checking if parameter is no null. 19/16019/1
authorNarinder Gupta <narinder.gupta@canonical.com>
Mon, 27 Jun 2016 23:03:58 +0000 (18:03 -0500)
committerNarinder Gupta <narinder.gupta@canonical.com>
Mon, 27 Jun 2016 23:04:36 +0000 (18:04 -0500)
Change-Id: Id3d908903ddb4584e0c813aa6dc8f859c3004ba7
Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
ci/deploy.py

index 3ec50dc..5f84da4 100644 (file)
@@ -215,7 +215,10 @@ opnfvlabcfg["opnfv"]["floating-ip-range"]=labcfg["lab"]["racks"][0]["floating-ip
 opnfvlabcfg["opnfv"]["ext-port"]=labcfg["lab"]["racks"][0]["ext-port"]
 opnfvlabcfg["opnfv"]["ceph-disk"]=labcfg["opnfv"]["storage"][0]["disk"]
 opnfvlabcfg["opnfv"]["interface-enable"]=",".join(list(set(ifnamelist)))
-opnfvlabcfg["opnfv"]["os-domain-name"] = labcfg["lab"]["racks"][0]["osdomainname"]
+
+osdomname = labcfg["lab"]["racks"][0]["osdomainname"]
+if osdomname:
+    opnfvlabcfg["opnfv"]["os-domain-name"] = labcfg["lab"]["racks"][0]["osdomainname"]
 
 with open('deployment.yaml', 'wa') as opnfvf:
    yaml.dump(opnfvcfg, opnfvf, default_flow_style=False)