From 573cab407e5823c9e1787f1f5b571af7dd41114e Mon Sep 17 00:00:00 2001 From: Prasanna Santhanam Date: Tue, 24 Jan 2012 15:44:42 +0530 Subject: [PATCH] Enable the zone after successful add --- tools/testClient/deployDataCenter.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/testClient/deployDataCenter.py b/tools/testClient/deployDataCenter.py index 3b94f5bc3dd..87bd2b6dbdb 100644 --- a/tools/testClient/deployDataCenter.py +++ b/tools/testClient/deployDataCenter.py @@ -209,7 +209,13 @@ class deployDataCenters(): traffic_type = addTrafficType.addTrafficTypeCmd() traffic_type.physicalnetworkid = physical_network_id traffic_type.traffictype = traffictype - self.apiClient.addTrafficType(traffic_type) + return self.apiClient.addTrafficType(traffic_type) + + def enableZone(self, zoneid, allocation_state="Enabled"): + zoneCmd = updateZone.updateZoneCmd() + zoneCmd.zoneid = zoneid + zoneCmd.allocationstate = allocation_state + return self.apiClient.updateZone(zoneCmd) def createZones(self, zones): for zone in zones: @@ -263,6 +269,7 @@ class deployDataCenters(): zoneId) self.createSecondaryStorages(zone.secondaryStorages, zoneId) + return self.enableZone(zoneId, "Enabled") def registerApiKey(self): listuser = listUsers.listUsersCmd()