def privatecloud_create(cmd, client: AVSClient, resource_group_name, name, location, sku, cluster_size, network_block, circuit_primary_subnet=None, circuit_secondary_subnet=None, internet=None, vcenter_password=None, nsxt_password=None, tags=[]): from azext_vmware.vendored_sdks.avs_client.models import PrivateCloud, Circuit, ManagementCluster, Sku if circuit_primary_subnet is not None or circuit_secondary_subnet is not None: circuit = Circuit(primary_subnet=circuit_primary_subnet, secondary_subnet=circuit_secondary_subnet) else: circuit = None management_cluster = ManagementCluster(cluster_size=cluster_size) cloud = PrivateCloud(location=location, sku=Sku(name=sku), circuit=circuit, management_cluster=management_cluster, network_block=network_block, tags=tags) if internet is not None: cloud.internet = internet if vcenter_password is not None: cloud.vcenter_password = vcenter_password if nsxt_password is not None: cloud.nsxt_password = nsxt_password return client.private_clouds.begin_create_or_update( resource_group_name, name, cloud)
def cluster_create(client: AVSClient, resource_group_name, name, sku, private_cloud, size): from azext_vmware.vendored_sdks.avs_client.models import Sku return client.clusters.begin_create_or_update( resource_group_name=resource_group_name, private_cloud_name=private_cloud, cluster_name=name, sku=Sku(name=sku), cluster_size=size)
def privatecloud_create(cmd, client: AVSClient, resource_group_name, name, location, sku, cluster_size, network_block, circuit_primary_subnet=None, circuit_secondary_subnet=None, internet=None, vcenter_password=None, nsxt_password=None, tags=[], accept_eula=False): from knack.prompting import prompt_y_n if not accept_eula: print(LEGAL_TERMS) msg = 'Do you agree to the above additional terms for AVS?' if not prompt_y_n(msg, default="n"): return from azext_vmware.vendored_sdks.avs_client.models import PrivateCloud, Circuit, ManagementCluster, Sku if circuit_primary_subnet is not None or circuit_secondary_subnet is not None: circuit = Circuit(primary_subnet=circuit_primary_subnet, secondary_subnet=circuit_secondary_subnet) else: circuit = None management_cluster = ManagementCluster(cluster_size=cluster_size) cloud = PrivateCloud(location=location, sku=Sku(name=sku), circuit=circuit, management_cluster=management_cluster, network_block=network_block, tags=tags) if internet is not None: cloud.internet = internet if vcenter_password is not None: cloud.vcenter_password = vcenter_password if nsxt_password is not None: cloud.nsxt_password = nsxt_password return client.private_clouds.begin_create_or_update( resource_group_name, name, cloud)