Disable port security at network creation (openstack) 45/7445/2
authoranwars <anwars@vmware.com>
Mon, 6 May 2019 05:53:07 +0000 (11:23 +0530)
committertierno <alfonso.tiernosepulveda@telefonica.com>
Fri, 10 May 2019 12:37:53 +0000 (13:37 +0100)
Feature : https://osm.etsi.org/gerrit/#/c/7326

Introducing a new VIM config parameter for openstack VIM,
disable_network_port_security

This will allow to disable the port security while creating networks in openstack

To be used for VIM which has port security extension but do not support port security
(Network creation fails with error that Port security is not supported)

Change-Id: I3822f0d76450cceec50fc757ad273ab11f414d13
Signed-off-by: anwars <anwars@vmware.com>
osm_ro/vimconn_openstack.py

index 3515ef6..b7bcda2 100644 (file)
@@ -571,6 +571,8 @@ class vimconnector(vimconn.vimconnector):
                         network_dict["provider:segmentation_id"] = self._generate_vlanID()
 
             network_dict["shared"] = shared
+            if self.config.get("disable_network_port_security"):
+                network_dict["port_security_enabled"] = False
             new_net = self.neutron.create_network({'network':network_dict})
             # print new_net
             # create subnetwork, even if there is no profile