Skip to content

Commit

Permalink
Do not return no-rule SG to neutron
Browse files Browse the repository at this point in the history
When neutron creates a port with no SG specified, we assign an internal SG
called '__no_rule__'. This should not be returned to neutron when the port is
read.

Change-Id: I91125f46db227b5f10acc26fd74e4556476431ee
Closes-Bug: 1476503
(cherry picked from commit d11ab28)
(cherry picked from commit 37b5769)
  • Loading branch information
Sachin Bansal authored and Sachin Bansal committed Jul 6, 2016
1 parent c1e141f commit 89142db
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/config/vnc_openstack/vnc_openstack/neutron_plugin_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -2006,10 +2006,9 @@ def _port_vnc_to_neutron(self, port_obj, port_req_memo=None):

port_q_dict['fixed_ips'].append(ip_q_dict)

port_q_dict['security_groups'] = []
sg_refs = port_obj.get_security_group_refs()
for sg_ref in sg_refs or []:
port_q_dict['security_groups'].append(sg_ref['uuid'])
sg_refs = port_obj.get_security_group_refs() or []
port_q_dict['security_groups'] = [ref['uuid'] for ref in sg_refs
if ref['to'] != SG_NO_RULE_FQ_NAME]

port_q_dict['admin_state_up'] = port_obj.get_id_perms().enable

Expand Down

0 comments on commit 89142db

Please sign in to comment.