Merge "Customize "supported_pci_vendor_devs" for SR-IOV"
[apex-tripleo-heat-templates.git] / puppet / extraconfig / all_nodes / neutron-ml2-cisco-nexus-ucsm.yaml
index 277b074..e924fc8 100644 (file)
@@ -65,11 +65,18 @@ parameters:
     default: false
   NetworkNexusSwitchHeartbeatTime:
     type: number
-    description: Time interval to check the state of the Nexus device
+    description: >
+      Time interval to check the state of the Nexus device. The units of this
+      object are seconds.  Setting this object to a value of 0 disables the
+      replay feature.
     default: 0
   NetworkNexusSwitchReplayCount:
     type: number
-    description: Number of times to attempt config replay
+    description: >
+      This configuration item is OBSOLETE.  The Nexus driver replay behavior
+      is to continue to attempt to connect to the down Nexus device with a
+      period equal to the heartbeat time interval.  This was previously the
+      Number of times to attempt config replay.
     default: 3
   NetworkNexusProviderVlanAutoCreate:
     type: boolean
@@ -131,6 +138,7 @@ resources:
   NetworkCiscoDeployment:
     type: OS::Heat::StructuredDeployments
     properties:
+      name: NetworkCiscoDeployment
       config: {get_resource: NetworkCiscoConfig}
       servers:  {get_param: controller_servers}
       input_values:
@@ -163,12 +171,22 @@ resources:
       config: |
         #!/bin/sh
         MACS=$(ifconfig  | grep ether | awk '{print $2}' | tr "\n" " ")
-        HOSTNAME=$(hostname -f)
-        echo "$HOSTNAME $MACS"
+        HOST_FQDN=$(hostname -f)
+        if [ -z "$HOST_FQDN" ]; then
+          HOSTNAME=$(hostname -s)
+          # hardcoding the domain name to avoid DNS lookup dependency
+          # same type of hardcoding appears elsewhere
+          # --ie. controller-puppet.yaml
+          # FIXME_HOSTNAME_DOMAIN_HARDCODE
+          echo "$HOSTNAME.localdomain $MACS"
+        else
+          echo "$HOST_FQDN $MACS"
+        fi
 
   CollectMacDeploymentsController:
     type: OS::Heat::SoftwareDeployments
     properties:
+      name: CollectMacDeploymentsController
       servers:  {get_param: controller_servers}
       config: {get_resource: CollectMacConfig}
       actions: ['CREATE'] # Only do this on CREATE
@@ -176,6 +194,7 @@ resources:
   CollectMacDeploymentsCompute:
     type: OS::Heat::SoftwareDeployments
     properties:
+      name: CollectMacDeploymentsCompute
       servers:  {get_param: compute_servers}
       config: {get_resource: CollectMacConfig}
       actions: ['CREATE'] # Only do this on CREATE
@@ -183,6 +202,7 @@ resources:
   CollectMacDeploymentsBlockStorage:
     type: OS::Heat::SoftwareDeployments
     properties:
+      name: CollectMacDeploymentsBlockStorage
       servers:  {get_param: blockstorage_servers}
       config: {get_resource: CollectMacConfig}
       actions: ['CREATE'] # Only do this on CREATE
@@ -190,6 +210,7 @@ resources:
   CollectMacDeploymentsObjectStorage:
     type: OS::Heat::SoftwareDeployments
     properties:
+      name: CollectMacDeploymentsObjectStorage
       servers:  {get_param: objectstorage_servers}
       config: {get_resource: CollectMacConfig}
       actions: ['CREATE'] # Only do this on CREATE
@@ -197,6 +218,7 @@ resources:
   CollectMacDeploymentsCephStorage:
     type: OS::Heat::SoftwareDeployments
     properties:
+      name: CollectMacDeploymentsCephStorage
       servers:  {get_param: cephstorage_servers}
       config: {get_resource: CollectMacConfig}
       actions: ['CREATE'] # Only do this on CREATE
@@ -256,10 +278,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)
@@ -267,6 +293,7 @@ resources:
   MappingToNexusDeploymentsController:
     type: OS::Heat::SoftwareDeployment
     properties:
+      name: MappingToNexusDeploymentsController
       server:  {get_param: [controller_servers, '0']}
       config: {get_resource: MappingToNexusConfig}
       input_values:
@@ -310,16 +337,9 @@ resources:
     type: OS::Heat::SoftwareDeployment
     depends_on: MappingToNexusDeploymentsController
     properties:
+      name: MappingToUCSMDeploymentsController
       server:  {get_param: [controller_servers, '0']}
       config: {get_resource: MappingToUCSMConfig}
       input_values:
         ucsm_config: {get_param: NetworkUCSMHostList}
       actions: ['CREATE'] # Only do this on CREATE
-
-outputs:
-  # The Deployment applying the hieradata outputs the derived config-id, which
-  # changes if the input_values change, so if the stdouts from
-  # NetworkCiscoDeployment change, we need to reapply puppet (which will
-  # happen if we return a different config_identifier)
-  config_identifier:
-    value: {get_attr: [NetworkCiscoDeployment, deploy_stdouts]}