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:
Kobi Samoray 2014-12-31 17:00:47 +02:00
parent be7564875e
commit 15525d7413
4 changed files with 10 additions and 10 deletions

View File

@ -74,6 +74,9 @@
"add_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": "",
"get_firewall": "rule:admin_or_owner",
"create_firewall:shared": "rule:admin_only",
@ -112,6 +115,7 @@
"get_loadbalancer-pools": "rule:admin_only",
"create_floatingip": "rule:regular_user",
"create_floatingip:floating_ip_address": "rule:admin_only",
"update_floatingip": "rule:admin_or_owner",
"delete_floatingip": "rule:admin_or_owner",
"get_floatingip": "rule:admin_or_owner",

View File

@ -2,8 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
# Temporary, till https://review.openstack.org/#/c/143949/ is merged
-e git://github.com/gkotton/neutron.git#egg=neutron
-e git://git.openstack.org/openstack/neutron.git#egg=neutron
hacking>=0.9.2,<0.10

View File

@ -296,12 +296,10 @@ def delete_nsxv_internal_edge(session, ext_ip_address):
filter_by(ext_ip_address=ext_ip_address).delete())
def add_neutron_nsx_section_mapping(session, neutron_id, ip_section_id,
mac_section_id=None):
def add_neutron_nsx_section_mapping(session, neutron_id, ip_section_id):
with session.begin(subtransactions=True):
mapping = nsxv_models.NsxvSectionMapping(
neutron_id=neutron_id, ip_section_id=ip_section_id,
mac_section_id=mac_section_id)
mapping = nsxv_models.NsxvSecurityGroupSectionMapping(
neutron_id=neutron_id, ip_section_id=ip_section_id)
session.add(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):
try:
mapping = (session.query(nsxv_models.NsxvSectionMapping).
mapping = (session.query(nsxv_models.NsxvSecurityGroupSectionMapping).
filter_by(neutron_id=neutron_id).
one())
return mapping

View File

@ -1558,7 +1558,7 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin,
if type == 'ip':
return mapping['ip_section_id']
else:
return mapping['mac_section_id']
None
def create_security_group(self, context, security_group,
default_sg=False):
@ -1658,7 +1658,6 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin,
# Delete nsx rule sections
self._delete_section(section_mapping['ip_section_id'])
self._delete_section(section_mapping['mac_section_id'])
# Delete nsx security group
self._delete_security_group(nsx_sg_id)