class AzureStackViewProvider {

    AzureStackView getAzureStack(AzureCredentialView azureCredentialView, CloudStack cloudStack, AzureClient client, AuthenticatedContext ac) {
        Map<String, String> customImageNamePerInstance = getCustomImageNamePerInstance(ac, cloudStack);
        Network network = cloudStack.getNetwork();
        Map<String, Long> availableIPs = getNumberOfAvailableIPsInSubnets(client, network);
        return new AzureStackView(ac.getCloudContext().getName(), stackNamePrefixLength, cloudStack.getGroups(), new AzureStorageView(azureCredentialView,
                ac.getCloudContext(),
                azureStorage, azureStorage.getArmAttachedStorageOption(cloudStack.getParameters())),
                AzureSubnetStrategy.getAzureSubnetStrategy(FILL, azureUtils.getCustomSubnetIds(network), availableIPs),
                customImageNamePerInstance);
    }

}