diff --git a/api/src/com/cloud/storage/StorageService.java b/api/src/com/cloud/storage/StorageService.java index 7c5b0a786c3..1ae1d3a7102 100644 --- a/api/src/com/cloud/storage/StorageService.java +++ b/api/src/com/cloud/storage/StorageService.java @@ -20,9 +20,9 @@ import java.net.UnknownHostException; import org.apache.cloudstack.api.command.admin.storage.AddImageStoreCmd; import org.apache.cloudstack.api.command.admin.storage.CancelPrimaryStorageMaintenanceCmd; -import org.apache.cloudstack.api.command.admin.storage.CreateCacheStoreCmd; +import org.apache.cloudstack.api.command.admin.storage.CreateSecondaryStagingStoreCmd; import org.apache.cloudstack.api.command.admin.storage.CreateStoragePoolCmd; -import org.apache.cloudstack.api.command.admin.storage.DeleteCacheStoreCmd; +import org.apache.cloudstack.api.command.admin.storage.DeleteSecondaryStagingStoreCmd; import org.apache.cloudstack.api.command.admin.storage.DeleteImageStoreCmd; import org.apache.cloudstack.api.command.admin.storage.DeletePoolCmd; import org.apache.cloudstack.api.command.admin.storage.UpdateStoragePoolCmd; @@ -50,7 +50,7 @@ public interface StorageService{ StoragePool createPool(CreateStoragePoolCmd cmd) throws ResourceInUseException, IllegalArgumentException, UnknownHostException, ResourceUnavailableException; - ImageStore createCacheStore(CreateCacheStoreCmd cmd); + ImageStore createSecondaryStagingStore(CreateSecondaryStagingStoreCmd cmd); /** * Delete the storage pool @@ -93,7 +93,7 @@ public interface StorageService{ boolean deleteImageStore(DeleteImageStoreCmd cmd); - boolean deleteCacheStore(DeleteCacheStoreCmd cmd); + boolean deleteSecondaryStagingStore(DeleteSecondaryStagingStoreCmd cmd); ImageStore discoverImageStore(AddImageStoreCmd cmd) throws IllegalArgumentException, DiscoveryException, InvalidParameterValueException; diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/CreateCacheStoreCmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/CreateSecondaryStagingStoreCmd.java similarity index 66% rename from api/src/org/apache/cloudstack/api/command/admin/storage/CreateCacheStoreCmd.java rename to api/src/org/apache/cloudstack/api/command/admin/storage/CreateSecondaryStagingStoreCmd.java index f94207fda91..deaf6d9f1e5 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/storage/CreateCacheStoreCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/storage/CreateSecondaryStagingStoreCmd.java @@ -35,32 +35,32 @@ import java.util.HashMap; import java.util.Iterator; import java.util.Map; -@APICommand(name = "createCacheStore", description="create cache store.", responseObject=ImageStoreResponse.class) -public class CreateCacheStoreCmd extends BaseCmd { +@APICommand(name = "createSecondaryStagingStore", description = "create secondary staging store.", responseObject = ImageStoreResponse.class) +public class CreateSecondaryStagingStoreCmd extends BaseCmd { public static final Logger s_logger = Logger.getLogger(AddImageStoreCmd.class.getName()); - private static final String s_name = "createcachestoreresponse"; + private static final String s_name = "createsecondarystagingstoreresponse"; ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name=ApiConstants.URL, type=CommandType.STRING, required=true, description="the URL for the cache store") + @Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = true, description = "the URL for the staging store") private String url; @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType=ZoneResponse.class, - description="the Zone ID for the image store") + description = "the Zone ID for the staging store") private Long zoneId; - @Parameter(name=ApiConstants.DETAILS, type=CommandType.MAP, description="the details for the image store") + @Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, description = "the details for the staging store") private Map details; @Parameter(name=ApiConstants.SCOPE, type=CommandType.STRING, - required=false, description="the scope of the image store: zone only for now") + required = false, description = "the scope of the staging store: zone only for now") private String scope; @Parameter(name=ApiConstants.PROVIDER, type=CommandType.STRING, - required=false, description="the cache store provider name") + required = false, description = "the staging store provider name") private String providerName; ///////////////////////////////////////////////////// @@ -75,25 +75,25 @@ public class CreateCacheStoreCmd extends BaseCmd { return zoneId; } - public Map getDetails() { - Map detailsMap = null; - if (details != null && !details.isEmpty()) { - detailsMap = new HashMap(); - Collection props = details.values(); - Iterator iter = props.iterator(); - while (iter.hasNext()) { - HashMap detail = (HashMap) iter.next(); - String key = detail.get("key"); - String value = detail.get("value"); - detailsMap.put(key, value); - } - } - return detailsMap; + public Map getDetails() { + Map detailsMap = null; + if (details != null && !details.isEmpty()) { + detailsMap = new HashMap(); + Collection props = details.values(); + Iterator iter = props.iterator(); + while (iter.hasNext()) { + HashMap detail = (HashMap) iter.next(); + String key = detail.get("key"); + String value = detail.get("value"); + detailsMap.put(key, value); + } + } + return detailsMap; } public String getScope() { return this.scope; - } + } public String getProviderName() { return this.providerName; @@ -117,13 +117,13 @@ public class CreateCacheStoreCmd extends BaseCmd { @Override public void execute(){ try{ - ImageStore result = _storageService.createCacheStore(this); + ImageStore result = _storageService.createSecondaryStagingStore(this); ImageStoreResponse storeResponse = null; if (result != null ) { - storeResponse = _responseGenerator.createImageStoreResponse(result); - storeResponse.setResponseName(getCommandName()); - storeResponse.setObjectName("secondarystorage"); - this.setResponseObject(storeResponse); + storeResponse = _responseGenerator.createImageStoreResponse(result); + storeResponse.setResponseName(getCommandName()); + storeResponse.setObjectName("secondarystorage"); + this.setResponseObject(storeResponse); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add secondary storage"); } diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/DeleteCacheStoreCmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/DeleteSecondaryStagingStoreCmd.java similarity index 82% rename from api/src/org/apache/cloudstack/api/command/admin/storage/DeleteCacheStoreCmd.java rename to api/src/org/apache/cloudstack/api/command/admin/storage/DeleteSecondaryStagingStoreCmd.java index 01d338562b4..ed3ebd861eb 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/storage/DeleteCacheStoreCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/storage/DeleteSecondaryStagingStoreCmd.java @@ -28,18 +28,18 @@ import org.apache.log4j.Logger; import com.cloud.user.Account; -@APICommand(name = "deleteCacheStore", description = "Deletes a cache store .", responseObject = SuccessResponse.class, since = "4.2.0") -public class DeleteCacheStoreCmd extends BaseCmd { - public static final Logger s_logger = Logger.getLogger(DeleteCacheStoreCmd.class.getName()); +@APICommand(name = "deleteSecondaryStagingStore", description = "Deletes a secondary staging store .", responseObject = SuccessResponse.class, since = "4.2.0") +public class DeleteSecondaryStagingStoreCmd extends BaseCmd { + public static final Logger s_logger = Logger.getLogger(DeleteSecondaryStagingStoreCmd.class.getName()); - private static final String s_name = "deletecachestoreresponse"; + private static final String s_name = "deletesecondarystagingstoreresponse"; // /////////////////////////////////////////////////// // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ImageStoreResponse.class, - required = true, description = "the cache store ID") + required = true, description = "the staging store ID") private Long id; @@ -68,12 +68,12 @@ public class DeleteCacheStoreCmd extends BaseCmd { @Override public void execute() { - boolean result = _storageService.deleteCacheStore(this); + boolean result = _storageService.deleteSecondaryStagingStore(this); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete image store"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete secondary staging store"); } } } diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/ListCacheStoresCmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/ListSecondaryStagingStoresCmd.java similarity index 75% rename from api/src/org/apache/cloudstack/api/command/admin/storage/ListCacheStoresCmd.java rename to api/src/org/apache/cloudstack/api/command/admin/storage/ListSecondaryStagingStoresCmd.java index 3909e8ec55c..2f81fb4c1e4 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/storage/ListCacheStoresCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/storage/ListSecondaryStagingStoresCmd.java @@ -25,31 +25,31 @@ import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.ZoneResponse; import org.apache.log4j.Logger; -@APICommand(name = "listCacheStores", description="Lists cache stores.", responseObject=ImageStoreResponse.class, since = "4.2.0") -public class ListCacheStoresCmd extends BaseListCmd { - public static final Logger s_logger = Logger.getLogger(ListCacheStoresCmd.class.getName()); +@APICommand(name = "listSecondaryStagingStores", description = "Lists secondary staging stores.", responseObject = ImageStoreResponse.class, since = "4.2.0") +public class ListSecondaryStagingStoresCmd extends BaseListCmd { + public static final Logger s_logger = Logger.getLogger(ListSecondaryStagingStoresCmd.class.getName()); - private static final String s_name = "listcachestoreresponse"; + private static final String s_name = "listsecondarystagingstoreresponse"; ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="the name of the cache store") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the staging store") private String storeName; - @Parameter(name=ApiConstants.PROTOCOL, type=CommandType.STRING, description="the cache store protocol") + @Parameter(name = ApiConstants.PROTOCOL, type = CommandType.STRING, description = "the staging store protocol") private String protocol; - @Parameter(name=ApiConstants.PROVIDER, type=CommandType.STRING, description="the cache store provider") + @Parameter(name = ApiConstants.PROVIDER, type = CommandType.STRING, description = "the staging store provider") private String provider; @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType = ZoneResponse.class, - description="the Zone ID for the cache store") + description = "the Zone ID for the staging store") private Long zoneId; @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = ImageStoreResponse.class, - description="the ID of the cache store") + description = "the ID of the staging store") private Long id; ///////////////////////////////////////////////////// @@ -97,7 +97,7 @@ public class ListCacheStoresCmd extends BaseListCmd { @Override public void execute(){ - ListResponse response = _queryService.searchForCacheStores(this); + ListResponse response = _queryService.searchForSecondaryStagingStores(this); response.setResponseName(getCommandName()); this.setResponseObject(response); } diff --git a/api/src/org/apache/cloudstack/query/QueryService.java b/api/src/org/apache/cloudstack/query/QueryService.java index da843a9bddd..a203564418d 100644 --- a/api/src/org/apache/cloudstack/query/QueryService.java +++ b/api/src/org/apache/cloudstack/query/QueryService.java @@ -20,7 +20,7 @@ import org.apache.cloudstack.affinity.AffinityGroupResponse; import org.apache.cloudstack.api.command.admin.host.ListHostsCmd; import org.apache.cloudstack.api.command.admin.internallb.ListInternalLBVMsCmd; import org.apache.cloudstack.api.command.admin.router.ListRoutersCmd; -import org.apache.cloudstack.api.command.admin.storage.ListCacheStoresCmd; +import org.apache.cloudstack.api.command.admin.storage.ListSecondaryStagingStoresCmd; import org.apache.cloudstack.api.command.admin.storage.ListImageStoresCmd; import org.apache.cloudstack.api.command.admin.storage.ListStoragePoolsCmd; import org.apache.cloudstack.api.command.admin.user.ListUsersCmd; @@ -81,7 +81,7 @@ public interface QueryService { public ListResponse searchForImageStores(ListImageStoresCmd cmd); - public ListResponse searchForCacheStores(ListCacheStoresCmd cmd); + public ListResponse searchForSecondaryStagingStores(ListSecondaryStagingStoresCmd cmd); public ListResponse searchForAccounts(ListAccountsCmd cmd); diff --git a/client/tomcatconf/commands.properties.in b/client/tomcatconf/commands.properties.in index 729dd23e762..fe3e4d9aad4 100644 --- a/client/tomcatconf/commands.properties.in +++ b/client/tomcatconf/commands.properties.in @@ -250,9 +250,9 @@ listS3s=1 addImageStore=1 listImageStores=1 deleteImageStore=1 -createCacheStore=1 -listCacheStores=1 -#deleteCacheStore=1 +createSecondaryStagingStore=1 +listSecondaryStagingStores=1 +deleteSecondaryStagingStore=1 #### host commands addHost=3 diff --git a/engine/storage/cache/src/org/apache/cloudstack/storage/cache/allocator/StorageCacheRandomAllocator.java b/engine/storage/cache/src/org/apache/cloudstack/storage/cache/allocator/StorageCacheRandomAllocator.java index f244a0371b7..3b434d175fd 100644 --- a/engine/storage/cache/src/org/apache/cloudstack/storage/cache/allocator/StorageCacheRandomAllocator.java +++ b/engine/storage/cache/src/org/apache/cloudstack/storage/cache/allocator/StorageCacheRandomAllocator.java @@ -46,7 +46,7 @@ public class StorageCacheRandomAllocator implements StorageCacheAllocator { List cacheStores = dataStoreMgr.getImageCacheStores(scope); if (cacheStores.size() <= 0) { - s_logger.debug("Can't find cache storage in zone: " + scope.getScopeId()); + s_logger.debug("Can't find staging storage in zone: " + scope.getScopeId()); return null; } diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java index 07e0fc0ee3f..0df2cd34d87 100755 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java @@ -472,12 +472,12 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager, Vmw if (secUrl == null) { // we are using non-NFS image store, then use cache storage instead - s_logger.info("Secondary storage is not NFS, we need to use cache storage"); + s_logger.info("Secondary storage is not NFS, we need to use staging storage"); DataStore cacheStore = _dataStoreMgr.getImageCacheStore(dcId); if (cacheStore != null) { secUrl = cacheStore.getUri(); } else { - s_logger.warn("No cache storage is found when non-NFS secondary storage is used"); + s_logger.warn("No staging storage is found when non-NFS secondary storage is used"); } } diff --git a/server/src/com/cloud/api/query/QueryManagerImpl.java b/server/src/com/cloud/api/query/QueryManagerImpl.java index 33327db9038..45f1c691175 100644 --- a/server/src/com/cloud/api/query/QueryManagerImpl.java +++ b/server/src/com/cloud/api/query/QueryManagerImpl.java @@ -34,7 +34,7 @@ import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd; import org.apache.cloudstack.api.command.admin.host.ListHostsCmd; import org.apache.cloudstack.api.command.admin.internallb.ListInternalLBVMsCmd; import org.apache.cloudstack.api.command.admin.router.ListRoutersCmd; -import org.apache.cloudstack.api.command.admin.storage.ListCacheStoresCmd; +import org.apache.cloudstack.api.command.admin.storage.ListSecondaryStagingStoresCmd; import org.apache.cloudstack.api.command.admin.storage.ListImageStoresCmd; import org.apache.cloudstack.api.command.admin.storage.ListStoragePoolsCmd; import org.apache.cloudstack.api.command.admin.user.ListUsersCmd; @@ -2107,7 +2107,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService { } @Override - public ListResponse searchForCacheStores(ListCacheStoresCmd cmd) { + public ListResponse searchForSecondaryStagingStores(ListSecondaryStagingStoresCmd cmd) { Pair, Integer> result = searchForCacheStoresInternal(cmd); ListResponse response = new ListResponse(); @@ -2117,7 +2117,7 @@ public class QueryManagerImpl extends ManagerBase implements QueryService { return response; } - private Pair, Integer> searchForCacheStoresInternal(ListCacheStoresCmd cmd) { + private Pair, Integer> searchForCacheStoresInternal(ListSecondaryStagingStoresCmd cmd) { Long zoneId = _accountMgr.checkAccessAndSpecifyAuthority(CallContext.current().getCallingAccount(), cmd.getZoneId()); Object id = cmd.getId(); diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java index 0bdb114bc4d..ecb8f85d71b 100755 --- a/server/src/com/cloud/server/ManagementServerImpl.java +++ b/server/src/com/cloud/server/ManagementServerImpl.java @@ -146,13 +146,13 @@ import org.apache.cloudstack.api.command.admin.router.UpgradeRouterCmd; import org.apache.cloudstack.api.command.admin.storage.AddImageStoreCmd; import org.apache.cloudstack.api.command.admin.storage.AddS3Cmd; import org.apache.cloudstack.api.command.admin.storage.CancelPrimaryStorageMaintenanceCmd; -import org.apache.cloudstack.api.command.admin.storage.CreateCacheStoreCmd; +import org.apache.cloudstack.api.command.admin.storage.CreateSecondaryStagingStoreCmd; import org.apache.cloudstack.api.command.admin.storage.CreateStoragePoolCmd; -import org.apache.cloudstack.api.command.admin.storage.DeleteCacheStoreCmd; +import org.apache.cloudstack.api.command.admin.storage.DeleteSecondaryStagingStoreCmd; import org.apache.cloudstack.api.command.admin.storage.DeleteImageStoreCmd; import org.apache.cloudstack.api.command.admin.storage.DeletePoolCmd; import org.apache.cloudstack.api.command.admin.storage.FindStoragePoolsForMigrationCmd; -import org.apache.cloudstack.api.command.admin.storage.ListCacheStoresCmd; +import org.apache.cloudstack.api.command.admin.storage.ListSecondaryStagingStoresCmd; import org.apache.cloudstack.api.command.admin.storage.ListImageStoresCmd; import org.apache.cloudstack.api.command.admin.storage.ListS3sCmd; import org.apache.cloudstack.api.command.admin.storage.ListStoragePoolsCmd; @@ -2798,9 +2798,9 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe cmdList.add(AddImageStoreCmd.class); cmdList.add(ListImageStoresCmd.class); cmdList.add(DeleteImageStoreCmd.class); - cmdList.add(CreateCacheStoreCmd.class); - cmdList.add(ListCacheStoresCmd.class); - cmdList.add(DeleteCacheStoreCmd.class); + cmdList.add(CreateSecondaryStagingStoreCmd.class); + cmdList.add(ListSecondaryStagingStoresCmd.class); + cmdList.add(DeleteSecondaryStagingStoreCmd.class); cmdList.add(CreateApplicationLoadBalancerCmd.class); cmdList.add(ListApplicationLoadBalancersCmd.class); cmdList.add(DeleteApplicationLoadBalancerCmd.class); diff --git a/server/src/com/cloud/storage/StorageManagerImpl.java b/server/src/com/cloud/storage/StorageManagerImpl.java index 25aee8c6b93..20d5a625095 100755 --- a/server/src/com/cloud/storage/StorageManagerImpl.java +++ b/server/src/com/cloud/storage/StorageManagerImpl.java @@ -46,9 +46,9 @@ import org.springframework.stereotype.Component; import org.apache.cloudstack.api.command.admin.storage.AddImageStoreCmd; import org.apache.cloudstack.api.command.admin.storage.CancelPrimaryStorageMaintenanceCmd; -import org.apache.cloudstack.api.command.admin.storage.CreateCacheStoreCmd; +import org.apache.cloudstack.api.command.admin.storage.CreateSecondaryStagingStoreCmd; import org.apache.cloudstack.api.command.admin.storage.CreateStoragePoolCmd; -import org.apache.cloudstack.api.command.admin.storage.DeleteCacheStoreCmd; +import org.apache.cloudstack.api.command.admin.storage.DeleteSecondaryStagingStoreCmd; import org.apache.cloudstack.api.command.admin.storage.DeleteImageStoreCmd; import org.apache.cloudstack.api.command.admin.storage.DeletePoolCmd; import org.apache.cloudstack.api.command.admin.storage.UpdateStoragePoolCmd; @@ -1797,7 +1797,7 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C } @Override - public ImageStore createCacheStore(CreateCacheStoreCmd cmd) { + public ImageStore createSecondaryStagingStore(CreateSecondaryStagingStoreCmd cmd) { String providerName = cmd.getProviderName(); DataStoreProvider storeProvider = _dataStoreProviderMgr.getDataStoreProvider(providerName); @@ -1865,7 +1865,7 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C } @Override - public boolean deleteCacheStore(DeleteCacheStoreCmd cmd) { + public boolean deleteSecondaryStagingStore(DeleteSecondaryStagingStoreCmd cmd) { long storeId = cmd.getId(); User caller = _accountMgr.getActiveUser(CallContext.current().getCallingUserId()); // Verify that cache store exists diff --git a/tools/apidoc/gen_toc.py b/tools/apidoc/gen_toc.py index 93328c34c13..506169c2969 100644 --- a/tools/apidoc/gen_toc.py +++ b/tools/apidoc/gen_toc.py @@ -145,9 +145,9 @@ known_categories = { 'addImageStore': 'Image Store', 'listImageStore': 'Image Store', 'deleteImageStore': 'Image Store', - 'createCacheStore': 'Image Store', - 'deleteCacheStore': 'Image Store', - 'listCacheStores': 'Image Store', + 'createSecondaryStagingStore': 'Image Store', + 'deleteSecondaryStagingStore': 'Image Store', + 'listSecondaryStagingStores': 'Image Store', 'InternalLoadBalancer': 'Internal LB', 'DeploymentPlanners': 'Configuration', 'PortableIp': 'Portable IP', diff --git a/tools/marvin/marvin/deployDataCenter.py b/tools/marvin/marvin/deployDataCenter.py index 279d4ee5785..ac07fa67ded 100644 --- a/tools/marvin/marvin/deployDataCenter.py +++ b/tools/marvin/marvin/deployDataCenter.py @@ -174,7 +174,7 @@ specify a valid config file" % cfgFile) if cacheStorages is None: return for cache in cacheStorages: - cachecmd = createCacheStore.createCacheStoreCmd() + cachecmd = createSecondaryStagingStore.createSecondaryStagingStoreCmd() cachecmd.url = cache.url cachecmd.provider = cache.provider cachecmd.zoneid = zoneId @@ -186,7 +186,7 @@ specify a valid config file" % cfgFile) 'key': key, 'value': value }) - self.apiClient.createCacheStore(cachecmd) + self.apiClient.createSecondaryStagingStore(cachecmd) def createnetworks(self, networks, zoneId): if networks is None: