Add port name for mapping
When creating cascading port in nova proxy, add the 'name' field which contains a cascading network_name and port uuid. Change-Id: I40418f24f4f4813b90add46fe11457819c2bf6ec
This commit is contained in:
parent
954bf16900
commit
429e12ea34
|
@ -1261,6 +1261,7 @@ class ComputeManager(manager.Manager):
|
|||
physical_ports = []
|
||||
for netObj in network_info:
|
||||
net_id = netObj['network']['id']
|
||||
net_name = netObj['network']['label']
|
||||
physical_net_id = None
|
||||
ovs_interface_mac = netObj['address']
|
||||
fixed_ips = []
|
||||
|
@ -1277,9 +1278,12 @@ class ComputeManager(manager.Manager):
|
|||
fixed_ips.append(
|
||||
{'ip_address': netObj['network']['subnets'][0]['ips'][0]['address']}
|
||||
)
|
||||
csd_port_name = self._gen_csd_nets_name(net_name,
|
||||
netObj['ovs_interfaceid'])
|
||||
req_body = {'port':
|
||||
{'tenant_id': instance['project_id'],
|
||||
'admin_state_up': True,
|
||||
'name': csd_port_name,
|
||||
'network_id': physical_net_id,
|
||||
'mac_address': ovs_interface_mac,
|
||||
'fixed_ips': fixed_ips,
|
||||
|
|
Loading…
Reference in New Issue