diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-11-04 15:30:40 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-11-04 15:30:40 +0000 |
commit | f453291db56b1504c4e0c0e5df96061ed0950775 (patch) | |
tree | f53f67e94063d6594c7451dc3b7a286e9b3d143e /puppet | |
parent | b60e8f79a26564b567f7620727428da50d7815b5 (diff) | |
parent | 588430a7f278c9534f8a80cb5d3463867e11760b (diff) |
Merge "Cisco Nexus ML2 MD: Need unique key for server level keys in hieradata"
Diffstat (limited to 'puppet')
-rw-r--r-- | puppet/extraconfig/all_nodes/neutron-ml2-cisco-nexus-ucsm.yaml | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/puppet/extraconfig/all_nodes/neutron-ml2-cisco-nexus-ucsm.yaml b/puppet/extraconfig/all_nodes/neutron-ml2-cisco-nexus-ucsm.yaml index d08a1692..2413f5a4 100644 --- a/puppet/extraconfig/all_nodes/neutron-ml2-cisco-nexus-ucsm.yaml +++ b/puppet/extraconfig/all_nodes/neutron-ml2-cisco-nexus-ucsm.yaml @@ -265,10 +265,14 @@ resources: for (mac,swport) in nexus[nexus_switch]['servers'].iteritems(): lmac=mac.lower() if lmac in mac2host: - if mac2host[lmac] in nexus_cp[nexus_switch]['servers']: - nexus_cp[nexus_switch]['servers'][mac2host[lmac]]['ports'] += ',' + swport['ports'] + hostname = mac2host[lmac] + # for puppet we need a unique title even at the 2nd key level + serv_key = nexus_switch + "::" + hostname + if serv_key in nexus_cp[nexus_switch]['servers']: + nexus_cp[nexus_switch]['servers'][serv_key]['ports'] += ',' + swport['ports'] else: - nexus_cp[nexus_switch]['servers'][mac2host[lmac]] = swport + nexus_cp[nexus_switch]['servers'][serv_key] = swport + nexus_cp[nexus_switch]['servers'][serv_key]['hostname'] = hostname del nexus_cp[nexus_switch]['servers'][mac] # Note this echo means you can view the data via heat deployment-show print json.dumps(nexus_cp) |