Fix deployment of EPA VMs to use single virtual socket instead of 1 socket per core
[osm/RO.git] / osm_ro / vimconn_openstack.py
index 1b1c6e5..f5f213b 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
@@ -882,6 +884,7 @@ class vimconnector(vimconn.vimconnector):
                                 if 'memory' in numa:
                                     ram = numa['memory']*1024
                                 #See for reference: https://specs.openstack.org/openstack/nova-specs/specs/mitaka/implemented/virt-driver-cpu-thread-pinning.html
+                                extra_specs["hw:cpu_sockets"] = 1
                                 if 'paired-threads' in numa:
                                     vcpus = numa['paired-threads']*2
                                     #cpu_thread_policy "require" implies that the compute node must have an STM architecture