except urllib2.HTTPError, e: print "listConfigurationsCmd Failed : " + str(e.msg) exit() zoneCmd = createZone.createZoneCmd() zoneCmd.name = "MCCDZone5" zoneCmd.networktype = "Advanced" zoneCmd.dns1 = "8.8.8.8" zoneCmd.dns2 = "8.8.8.4" zoneCmd.internaldns1 = "192.168.56.2" zoneCmd.domain = "devcloud.local" zoneCmd.localstorageenabled = "true" zoneCmd.guestcidraddress = "10.1.1.1/24" try: zone = apiclient.createZone(zoneCmd) print "Zone " + zone.name + " created" except urllib2.HTTPError, e: print "createZoneCmd Failed : " + str(e.msg) # Setup physical network for Management and Public physNetCmd = createPhysicalNetwork.createPhysicalNetworkCmd() physNetCmd.name = "DevCloud Mgmt" physNetCmd.zoneid = zone.id physNetCmd.isolationmethods = [ "VLAN" ] try: physNetManagement = apiclient.createPhysicalNetwork(physNetCmd) except urllib2.HTTPError, e: print "createPhysicalNetworkCmd Failed : " + str(e.msg) # Add traffic type Management
except urllib2.HTTPError, e: print "listConfigurationsCmd Failed : " + str(e.msg) exit() zoneCmd = createZone.createZoneCmd() zoneCmd.name = "MCCDZone5" zoneCmd.networktype = "Advanced" zoneCmd.dns1 = "8.8.8.8" zoneCmd.dns2 = "8.8.8.4" zoneCmd.internaldns1 = "192.168.56.2" zoneCmd.domain = "devcloud.local" zoneCmd.localstorageenabled = "true" zoneCmd.guestcidraddress = "10.1.1.1/24" try: zone = apiclient.createZone(zoneCmd) print "Zone " + zone.name + " created" except urllib2.HTTPError, e: print "createZoneCmd Failed : " + str(e.msg) # Setup physical network for Management and Public physNetCmd = createPhysicalNetwork.createPhysicalNetworkCmd() physNetCmd.name = "DevCloud Mgmt" physNetCmd.zoneid = zone.id physNetCmd.isolationmethods = ["VLAN"] try: physNetManagement = apiclient.createPhysicalNetwork(physNetCmd) except urllib2.HTTPError, e: print "createPhysicalNetworkCmd Failed : " + str(e.msg) # Add traffic type Management