Browse Source

Nova.patch update for support DVS/PG IDs for VIFs

Change-Id: I1691b6f8d3b173fd7044681943346b734770e8f7
Vyacheslav Tabolin 2 years ago
parent
commit
433eeac5a2
1 changed files with 10 additions and 6 deletions
  1. 10
    6
      deployment_scripts/puppet/modules/vmware_dvs/files/nova.patch

+ 10
- 6
deployment_scripts/puppet/modules/vmware_dvs/files/nova.patch View File

@@ -1,11 +1,16 @@
1
-diff --git a/nova/virt/vmwareapi/vif.py b/nova/virt/vmwareapi/vif.py
2
-index 3d228d7..d513a74 100644
3 1
 --- a/nova/virt/vmwareapi/vif.py
4 2
 +++ b/nova/virt/vmwareapi/vif.py
5
-@@ -146,6 +146,10 @@
3
+@@ -145,7 +145,16 @@
4
+ 
6 5
  def get_network_ref(session, cluster, vif, is_neutron):
7 6
      if is_neutron:
8
-         network_ref = _get_neutron_network(session, cluster, vif)
7
+-        network_ref = _get_neutron_network(session, cluster, vif)
8
++        try:
9
++            network_ref = {'dvsw': vif['details']['dvs_id'],
10
++                           'dvpg': vif['details']['pg_id'],
11
++                           'type': 'DistributedVirtualPortgroup'}
12
++        except KeyError:
13
++            network_ref = _get_neutron_network(session, cluster, vif)
9 14
 +        try:
10 15
 +            network_ref['dvs_port_key'] = vif['details']['dvs_port_key']
11 16
 +        except KeyError:
@@ -14,10 +19,9 @@ index 3d228d7..d513a74 100644
14 19
          create_vlan = vif['network'].get_meta('should_create_vlan', False)
15 20
          network_ref = ensure_vlan_bridge(session, vif, cluster=cluster,
16 21
 diff --git a/nova/virt/vmwareapi/vm_util.py b/nova/virt/vmwareapi/vm_util.py
17
-index bbf2835..be68010 100644
18 22
 --- a/nova/virt/vmwareapi/vm_util.py
19 23
 +++ b/nova/virt/vmwareapi/vm_util.py
20
-@@ -339,6 +339,10 @@ def _create_vif_spec(client_factory, vif_info):
24
+@@ -453,6 +453,10 @@
21 25
                      'ns0:DistributedVirtualSwitchPortConnection')
22 26
          portgroup.switchUuid = network_ref['dvsw']
23 27
          portgroup.portgroupKey = network_ref['dvpg']

Loading…
Cancel
Save