diff --git a/lower-constraints.txt b/lower-constraints.txt index 9ea5dbb9bd..77ecddecbb 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -36,7 +36,7 @@ prettytable==0.7.2 psycopg2==2.7 PyMySQL==0.7.6 pylint==1.7.1 -python-openstackclient==4.0.0 +python-openstackclient==5.3.0 reno==2.5.0 requests==2.14.2 six==1.11.0 diff --git a/requirements.txt b/requirements.txt index 6a2ed7a5b9..f3c91808a8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,7 +14,7 @@ stevedore>=1.20.0 # Apache-2.0 neutron-lib>=2.0.0 # Apache-2.0 osc-lib>=1.14.0 # Apache-2.0 octavia-lib>=1.3.1 # Apache-2.0 -python-openstackclient>=4.0.0 # Apache-2.0 +python-openstackclient>=5.3.0 # Apache-2.0 oslo.concurrency>=3.26.0 # Apache-2.0 oslo.context>=2.19.2 # Apache-2.0 oslo.config>=5.2.0 # Apache-2.0 diff --git a/vmware_nsx/osc/v2/security_group.py b/vmware_nsx/osc/v2/security_group.py index f720c0bea3..a3ca443c4d 100644 --- a/vmware_nsx/osc/v2/security_group.py +++ b/vmware_nsx/osc/v2/security_group.py @@ -87,6 +87,10 @@ class NsxCreateSecurityGroup(security_group.CreateSecurityGroup): attrs = {} attrs['name'] = parsed_args.name attrs['description'] = self._get_description(parsed_args) + if parsed_args.stateful: + attrs['stateful'] = True + if parsed_args.stateless: + attrs['stateful'] = False if parsed_args.project is not None: identity_client = self.app.client_manager.identity project_id = identity_common.find_project( @@ -136,6 +140,10 @@ class NsxSetSecurityGroup(security_group.SetSecurityGroup): attrs['name'] = parsed_args.name if parsed_args.description is not None: attrs['description'] = parsed_args.description + if parsed_args.stateful: + attrs['stateful'] = True + if parsed_args.stateless: + attrs['stateful'] = False # add the plugin attributes attrs = _get_plugin_attrs(attrs, parsed_args, self.app.client_manager) diff --git a/vmware_nsx/plugins/common_v3/plugin.py b/vmware_nsx/plugins/common_v3/plugin.py index 060042f28a..98451603bb 100644 --- a/vmware_nsx/plugins/common_v3/plugin.py +++ b/vmware_nsx/plugins/common_v3/plugin.py @@ -32,7 +32,6 @@ from neutron.db import agents_db from neutron.db import agentschedulers_db from neutron.db import allowedaddresspairs_db as addr_pair_db from neutron.db.availability_zone import router as router_az_db -from neutron.db import db_base_plugin_v2 from neutron.db import dns_db from neutron.db import external_net_db from neutron.db import extradhcpopt_db @@ -2478,8 +2477,7 @@ class NsxPluginV3Base(agentschedulers_db.AZDhcpAgentSchedulerDbMixin, def _has_active_port(self, context, network_id): ports_in_use = context.session.query(models_v2.Port).filter_by( network_id=network_id).all() - return not all([p.device_owner in - db_base_plugin_v2.AUTO_DELETE_PORT_OWNERS + return not all([p.device_owner == constants.DEVICE_OWNER_DHCP for p in ports_in_use]) if ports_in_use else False def _delete_network_disable_dhcp(self, context, network_id):