Nova.patch update for support DVS/PG IDs for VIFs
Change-Id: I1691b6f8d3b173fd7044681943346b734770e8f7
This commit is contained in:
parent
299cccbd0c
commit
433eeac5a2
|
@ -1,11 +1,16 @@
|
||||||
diff --git a/nova/virt/vmwareapi/vif.py b/nova/virt/vmwareapi/vif.py
|
|
||||||
index 3d228d7..d513a74 100644
|
|
||||||
--- a/nova/virt/vmwareapi/vif.py
|
--- a/nova/virt/vmwareapi/vif.py
|
||||||
+++ b/nova/virt/vmwareapi/vif.py
|
+++ b/nova/virt/vmwareapi/vif.py
|
||||||
@@ -146,6 +146,10 @@
|
@@ -145,7 +145,16 @@
|
||||||
|
|
||||||
def get_network_ref(session, cluster, vif, is_neutron):
|
def get_network_ref(session, cluster, vif, is_neutron):
|
||||||
if is_neutron:
|
if is_neutron:
|
||||||
network_ref = _get_neutron_network(session, cluster, vif)
|
- network_ref = _get_neutron_network(session, cluster, vif)
|
||||||
|
+ try:
|
||||||
|
+ network_ref = {'dvsw': vif['details']['dvs_id'],
|
||||||
|
+ 'dvpg': vif['details']['pg_id'],
|
||||||
|
+ 'type': 'DistributedVirtualPortgroup'}
|
||||||
|
+ except KeyError:
|
||||||
|
+ network_ref = _get_neutron_network(session, cluster, vif)
|
||||||
+ try:
|
+ try:
|
||||||
+ network_ref['dvs_port_key'] = vif['details']['dvs_port_key']
|
+ network_ref['dvs_port_key'] = vif['details']['dvs_port_key']
|
||||||
+ except KeyError:
|
+ except KeyError:
|
||||||
|
@ -14,10 +19,9 @@ index 3d228d7..d513a74 100644
|
||||||
create_vlan = vif['network'].get_meta('should_create_vlan', False)
|
create_vlan = vif['network'].get_meta('should_create_vlan', False)
|
||||||
network_ref = ensure_vlan_bridge(session, vif, cluster=cluster,
|
network_ref = ensure_vlan_bridge(session, vif, cluster=cluster,
|
||||||
diff --git a/nova/virt/vmwareapi/vm_util.py b/nova/virt/vmwareapi/vm_util.py
|
diff --git a/nova/virt/vmwareapi/vm_util.py b/nova/virt/vmwareapi/vm_util.py
|
||||||
index bbf2835..be68010 100644
|
|
||||||
--- a/nova/virt/vmwareapi/vm_util.py
|
--- a/nova/virt/vmwareapi/vm_util.py
|
||||||
+++ b/nova/virt/vmwareapi/vm_util.py
|
+++ b/nova/virt/vmwareapi/vm_util.py
|
||||||
@@ -339,6 +339,10 @@ def _create_vif_spec(client_factory, vif_info):
|
@@ -453,6 +453,10 @@
|
||||||
'ns0:DistributedVirtualSwitchPortConnection')
|
'ns0:DistributedVirtualSwitchPortConnection')
|
||||||
portgroup.switchUuid = network_ref['dvsw']
|
portgroup.switchUuid = network_ref['dvsw']
|
||||||
portgroup.portgroupKey = network_ref['dvpg']
|
portgroup.portgroupKey = network_ref['dvpg']
|
||||||
|
|
Loading…
Reference in New Issue