summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorNarinder Gupta <narinder.gupta@canonical.com>2016-05-17 17:45:53 -0500
committerNarinder Gupta <narinder.gupta@canonical.com>2016-05-17 17:48:16 -0500
commite957fbd5c8afdff83939980c3a32a8f896df41a1 (patch)
tree6361b8ffdd9b0bdaf8d843de92173bdd836ced2c /ci
parent02af9879d42a4eebc1d7439fe42caf49e6cd1af0 (diff)
need to mofified further for support.
Change-Id: I2348e3b67b2a0bd4d0fc94a86cb7b60ce07a914a Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
Diffstat (limited to 'ci')
-rwxr-xr-xci/02-maasdeploy.sh4
-rw-r--r--ci/deploy.py30
-rwxr-xr-xci/maas/deployment.yaml28
3 files changed, 20 insertions, 42 deletions
diff --git a/ci/02-maasdeploy.sh b/ci/02-maasdeploy.sh
index 3a2f6817..d5691543 100755
--- a/ci/02-maasdeploy.sh
+++ b/ci/02-maasdeploy.sh
@@ -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 ./
diff --git a/ci/deploy.py b/ci/deploy.py
index c1a714d8..a4e23031 100644
--- a/ci/deploy.py
+++ b/ci/deploy.py
@@ -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)
-
diff --git a/ci/maas/deployment.yaml b/ci/maas/deployment.yaml
index 82f49b81..87eb9e25 100755
--- a/ci/maas/deployment.yaml
+++ b/ci/maas/deployment.yaml
@@ -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