diff options
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/02-maasdeploy.sh | 4 | ||||
-rw-r--r-- | ci/deploy.py | 30 | ||||
-rwxr-xr-x | ci/maas/deployment.yaml | 28 |
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 |