Rename NsxvSectionMapping class
Rename class NsxvSectionMapping to NsxvSecurityGroupSectionMapping, to satisfy neutron model review feedback Also update test-requirements to refer to neutron repo Change-Id: I7e4ca7985f4dd2c755a026058690b5767fe06b76
This commit is contained in:
parent
be7564875e
commit
15525d7413
@ -74,6 +74,9 @@
|
|||||||
"add_router_interface": "rule:admin_or_owner",
|
"add_router_interface": "rule:admin_or_owner",
|
||||||
"remove_router_interface": "rule:admin_or_owner",
|
"remove_router_interface": "rule:admin_or_owner",
|
||||||
|
|
||||||
|
"create_router:external_gateway_info:external_fixed_ips": "rule:admin_only",
|
||||||
|
"update_router:external_gateway_info:external_fixed_ips": "rule:admin_only",
|
||||||
|
|
||||||
"create_firewall": "",
|
"create_firewall": "",
|
||||||
"get_firewall": "rule:admin_or_owner",
|
"get_firewall": "rule:admin_or_owner",
|
||||||
"create_firewall:shared": "rule:admin_only",
|
"create_firewall:shared": "rule:admin_only",
|
||||||
@ -112,6 +115,7 @@
|
|||||||
"get_loadbalancer-pools": "rule:admin_only",
|
"get_loadbalancer-pools": "rule:admin_only",
|
||||||
|
|
||||||
"create_floatingip": "rule:regular_user",
|
"create_floatingip": "rule:regular_user",
|
||||||
|
"create_floatingip:floating_ip_address": "rule:admin_only",
|
||||||
"update_floatingip": "rule:admin_or_owner",
|
"update_floatingip": "rule:admin_or_owner",
|
||||||
"delete_floatingip": "rule:admin_or_owner",
|
"delete_floatingip": "rule:admin_or_owner",
|
||||||
"get_floatingip": "rule:admin_or_owner",
|
"get_floatingip": "rule:admin_or_owner",
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
# of appearance. Changing the order has an impact on the overall integration
|
# of appearance. Changing the order has an impact on the overall integration
|
||||||
# process, which may cause wedges in the gate later.
|
# process, which may cause wedges in the gate later.
|
||||||
|
|
||||||
# Temporary, till https://review.openstack.org/#/c/143949/ is merged
|
-e git://git.openstack.org/openstack/neutron.git#egg=neutron
|
||||||
-e git://github.com/gkotton/neutron.git#egg=neutron
|
|
||||||
|
|
||||||
hacking>=0.9.2,<0.10
|
hacking>=0.9.2,<0.10
|
||||||
|
|
||||||
|
@ -296,12 +296,10 @@ def delete_nsxv_internal_edge(session, ext_ip_address):
|
|||||||
filter_by(ext_ip_address=ext_ip_address).delete())
|
filter_by(ext_ip_address=ext_ip_address).delete())
|
||||||
|
|
||||||
|
|
||||||
def add_neutron_nsx_section_mapping(session, neutron_id, ip_section_id,
|
def add_neutron_nsx_section_mapping(session, neutron_id, ip_section_id):
|
||||||
mac_section_id=None):
|
|
||||||
with session.begin(subtransactions=True):
|
with session.begin(subtransactions=True):
|
||||||
mapping = nsxv_models.NsxvSectionMapping(
|
mapping = nsxv_models.NsxvSecurityGroupSectionMapping(
|
||||||
neutron_id=neutron_id, ip_section_id=ip_section_id,
|
neutron_id=neutron_id, ip_section_id=ip_section_id)
|
||||||
mac_section_id=mac_section_id)
|
|
||||||
session.add(mapping)
|
session.add(mapping)
|
||||||
return mapping
|
return mapping
|
||||||
|
|
||||||
@ -324,7 +322,7 @@ def add_neutron_nsx_port_vnic_mapping(session, neutron_id, nsx_id):
|
|||||||
|
|
||||||
def get_nsx_section(session, neutron_id):
|
def get_nsx_section(session, neutron_id):
|
||||||
try:
|
try:
|
||||||
mapping = (session.query(nsxv_models.NsxvSectionMapping).
|
mapping = (session.query(nsxv_models.NsxvSecurityGroupSectionMapping).
|
||||||
filter_by(neutron_id=neutron_id).
|
filter_by(neutron_id=neutron_id).
|
||||||
one())
|
one())
|
||||||
return mapping
|
return mapping
|
||||||
|
@ -1558,7 +1558,7 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin,
|
|||||||
if type == 'ip':
|
if type == 'ip':
|
||||||
return mapping['ip_section_id']
|
return mapping['ip_section_id']
|
||||||
else:
|
else:
|
||||||
return mapping['mac_section_id']
|
None
|
||||||
|
|
||||||
def create_security_group(self, context, security_group,
|
def create_security_group(self, context, security_group,
|
||||||
default_sg=False):
|
default_sg=False):
|
||||||
@ -1658,7 +1658,6 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin,
|
|||||||
|
|
||||||
# Delete nsx rule sections
|
# Delete nsx rule sections
|
||||||
self._delete_section(section_mapping['ip_section_id'])
|
self._delete_section(section_mapping['ip_section_id'])
|
||||||
self._delete_section(section_mapping['mac_section_id'])
|
|
||||||
|
|
||||||
# Delete nsx security group
|
# Delete nsx security group
|
||||||
self._delete_security_group(nsx_sg_id)
|
self._delete_security_group(nsx_sg_id)
|
||||||
|
Loading…
Reference in New Issue
Block a user