diff --git a/src/azure-cli/azure/cli/command_modules/acs/_client_factory.py b/src/azure-cli/azure/cli/command_modules/acs/_client_factory.py index 1c4909f1abd..b3cadcf34de 100644 --- a/src/azure-cli/azure/cli/command_modules/acs/_client_factory.py +++ b/src/azure-cli/azure/cli/command_modules/acs/_client_factory.py @@ -64,7 +64,7 @@ def get_container_service_client(cli_ctx, **_): def get_osa_container_service_client(cli_ctx, **_): from azure.mgmt.containerservice import ContainerServiceClient - return get_mgmt_service_client(cli_ctx, ContainerServiceClient, api_version='2019-04-30') + return get_mgmt_service_client(cli_ctx, ContainerServiceClient, api_version='2019-09-30-preview') def get_graph_rbac_management_client(cli_ctx, **_): diff --git a/src/azure-cli/azure/cli/command_modules/acs/custom.py b/src/azure-cli/azure/cli/command_modules/acs/custom.py index d6a73b85c42..dfb5c8bc3af 100644 --- a/src/azure-cli/azure/cli/command_modules/acs/custom.py +++ b/src/azure-cli/azure/cli/command_modules/acs/custom.py @@ -73,15 +73,14 @@ from azure.mgmt.containerservice.v2019_08_01.models import AgentPool from azure.mgmt.containerservice.v2019_08_01.models import ResourceReference -from azure.mgmt.containerservice.v2019_04_30.models import OpenShiftManagedClusterAgentPoolProfile -from azure.mgmt.containerservice.v2019_04_30.models import OpenShiftAgentPoolProfileRole -from azure.mgmt.containerservice.v2019_04_30.models import OpenShiftManagedClusterIdentityProvider -from azure.mgmt.containerservice.v2019_04_30.models import OpenShiftManagedClusterAADIdentityProvider -from azure.mgmt.containerservice.v2019_04_30.models import OpenShiftManagedCluster -from azure.mgmt.containerservice.v2019_04_30.models import OpenShiftRouterProfile -from azure.mgmt.containerservice.v2019_04_30.models import OpenShiftManagedClusterAuthProfile -from azure.mgmt.containerservice.v2019_04_30.models import NetworkProfile -from azure.mgmt.containerservice.v2019_09_30_preview.models import OpenShiftManagedCluster as OpenShiftManagedClusterMonitor # pylint: disable=line-too-long +from azure.mgmt.containerservice.v2019_09_30_preview.models import OpenShiftManagedClusterAgentPoolProfile +from azure.mgmt.containerservice.v2019_09_30_preview.models import OpenShiftAgentPoolProfileRole +from azure.mgmt.containerservice.v2019_09_30_preview.models import OpenShiftManagedClusterIdentityProvider +from azure.mgmt.containerservice.v2019_09_30_preview.models import OpenShiftManagedClusterAADIdentityProvider +from azure.mgmt.containerservice.v2019_09_30_preview.models import OpenShiftManagedCluster +from azure.mgmt.containerservice.v2019_09_30_preview.models import OpenShiftRouterProfile +from azure.mgmt.containerservice.v2019_09_30_preview.models import OpenShiftManagedClusterAuthProfile +from azure.mgmt.containerservice.v2019_09_30_preview.models import NetworkProfile from azure.mgmt.containerservice.v2019_09_30_preview.models import OpenShiftManagedClusterMonitorProfile from ._client_factory import cf_container_services @@ -3208,26 +3207,15 @@ def openshift_create(cmd, client, resource_group_name, name, # pylint: disable= monitor_profile = None network_profile = NetworkProfile(vnet_cidr=vnet_prefix, peer_vnet_id=vnet_peer) - - if monitor_profile is not None: - osamc = OpenShiftManagedClusterMonitor( - location=location, tags=tags, - open_shift_version="v3.11", - network_profile=network_profile, - auth_profile=auth_profile, - agent_pool_profiles=agent_pool_profiles, - master_pool_profile=agent_master_pool_profile, - router_profiles=[default_router_profile], - monitor_profile=monitor_profile) - else: - osamc = OpenShiftManagedCluster( - location=location, tags=tags, - open_shift_version="v3.11", - network_profile=network_profile, - auth_profile=auth_profile, - agent_pool_profiles=agent_pool_profiles, - master_pool_profile=agent_master_pool_profile, - router_profiles=[default_router_profile]) + osamc = OpenShiftManagedCluster( + location=location, tags=tags, + open_shift_version="v3.11", + network_profile=network_profile, + auth_profile=auth_profile, + agent_pool_profiles=agent_pool_profiles, + master_pool_profile=agent_master_pool_profile, + router_profiles=[default_router_profile], + monitor_profile=monitor_profile) try: # long_running_operation_timeout=300