need to mofified further for support. 71/14271/1
authorNarinder Gupta <narinder.gupta@canonical.com>
Tue, 17 May 2016 22:45:53 +0000 (17:45 -0500)
committerNarinder Gupta <narinder.gupta@canonical.com>
Tue, 17 May 2016 22:48:16 +0000 (17:48 -0500)
Change-Id: I2348e3b67b2a0bd4d0fc94a86cb7b60ce07a914a
Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
ci/02-maasdeploy.sh
ci/deploy.py
ci/maas/deployment.yaml
labconfig/intel/pod6/labconfig.yaml

index 3a2f681..d569154 100755 (executable)
@@ -9,7 +9,9 @@ cp ../labconfig/intel/pod6/labconfig.yaml ./
 
 case "$1" in
     'intelpod5' )
-        cp maas/intel/pod5/deployment.yaml ./deployment.yaml
+        cp ../labconfig/intel/pod5/labconfig.yaml ./
+        #to be removed later once converted for all labs.
+        python deploy.py
         ;;
     'intelpod6' )
         cp ../labconfig/intel/pod6/labconfig.yaml ./
index c1a714d..a4e2303 100644 (file)
@@ -129,6 +129,9 @@ while c < len(labcfg["labconfig"]["nodes"]):
     # setup value of name and tags accordigly
     value = getFromDict(labcfg, ["labconfig","nodes",c, "type"])
     namevalue = "node" + str(c+1) + "-" + value 
+    if c > 0:
+        opnfvcfg["demo-maas"]["maas"]["nodes"].append({})
+
     opnfvcfg["demo-maas"]["maas"]["nodes"][c]["name"] = namevalue
     opnfvcfg["demo-maas"]["maas"]["nodes"][c]["tags"] = value
 
@@ -141,21 +144,19 @@ while c < len(labcfg["labconfig"]["nodes"]):
     # setup mac_addresses
     value = getFromDict(labcfg, ["labconfig","nodes",c, "pxe_mac_address"])
     opnfvcfg["demo-maas"]["maas"]["nodes"][c]["mac_addresses"] = value
+    valuetype = getFromDict(labcfg, ["labconfig","nodes",c, "power", "type"])
 
-    value = getFromDict(labcfg, ["labconfig","nodes",c, "power", "type"])
-    opnfvcfg["demo-maas"]["maas"]["nodes"][c]["power"]["type"] = value
-    if value == "wakeonlan":
-        value = getFromDict(labcfg, ["labconfig","nodes",c, "power", "mac_address"])
-        opnfvcfg["demo-maas"]["maas"]["nodes"][c]["power"]["mac_address"] = value
-
-    if value == "ipmi":
-        value = getFromDict(labcfg, ["labconfig","nodes",c, "power", "address"])
-        opnfvcfg["demo-maas"]["maas"]["nodes"][c]["power"]["address"] = value
-        value = getFromDict(labcfg, ["labconfig","nodes",c, "power", "user"])
-        opnfvcfg["demo-maas"]["maas"]["nodes"][c]["power"]["user"] = value
-        value = getFromDict(labcfg, ["labconfig","nodes",c, "power", "pass"])
-        opnfvcfg["demo-maas"]["maas"]["nodes"][c]["power"]["pass"] = value
-        opnfvcfg["demo-maas"]["maas"]["nodes"][c]["power"]["driver"] = "LAN_2_0"
+    if valuetype == "wakeonlan":
+        macvalue = getFromDict(labcfg, ["labconfig","nodes",c, "power", "mac_address"])
+        power={"type": "ether_wake", "mac_address": macvalue}
+        opnfvcfg["demo-maas"]["maas"]["nodes"][c]["power"] = power
+    if valuetype == "ipmi":
+        valueaddr = getFromDict(labcfg, ["labconfig","nodes",c, "power", "address"])
+        valueuser = getFromDict(labcfg, ["labconfig","nodes",c, "power", "user"])
+        valuepass = getFromDict(labcfg, ["labconfig","nodes",c, "power", "pass"])
+        valuedriver = "LAN_2_0"
+        power={"type": valuetype, "address": valueaddr,"user": valueuser, "pass": valuepass, "driver": valuedriver}
+        opnfvcfg["demo-maas"]["maas"]["nodes"][c]["power"] = power
 
 
     c=c+1
@@ -163,4 +164,3 @@ while c < len(labcfg["labconfig"]["nodes"]):
 with open('deployment.yaml', 'w') as opnfvf:
    yaml.dump(opnfvcfg, opnfvf, default_flow_style=False)
 
-
index 82f49b8..87eb9e2 100755 (executable)
@@ -29,7 +29,7 @@ demo-maas:
     - bridge=brAdm,model=virtio
     ip_address: 
     memory: 4096
-    name: opnfv-intelpod6
+    name: 
     network_config: 
     node_group_ifaces:
     - broadcast_ip: 
@@ -54,31 +54,7 @@ demo-maas:
         high: 
         low: 
     nodes:
-    - architecture: 
-      mac_addresses:
-      - 
-      power:
-        address: 
-    - architecture: 
-      mac_addresses:
-      - 
-      power:
-        address: 
-    - architecture: 
-      mac_addresses:
-      - 
-      power:
-        address: 
-    - architecture: 
-      mac_addresses:
-      - 
-      power:
-        address: 
-    - architecture: 
-      mac_addresses:
-      - 
-      power:
-        address: 
+    - name: 
     password: ubuntu
     pool: default
     release: trusty
index 52775d7..a1cdd73 100644 (file)
@@ -78,4 +78,4 @@ opnfv:
           disk: sda,sdb
     floating-ip-range: 
     feature: odl_l2 
-    ext-port: eth0
+    ext-port: eth5