yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #87320
[Bug 1945747] Re: GET security group rule is missing description attribute
*** This bug is a duplicate of bug 1904188 ***
https://bugs.launchpad.net/bugs/1904188
I am marking this as duplicate. Let me know if you think differently.
Also don't hesitate to propose a backport to stable/ussuri.
** This bug has been marked a duplicate of bug 1904188
Include standard attributes ID in OVO dictionaries to improve the OVN revision numbers operation
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1945747
Title:
GET security group rule is missing description attribute
Status in neutron:
New
Bug description:
The description attribute is missed attribute in
_make_security_group_rule_dict
Create sec group rule with desc
stack@bionic-template:~/devstack$ openstack security group rule create --description "test rule" --remote-ip 0.0.0.0/0 --ingress ff57f76f-93a0-4bf3-b538-c88df40fdc40
+-------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| created_at | 2021-10-01T06:35:50Z |
| description | test rule |
| direction | ingress |
| ether_type | IPv4 |
| id | 389eb45e-58ac-471c-b966-a3c8784009f7 |
| location | cloud='', project.domain_id='default', project.domain_name=, project.id='f2527eb734c745eca32b1dfbd9107563', project.name='admin', region_name='RegionOne', zone= |
| name | None |
| port_range_max | None |
| port_range_min | None |
| project_id | f2527eb734c745eca32b1dfbd9107563 |
| protocol | None |
| remote_group_id | None |
| remote_ip_prefix | None |
| revision_number | 0 |
| security_group_id | ff57f76f-93a0-4bf3-b538-c88df40fdc40 |
| tags | [] |
| updated_at | 2021-10-01T06:35:50Z |
+-------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Example get (no description)
RESP BODY: {"security_group_rule": {"id":
"389eb45e-58ac-471c-b966-a3c8784009f7", "tenant_id":
"f2527eb734c745eca32b1dfbd9107563", "security_group_id":
"ff57f76f-93a0-4bf3-b538-c88df40fdc40", "ethertype": "IPv4",
"direction": "ingress", "protocol": null, "port_range_min": null,
"port_range_max": null, "remote_ip_prefix": "0.0.0.0/0",
"remote_group_id": null, "local_ip_prefix": null, "created_at":
"2021-10-01T06:35:50Z", "updated_at": "2021-10-01T06:35:50Z",
"revision_number": 0, "project_id":
"f2527eb734c745eca32b1dfbd9107563"}}
Potential fix (patch applies to stable/ussuri, not master)
diff --git a/neutron/db/securitygroups_db.py b/neutron/db/securitygroups_db.py
index 28238358ae..0c848bbe38 100644
--- a/neutron/db/securitygroups_db.py
+++ b/neutron/db/securitygroups_db.py
@@ -655,6 +655,7 @@ class SecurityGroupDbMixin(ext_sg.SecurityGroupPluginBase,
def _make_security_group_rule_dict(self, security_group_rule, fields=None):
res = {'id': security_group_rule['id'],
+ 'description': security_group_rule['description'],
'tenant_id': security_group_rule['tenant_id'],
'security_group_id': security_group_rule['security_group_id'],
'ethertype': security_group_rule['ethertype'],
After patch description attribute is present
RESP BODY: {"security_group_rule": {"id":
"389eb45e-58ac-471c-b966-a3c8784009f7", "description": "test rule",
"tenant_id": "f2527eb734c745eca32b1dfbd9107563", "security_group_id":
"ff57f76f-93a0-4bf3-b538-c88df40fdc40", "ethertype": "IPv4",
"direction": "ingress", "protocol": null, "port_range_min": null,
"port_range_max": null, "remote_ip_prefix": "0.0.0.0/0",
"remote_group_id": null, "local_ip_prefix": null, "created_at":
"2021-10-01T06:35:50Z", "updated_at": "2021-10-01T06:35:50Z",
"revision_number": 0, "project_id":
"f2527eb734c745eca32b1dfbd9107563"}}
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1945747/+subscriptions
References