This commit is contained in:
Alexandra Avendano 2023-10-20 16:08:59 -07:00
Родитель 0ce97f32e2
Коммит 7c128bc068
2 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -4,9 +4,11 @@
# --------------------------------------------------------------------------------------------
def _baremetal_instance_client_factory(cli_ctx, subscription_id=None):
from azext_baremetalinfrastructure.modules_sdk import BareMetalInfrastructureClient
from azure.cli.core.commands.client_factory import get_mgmt_service_client
return get_mgmt_service_client(cli_ctx, BareMetalInfrastructureClient, subscription_id=subscription_id)
from azext_baremetalinfrastructure.modules_sdk import BareMetalInfrastructureClient
return get_mgmt_service_client(cli_ctx=cli_ctx, client_or_resource_type=BareMetalInfrastructureClient, subscription_id=subscription_id, base_url_bound=False, credential= None)
def cf_baremetalinstance_groups(cli_ctx, *_):
return _baremetal_instance_client_factory(cli_ctx).azure_bare_metal_instances
from azure.cli.core.commands.client_factory import get_subscription_id
subscription_id=get_subscription_id(cli_ctx)
return _baremetal_instance_client_factory(cli_ctx=cli_ctx, subscription_id=subscription_id).azure_bare_metal_instances

Просмотреть файл

@ -46,8 +46,8 @@ class BareMetalInfrastructureClient: # pylint: disable=client-accepts-api-versi
def __init__(
self,
subscription_id: str,
credential: "TokenCredential",
subscription_id: str,
*,
endpoint: str = "https://management.azure.com",
**kwargs: Any