aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/compass_conf
diff options
context:
space:
mode:
authorHarry Huang <huangxiangyu5@huawei.com>2018-12-04 11:41:34 +0800
committerHarry Huang <huangxiangyu5@huawei.com>2019-02-01 17:24:50 +0800
commite29a4ea1b77bdb9e78e2fabac8a3029c4c2b61fc (patch)
tree9279936c6157e4877a6f9630ef6918ef248beaef /deploy/compass_conf
parent5999d29ded67ee2847e58fa559dd9da29e1bd150 (diff)
Adapt compass4nfv scripts to new compass-deck
JIRA: COMPASS-612 1. pass machine info through file 2. generate mac address in config_parse.py Change-Id: Iaaf0f2b1f4ab97e8200c8c046746168d991570e3 Signed-off-by: Harry Huang <huangxiangyu5@huawei.com>
Diffstat (limited to 'deploy/compass_conf')
-rwxr-xr-xdeploy/compass_conf/templates/cobbler/ubuntu-16.04.3-server-x86_64/system.tmpl56
1 files changed, 31 insertions, 25 deletions
diff --git a/deploy/compass_conf/templates/cobbler/ubuntu-16.04.3-server-x86_64/system.tmpl b/deploy/compass_conf/templates/cobbler/ubuntu-16.04.3-server-x86_64/system.tmpl
index cfcc883e..366cbc13 100755
--- a/deploy/compass_conf/templates/cobbler/ubuntu-16.04.3-server-x86_64/system.tmpl
+++ b/deploy/compass_conf/templates/cobbler/ubuntu-16.04.3-server-x86_64/system.tmpl
@@ -11,36 +11,38 @@
"proxy": "$getVar('http_proxy', '')",
"modify_interface":
#set networks = $networks
+ #set mac = $mac
#set rekeyed = {}
#set promic_nic = ""
- #for $nic, $val in $networks.iteritems():
- #set ip_key = '-'.join(('ipaddress', $nic))
- #set netmask_key = '-'.join(('netmask', $nic))
- #set mgmt_key = '-'.join(('management', $nic))
- #set static_key = '-'.join(('static', $nic))
- #set $rekeyed[$ip_key] = $val.ip
- #set $rekeyed[$netmask_key] = $val.netmask
- #set $rekeyed[$static_key] = True
+ #for $nic in $mac
+ #set mac_key = '-'.join(('macaddress', $nic))
+ #set $rekeyed[$mac_key] = $mac[$nic]
+ #if $nic in $networks
+ #set val = $networks[$nic]
+ #set ip_key = '-'.join(('ipaddress', $nic))
+ #set netmask_key = '-'.join(('netmask', $nic))
+ #set mgmt_key = '-'.join(('management', $nic))
+ #set static_key = '-'.join(('static', $nic))
+ #set $rekeyed[$ip_key] = $val.ip
+ #set $rekeyed[$netmask_key] = $val.netmask
+ #set $rekeyed[$static_key] = True
- #set dns_key = '-'.join(('dnsname', $nic))
- #if $val.is_mgmt
- #set $rekeyed[$dns_key] = $dns
- #else
- #if '.' in $dns
- #set $dns_name, $dns_domain = $dns.split('.', 1)
- #set $dns_nic = '%s-%s.%s' % ($dns_name, $nic, $dns_domain)
+ #set dns_key = '-'.join(('dnsname', $nic))
+ #if $val.is_mgmt
+ #set $rekeyed[$dns_key] = $dns
#else
- #set $dns_nic = '%s-%s' % ($dns, $nic)
+ #if '.' in $dns
+ #set $dns_name, $dns_domain = $dns.split('.', 1)
+ #set $dns_nic = '%s-%s.%s' % ($dns_name, $nic, $dns_domain)
+ #else
+ #set $dns_nic = '%s-%s' % ($dns, $nic)
+ #end if
+ #set $rekeyed[$dns_key] = $dns_nic
#end if
- #set $rekeyed[$dns_key] = $dns_nic
- #end if
- #if $val.is_promiscuous:
- #set promic_nic = $nic
- #end if
- #if $val.is_mgmt:
- #set mac_key = '-'.join(('macaddress', $nic))
- #set $rekeyed[$mac_key] = $mac
+ #if $val.is_promiscuous
+ #set promic_nic = $nic
+ #end if
#end if
#end for
#set nic_info = json.dumps($rekeyed, encoding='utf-8')
@@ -71,5 +73,9 @@
"ignore_proxy": "$no_proxy",
"local_repo": "$getVar('local_repo', '')",
"disk_num": "1"
- }
+ },
+ "power_address": "$power_manage.ip",
+ "power_user": "$power_manage.username",
+ "power_pass": "$power_manage.password",
+ "power_type": "$getVar('power_type', 'ipmilan')"
}