Support new form of servers config for ML2 cisco nexus allnodes config.
authortiswanso <tiswanso@cisco.com>
Mon, 14 Sep 2015 19:46:29 +0000 (15:46 -0400)
committerSteven Hardy <shardy@redhat.com>
Thu, 17 Sep 2015 14:50:39 +0000 (15:50 +0100)
The puppet-neutron changes to remove the usage of ERB templates require
changing the format of the 'servers' hash/dictionary to include a key
for use with puppet's create_resources directly from hiera data.

Depends-On: I401371c9e5176de7ce19d4d4e878e9f2e69aab80

Change-Id: I950b7fb019dd8dd072592618b968a19df5c9c884

puppet/extraconfig/all_nodes/neutron-ml2-cisco-nexus-ucsm.yaml

index c873ef3..277b074 100644 (file)
@@ -257,8 +257,7 @@ resources:
             lmac=mac.lower()
             if lmac in mac2host:
               if mac2host[lmac] in nexus_cp[nexus_switch]['servers']:
-                cur_swports = nexus_cp[nexus_switch]['servers'][mac2host[lmac]]
-                nexus_cp[nexus_switch]['servers'][mac2host[lmac]] = cur_swports + ',' + swport
+                nexus_cp[nexus_switch]['servers'][mac2host[lmac]]['ports'] += ',' + swport['ports']
               else:
                 nexus_cp[nexus_switch]['servers'][mac2host[lmac]] = swport
             del nexus_cp[nexus_switch]['servers'][mac]