X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=yardstick%2Forchestrator%2Fheat.py;h=8c7b1e4291f43e8e75652740b74c071c68d1f18f;hb=4db701fdc4da663b0b61d9930777a2201b315f8f;hp=bf6593d456a82415cb8226b5a39c71a923a96ef9;hpb=72778951d6b8968f562fb8fefa02a57159ea1b83;p=yardstick.git diff --git a/yardstick/orchestrator/heat.py b/yardstick/orchestrator/heat.py index bf6593d45..8c7b1e429 100644 --- a/yardstick/orchestrator/heat.py +++ b/yardstick/orchestrator/heat.py @@ -265,7 +265,7 @@ name (i.e. %s).\ self.resources[name]['properties']['mountpoint'] = mountpoint def add_network(self, name, physical_network='physnet1', provider=None, - segmentation_id=None, port_security_enabled=None): + segmentation_id=None, port_security_enabled=None, network_type=None): """add to the template a Neutron Net""" log.debug("adding Neutron::Net '%s'", name) if provider is None: @@ -280,12 +280,14 @@ name (i.e. %s).\ 'type': 'OS::Neutron::ProviderNet', 'properties': { 'name': name, - 'network_type': 'vlan', + 'network_type': 'flat' if network_type is None else network_type, 'physical_network': physical_network, }, } if segmentation_id: self.resources[name]['properties']['segmentation_id'] = segmentation_id + if network_type is None: + self.resources[name]['properties']['network_type'] = 'vlan' # if port security is not defined then don't add to template: # some deployments don't have port security plugin installed if port_security_enabled is not None: @@ -316,7 +318,9 @@ name (i.e. %s).\ 'enable_dhcp': enable_dhcp, } } - if gateway_ip is not None: + if gateway_ip == 'null': + self.resources[name]['properties']['gateway_ip'] = None + elif gateway_ip is not None: self.resources[name]['properties']['gateway_ip'] = gateway_ip self._template['outputs'][name] = {