From bb8594dfaf047ba7f7350090d3f02f3b102e5d99 Mon Sep 17 00:00:00 2001 From: sakreter Date: Mon, 15 Oct 2018 13:22:22 -0700 Subject: [PATCH 01/13] adding deployment based for resources --- .../cli/command_modules/container/custom.py | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py index 1ca3cf857fd..6281b274088 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py @@ -35,6 +35,7 @@ GitRepoVolume, LogAnalytics, ContainerGroupDiagnostics, ContainerGroupNetworkProfile, ContainerGroupIpAddressType, ResourceIdentityType, ContainerGroupIdentity) from azure.cli.core.util import sdk_no_wait +from azure.cli.core.commands import LongRunningOperation from ._client_factory import cf_container_groups, cf_container, cf_log_analytics, cf_resource, cf_network @@ -215,6 +216,10 @@ def create_container(cmd, container_group_client = cf_container_groups(cmd.cli_ctx) return sdk_no_wait(no_wait, container_group_client.create_or_update, resource_group_name, name, cgroup) + print(cg.__dict__) + # if assign_identity: + # _create_update_msi_role_assignment(cmd.cli_ctx, resource_group_name, name, cg.id, role_definition_id, + # role_assignment_guid, identity_scope, no_wait) def _build_identities_info(identities): @@ -232,6 +237,46 @@ def _build_identities_info(identities): identity.user_assigned_identities = {e: {} for e in external_identities} return identity +def _create_update_msi_role_assignment(cli_ctx, resource_group_name, cg_name, cg_resource_id, role_definition_id, + role_assignment_guid, identity_scope, no_wait): + from msrestazure.tools import parse_resource_id + resource_client = cf_resource(cli_ctx) + + result = parse_resource_id(identity_scope) + if result.get('type'): # is a resource id? + name = '{}/Microsoft.Authorization/{}'.format(result['name'], role_assignment_guid) + assignment_type = '{}/{}/providers/roleAssignments'.format(result['namespace'], result['type']) + else: + name = role_assignment_guid + assignment_type = 'Microsoft.Authorization/roleAssignments' + + # pylint: disable=line-too-long + msi_rp_api_version = '2015-08-31-PREVIEW' + role_assignment = { + 'name': name, + 'type': assignment_type, + 'apiVersion': '2015-07-01', # the minimum api-version to create the assignment + 'dependsOn': [ + 'Microsoft.ContainerInstance/containerGroups/{}'.format(cg_name) + ], + 'properties': { + 'roleDefinitionId': role_definition_id, + 'principalId': "[reference('{}/providers/Microsoft.ManagedIdentity/Identities/default', '{}').principalId]".format( + cg_resource_id, msi_rp_api_version), + 'scope': identity_scope + } + } + + return sdk_no_wait(no_wait, + resource_client.resources.create_or_update, + resource_group_name, + 'Microsoft.Authorization', + '', + "roleAssignments", + name, + '2015-07-01', + role_assignment) + def _get_resource(client, resource_group_name, *subresources): from msrestazure.azure_exceptions import CloudError From f3396e60f3148a7049bfac4220a869302cd06c31 Mon Sep 17 00:00:00 2001 From: sakreter Date: Tue, 16 Oct 2018 09:02:18 -0700 Subject: [PATCH 02/13] changing to sdk calls for role assignment --- .../container/_client_factory.py | 18 +++++ .../cli/command_modules/container/_params.py | 9 ++- .../command_modules/container/_validators.py | 48 ++++++++++++ .../cli/command_modules/container/custom.py | 76 +++++++++---------- .../azure-cli-container/setup.py | 1 + 5 files changed, 112 insertions(+), 40 deletions(-) diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_client_factory.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_client_factory.py index c5a7b617cc4..8aa90a0eb9c 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_client_factory.py +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_client_factory.py @@ -34,6 +34,24 @@ def cf_resource(cli_ctx): return get_mgmt_service_client(cli_ctx, ResourceManagementClient) +def get_auth_management_client(cli_ctx, scope=None, **_): + import re + from azure.cli.core.profiles import ResourceType + from azure.cli.core.commands.client_factory import get_mgmt_service_client + + subscription_id = None + if scope: + matched = re.match('/subscriptions/(?P[^/]*)/', scope) + if matched: + subscription_id = matched.groupdict()['subscription'] + return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_AUTHORIZATION, subscription_id=subscription_id) + +def cf_authorization(cli_ctx): + from azure.mgmt.authorization import AuthorizationManagementClient + from azure.cli.core.commands.client_factory import get_mgmt_service_client + return get_mgmt_service_client(cli_ctx, AuthorizationManagementClient).role_assignments + + def cf_network(cli_ctx): from azure.mgmt.network import NetworkManagementClient from azure.cli.core.commands.client_factory import get_mgmt_service_client diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_params.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_params.py index a881f2c1b30..5d4abb0ffc0 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_params.py +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_params.py @@ -11,7 +11,7 @@ from azure.cli.core.commands.validators import get_default_location_from_resource_group from azure.mgmt.containerinstance.models import ( ContainerGroupRestartPolicy, OperatingSystemTypes, ContainerNetworkProtocol) -from ._validators import (validate_volume_mount_path, validate_secrets, validate_subnet, +from ._validators import (validate_volume_mount_path, validate_secrets, validate_subnet, validate_msi, validate_gitrepo_directory, validate_network_profile, validate_image) # pylint: disable=line-too-long @@ -78,7 +78,12 @@ def load_arguments(self, _): c.argument('secrets', secrets_type) c.argument('secrets_mount_path', validator=validate_volume_mount_path, help="The path within the container where the secrets volume should be mounted. Must not contain colon ':'.") c.argument('file', options_list=['--file', '-f'], help="The path to the input file.") - c.argument('assign_identity', nargs='*', arg_group='Managed Service Identity', help="Space-separated list of assigned identities. Assigned identities are either user assigned identities (resource IDs) and / or the system assigned identity ('[system]'). See examples for more info.") + + with self.argument_context('container create', arg_group='Managed Service Identity') as c: + c.argument('assign_identity', nargs='*', validator=validate_msi, help="Space-separated list of assigned identities. Assigned identities are either user assigned identities (resource IDs) and / or the system assigned identity ('[system]'). See examples for more info.") + c.argument('identity_scope', options_list=['--scope'], help="Scope that the system assigned identity can access") + c.argument('identity_role', options_list=['--role'], help="Role name or id the system assigned identity will have") + c.ignore('identity_role_id') with self.argument_context('container create', arg_group='Network') as c: c.argument('network_profile', network_profile_type) diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_validators.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_validators.py index 1849a4a325e..6beef7463de 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_validators.py +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_validators.py @@ -50,6 +50,54 @@ def validate_image(ns): ns.image) +def validate_msi(cmd, namespace): + MSI_LOCAL_ID = '[system]' + if namespace.assign_identity is not None: + identities = namespace.assign_identity or [] + if not namespace.identity_scope and getattr(namespace.identity_role, 'is_default', None) is None: + raise CLIError("usage error: '--role {}' is not applicable as the '--scope' is not provided".format( + namespace.identity_role)) + + if namespace.identity_scope: + if identities and MSI_LOCAL_ID not in identities: + raise CLIError("usage error: '--scope'/'--role' is only applicable when assign system identity") + # keep 'identity_role' for output as logical name is more readable + setattr(namespace, 'identity_role_id', _resolve_role_id(cmd.cli_ctx, namespace.identity_role, + namespace.identity_scope)) + elif namespace.identity_scope or getattr(namespace.identity_role, 'is_default', None) is None: + raise CLIError('usage error: --assign-identity [--scope SCOPE] [--role ROLE]') + + +def _resolve_role_id(cli_ctx, role, scope): + import re + import uuid + from azure.cli.core.commands.client_factory import get_mgmt_service_client + from azure.cli.core.profiles import ResourceType + + client = get_mgmt_service_client(cli_ctx, ResourceType.MGMT_AUTHORIZATION).role_definitions + role_id = None + if re.match(r'/subscriptions/.+/providers/Microsoft.Authorization/roleDefinitions/', + role, re.I): + role_id = role + else: + try: + uuid.UUID(role) + role_id = '/subscriptions/{}/providers/Microsoft.Authorization/roleDefinitions/{}'.format( + client.config.subscription_id, role) + except ValueError: + pass + if not role_id: # retrieve role id + role_defs = list(client.list(scope, "roleName eq '{}'".format(role))) + if not role_defs: + raise CLIError("Role '{}' doesn't exist.".format(role)) + elif len(role_defs) > 1: + ids = [r.id for r in role_defs] + err = "More than one role matches the given name '{}'. Please pick an id from '{}'" + raise CLIError(err.format(role, ids)) + role_id = role_defs[0].id + return role_id + + def validate_subnet(ns): from msrestazure.tools import is_valid_resource_id diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py index 6281b274088..b6f3dbe4414 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py @@ -36,8 +36,7 @@ ContainerGroupIpAddressType, ResourceIdentityType, ContainerGroupIdentity) from azure.cli.core.util import sdk_no_wait from azure.cli.core.commands import LongRunningOperation -from ._client_factory import cf_container_groups, cf_container, cf_log_analytics, cf_resource, cf_network - +from ._client_factory import cf_container_groups, cf_container, cf_log_analytics, cf_resource, cf_network, get_auth_management_client logger = get_logger(__name__) WINDOWS_NAME = 'Windows' @@ -105,6 +104,9 @@ def create_container(cmd, secrets_mount_path=None, file=None, assign_identity=None, + identity_scope=None, + identity_role='Contributor', + identity_role_id=None, no_wait=False): """Create a container group. """ if file: @@ -215,11 +217,16 @@ def create_container(cmd, tags=tags) container_group_client = cf_container_groups(cmd.cli_ctx) - return sdk_no_wait(no_wait, container_group_client.create_or_update, resource_group_name, name, cgroup) - print(cg.__dict__) - # if assign_identity: - # _create_update_msi_role_assignment(cmd.cli_ctx, resource_group_name, name, cg.id, role_definition_id, - # role_assignment_guid, identity_scope, no_wait) + if no_wait: + return sdk_no_wait(no_wait, container_group_client.create_or_update, resource_group_name, name, cgroup) + + LongRunningOperation(cmd.cli_ctx)(sdk_no_wait(no_wait, container_group_client.create_or_update, + resource_group_name, name, cgroup)) + + cg = container_group_client.get(resource_group_name, name) + if assign_identity is not None: + _create_update_msi_role_assignment(cmd, resource_group_name, name, cg.identity.principal_id, + identity_role_id, identity_scope, no_wait) def _build_identities_info(identities): @@ -237,45 +244,34 @@ def _build_identities_info(identities): identity.user_assigned_identities = {e: {} for e in external_identities} return identity -def _create_update_msi_role_assignment(cli_ctx, resource_group_name, cg_name, cg_resource_id, role_definition_id, - role_assignment_guid, identity_scope, no_wait): + +def _create_update_msi_role_assignment(cmd, resource_group_name, cg_name, identity_principle_id, role_definition_id, + identity_scope, no_wait): + from msrestazure.tools import parse_resource_id - resource_client = cf_resource(cli_ctx) + from azure.cli.core.profiles import ResourceType, get_sdk #'RoleAssignmentCreateParameters' + + RoleAssignmentCreateParameters = get_sdk( + cmd.cli_ctx, ResourceType.MGMT_AUTHORIZATION, + 'RoleAssignmentCreateParameters', + mod='models', operation_group='role_assignments') + + auth_client = get_auth_management_client(cmd.cli_ctx, identity_scope).role_assignments + + role_assignment_guid = str(_gen_guid()) result = parse_resource_id(identity_scope) if result.get('type'): # is a resource id? name = '{}/Microsoft.Authorization/{}'.format(result['name'], role_assignment_guid) - assignment_type = '{}/{}/providers/roleAssignments'.format(result['namespace'], result['type']) else: name = role_assignment_guid - assignment_type = 'Microsoft.Authorization/roleAssignments' - - # pylint: disable=line-too-long - msi_rp_api_version = '2015-08-31-PREVIEW' - role_assignment = { - 'name': name, - 'type': assignment_type, - 'apiVersion': '2015-07-01', # the minimum api-version to create the assignment - 'dependsOn': [ - 'Microsoft.ContainerInstance/containerGroups/{}'.format(cg_name) - ], - 'properties': { - 'roleDefinitionId': role_definition_id, - 'principalId': "[reference('{}/providers/Microsoft.ManagedIdentity/Identities/default', '{}').principalId]".format( - cg_resource_id, msi_rp_api_version), - 'scope': identity_scope - } - } - return sdk_no_wait(no_wait, - resource_client.resources.create_or_update, - resource_group_name, - 'Microsoft.Authorization', - '', - "roleAssignments", - name, - '2015-07-01', - role_assignment) + create_params = RoleAssignmentCreateParameters( + role_definition_id=role_definition_id, + principal_id=identity_principle_id + ) + auth_client.create(identity_scope, name, create_params, custom_headers=None) + #return sdk_no_wait(False, auth_client.create, identity_scope, name, create_params) def _get_resource(client, resource_group_name, *subresources): @@ -832,3 +828,7 @@ def _move_console_cursor_up(lines): if lines > 0: # Use stdout.write to support Python 2 sys.stdout.write('\033[{}A\033[K\033[J'.format(lines)) + +def _gen_guid(): + import uuid + return uuid.uuid4() \ No newline at end of file diff --git a/src/command_modules/azure-cli-container/setup.py b/src/command_modules/azure-cli-container/setup.py index 7411a2c655e..9bc362dd43f 100644 --- a/src/command_modules/azure-cli-container/setup.py +++ b/src/command_modules/azure-cli-container/setup.py @@ -35,6 +35,7 @@ 'azure-mgmt-loganalytics==0.2.0', 'azure-mgmt-resource==2.0.0', 'azure-mgmt-network==2.2.1', + 'azure-mgmt-authorization==0.50.0', 'azure-cli-core', 'pyyaml>=3.13', 'colorama', From 362b33491cbda6131a455c046d12493f048bc661 Mon Sep 17 00:00:00 2001 From: sakreter Date: Tue, 16 Oct 2018 11:01:29 -0700 Subject: [PATCH 03/13] Fixing naming problem causing authorization client to fail --- .../azure-cli-container/HISTORY.rst | 1 + .../container/_client_factory.py | 5 --- .../cli/command_modules/container/custom.py | 40 ++++++++----------- 3 files changed, 17 insertions(+), 29 deletions(-) diff --git a/src/command_modules/azure-cli-container/HISTORY.rst b/src/command_modules/azure-cli-container/HISTORY.rst index ca2b0155288..7c73c2f1fd9 100644 --- a/src/command_modules/azure-cli-container/HISTORY.rst +++ b/src/command_modules/azure-cli-container/HISTORY.rst @@ -6,6 +6,7 @@ Release History 0.3.6 +++++ * Add '--assign-identity' for adding a MSI identity to a container group +* Add '--scope' to create a role assignment for the system assigned MSI identity * Show warning when creating a container group with an image without a long running process * Fix table output issues for 'list' and 'show' commands diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_client_factory.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_client_factory.py index 8aa90a0eb9c..fe0a2d28d16 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_client_factory.py +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_client_factory.py @@ -46,11 +46,6 @@ def get_auth_management_client(cli_ctx, scope=None, **_): subscription_id = matched.groupdict()['subscription'] return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_AUTHORIZATION, subscription_id=subscription_id) -def cf_authorization(cli_ctx): - from azure.mgmt.authorization import AuthorizationManagementClient - from azure.cli.core.commands.client_factory import get_mgmt_service_client - return get_mgmt_service_client(cli_ctx, AuthorizationManagementClient).role_assignments - def cf_network(cli_ctx): from azure.mgmt.network import NetworkManagementClient diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py index b6f3dbe4414..18d638fb6d4 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py @@ -36,7 +36,8 @@ ContainerGroupIpAddressType, ResourceIdentityType, ContainerGroupIdentity) from azure.cli.core.util import sdk_no_wait from azure.cli.core.commands import LongRunningOperation -from ._client_factory import cf_container_groups, cf_container, cf_log_analytics, cf_resource, cf_network, get_auth_management_client +from ._client_factory import (cf_container_groups, cf_container, cf_log_analytics, cf_resource, + cf_network, get_auth_management_client) logger = get_logger(__name__) WINDOWS_NAME = 'Windows' @@ -218,15 +219,16 @@ def create_container(cmd, container_group_client = cf_container_groups(cmd.cli_ctx) if no_wait: - return sdk_no_wait(no_wait, container_group_client.create_or_update, resource_group_name, name, cgroup) + return sdk_no_wait(no_wait, container_group_client.create_or_update, resource_group_name, + name, cgroup) - LongRunningOperation(cmd.cli_ctx)(sdk_no_wait(no_wait, container_group_client.create_or_update, + LongRunningOperation(cmd.cli_ctx)(sdk_no_wait(no_wait, container_group_client.create_or_update, resource_group_name, name, cgroup)) cg = container_group_client.get(resource_group_name, name) - if assign_identity is not None: + if assign_identity is not None and identity_scope: _create_update_msi_role_assignment(cmd, resource_group_name, name, cg.identity.principal_id, - identity_role_id, identity_scope, no_wait) + identity_role_id, identity_scope) def _build_identities_info(identities): @@ -245,33 +247,23 @@ def _build_identities_info(identities): return identity -def _create_update_msi_role_assignment(cmd, resource_group_name, cg_name, identity_principle_id, role_definition_id, - identity_scope, no_wait): - - from msrestazure.tools import parse_resource_id - from azure.cli.core.profiles import ResourceType, get_sdk #'RoleAssignmentCreateParameters' +def _create_update_msi_role_assignment(cmd, resource_group_name, cg_name, identity_principle_id, + role_definition_id, identity_scope): + from azure.cli.core.profiles import ResourceType, get_sdk - RoleAssignmentCreateParameters = get_sdk( - cmd.cli_ctx, ResourceType.MGMT_AUTHORIZATION, - 'RoleAssignmentCreateParameters', - mod='models', operation_group='role_assignments') + RoleAssignmentCreateParameters = get_sdk(cmd.cli_ctx, ResourceType.MGMT_AUTHORIZATION, + 'RoleAssignmentCreateParameters', + mod='models', operation_group='role_assignments') - auth_client = get_auth_management_client(cmd.cli_ctx, identity_scope).role_assignments + assignment_client = get_auth_management_client(cmd.cli_ctx, identity_scope).role_assignments role_assignment_guid = str(_gen_guid()) - result = parse_resource_id(identity_scope) - if result.get('type'): # is a resource id? - name = '{}/Microsoft.Authorization/{}'.format(result['name'], role_assignment_guid) - else: - name = role_assignment_guid - create_params = RoleAssignmentCreateParameters( role_definition_id=role_definition_id, principal_id=identity_principle_id ) - auth_client.create(identity_scope, name, create_params, custom_headers=None) - #return sdk_no_wait(False, auth_client.create, identity_scope, name, create_params) + return assignment_client.create(identity_scope, role_assignment_guid, create_params, custom_headers=None) def _get_resource(client, resource_group_name, *subresources): @@ -831,4 +823,4 @@ def _move_console_cursor_up(lines): def _gen_guid(): import uuid - return uuid.uuid4() \ No newline at end of file + return uuid.uuid4() From da0f55c58cf3bc537c4715b3612c8f87873c672f Mon Sep 17 00:00:00 2001 From: sakreter Date: Tue, 16 Oct 2018 11:29:52 -0700 Subject: [PATCH 04/13] Fixing formatting errors --- .../azure/cli/command_modules/container/custom.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py index 18d638fb6d4..6d309c6cc80 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py @@ -821,6 +821,7 @@ def _move_console_cursor_up(lines): # Use stdout.write to support Python 2 sys.stdout.write('\033[{}A\033[K\033[J'.format(lines)) + def _gen_guid(): import uuid return uuid.uuid4() From 4faf9a8641e958d903d587606de43ea475104cd9 Mon Sep 17 00:00:00 2001 From: sakreter Date: Tue, 16 Oct 2018 13:03:40 -0700 Subject: [PATCH 05/13] fixing differnt return statemnet errors --- .../azure/cli/command_modules/container/custom.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py index 6d309c6cc80..4e841ce4891 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py @@ -222,13 +222,14 @@ def create_container(cmd, return sdk_no_wait(no_wait, container_group_client.create_or_update, resource_group_name, name, cgroup) - LongRunningOperation(cmd.cli_ctx)(sdk_no_wait(no_wait, container_group_client.create_or_update, - resource_group_name, name, cgroup)) + lro = LongRunningOperation(cmd.cli_ctx)(sdk_no_wait(no_wait, container_group_client.create_or_update, + resource_group_name, name, cgroup)) - cg = container_group_client.get(resource_group_name, name) if assign_identity is not None and identity_scope: + cg = container_group_client.get(resource_group_name, name) _create_update_msi_role_assignment(cmd, resource_group_name, name, cg.identity.principal_id, identity_role_id, identity_scope) + return lro def _build_identities_info(identities): From ec623583dbb733f5ecf3a474a6a1f8633fdecc72 Mon Sep 17 00:00:00 2001 From: sakreter Date: Wed, 17 Oct 2018 13:10:17 -0700 Subject: [PATCH 06/13] adding tests for the --scope parameter --- .../recordings/test_container_create.yaml | 94 ++--- .../test_container_create_with_acr.yaml | 76 ++-- .../test_container_create_with_msi.yaml | 395 +++++++++++++----- .../test_container_create_with_vnet.yaml | 46 +- .../test_container_git_repo_volume_mount.yaml | 78 ++-- .../tests/latest/test_container_commands.py | 20 +- 6 files changed, 448 insertions(+), 261 deletions(-) diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create.yaml index 14be2df516c..6f835b22314 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create.yaml +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create.yaml @@ -1,7 +1,7 @@ interactions: - request: body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", - "date": "2018-10-09T22:14:20Z"}}' + "date": "2018-10-17T20:05:43Z"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -11,22 +11,22 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-09T22:14:20Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:05:43Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:14:22 GMT'] + date: ['Wed, 17 Oct 2018 20:05:44 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 201, message: Created} - request: body: null @@ -38,17 +38,17 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-09T22:14:20Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:05:43Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:14:23 GMT'] + date: ['Wed, 17 Oct 2018 20:05:44 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -75,26 +75,26 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","command":["/bin/sh","-c","while - true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"40.78.1.58","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}],"instanceView":{"state":"Pending"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"40.112.199.77","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}],"instanceView":{"state":"Pending"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/be7b8039-7e65-41b3-9a12-727389c9114b?api-version=2018-06-01'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/58d7b3cd-2421-4e04-a122-045c9edf514f?api-version=2018-06-01'] cache-control: [no-cache] - content-length: ['1152'] + content-length: ['1155'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:14:29 GMT'] + date: ['Wed, 17 Oct 2018 20:05:52 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['84'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['97'] - x-ms-ratelimit-remaining-subscription-writes: ['1196'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['89'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['94'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} - request: body: null @@ -105,20 +105,20 @@ interactions: Connection: [keep-alive] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/be7b8039-7e65-41b3-9a12-727389c9114b?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/58d7b3cd-2421-4e04-a122-045c9edf514f?api-version=2018-06-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-09T22:14:28.8640828Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-10-09T22:14:33Z","lastTimestamp":"2018-10-09T22:14:33Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:14:35Z","lastTimestamp":"2018-10-09T22:14:35Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:14:35Z","lastTimestamp":"2018-10-09T22:14:35Z","name":"Created","message":"Created - container with id f9a108b6f245ea37f8e39d526062d43b5ae618ec2733af4e1f3f9ffc4fdc0c45","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:14:36Z","lastTimestamp":"2018-10-09T22:14:36Z","name":"Started","message":"Started - container with id f9a108b6f245ea37f8e39d526062d43b5ae618ec2733af4e1f3f9ffc4fdc0c45","type":"Normal"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-17T20:05:52.3038725Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-10-17T20:05:57Z","lastTimestamp":"2018-10-17T20:05:57Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:05:59Z","lastTimestamp":"2018-10-17T20:05:59Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:05:59Z","lastTimestamp":"2018-10-17T20:05:59Z","name":"Created","message":"Created + container with id b4d6fa10315f956af11ad4a7a2d450206cc91c48baf7fb6c1093e37d14b4ca29","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:05:59Z","lastTimestamp":"2018-10-17T20:05:59Z","name":"Started","message":"Started + container with id b4d6fa10315f956af11ad4a7a2d450206cc91c48baf7fb6c1093e37d14b4ca29","type":"Normal"}]}}'} headers: cache-control: [no-cache] content-length: ['1113'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:14:59 GMT'] + date: ['Wed, 17 Oct 2018 20:06:23 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -135,21 +135,21 @@ interactions: Connection: [keep-alive] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","command":["/bin/sh","-c","while - true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-09T22:14:36Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-09T22:14:33Z","lastTimestamp":"2018-10-09T22:14:33Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:14:35Z","lastTimestamp":"2018-10-09T22:14:35Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:14:35Z","lastTimestamp":"2018-10-09T22:14:35Z","name":"Created","message":"Created - container with id f9a108b6f245ea37f8e39d526062d43b5ae618ec2733af4e1f3f9ffc4fdc0c45","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:14:36Z","lastTimestamp":"2018-10-09T22:14:36Z","name":"Started","message":"Started - container with id f9a108b6f245ea37f8e39d526062d43b5ae618ec2733af4e1f3f9ffc4fdc0c45","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"40.78.1.58","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T20:05:59Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T20:05:57Z","lastTimestamp":"2018-10-17T20:05:57Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:05:59Z","lastTimestamp":"2018-10-17T20:05:59Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:05:59Z","lastTimestamp":"2018-10-17T20:05:59Z","name":"Created","message":"Created + container with id b4d6fa10315f956af11ad4a7a2d450206cc91c48baf7fb6c1093e37d14b4ca29","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:05:59Z","lastTimestamp":"2018-10-17T20:05:59Z","name":"Started","message":"Started + container with id b4d6fa10315f956af11ad4a7a2d450206cc91c48baf7fb6c1093e37d14b4ca29","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"40.112.199.77","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] - content-length: ['2100'] + content-length: ['2103'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:14:59 GMT'] + date: ['Wed, 17 Oct 2018 20:06:25 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -166,22 +166,22 @@ interactions: Connection: [keep-alive] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","command":["/bin/sh","-c","while - true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-09T22:14:36Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-09T22:14:33Z","lastTimestamp":"2018-10-09T22:14:33Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:14:35Z","lastTimestamp":"2018-10-09T22:14:35Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:14:35Z","lastTimestamp":"2018-10-09T22:14:35Z","name":"Created","message":"Created - container with id f9a108b6f245ea37f8e39d526062d43b5ae618ec2733af4e1f3f9ffc4fdc0c45","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:14:36Z","lastTimestamp":"2018-10-09T22:14:36Z","name":"Started","message":"Started - container with id f9a108b6f245ea37f8e39d526062d43b5ae618ec2733af4e1f3f9ffc4fdc0c45","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"40.78.1.58","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T20:05:59Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T20:05:57Z","lastTimestamp":"2018-10-17T20:05:57Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:05:59Z","lastTimestamp":"2018-10-17T20:05:59Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:05:59Z","lastTimestamp":"2018-10-17T20:05:59Z","name":"Created","message":"Created + container with id b4d6fa10315f956af11ad4a7a2d450206cc91c48baf7fb6c1093e37d14b4ca29","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:05:59Z","lastTimestamp":"2018-10-17T20:05:59Z","name":"Started","message":"Started + container with id b4d6fa10315f956af11ad4a7a2d450206cc91c48baf7fb6c1093e37d14b4ca29","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"40.112.199.77","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] - content-length: ['2100'] + content-length: ['2103'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:15:01 GMT'] + date: ['Wed, 17 Oct 2018 20:06:28 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -198,18 +198,18 @@ interactions: Connection: [keep-alive] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups?api-version=2018-10-01 response: body: {string: '{"value":[{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","command":["/bin/sh","-c","while - true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"40.78.1.58","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}]},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}]}'} + true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"40.112.199.77","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}]},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}]}'} headers: cache-control: [no-cache] - content-length: ['1131'] + content-length: ['1134'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:15:01 GMT'] + date: ['Wed, 17 Oct 2018 20:06:28 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -228,7 +228,7 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 @@ -237,9 +237,9 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Tue, 09 Oct 2018 22:15:02 GMT'] + date: ['Wed, 17 Oct 2018 20:06:29 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdXVlBMUkpFUDI1RDJXQ1pRSkxaSFlFS05URUVLTlU1TUpRR3xGNzY0NDU1OEZEOTY3NTk0LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdPQUJEQlRUWFFFQUtHNUZWUEpRMk1SRTRXVEFBVVVQVUczNXwzM0REODFBNTYzNkE1ODhELVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_acr.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_acr.yaml index 7382beb0ded..3cdb14e963f 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_acr.yaml +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_acr.yaml @@ -1,7 +1,7 @@ interactions: - request: body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", - "date": "2018-10-09T22:15:02Z"}}' + "date": "2018-10-17T20:06:30Z"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -11,17 +11,17 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-09T22:15:02Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:06:30Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:15:04 GMT'] + date: ['Wed, 17 Oct 2018 20:06:30 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -38,17 +38,17 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-09T22:15:02Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:06:30Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:15:03 GMT'] + date: ['Wed, 17 Oct 2018 20:06:31 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -70,25 +70,25 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000002","properties":{"image":"clitestregistry1.azurecr.io/nginx:latest","ports":[],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"imageRegistryCredentials":[{"server":"clitestregistry1.azurecr.io","username":"clitestregistry1"}],"restartPolicy":"Always","osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/d3e43779-bbaa-4586-aa1c-030aff0692f5?api-version=2018-06-01'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/b257a589-815f-457b-adc0-093d643f5469?api-version=2018-06-01'] cache-control: [no-cache] content-length: ['780'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:15:06 GMT'] + date: ['Wed, 17 Oct 2018 20:06:34 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['81'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['97'] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['92'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['98'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 201, message: Created} - request: body: null @@ -99,20 +99,20 @@ interactions: Connection: [keep-alive] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/d3e43779-bbaa-4586-aa1c-030aff0692f5?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/b257a589-815f-457b-adc0-093d643f5469?api-version=2018-06-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-09T22:15:06.7773437Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-10-09T22:15:11Z","lastTimestamp":"2018-10-09T22:15:11Z","name":"Pulling","message":"pulling - image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:15:21Z","lastTimestamp":"2018-10-09T22:15:21Z","name":"Pulled","message":"Successfully - pulled image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:15:21Z","lastTimestamp":"2018-10-09T22:15:21Z","name":"Created","message":"Created - container with id 5035b086ab7fed023c88ca6874045642e2049475bf33c97d9d36d0214d9b220d","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:15:21Z","lastTimestamp":"2018-10-09T22:15:21Z","name":"Started","message":"Started - container with id 5035b086ab7fed023c88ca6874045642e2049475bf33c97d9d36d0214d9b220d","type":"Normal"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-17T20:06:33.9917951Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-10-17T20:06:38Z","lastTimestamp":"2018-10-17T20:06:38Z","name":"Pulling","message":"pulling + image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:06:45Z","lastTimestamp":"2018-10-17T20:06:45Z","name":"Pulled","message":"Successfully + pulled image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:06:45Z","lastTimestamp":"2018-10-17T20:06:45Z","name":"Created","message":"Created + container with id 23fa548de3e9c9335f95da46912c8c31f1c358a2c84a283a750e2b017b028f40","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:06:45Z","lastTimestamp":"2018-10-17T20:06:45Z","name":"Started","message":"Started + container with id 23fa548de3e9c9335f95da46912c8c31f1c358a2c84a283a750e2b017b028f40","type":"Normal"}]}}'} headers: cache-control: [no-cache] content-length: ['1167'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:15:36 GMT'] + date: ['Wed, 17 Oct 2018 20:07:04 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -129,20 +129,20 @@ interactions: Connection: [keep-alive] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"clitestregistry1.azurecr.io/nginx:latest","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-09T22:15:21Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-09T22:15:11Z","lastTimestamp":"2018-10-09T22:15:11Z","name":"Pulling","message":"pulling - image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:15:21Z","lastTimestamp":"2018-10-09T22:15:21Z","name":"Pulled","message":"Successfully - pulled image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:15:21Z","lastTimestamp":"2018-10-09T22:15:21Z","name":"Created","message":"Created - container with id 5035b086ab7fed023c88ca6874045642e2049475bf33c97d9d36d0214d9b220d","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:15:21Z","lastTimestamp":"2018-10-09T22:15:21Z","name":"Started","message":"Started - container with id 5035b086ab7fed023c88ca6874045642e2049475bf33c97d9d36d0214d9b220d","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"imageRegistryCredentials":[{"server":"clitestregistry1.azurecr.io","username":"clitestregistry1"}],"restartPolicy":"Always","osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"clitestregistry1.azurecr.io/nginx:latest","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T20:06:45Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T20:06:38Z","lastTimestamp":"2018-10-17T20:06:38Z","name":"Pulling","message":"pulling + image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:06:45Z","lastTimestamp":"2018-10-17T20:06:45Z","name":"Pulled","message":"Successfully + pulled image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:06:45Z","lastTimestamp":"2018-10-17T20:06:45Z","name":"Created","message":"Created + container with id 23fa548de3e9c9335f95da46912c8c31f1c358a2c84a283a750e2b017b028f40","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:06:45Z","lastTimestamp":"2018-10-17T20:06:45Z","name":"Started","message":"Started + container with id 23fa548de3e9c9335f95da46912c8c31f1c358a2c84a283a750e2b017b028f40","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"imageRegistryCredentials":[{"server":"clitestregistry1.azurecr.io","username":"clitestregistry1"}],"restartPolicy":"Always","osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] content-length: ['1782'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:15:37 GMT'] + date: ['Wed, 17 Oct 2018 20:07:04 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -159,21 +159,21 @@ interactions: Connection: [keep-alive] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"clitestregistry1.azurecr.io/nginx:latest","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-09T22:15:21Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-09T22:15:11Z","lastTimestamp":"2018-10-09T22:15:11Z","name":"Pulling","message":"pulling - image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:15:21Z","lastTimestamp":"2018-10-09T22:15:21Z","name":"Pulled","message":"Successfully - pulled image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:15:21Z","lastTimestamp":"2018-10-09T22:15:21Z","name":"Created","message":"Created - container with id 5035b086ab7fed023c88ca6874045642e2049475bf33c97d9d36d0214d9b220d","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:15:21Z","lastTimestamp":"2018-10-09T22:15:21Z","name":"Started","message":"Started - container with id 5035b086ab7fed023c88ca6874045642e2049475bf33c97d9d36d0214d9b220d","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"imageRegistryCredentials":[{"server":"clitestregistry1.azurecr.io","username":"clitestregistry1"}],"restartPolicy":"Always","osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"clitestregistry1.azurecr.io/nginx:latest","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T20:06:45Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T20:06:38Z","lastTimestamp":"2018-10-17T20:06:38Z","name":"Pulling","message":"pulling + image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:06:45Z","lastTimestamp":"2018-10-17T20:06:45Z","name":"Pulled","message":"Successfully + pulled image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:06:45Z","lastTimestamp":"2018-10-17T20:06:45Z","name":"Created","message":"Created + container with id 23fa548de3e9c9335f95da46912c8c31f1c358a2c84a283a750e2b017b028f40","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:06:45Z","lastTimestamp":"2018-10-17T20:06:45Z","name":"Started","message":"Started + container with id 23fa548de3e9c9335f95da46912c8c31f1c358a2c84a283a750e2b017b028f40","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"imageRegistryCredentials":[{"server":"clitestregistry1.azurecr.io","username":"clitestregistry1"}],"restartPolicy":"Always","osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] content-length: ['1782'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:15:37 GMT'] + date: ['Wed, 17 Oct 2018 20:07:05 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -192,7 +192,7 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 @@ -201,9 +201,9 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Tue, 09 Oct 2018 22:15:39 GMT'] + date: ['Wed, 17 Oct 2018 20:07:06 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdVNkxWTFhITEpCQkVKR0hPNVNSSVdWT1BCSEpLUEIyWlBPWHwxMDdFODIwRTE0NDREMzVELVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdOT1pYSVNTRVJUV1BEVjNMUFZON1lJTVBPVU4yM1FZNzY0U3w1OUJCNDlDMUQ1RkE1MjcwLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_msi.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_msi.yaml index c596d3ddcb9..4877d37524d 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_msi.yaml +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_msi.yaml @@ -1,7 +1,7 @@ interactions: - request: body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", - "date": "2018-10-09T22:15:39Z"}}' + "date": "2018-10-17T20:07:07Z"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -11,22 +11,22 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-09T22:15:39Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:07:07Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:15:40 GMT'] + date: ['Wed, 17 Oct 2018 20:07:07 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} - request: body: null @@ -38,17 +38,17 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-09T22:15:39Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:07:07Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:15:41 GMT'] + date: ['Wed, 17 Oct 2018 20:07:08 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -65,17 +65,17 @@ interactions: Content-Length: ['22'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-msi/0.2.0 Azure-SDK-For-Python AZURECLI/2.0.47] + msrest_azure/0.4.34 azure-mgmt-msi/0.2.0 Azure-SDK-For-Python AZURECLI/2.0.49] accept-language: [en-US] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005?api-version=2015-08-31-preview response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005","name":"cliaciidentity000005","type":"Microsoft.ManagedIdentity/userAssignedIdentities","location":"westus","tags":{},"properties":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","principalId":"4bcbb5c3-4c15-48de-9442-adbd32ad93ed","clientId":"2aa393be-8bfb-430b-a4b9-a0bb403649a6","clientSecretUrl":"https://control-westus.identity.azure.net/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005/credentials?tid=72f988bf-86f1-41af-91ab-2d7cd011db47&oid=4bcbb5c3-4c15-48de-9442-adbd32ad93ed&aid=2aa393be-8bfb-430b-a4b9-a0bb403649a6"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005","name":"cliaciidentity000005","type":"Microsoft.ManagedIdentity/userAssignedIdentities","location":"westus","tags":{},"properties":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","principalId":"62c75cac-c3bb-42a9-8968-8c5404eeb14e","clientId":"51eb9008-7ef0-4e79-a3da-84d3639a90e0","clientSecretUrl":"https://control-westus.identity.azure.net/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005/credentials?tid=72f988bf-86f1-41af-91ab-2d7cd011db47&oid=62c75cac-c3bb-42a9-8968-8c5404eeb14e&aid=51eb9008-7ef0-4e79-a3da-84d3639a90e0"}}'} headers: cache-control: [no-cache] content-length: ['936'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:15:43 GMT'] + date: ['Wed, 17 Oct 2018 20:07:11 GMT'] expires: ['-1'] location: [/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005] pragma: [no-cache] @@ -94,17 +94,17 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-09T22:15:39Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:07:07Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:15:44 GMT'] + date: ['Wed, 17 Oct 2018 20:07:11 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -126,24 +126,24 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"168.61.17.91","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"principalId":"f414fa19-31b8-46f8-843e-f73bc7b11fa9","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.169.26","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"principalId":"00ee30b8-d164-424b-a88b-355ae26c7196","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/a72f504f-a8fc-42b4-b11b-c78daa4ae314?api-version=2018-06-01'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/8858bc2f-e248-40f7-8645-7ca21451adc8?api-version=2018-06-01'] cache-control: [no-cache] - content-length: ['883'] + content-length: ['884'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:15:52 GMT'] + date: ['Wed, 17 Oct 2018 20:07:22 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['83'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['97'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['88'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['94'] x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} - request: @@ -155,29 +155,166 @@ interactions: Connection: [keep-alive] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/a72f504f-a8fc-42b4-b11b-c78daa4ae314?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/8858bc2f-e248-40f7-8645-7ca21451adc8?api-version=2018-06-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-09T22:15:52.5521865Z","properties":{"events":[{"count":2,"firstTimestamp":"2018-10-09T22:16:01Z","lastTimestamp":"2018-10-09T22:16:04Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-09T22:16:03Z","lastTimestamp":"2018-10-09T22:16:06Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:16:03Z","lastTimestamp":"2018-10-09T22:16:03Z","name":"Created","message":"Created - container with id 2315021daba9de086e853ad04497bb2da32ef27d47678746495960c7f0e00061","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:16:04Z","lastTimestamp":"2018-10-09T22:16:04Z","name":"Started","message":"Started - container with id 2315021daba9de086e853ad04497bb2da32ef27d47678746495960c7f0e00061","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:16:06Z","lastTimestamp":"2018-10-09T22:16:06Z","name":"Created","message":"Created - container with id 7b10e0a6cf311667580ab8436520ac555501a0d1c186ec5e4a9f1e2ef1a36076","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:16:06Z","lastTimestamp":"2018-10-09T22:16:06Z","name":"Started","message":"Started - container with id 7b10e0a6cf311667580ab8436520ac555501a0d1c186ec5e4a9f1e2ef1a36076","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:16:07Z","lastTimestamp":"2018-10-09T22:16:07Z","name":"BackOff","message":"Back-off + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-17T20:07:22.6820798Z","properties":{"events":[{"count":2,"firstTimestamp":"2018-10-17T20:07:39Z","lastTimestamp":"2018-10-17T20:07:43Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:07:42Z","lastTimestamp":"2018-10-17T20:07:44Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:07:42Z","lastTimestamp":"2018-10-17T20:07:42Z","name":"Created","message":"Created + container with id c2c6eac86666e31903a77924c9d527465b2e1258f4ba343eaca3ecd6c6e58213","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:07:42Z","lastTimestamp":"2018-10-17T20:07:42Z","name":"Started","message":"Started + container with id c2c6eac86666e31903a77924c9d527465b2e1258f4ba343eaca3ecd6c6e58213","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:07:44Z","lastTimestamp":"2018-10-17T20:07:44Z","name":"Created","message":"Created + container with id d1e31df4c1b9636cd098773a3e661c06e9670f960b7b233b2142a2a20ad0a578","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:07:45Z","lastTimestamp":"2018-10-17T20:07:45Z","name":"Started","message":"Started + container with id d1e31df4c1b9636cd098773a3e661c06e9670f960b7b233b2142a2a20ad0a578","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:07:45Z","lastTimestamp":"2018-10-17T20:07:46Z","name":"BackOff","message":"Back-off restarting failed container","type":"Warning"}]}}'} headers: cache-control: [no-cache] content-length: ['1741'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:16:22 GMT'] + date: ['Wed, 17 Oct 2018 20:07:52 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 + response: + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":1,"currentState":{"state":"Waiting","detailStatus":"CrashLoopBackOff: + Back-off 10s restarting failed"},"previousState":{"state":"Terminated","startTime":"2018-10-17T20:07:45Z","exitCode":0,"finishTime":"2018-10-17T20:07:45Z","detailStatus":"Completed"},"events":[{"count":2,"firstTimestamp":"2018-10-17T20:07:39Z","lastTimestamp":"2018-10-17T20:07:43Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:07:42Z","lastTimestamp":"2018-10-17T20:07:44Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:07:42Z","lastTimestamp":"2018-10-17T20:07:42Z","name":"Created","message":"Created + container with id c2c6eac86666e31903a77924c9d527465b2e1258f4ba343eaca3ecd6c6e58213","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:07:42Z","lastTimestamp":"2018-10-17T20:07:42Z","name":"Started","message":"Started + container with id c2c6eac86666e31903a77924c9d527465b2e1258f4ba343eaca3ecd6c6e58213","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:07:44Z","lastTimestamp":"2018-10-17T20:07:44Z","name":"Created","message":"Created + container with id d1e31df4c1b9636cd098773a3e661c06e9670f960b7b233b2142a2a20ad0a578","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:07:45Z","lastTimestamp":"2018-10-17T20:07:45Z","name":"Started","message":"Started + container with id d1e31df4c1b9636cd098773a3e661c06e9670f960b7b233b2142a2a20ad0a578","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:07:45Z","lastTimestamp":"2018-10-17T20:07:46Z","name":"BackOff","message":"Back-off + restarting failed container","type":"Warning"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.169.26","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"principalId":"00ee30b8-d164-424b-a88b-355ae26c7196","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + headers: + cache-control: [no-cache] + content-length: ['2623'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:07:52 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:07:07Z"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:07:53 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-authorization/0.50.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli/providers/Microsoft.Storage/storageAccounts/cliacistorageaccount/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Contributor%27&api-version=2018-01-01-preview + response: + body: {string: '{"value":[{"properties":{"roleName":"Contributor","type":"BuiltInRole","description":"Lets + you manage everything except access to resources.","assignableScopes":["/"],"permissions":[{"actions":["*"],"notActions":["Microsoft.Authorization/*/Delete","Microsoft.Authorization/*/Write","Microsoft.Authorization/elevateAccess/Action","Microsoft.Blueprint/blueprintAssignments/write","Microsoft.Blueprint/blueprintAssignments/delete"],"dataActions":[],"notDataActions":[]}],"createdOn":"0001-01-01T08:00:00.0000000Z","updatedOn":"2018-05-30T19:22:32.4538167Z","createdBy":null,"updatedBy":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c","type":"Microsoft.Authorization/roleDefinitions","name":"b24988ac-6180-42a0-ab88-20f7382dd24c"}]}'} + headers: + cache-control: [no-cache] + content-length: ['832'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:07:54 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/10.0] + set-cookie: [x-ms-gateway-slice=productionb; path=/; secure; HttpOnly] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-request-charge: ['1'] + status: {code: 200, message: OK} +- request: + body: 'b''{"location": "westus", "tags": {}, "identity": {"type": "SystemAssigned"}, + "properties": {"containers": [{"name": "clicontainer000002", "properties": {"image": + "alpine:latest", "ports": [{"protocol": "TCP", "port": 80}], "resources": {"requests": + {"memoryInGB": 1.5, "cpu": 1.0}}}}], "restartPolicy": "Always", "ipAddress": + {"ports": [{"protocol": "TCP", "port": 80}], "type": "Public"}, "osType": "Linux"}}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Length: ['405'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 + response: + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":1,"currentState":{"state":"Waiting","detailStatus":"CrashLoopBackOff: + Back-off 10s restarting failed"},"previousState":{"state":"Terminated","startTime":"2018-10-17T20:07:45Z","exitCode":0,"finishTime":"2018-10-17T20:07:45Z","detailStatus":"Completed"},"events":[{"count":2,"firstTimestamp":"2018-10-17T20:07:39Z","lastTimestamp":"2018-10-17T20:07:43Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:07:42Z","lastTimestamp":"2018-10-17T20:07:44Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:07:42Z","lastTimestamp":"2018-10-17T20:07:42Z","name":"Created","message":"Created + container with id c2c6eac86666e31903a77924c9d527465b2e1258f4ba343eaca3ecd6c6e58213","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:07:42Z","lastTimestamp":"2018-10-17T20:07:42Z","name":"Started","message":"Started + container with id c2c6eac86666e31903a77924c9d527465b2e1258f4ba343eaca3ecd6c6e58213","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:07:44Z","lastTimestamp":"2018-10-17T20:07:44Z","name":"Created","message":"Created + container with id d1e31df4c1b9636cd098773a3e661c06e9670f960b7b233b2142a2a20ad0a578","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:07:45Z","lastTimestamp":"2018-10-17T20:07:45Z","name":"Started","message":"Started + container with id d1e31df4c1b9636cd098773a3e661c06e9670f960b7b233b2142a2a20ad0a578","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:07:45Z","lastTimestamp":"2018-10-17T20:07:46Z","name":"BackOff","message":"Back-off + restarting failed container","type":"Warning"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.169.26","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"principalId":"00ee30b8-d164-424b-a88b-355ae26c7196","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + headers: + cache-control: [no-cache] + content-length: ['2623'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:07:56 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: ['Accept-Encoding,Accept-Encoding'] x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['87'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['93'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null @@ -188,25 +325,25 @@ interactions: Connection: [keep-alive] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] + accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":2,"currentState":{"state":"Terminated","startTime":"2018-10-09T22:16:21Z","exitCode":0,"finishTime":"2018-10-09T22:16:21Z","detailStatus":"Completed"},"previousState":{"state":"Terminated","startTime":"2018-10-09T22:16:06Z","exitCode":0,"finishTime":"2018-10-09T22:16:06Z","detailStatus":"Completed"},"events":[{"count":3,"firstTimestamp":"2018-10-09T22:16:01Z","lastTimestamp":"2018-10-09T22:16:20Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-09T22:16:03Z","lastTimestamp":"2018-10-09T22:16:21Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:16:03Z","lastTimestamp":"2018-10-09T22:16:03Z","name":"Created","message":"Created - container with id 2315021daba9de086e853ad04497bb2da32ef27d47678746495960c7f0e00061","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:16:04Z","lastTimestamp":"2018-10-09T22:16:04Z","name":"Started","message":"Started - container with id 2315021daba9de086e853ad04497bb2da32ef27d47678746495960c7f0e00061","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:16:06Z","lastTimestamp":"2018-10-09T22:16:06Z","name":"Created","message":"Created - container with id 7b10e0a6cf311667580ab8436520ac555501a0d1c186ec5e4a9f1e2ef1a36076","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:16:06Z","lastTimestamp":"2018-10-09T22:16:06Z","name":"Started","message":"Started - container with id 7b10e0a6cf311667580ab8436520ac555501a0d1c186ec5e4a9f1e2ef1a36076","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-09T22:16:07Z","lastTimestamp":"2018-10-09T22:16:22Z","name":"BackOff","message":"Back-off - restarting failed container","type":"Warning"},{"count":1,"firstTimestamp":"2018-10-09T22:16:21Z","lastTimestamp":"2018-10-09T22:16:21Z","name":"Created","message":"Created - container with id a2cd1ce17a021c308314929b85fbbd1026de165f3e484d66477504a1625bc063","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:16:21Z","lastTimestamp":"2018-10-09T22:16:21Z","name":"Started","message":"Started - container with id a2cd1ce17a021c308314929b85fbbd1026de165f3e484d66477504a1625bc063","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"168.61.17.91","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Succeeded"}},"identity":{"principalId":"f414fa19-31b8-46f8-843e-f73bc7b11fa9","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":1,"currentState":{"state":"Waiting","detailStatus":"CrashLoopBackOff: + Back-off 10s restarting failed"},"previousState":{"state":"Terminated","startTime":"2018-10-17T20:07:45Z","exitCode":0,"finishTime":"2018-10-17T20:07:45Z","detailStatus":"Completed"},"events":[{"count":2,"firstTimestamp":"2018-10-17T20:07:39Z","lastTimestamp":"2018-10-17T20:07:43Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:07:42Z","lastTimestamp":"2018-10-17T20:07:44Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:07:42Z","lastTimestamp":"2018-10-17T20:07:42Z","name":"Created","message":"Created + container with id c2c6eac86666e31903a77924c9d527465b2e1258f4ba343eaca3ecd6c6e58213","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:07:42Z","lastTimestamp":"2018-10-17T20:07:42Z","name":"Started","message":"Started + container with id c2c6eac86666e31903a77924c9d527465b2e1258f4ba343eaca3ecd6c6e58213","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:07:44Z","lastTimestamp":"2018-10-17T20:07:44Z","name":"Created","message":"Created + container with id d1e31df4c1b9636cd098773a3e661c06e9670f960b7b233b2142a2a20ad0a578","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:07:45Z","lastTimestamp":"2018-10-17T20:07:45Z","name":"Started","message":"Started + container with id d1e31df4c1b9636cd098773a3e661c06e9670f960b7b233b2142a2a20ad0a578","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:07:45Z","lastTimestamp":"2018-10-17T20:07:46Z","name":"BackOff","message":"Back-off + restarting failed container","type":"Warning"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.169.26","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"principalId":"00ee30b8-d164-424b-a88b-355ae26c7196","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] - content-length: ['3126'] + content-length: ['2623'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:16:23 GMT'] + date: ['Wed, 17 Oct 2018 20:07:56 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -214,6 +351,38 @@ interactions: vary: ['Accept-Encoding,Accept-Encoding'] x-content-type-options: [nosniff] status: {code: 200, message: OK} +- request: + body: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c", + "principalId": "00ee30b8-d164-424b-a88b-355ae26c7196"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Length: ['233'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-authorization/0.50.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli/providers/Microsoft.Storage/storageAccounts/cliacistorageaccount/providers/Microsoft.Authorization/roleAssignments/5396e06a-07f3-4077-90e7-6195acfd0fa5?api-version=2018-01-01-preview + response: + body: {string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c","principalId":"00ee30b8-d164-424b-a88b-355ae26c7196","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli/providers/Microsoft.Storage/storageAccounts/cliacistorageaccount","createdOn":"2018-10-17T20:07:58.4261293Z","updatedOn":"2018-10-17T20:07:58.4261293Z","createdBy":null,"updatedBy":"facd2063-6d5d-4fd5-81f2-8d956c047170"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli/providers/Microsoft.Storage/storageAccounts/cliacistorageaccount/providers/Microsoft.Authorization/roleAssignments/5396e06a-07f3-4077-90e7-6195acfd0fa5","type":"Microsoft.Authorization/roleAssignments","name":"5396e06a-07f3-4077-90e7-6195acfd0fa5"}'} + headers: + cache-control: [no-cache] + content-length: ['901'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:08:01 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/10.0] + set-cookie: [x-ms-gateway-slice=productionb; path=/; secure; HttpOnly] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-charge: ['4'] + status: {code: 201, message: Created} - request: body: null headers: @@ -224,17 +393,17 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-09T22:15:39Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:07:07Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:16:25 GMT'] + date: ['Wed, 17 Oct 2018 20:08:01 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -258,25 +427,25 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000003","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.158.129","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005":{"principalId":"4bcbb5c3-4c15-48de-9442-adbd32ad93ed","clientId":"2aa393be-8bfb-430b-a4b9-a0bb403649a6"}},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"UserAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003","name":"clicontainer000003","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000003","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.215.6","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005":{"principalId":"62c75cac-c3bb-42a9-8968-8c5404eeb14e","clientId":"51eb9008-7ef0-4e79-a3da-84d3639a90e0"}},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"UserAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003","name":"clicontainer000003","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/65687022-7cd1-47e0-be42-199356b4194d?api-version=2018-06-01'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/349e2af4-a4e7-4697-a90e-f1c7ff7d65e8?api-version=2018-06-01'] cache-control: [no-cache] - content-length: ['1187'] + content-length: ['1185'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:16:31 GMT'] + date: ['Wed, 17 Oct 2018 20:08:06 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['82'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['96'] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['86'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['93'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 201, message: Created} - request: body: null @@ -287,20 +456,20 @@ interactions: Connection: [keep-alive] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/65687022-7cd1-47e0-be42-199356b4194d?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/349e2af4-a4e7-4697-a90e-f1c7ff7d65e8?api-version=2018-06-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003","status":"Succeeded","startTime":"2018-10-09T22:16:31.0498322Z","properties":{"events":[{"count":2,"firstTimestamp":"2018-10-09T22:16:36Z","lastTimestamp":"2018-10-09T22:16:41Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-09T22:16:39Z","lastTimestamp":"2018-10-09T22:16:42Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:16:40Z","lastTimestamp":"2018-10-09T22:16:40Z","name":"Created","message":"Created - container","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:16:40Z","lastTimestamp":"2018-10-09T22:16:40Z","name":"Started","message":"Started - container","type":"Normal"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003","status":"Succeeded","startTime":"2018-10-17T20:08:07.1247173Z","properties":{"events":[{"count":2,"firstTimestamp":"2018-10-17T20:08:16Z","lastTimestamp":"2018-10-17T20:08:19Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:08:18Z","lastTimestamp":"2018-10-17T20:08:18Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:08:18Z","lastTimestamp":"2018-10-17T20:08:18Z","name":"Created","message":"Created + container with id 11a14f58ab0bf90882a01844ab10af70cc32d5c94a8e3150aa61591e7a843553","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:08:18Z","lastTimestamp":"2018-10-17T20:08:18Z","name":"Started","message":"Started + container with id 11a14f58ab0bf90882a01844ab10af70cc32d5c94a8e3150aa61591e7a843553","type":"Normal"}]}}'} headers: cache-control: [no-cache] - content-length: ['967'] + content-length: ['1113'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:17:00 GMT'] + date: ['Wed, 17 Oct 2018 20:08:37 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -317,21 +486,24 @@ interactions: Connection: [keep-alive] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000003","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":2,"currentState":{"state":"Terminated","startTime":"2018-10-09T22:16:59Z","exitCode":0,"finishTime":"2018-10-09T22:16:59Z","detailStatus":"Completed"},"previousState":{"state":"Terminated","startTime":"2018-10-09T22:16:43Z","exitCode":0,"finishTime":"2018-10-09T22:16:43Z","detailStatus":"Completed"},"events":[{"count":3,"firstTimestamp":"2018-10-09T22:16:36Z","lastTimestamp":"2018-10-09T22:16:57Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-09T22:16:39Z","lastTimestamp":"2018-10-09T22:16:59Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-09T22:16:40Z","lastTimestamp":"2018-10-09T22:16:59Z","name":"Created","message":"Created - container","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-09T22:16:40Z","lastTimestamp":"2018-10-09T22:16:59Z","name":"Started","message":"Started - container","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-09T22:16:44Z","lastTimestamp":"2018-10-09T22:17:00Z","name":"BackOff","message":"Back-off - restarting failed container","type":"Warning"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.158.129","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Succeeded"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005":{"principalId":"4bcbb5c3-4c15-48de-9442-adbd32ad93ed","clientId":"2aa393be-8bfb-430b-a4b9-a0bb403649a6"}},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"UserAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003","name":"clicontainer000003","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000003","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":1,"currentState":{"state":"Waiting","detailStatus":"CrashLoopBackOff: + Back-off 10s restarting failed"},"previousState":{"state":"Terminated","startTime":"2018-10-17T20:08:20Z","exitCode":0,"finishTime":"2018-10-17T20:08:20Z","detailStatus":"Completed"},"events":[{"count":3,"firstTimestamp":"2018-10-17T20:08:16Z","lastTimestamp":"2018-10-17T20:08:37Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:08:18Z","lastTimestamp":"2018-10-17T20:08:20Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:08:18Z","lastTimestamp":"2018-10-17T20:08:18Z","name":"Created","message":"Created + container with id 11a14f58ab0bf90882a01844ab10af70cc32d5c94a8e3150aa61591e7a843553","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:08:18Z","lastTimestamp":"2018-10-17T20:08:18Z","name":"Started","message":"Started + container with id 11a14f58ab0bf90882a01844ab10af70cc32d5c94a8e3150aa61591e7a843553","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:08:20Z","lastTimestamp":"2018-10-17T20:08:20Z","name":"Created","message":"Created + container with id c72b3a08a321230a9c786ce3928dca44e8684730578afb5977c129cb26bf5863","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:08:20Z","lastTimestamp":"2018-10-17T20:08:20Z","name":"Started","message":"Started + container with id c72b3a08a321230a9c786ce3928dca44e8684730578afb5977c129cb26bf5863","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:08:21Z","lastTimestamp":"2018-10-17T20:08:22Z","name":"BackOff","message":"Back-off + restarting failed container","type":"Warning"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.215.6","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005":{"principalId":"62c75cac-c3bb-42a9-8968-8c5404eeb14e","clientId":"51eb9008-7ef0-4e79-a3da-84d3639a90e0"}},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"UserAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003","name":"clicontainer000003","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] - content-length: ['2376'] + content-length: ['2924'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:17:01 GMT'] + date: ['Wed, 17 Oct 2018 20:08:37 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -349,17 +521,17 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-09T22:15:39Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:07:07Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:17:02 GMT'] + date: ['Wed, 17 Oct 2018 20:08:38 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -383,26 +555,26 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000004","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"168.62.30.231","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005":{"principalId":"4bcbb5c3-4c15-48de-9442-adbd32ad93ed","clientId":"2aa393be-8bfb-430b-a4b9-a0bb403649a6"}},"principalId":"4c5d4ae7-5df6-4e4c-ae36-156b86ffe299","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned, + body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000004","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.155.112","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005":{"principalId":"62c75cac-c3bb-42a9-8968-8c5404eeb14e","clientId":"51eb9008-7ef0-4e79-a3da-84d3639a90e0"}},"principalId":"6966b7eb-0c6c-42db-a37e-d2cf1dce2fd8","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned, UserAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004","name":"clicontainer000004","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/729a82bd-3ab7-46e0-81ee-653b788f956e?api-version=2018-06-01'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/b9bef464-af4b-4340-9d51-2966bbfe9fcc?api-version=2018-06-01'] cache-control: [no-cache] - content-length: ['1255'] + content-length: ['1256'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:17:07 GMT'] + date: ['Wed, 17 Oct 2018 20:08:47 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['81'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['96'] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['85'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['92'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 201, message: Created} - request: body: null @@ -413,23 +585,20 @@ interactions: Connection: [keep-alive] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/729a82bd-3ab7-46e0-81ee-653b788f956e?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/b9bef464-af4b-4340-9d51-2966bbfe9fcc?api-version=2018-06-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004","status":"Succeeded","startTime":"2018-10-09T22:17:08.1276975Z","properties":{"events":[{"count":2,"firstTimestamp":"2018-10-09T22:17:10Z","lastTimestamp":"2018-10-09T22:17:13Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-09T22:17:12Z","lastTimestamp":"2018-10-09T22:17:15Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:17:12Z","lastTimestamp":"2018-10-09T22:17:12Z","name":"Created","message":"Created - container with id f829375aa405870520f30df8c9a67020b6058f47c4b9e3291089ff6068a65c01","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:17:12Z","lastTimestamp":"2018-10-09T22:17:12Z","name":"Started","message":"Started - container with id f829375aa405870520f30df8c9a67020b6058f47c4b9e3291089ff6068a65c01","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:17:15Z","lastTimestamp":"2018-10-09T22:17:15Z","name":"Created","message":"Created - container with id 069d13b8cd2ec948e04332cc64a7cc66afdb8e13994eb471afc1cbac9d09c37b","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:17:15Z","lastTimestamp":"2018-10-09T22:17:15Z","name":"Started","message":"Started - container with id 069d13b8cd2ec948e04332cc64a7cc66afdb8e13994eb471afc1cbac9d09c37b","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:17:15Z","lastTimestamp":"2018-10-09T22:17:15Z","name":"BackOff","message":"Back-off - restarting failed container","type":"Warning"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004","status":"Succeeded","startTime":"2018-10-17T20:08:47.7932611Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-10-17T20:08:52Z","lastTimestamp":"2018-10-17T20:08:52Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:08:56Z","lastTimestamp":"2018-10-17T20:08:56Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:08:56Z","lastTimestamp":"2018-10-17T20:08:56Z","name":"Created","message":"Created + container with id 8dcf2c5c09ac4332d8b190c4b58b21343e00084eb14dfc49709c075447caa51e","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:08:56Z","lastTimestamp":"2018-10-17T20:08:56Z","name":"Started","message":"Started + container with id 8dcf2c5c09ac4332d8b190c4b58b21343e00084eb14dfc49709c075447caa51e","type":"Normal"}]}}'} headers: cache-control: [no-cache] - content-length: ['1741'] + content-length: ['1113'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:17:38 GMT'] + date: ['Wed, 17 Oct 2018 20:09:17 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -446,26 +615,26 @@ interactions: Connection: [keep-alive] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000004","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":2,"currentState":{"state":"Terminated","startTime":"2018-10-09T22:17:33Z","exitCode":0,"finishTime":"2018-10-09T22:17:33Z","detailStatus":"Completed"},"previousState":{"state":"Terminated","startTime":"2018-10-09T22:17:15Z","exitCode":0,"finishTime":"2018-10-09T22:17:15Z","detailStatus":"Completed"},"events":[{"count":3,"firstTimestamp":"2018-10-09T22:17:10Z","lastTimestamp":"2018-10-09T22:17:32Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-09T22:17:12Z","lastTimestamp":"2018-10-09T22:17:33Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:17:12Z","lastTimestamp":"2018-10-09T22:17:12Z","name":"Created","message":"Created - container with id f829375aa405870520f30df8c9a67020b6058f47c4b9e3291089ff6068a65c01","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:17:12Z","lastTimestamp":"2018-10-09T22:17:12Z","name":"Started","message":"Started - container with id f829375aa405870520f30df8c9a67020b6058f47c4b9e3291089ff6068a65c01","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:17:15Z","lastTimestamp":"2018-10-09T22:17:15Z","name":"Created","message":"Created - container with id 069d13b8cd2ec948e04332cc64a7cc66afdb8e13994eb471afc1cbac9d09c37b","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:17:15Z","lastTimestamp":"2018-10-09T22:17:15Z","name":"Started","message":"Started - container with id 069d13b8cd2ec948e04332cc64a7cc66afdb8e13994eb471afc1cbac9d09c37b","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-09T22:17:15Z","lastTimestamp":"2018-10-09T22:17:34Z","name":"BackOff","message":"Back-off - restarting failed container","type":"Warning"},{"count":1,"firstTimestamp":"2018-10-09T22:17:33Z","lastTimestamp":"2018-10-09T22:17:33Z","name":"Created","message":"Created - container with id e8bdc0ec5dc10115c214ae1b204c4c6280333b656ed0c802a9f15c3810728e1d","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:17:33Z","lastTimestamp":"2018-10-09T22:17:33Z","name":"Started","message":"Started - container with id e8bdc0ec5dc10115c214ae1b204c4c6280333b656ed0c802a9f15c3810728e1d","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"168.62.30.231","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Succeeded"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005":{"principalId":"4bcbb5c3-4c15-48de-9442-adbd32ad93ed","clientId":"2aa393be-8bfb-430b-a4b9-a0bb403649a6"}},"principalId":"4c5d4ae7-5df6-4e4c-ae36-156b86ffe299","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned, + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000004","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":2,"currentState":{"state":"Terminated","startTime":"2018-10-17T20:09:16Z","exitCode":0,"finishTime":"2018-10-17T20:09:16Z","detailStatus":"Completed"},"previousState":{"state":"Terminated","startTime":"2018-10-17T20:08:58Z","exitCode":0,"finishTime":"2018-10-17T20:08:58Z","detailStatus":"Completed"},"events":[{"count":3,"firstTimestamp":"2018-10-17T20:08:52Z","lastTimestamp":"2018-10-17T20:09:14Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-17T20:08:56Z","lastTimestamp":"2018-10-17T20:09:16Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:08:56Z","lastTimestamp":"2018-10-17T20:08:56Z","name":"Created","message":"Created + container with id 8dcf2c5c09ac4332d8b190c4b58b21343e00084eb14dfc49709c075447caa51e","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:08:56Z","lastTimestamp":"2018-10-17T20:08:56Z","name":"Started","message":"Started + container with id 8dcf2c5c09ac4332d8b190c4b58b21343e00084eb14dfc49709c075447caa51e","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:08:58Z","lastTimestamp":"2018-10-17T20:08:58Z","name":"Created","message":"Created + container with id 2100e9361de5c05f05c7e607440f342693c0a31dc0f4756ca3cc7ff5b4303868","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:08:58Z","lastTimestamp":"2018-10-17T20:08:58Z","name":"Started","message":"Started + container with id 2100e9361de5c05f05c7e607440f342693c0a31dc0f4756ca3cc7ff5b4303868","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-17T20:08:59Z","lastTimestamp":"2018-10-17T20:09:17Z","name":"BackOff","message":"Back-off + restarting failed container","type":"Warning"},{"count":1,"firstTimestamp":"2018-10-17T20:09:16Z","lastTimestamp":"2018-10-17T20:09:16Z","name":"Created","message":"Created + container with id f80cd8241e98746cbedd46ad9b88a1321dee72520ebc2651d9038444dc490255","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:09:16Z","lastTimestamp":"2018-10-17T20:09:16Z","name":"Started","message":"Started + container with id f80cd8241e98746cbedd46ad9b88a1321dee72520ebc2651d9038444dc490255","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.155.112","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Succeeded"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005":{"principalId":"62c75cac-c3bb-42a9-8968-8c5404eeb14e","clientId":"51eb9008-7ef0-4e79-a3da-84d3639a90e0"}},"principalId":"6966b7eb-0c6c-42db-a37e-d2cf1dce2fd8","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned, UserAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004","name":"clicontainer000004","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] - content-length: ['3498'] + content-length: ['3499'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:17:38 GMT'] + date: ['Wed, 17 Oct 2018 20:09:18 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -484,7 +653,7 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 @@ -493,12 +662,12 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Tue, 09 Oct 2018 22:17:39 GMT'] + date: ['Wed, 17 Oct 2018 20:09:19 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkcyRUZWREtUT0ZGU05OU0xWUlBSQU9CSURPTUJOUENDQ0JTQXxDRDU2M0U5QjU1RTdEQzAzLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdTSU4yT0RQWURURlNUMjZDRlVaNTNZQ0Y2UUM1TVlRQlhOVHxGNjk4RDdGRjlEMTAwQjZGLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-deletes: ['14999'] + x-ms-ratelimit-remaining-subscription-deletes: ['14997'] status: {code: 202, message: Accepted} version: 1 diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_vnet.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_vnet.yaml index 80cedac35ad..7a683455064 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_vnet.yaml +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_vnet.yaml @@ -1,7 +1,7 @@ interactions: - request: body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", - "date": "2018-10-09T22:17:40Z"}}' + "date": "2018-10-17T20:09:20Z"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -11,22 +11,22 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-09T22:17:40Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:09:20Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:17:40 GMT'] + date: ['Wed, 17 Oct 2018 20:09:20 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 201, message: Created} - request: body: null @@ -38,17 +38,17 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-09T22:17:40Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:09:20Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:17:41 GMT'] + date: ['Wed, 17 Oct 2018 20:09:20 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -65,17 +65,17 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-09T22:17:40Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:09:20Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:17:41 GMT'] + date: ['Wed, 17 Oct 2018 20:09:20 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -92,17 +92,17 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-09T22:17:40Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:09:20Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:17:41 GMT'] + date: ['Wed, 17 Oct 2018 20:09:21 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -124,7 +124,7 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 @@ -136,14 +136,14 @@ interactions: cache-control: [no-cache] content-length: ['330'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:17:42 GMT'] + date: ['Wed, 17 Oct 2018 20:09:23 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['80'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['98'] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['84'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['93'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 400, message: Bad Request} - request: body: null @@ -156,7 +156,7 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 @@ -165,12 +165,12 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Tue, 09 Oct 2018 22:17:43 GMT'] + date: ['Wed, 17 Oct 2018 20:09:24 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdPWjZUN1FFN1M2V05TRFo0QzJKU0laMlZGN1Q2QjNPQ0JNN3xDRkYwRUUxMTk4NEI2MjRDLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdKQzU0Wlc0VERYS1lKSDQyTllKSUJBUEFXWlo2S0hZV0tBS3wyQkJBNEExRTZEMENBMEJCLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-deletes: ['14999'] + x-ms-ratelimit-remaining-subscription-deletes: ['14998'] status: {code: 202, message: Accepted} version: 1 diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_git_repo_volume_mount.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_git_repo_volume_mount.yaml index caa56233dad..97ea2f6f7f0 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_git_repo_volume_mount.yaml +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_git_repo_volume_mount.yaml @@ -1,7 +1,7 @@ interactions: - request: body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", - "date": "2018-10-09T22:17:44Z"}}' + "date": "2018-10-17T20:09:25Z"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -11,22 +11,22 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-09T22:17:44Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:09:25Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:17:45 GMT'] + date: ['Wed, 17 Oct 2018 20:09:26 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} - request: body: null @@ -38,17 +38,17 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-09T22:17:44Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:09:25Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:17:45 GMT'] + date: ['Wed, 17 Oct 2018 20:09:25 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -71,25 +71,25 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000002","properties":{"image":"nginx","ports":[],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}},"volumeMounts":[{"name":"gitrepo","mountPath":"/src"}]}}],"restartPolicy":"Always","osType":"Linux","volumes":[{"name":"gitrepo","gitRepo":{"repository":"https://github.com/yolo3301/dumb-flow.git","directory":"./test","revision":"5604f0a8f11bfe13e621418ab6f6a71973e208ce"}}],"instanceView":{"state":"Pending"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/1d76f815-9d9f-471f-82ab-550a5d8ecffa?api-version=2018-06-01'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/4db55ba8-75d1-4dde-9190-3a56191d252b?api-version=2018-06-01'] cache-control: [no-cache] content-length: ['875'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:17:49 GMT'] + date: ['Wed, 17 Oct 2018 20:09:28 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['79'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['94'] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['83'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['92'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} - request: body: null @@ -100,20 +100,20 @@ interactions: Connection: [keep-alive] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/1d76f815-9d9f-471f-82ab-550a5d8ecffa?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/4db55ba8-75d1-4dde-9190-3a56191d252b?api-version=2018-06-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-09T22:17:49.9568305Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-10-09T22:17:54Z","lastTimestamp":"2018-10-09T22:17:54Z","name":"Pulling","message":"pulling - image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:18:03Z","lastTimestamp":"2018-10-09T22:18:03Z","name":"Pulled","message":"Successfully - pulled image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:18:03Z","lastTimestamp":"2018-10-09T22:18:03Z","name":"Created","message":"Created - container with id d96efdc82cfa634b8250d4ef77eff354a9bf143b28eec5646b020fbce0c70b39","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:18:03Z","lastTimestamp":"2018-10-09T22:18:03Z","name":"Started","message":"Started - container with id d96efdc82cfa634b8250d4ef77eff354a9bf143b28eec5646b020fbce0c70b39","type":"Normal"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-17T20:09:28.9205076Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-10-17T20:09:34Z","lastTimestamp":"2018-10-17T20:09:34Z","name":"Pulling","message":"pulling + image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:09:43Z","lastTimestamp":"2018-10-17T20:09:43Z","name":"Pulled","message":"Successfully + pulled image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:09:43Z","lastTimestamp":"2018-10-17T20:09:43Z","name":"Created","message":"Created + container with id 333b38e00a860441377bacb08e48577ea837b859b53b67488e7fd5366fb0167c","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:09:44Z","lastTimestamp":"2018-10-17T20:09:44Z","name":"Started","message":"Started + container with id 333b38e00a860441377bacb08e48577ea837b859b53b67488e7fd5366fb0167c","type":"Normal"}]}}'} headers: cache-control: [no-cache] content-length: ['1097'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:18:20 GMT'] + date: ['Wed, 17 Oct 2018 20:09:59 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -130,20 +130,20 @@ interactions: Connection: [keep-alive] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"nginx","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-09T22:18:03Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-09T22:17:54Z","lastTimestamp":"2018-10-09T22:17:54Z","name":"Pulling","message":"pulling - image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:18:03Z","lastTimestamp":"2018-10-09T22:18:03Z","name":"Pulled","message":"Successfully - pulled image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:18:03Z","lastTimestamp":"2018-10-09T22:18:03Z","name":"Created","message":"Created - container with id d96efdc82cfa634b8250d4ef77eff354a9bf143b28eec5646b020fbce0c70b39","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:18:03Z","lastTimestamp":"2018-10-09T22:18:03Z","name":"Started","message":"Started - container with id d96efdc82cfa634b8250d4ef77eff354a9bf143b28eec5646b020fbce0c70b39","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}},"volumeMounts":[{"name":"gitrepo","mountPath":"/src"}]}}],"restartPolicy":"Always","osType":"Linux","volumes":[{"name":"gitrepo","gitRepo":{"repository":"https://github.com/yolo3301/dumb-flow.git","directory":"./test","revision":"5604f0a8f11bfe13e621418ab6f6a71973e208ce"}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"nginx","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T20:09:43Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T20:09:34Z","lastTimestamp":"2018-10-17T20:09:34Z","name":"Pulling","message":"pulling + image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:09:43Z","lastTimestamp":"2018-10-17T20:09:43Z","name":"Pulled","message":"Successfully + pulled image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:09:43Z","lastTimestamp":"2018-10-17T20:09:43Z","name":"Created","message":"Created + container with id 333b38e00a860441377bacb08e48577ea837b859b53b67488e7fd5366fb0167c","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:09:44Z","lastTimestamp":"2018-10-17T20:09:44Z","name":"Started","message":"Started + container with id 333b38e00a860441377bacb08e48577ea837b859b53b67488e7fd5366fb0167c","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}},"volumeMounts":[{"name":"gitrepo","mountPath":"/src"}]}}],"restartPolicy":"Always","osType":"Linux","volumes":[{"name":"gitrepo","gitRepo":{"repository":"https://github.com/yolo3301/dumb-flow.git","directory":"./test","revision":"5604f0a8f11bfe13e621418ab6f6a71973e208ce"}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] content-length: ['1807'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:18:20 GMT'] + date: ['Wed, 17 Oct 2018 20:09:59 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -160,21 +160,21 @@ interactions: Connection: [keep-alive] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"nginx","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-09T22:18:03Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-09T22:17:54Z","lastTimestamp":"2018-10-09T22:17:54Z","name":"Pulling","message":"pulling - image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:18:03Z","lastTimestamp":"2018-10-09T22:18:03Z","name":"Pulled","message":"Successfully - pulled image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:18:03Z","lastTimestamp":"2018-10-09T22:18:03Z","name":"Created","message":"Created - container with id d96efdc82cfa634b8250d4ef77eff354a9bf143b28eec5646b020fbce0c70b39","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:18:03Z","lastTimestamp":"2018-10-09T22:18:03Z","name":"Started","message":"Started - container with id d96efdc82cfa634b8250d4ef77eff354a9bf143b28eec5646b020fbce0c70b39","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}},"volumeMounts":[{"name":"gitrepo","mountPath":"/src"}]}}],"restartPolicy":"Always","osType":"Linux","volumes":[{"name":"gitrepo","gitRepo":{"repository":"https://github.com/yolo3301/dumb-flow.git","directory":"./test","revision":"5604f0a8f11bfe13e621418ab6f6a71973e208ce"}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"nginx","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T20:09:43Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T20:09:34Z","lastTimestamp":"2018-10-17T20:09:34Z","name":"Pulling","message":"pulling + image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:09:43Z","lastTimestamp":"2018-10-17T20:09:43Z","name":"Pulled","message":"Successfully + pulled image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:09:43Z","lastTimestamp":"2018-10-17T20:09:43Z","name":"Created","message":"Created + container with id 333b38e00a860441377bacb08e48577ea837b859b53b67488e7fd5366fb0167c","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:09:44Z","lastTimestamp":"2018-10-17T20:09:44Z","name":"Started","message":"Started + container with id 333b38e00a860441377bacb08e48577ea837b859b53b67488e7fd5366fb0167c","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}},"volumeMounts":[{"name":"gitrepo","mountPath":"/src"}]}}],"restartPolicy":"Always","osType":"Linux","volumes":[{"name":"gitrepo","gitRepo":{"repository":"https://github.com/yolo3301/dumb-flow.git","directory":"./test","revision":"5604f0a8f11bfe13e621418ab6f6a71973e208ce"}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] content-length: ['1807'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:18:21 GMT'] + date: ['Wed, 17 Oct 2018 20:10:00 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -193,7 +193,7 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.49] accept-language: [en-US] method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 @@ -202,9 +202,9 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Tue, 09 Oct 2018 22:18:21 GMT'] + date: ['Wed, 17 Oct 2018 20:10:01 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkc1NkNJU1hUT0pGRVNTRlhCT0xLU0syWVI2WTVVSjNXNlFLVXwzQUMwMzRFODgwNjlCQThGLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdKNElMS0xIMkxFWlU1S0RMQldZQzdKWFU0VjJCNE80WlZaTnxBNDFEMzg4OUVDMjhGNUI5LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/test_container_commands.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/test_container_commands.py index 19fe6be1278..2915f415fde 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/test_container_commands.py +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/test_container_commands.py @@ -118,6 +118,8 @@ def test_container_create(self, resource_group, resource_group_location): # Test create container using managed identities. @ResourceGroupPreparer() def test_container_create_with_msi(self, resource_group, resource_group_location): + from msrestazure.tools import resource_id + from knack.util import CLIError container_group_name1 = self.create_random_name('clicontainer', 16) container_group_name2 = self.create_random_name('clicontainer', 16) container_group_name3 = self.create_random_name('clicontainer', 16) @@ -126,6 +128,10 @@ def test_container_create_with_msi(self, resource_group, resource_group_location ip_address_type = 'Public' user_assigned_identity_name = self.create_random_name('cliaciidentity', 20) system_assigned_identity = '[system]' + msi_scope = resource_id(subscription=self.get_subscription_id(), + resource_group="azure-cli", + namespace='Microsoft.Storage', type='storageAccounts', + name='cliacistorageaccount') self.kwargs.update({ 'user_assigned_identity_name': user_assigned_identity_name @@ -142,7 +148,8 @@ def test_container_create_with_msi(self, resource_group, resource_group_location 'os_type': os_type, 'ip_address_type': ip_address_type, 'user_assigned_identity': msi_identity_result['id'], - 'system_assigned_identity': system_assigned_identity + 'system_assigned_identity': system_assigned_identity, + 'msi_scope': msi_scope }) # Test create system assigned identity @@ -155,6 +162,17 @@ def test_container_create_with_msi(self, resource_group, resource_group_location self.check('identity.type', 'SystemAssigned'), self.exists('ipAddress.ip'), self.check('containers[0].image', '{image}')]) + + # Test create system assigned identity with scope + self.cmd('container create -g {rg} -n {container_group_name1} --image {image} --os-type {os_type} ' + '--ip-address {ip_address_type} --assign-identity --scope {msi_scope}', + checks=[self.check('name', '{container_group_name1}'), + self.check('location', '{resource_group_location}'), + self.check('provisioningState', 'Succeeded'), + self.check('osType', '{os_type}'), + self.check('identity.type', 'SystemAssigned'), + self.exists('ipAddress.ip'), + self.check('containers[0].image', '{image}')]) # Test create user assigned identity self.cmd('container create -g {rg} -n {container_group_name2} --image {image} --os-type {os_type} ' From 32e06fdd375e09ff051e6a8435dba50108b69353 Mon Sep 17 00:00:00 2001 From: sakreter Date: Wed, 17 Oct 2018 13:24:46 -0700 Subject: [PATCH 07/13] fixing conflicts in recordings --- .../recordings/test_container_create.yaml | 248 +++++++ .../test_container_create_with_acr.yaml | 212 ++++++ .../test_container_create_with_msi.yaml | 672 ++++++++++++++++++ .../test_container_create_with_vnet.yaml | 176 +++++ .../test_container_git_repo_volume_mount.yaml | 213 ++++++ 5 files changed, 1521 insertions(+) create mode 100644 src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create.yaml create mode 100644 src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_acr.yaml create mode 100644 src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_msi.yaml create mode 100644 src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_vnet.yaml create mode 100644 src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_git_repo_volume_mount.yaml diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create.yaml new file mode 100644 index 00000000000..5c03074fba2 --- /dev/null +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create.yaml @@ -0,0 +1,248 @@ +interactions: +- request: + body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", + "date": "2018-10-17T20:13:15Z"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['110'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:13:15Z"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:13:16 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:13:15Z"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:13:17 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: 'b''{"location": "westus", "tags": {}, "properties": {"containers": [{"name": + "clicontainer000002", "properties": {"image": "alpine:latest", "command": ["/bin/sh", + "-c", "while true; do echo hello; sleep 20; done"], "ports": [{"protocol": "TCP", + "port": 8000}, {"protocol": "TCP", "port": 8001}], "environmentVariables": [{"name": + "KEY1", "value": "VALUE1"}, {"name": "KEY2", "value": "FOO=BAR="}], "resources": + {"requests": {"memoryInGB": 1.0, "cpu": 1.0}}, "volumeMounts": [{"name": "secrets", + "mountPath": "/s"}]}}], "restartPolicy": "Never", "ipAddress": {"ports": [{"protocol": + "TCP", "port": 8000}, {"protocol": "TCP", "port": 8001}], "type": "Public", + "dnsNameLabel": "clicontainer000002"}, "osType": "Linux", "volumes": [{"name": + "secrets", "secret": {"secret1": "c3VwZXJhd2Vzb21lc2VjcmV0", "secret2": "bm90aGluZyB0byBzZWU="}}]}}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Length: ['829'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 + response: + body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","command":["/bin/sh","-c","while + true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"104.42.60.190","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}],"instanceView":{"state":"Pending"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/1b09d3d3-9cc9-46f3-a177-09d3ea5692ca?api-version=2018-06-01'] + cache-control: [no-cache] + content-length: ['1155'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:13:30 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['91'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['99'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/1b09d3d3-9cc9-46f3-a177-09d3ea5692ca?api-version=2018-06-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-17T20:13:26.7327266Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-10-17T20:13:35Z","lastTimestamp":"2018-10-17T20:13:35Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:13:38Z","lastTimestamp":"2018-10-17T20:13:38Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:13:38Z","lastTimestamp":"2018-10-17T20:13:38Z","name":"Created","message":"Created + container with id 2948e413395fd65b211c70f5ca735243b4e4790ba55075639986be8274ce9c17","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:13:38Z","lastTimestamp":"2018-10-17T20:13:38Z","name":"Started","message":"Started + container with id 2948e413395fd65b211c70f5ca735243b4e4790ba55075639986be8274ce9c17","type":"Normal"}]}}'} + headers: + cache-control: [no-cache] + content-length: ['1113'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:14:00 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 + response: + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","command":["/bin/sh","-c","while + true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T20:13:38Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T20:13:35Z","lastTimestamp":"2018-10-17T20:13:35Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:13:38Z","lastTimestamp":"2018-10-17T20:13:38Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:13:38Z","lastTimestamp":"2018-10-17T20:13:38Z","name":"Created","message":"Created + container with id 2948e413395fd65b211c70f5ca735243b4e4790ba55075639986be8274ce9c17","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:13:38Z","lastTimestamp":"2018-10-17T20:13:38Z","name":"Started","message":"Started + container with id 2948e413395fd65b211c70f5ca735243b4e4790ba55075639986be8274ce9c17","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"104.42.60.190","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + headers: + cache-control: [no-cache] + content-length: ['2103'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:15:40 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container show] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 + response: + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","command":["/bin/sh","-c","while + true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T20:13:38Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T20:13:35Z","lastTimestamp":"2018-10-17T20:13:35Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:13:38Z","lastTimestamp":"2018-10-17T20:13:38Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:13:38Z","lastTimestamp":"2018-10-17T20:13:38Z","name":"Created","message":"Created + container with id 2948e413395fd65b211c70f5ca735243b4e4790ba55075639986be8274ce9c17","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:13:38Z","lastTimestamp":"2018-10-17T20:13:38Z","name":"Started","message":"Started + container with id 2948e413395fd65b211c70f5ca735243b4e4790ba55075639986be8274ce9c17","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"104.42.60.190","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + headers: + cache-control: [no-cache] + content-length: ['2103'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:15:44 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container list] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups?api-version=2018-10-01 + response: + body: {string: '{"value":[{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","command":["/bin/sh","-c","while + true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"104.42.60.190","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}]},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}]}'} + headers: + cache-control: [no-cache] + content-length: ['1134'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:15:45 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 17 Oct 2018 20:15:46 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkczSExFRVRHN1YyNFBKMlRXRkc3V0oyWVdPSUVSVDZZTjZUVHwyOTgxNkUyNDdENzBEOUUyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-deletes: ['14999'] + status: {code: 202, message: Accepted} +version: 1 diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_acr.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_acr.yaml new file mode 100644 index 00000000000..0184be2a712 --- /dev/null +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_acr.yaml @@ -0,0 +1,212 @@ +interactions: +- request: + body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", + "date": "2018-10-17T20:15:46Z"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['110'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:15:46Z"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:17:27 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:15:46Z"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:17:27 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: 'b''{"location": "westus", "tags": {}, "properties": {"containers": [{"name": + "clicontainer000002", "properties": {"image": "clitestregistry1.azurecr.io/nginx:latest", + "resources": {"requests": {"memoryInGB": 1.5, "cpu": 1.0}}}}], "imageRegistryCredentials": + [{"server": "clitestregistry1.azurecr.io", "username": "clitestregistry1", "password": + "5+36OCtbIwfy8g5glC4bQQrFsfmMc3iD"}], "restartPolicy": "Always", "osType": "Linux"}}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Length: ['424'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 + response: + body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000002","properties":{"image":"clitestregistry1.azurecr.io/nginx:latest","ports":[],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"imageRegistryCredentials":[{"server":"clitestregistry1.azurecr.io","username":"clitestregistry1"}],"restartPolicy":"Always","osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/81ddb545-b9d8-47e3-a4b8-3073b3927def?api-version=2018-06-01'] + cache-control: [no-cache] + content-length: ['780'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:17:30 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['84'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['98'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/81ddb545-b9d8-47e3-a4b8-3073b3927def?api-version=2018-06-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-17T20:17:30.7450547Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-10-17T20:17:39Z","lastTimestamp":"2018-10-17T20:17:39Z","name":"Pulling","message":"pulling + image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:17:45Z","lastTimestamp":"2018-10-17T20:17:45Z","name":"Pulled","message":"Successfully + pulled image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:17:45Z","lastTimestamp":"2018-10-17T20:17:45Z","name":"Created","message":"Created + container with id baa521b408701342588fb380b836034c05f5c0cf0d384943ae98a05bb0591d45","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:17:45Z","lastTimestamp":"2018-10-17T20:17:45Z","name":"Started","message":"Started + container with id baa521b408701342588fb380b836034c05f5c0cf0d384943ae98a05bb0591d45","type":"Normal"}]}}'} + headers: + cache-control: [no-cache] + content-length: ['1167'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:18:01 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 + response: + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"clitestregistry1.azurecr.io/nginx:latest","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T20:17:45Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T20:17:39Z","lastTimestamp":"2018-10-17T20:17:39Z","name":"Pulling","message":"pulling + image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:17:45Z","lastTimestamp":"2018-10-17T20:17:45Z","name":"Pulled","message":"Successfully + pulled image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:17:45Z","lastTimestamp":"2018-10-17T20:17:45Z","name":"Created","message":"Created + container with id baa521b408701342588fb380b836034c05f5c0cf0d384943ae98a05bb0591d45","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:17:45Z","lastTimestamp":"2018-10-17T20:17:45Z","name":"Started","message":"Started + container with id baa521b408701342588fb380b836034c05f5c0cf0d384943ae98a05bb0591d45","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"imageRegistryCredentials":[{"server":"clitestregistry1.azurecr.io","username":"clitestregistry1"}],"restartPolicy":"Always","osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + headers: + cache-control: [no-cache] + content-length: ['1782'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:18:01 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container show] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 + response: + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"clitestregistry1.azurecr.io/nginx:latest","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T20:17:45Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T20:17:39Z","lastTimestamp":"2018-10-17T20:17:39Z","name":"Pulling","message":"pulling + image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:17:45Z","lastTimestamp":"2018-10-17T20:17:45Z","name":"Pulled","message":"Successfully + pulled image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:17:45Z","lastTimestamp":"2018-10-17T20:17:45Z","name":"Created","message":"Created + container with id baa521b408701342588fb380b836034c05f5c0cf0d384943ae98a05bb0591d45","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:17:45Z","lastTimestamp":"2018-10-17T20:17:45Z","name":"Started","message":"Started + container with id baa521b408701342588fb380b836034c05f5c0cf0d384943ae98a05bb0591d45","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"imageRegistryCredentials":[{"server":"clitestregistry1.azurecr.io","username":"clitestregistry1"}],"restartPolicy":"Always","osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + headers: + cache-control: [no-cache] + content-length: ['1782'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:18:01 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 17 Oct 2018 20:18:02 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdLWEpFNTdDQU9LUEZHU1lJQUJTSUtQN1pUUEhQSzVPWlZaUXwxOTBBOTlCMzQyMTdGNzI1LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-deletes: ['14999'] + status: {code: 202, message: Accepted} +version: 1 diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_msi.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_msi.yaml new file mode 100644 index 00000000000..cb6e2fef74c --- /dev/null +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_msi.yaml @@ -0,0 +1,672 @@ +interactions: +- request: + body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", + "date": "2018-10-17T20:18:03Z"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['110'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:18:03Z"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:18:03 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [identity create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:18:03Z"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:18:05 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: '{"location": "westus"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [identity create] + Connection: [keep-alive] + Content-Length: ['22'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-msi/0.2.0 Azure-SDK-For-Python AZURECLI/2.0.49] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005?api-version=2015-08-31-preview + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005","name":"cliaciidentity000005","type":"Microsoft.ManagedIdentity/userAssignedIdentities","location":"westus","tags":{},"properties":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","principalId":"bb327d04-b389-4ae3-a61a-d7c15718136f","clientId":"c42f27f1-9abe-4af9-9516-2a1a24411571","clientSecretUrl":"https://control-westus.identity.azure.net/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005/credentials?tid=72f988bf-86f1-41af-91ab-2d7cd011db47&oid=bb327d04-b389-4ae3-a61a-d7c15718136f&aid=c42f27f1-9abe-4af9-9516-2a1a24411571"}}'} + headers: + cache-control: [no-cache] + content-length: ['936'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:18:07 GMT'] + expires: ['-1'] + location: [/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005] + pragma: [no-cache] + server: [Microsoft-HTTPAPI/2.0] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1196'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:18:03Z"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:18:07 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: 'b''{"location": "westus", "tags": {}, "identity": {"type": "SystemAssigned"}, + "properties": {"containers": [{"name": "clicontainer000002", "properties": {"image": + "alpine:latest", "ports": [{"protocol": "TCP", "port": 80}], "resources": {"requests": + {"memoryInGB": 1.5, "cpu": 1.0}}}}], "restartPolicy": "Always", "ipAddress": + {"ports": [{"protocol": "TCP", "port": 80}], "type": "Public"}, "osType": "Linux"}}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Length: ['405'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 + response: + body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.183.97","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"principalId":"fa12093a-7da7-419c-9d0d-4afe35181abd","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/b8f007c9-5c45-426b-ad0a-09abdfc3965e?api-version=2018-06-01'] + cache-control: [no-cache] + content-length: ['884'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:18:17 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['92'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['99'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/b8f007c9-5c45-426b-ad0a-09abdfc3965e?api-version=2018-06-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-17T20:18:18.2708838Z","properties":{"events":[{"count":2,"firstTimestamp":"2018-10-17T20:18:28Z","lastTimestamp":"2018-10-17T20:18:31Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:30Z","lastTimestamp":"2018-10-17T20:18:33Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:31Z","lastTimestamp":"2018-10-17T20:18:33Z","name":"Created","message":"Created + container","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:31Z","lastTimestamp":"2018-10-17T20:18:33Z","name":"Started","message":"Started + container","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:34Z","lastTimestamp":"2018-10-17T20:18:35Z","name":"BackOff","message":"Back-off + restarting failed container","type":"Warning"}]}}'} + headers: + cache-control: [no-cache] + content-length: ['1141'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:18:49 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 + response: + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":1,"currentState":{"state":"Waiting","detailStatus":"CrashLoopBackOff: + Back-off 10s restarting failed"},"previousState":{"state":"Terminated","startTime":"2018-10-17T20:18:33Z","exitCode":0,"finishTime":"2018-10-17T20:18:33Z","detailStatus":"Completed"},"events":[{"count":2,"firstTimestamp":"2018-10-17T20:18:28Z","lastTimestamp":"2018-10-17T20:18:31Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:30Z","lastTimestamp":"2018-10-17T20:18:33Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:31Z","lastTimestamp":"2018-10-17T20:18:33Z","name":"Created","message":"Created + container","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:31Z","lastTimestamp":"2018-10-17T20:18:33Z","name":"Started","message":"Started + container","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:34Z","lastTimestamp":"2018-10-17T20:18:35Z","name":"BackOff","message":"Back-off + restarting failed container","type":"Warning"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.183.97","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"principalId":"fa12093a-7da7-419c-9d0d-4afe35181abd","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + headers: + cache-control: [no-cache] + content-length: ['2023'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:18:48 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:18:03Z"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:18:49 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-authorization/0.50.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli/providers/Microsoft.Storage/storageAccounts/cliacistorageaccount/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Contributor%27&api-version=2018-01-01-preview + response: + body: {string: '{"value":[{"properties":{"roleName":"Contributor","type":"BuiltInRole","description":"Lets + you manage everything except access to resources.","assignableScopes":["/"],"permissions":[{"actions":["*"],"notActions":["Microsoft.Authorization/*/Delete","Microsoft.Authorization/*/Write","Microsoft.Authorization/elevateAccess/Action","Microsoft.Blueprint/blueprintAssignments/write","Microsoft.Blueprint/blueprintAssignments/delete"],"dataActions":[],"notDataActions":[]}],"createdOn":"0001-01-01T08:00:00.0000000Z","updatedOn":"2018-05-30T19:22:32.4538167Z","createdBy":null,"updatedBy":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c","type":"Microsoft.Authorization/roleDefinitions","name":"b24988ac-6180-42a0-ab88-20f7382dd24c"}]}'} + headers: + cache-control: [no-cache] + content-length: ['832'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:18:49 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/10.0] + set-cookie: [x-ms-gateway-slice=productionb; path=/; secure; HttpOnly] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-request-charge: ['1'] + status: {code: 200, message: OK} +- request: + body: 'b''{"location": "westus", "tags": {}, "identity": {"type": "SystemAssigned"}, + "properties": {"containers": [{"name": "clicontainer000002", "properties": {"image": + "alpine:latest", "ports": [{"protocol": "TCP", "port": 80}], "resources": {"requests": + {"memoryInGB": 1.5, "cpu": 1.0}}}}], "restartPolicy": "Always", "ipAddress": + {"ports": [{"protocol": "TCP", "port": 80}], "type": "Public"}, "osType": "Linux"}}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Length: ['405'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 + response: + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":1,"currentState":{"state":"Waiting","detailStatus":"CrashLoopBackOff: + Back-off 10s restarting failed"},"previousState":{"state":"Terminated","startTime":"2018-10-17T20:18:33Z","exitCode":0,"finishTime":"2018-10-17T20:18:33Z","detailStatus":"Completed"},"events":[{"count":2,"firstTimestamp":"2018-10-17T20:18:28Z","lastTimestamp":"2018-10-17T20:18:31Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:30Z","lastTimestamp":"2018-10-17T20:18:33Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:31Z","lastTimestamp":"2018-10-17T20:18:33Z","name":"Created","message":"Created + container","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:31Z","lastTimestamp":"2018-10-17T20:18:33Z","name":"Started","message":"Started + container","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:34Z","lastTimestamp":"2018-10-17T20:18:35Z","name":"BackOff","message":"Back-off + restarting failed container","type":"Warning"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.183.97","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"principalId":"fa12093a-7da7-419c-9d0d-4afe35181abd","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + headers: + cache-control: [no-cache] + content-length: ['2023'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:18:50 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['83'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['97'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 + response: + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":1,"currentState":{"state":"Waiting","detailStatus":"CrashLoopBackOff: + Back-off 10s restarting failed"},"previousState":{"state":"Terminated","startTime":"2018-10-17T20:18:33Z","exitCode":0,"finishTime":"2018-10-17T20:18:33Z","detailStatus":"Completed"},"events":[{"count":3,"firstTimestamp":"2018-10-17T20:18:28Z","lastTimestamp":"2018-10-17T20:18:51Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:30Z","lastTimestamp":"2018-10-17T20:18:33Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:31Z","lastTimestamp":"2018-10-17T20:18:33Z","name":"Created","message":"Created + container","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:31Z","lastTimestamp":"2018-10-17T20:18:33Z","name":"Started","message":"Started + container","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:34Z","lastTimestamp":"2018-10-17T20:18:35Z","name":"BackOff","message":"Back-off + restarting failed container","type":"Warning"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.183.97","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"principalId":"fa12093a-7da7-419c-9d0d-4afe35181abd","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + headers: + cache-control: [no-cache] + content-length: ['2023'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:18:50 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c", + "principalId": "fa12093a-7da7-419c-9d0d-4afe35181abd"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Length: ['233'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-authorization/0.50.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli/providers/Microsoft.Storage/storageAccounts/cliacistorageaccount/providers/Microsoft.Authorization/roleAssignments/fd046d5d-5d77-47a5-ba1c-ed8c4cc5a361?api-version=2018-01-01-preview + response: + body: {string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c","principalId":"fa12093a-7da7-419c-9d0d-4afe35181abd","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli/providers/Microsoft.Storage/storageAccounts/cliacistorageaccount","createdOn":"2018-10-17T20:18:52.7464040Z","updatedOn":"2018-10-17T20:18:52.7464040Z","createdBy":null,"updatedBy":"facd2063-6d5d-4fd5-81f2-8d956c047170"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli/providers/Microsoft.Storage/storageAccounts/cliacistorageaccount/providers/Microsoft.Authorization/roleAssignments/fd046d5d-5d77-47a5-ba1c-ed8c4cc5a361","type":"Microsoft.Authorization/roleAssignments","name":"fd046d5d-5d77-47a5-ba1c-ed8c4cc5a361"}'} + headers: + cache-control: [no-cache] + content-length: ['901'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:18:54 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/10.0] + set-cookie: [x-ms-gateway-slice=productionb; path=/; secure; HttpOnly] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-request-charge: ['3'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:18:03Z"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:18:54 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: 'b''b\''b\\\''{"location": "westus", "tags": {}, "identity": {"type": "UserAssigned", + "userAssignedIdentities": {"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005": + {}}}, "properties": {"containers": [{"name": "clicontainer000003", "properties": + {"image": "alpine:latest", "ports": [{"protocol": "TCP", "port": 80}], "resources": + {"requests": {"memoryInGB": 1.5, "cpu": 1.0}}}}], "restartPolicy": "Always", + "ipAddress": {"ports": [{"protocol": "TCP", "port": 80}], "type": "Public"}, + "osType": "Linux"}}\\\''\''''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Length: ['661'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003?api-version=2018-10-01 + response: + body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000003","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"168.62.31.19","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005":{"principalId":"bb327d04-b389-4ae3-a61a-d7c15718136f","clientId":"c42f27f1-9abe-4af9-9516-2a1a24411571"}},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"UserAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003","name":"clicontainer000003","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/20ec46cd-02f2-47d8-acd8-4a490a50542b?api-version=2018-06-01'] + cache-control: [no-cache] + content-length: ['1185'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:19:01 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['91'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['98'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/20ec46cd-02f2-47d8-acd8-4a490a50542b?api-version=2018-06-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003","status":"Succeeded","startTime":"2018-10-17T20:19:02.115362Z","properties":{"events":[{"count":2,"firstTimestamp":"2018-10-17T20:19:04Z","lastTimestamp":"2018-10-17T20:19:09Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:19:07Z","lastTimestamp":"2018-10-17T20:19:10Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:08Z","lastTimestamp":"2018-10-17T20:19:08Z","name":"Created","message":"Created + container with id d74f95991cecf81dbf41e6b42d1ba26c0c7632d8e421cf39b0ad20b59ec1f449","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:08Z","lastTimestamp":"2018-10-17T20:19:08Z","name":"Started","message":"Started + container with id d74f95991cecf81dbf41e6b42d1ba26c0c7632d8e421cf39b0ad20b59ec1f449","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:10Z","lastTimestamp":"2018-10-17T20:19:10Z","name":"Created","message":"Created + container with id d77a1c76f82e7a49f7b35f212d2d0126ba100386235682605bc7e7f3b959e47b","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:10Z","lastTimestamp":"2018-10-17T20:19:10Z","name":"Started","message":"Started + container with id d77a1c76f82e7a49f7b35f212d2d0126ba100386235682605bc7e7f3b959e47b","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:11Z","lastTimestamp":"2018-10-17T20:19:11Z","name":"BackOff","message":"Back-off + restarting failed container","type":"Warning"}]}}'} + headers: + cache-control: [no-cache] + content-length: ['1740'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:19:31 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003?api-version=2018-10-01 + response: + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000003","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":2,"currentState":{"state":"Terminated","startTime":"2018-10-17T20:19:28Z","exitCode":0,"finishTime":"2018-10-17T20:19:28Z","detailStatus":"Completed"},"previousState":{"state":"Terminated","startTime":"2018-10-17T20:19:10Z","exitCode":0,"finishTime":"2018-10-17T20:19:10Z","detailStatus":"Completed"},"events":[{"count":3,"firstTimestamp":"2018-10-17T20:19:04Z","lastTimestamp":"2018-10-17T20:19:27Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-17T20:19:07Z","lastTimestamp":"2018-10-17T20:19:28Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:08Z","lastTimestamp":"2018-10-17T20:19:08Z","name":"Created","message":"Created + container with id d74f95991cecf81dbf41e6b42d1ba26c0c7632d8e421cf39b0ad20b59ec1f449","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:08Z","lastTimestamp":"2018-10-17T20:19:08Z","name":"Started","message":"Started + container with id d74f95991cecf81dbf41e6b42d1ba26c0c7632d8e421cf39b0ad20b59ec1f449","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:10Z","lastTimestamp":"2018-10-17T20:19:10Z","name":"Created","message":"Created + container with id d77a1c76f82e7a49f7b35f212d2d0126ba100386235682605bc7e7f3b959e47b","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:10Z","lastTimestamp":"2018-10-17T20:19:10Z","name":"Started","message":"Started + container with id d77a1c76f82e7a49f7b35f212d2d0126ba100386235682605bc7e7f3b959e47b","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-17T20:19:11Z","lastTimestamp":"2018-10-17T20:19:29Z","name":"BackOff","message":"Back-off + restarting failed container","type":"Warning"},{"count":1,"firstTimestamp":"2018-10-17T20:19:28Z","lastTimestamp":"2018-10-17T20:19:28Z","name":"Created","message":"Created + container with id 8bc8790cb09d0d62f0baec3f6134ff447466c2108bb4aa66fa88109215935306","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:28Z","lastTimestamp":"2018-10-17T20:19:28Z","name":"Started","message":"Started + container with id 8bc8790cb09d0d62f0baec3f6134ff447466c2108bb4aa66fa88109215935306","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"168.62.31.19","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Succeeded"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005":{"principalId":"bb327d04-b389-4ae3-a61a-d7c15718136f","clientId":"c42f27f1-9abe-4af9-9516-2a1a24411571"}},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"UserAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003","name":"clicontainer000003","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + headers: + cache-control: [no-cache] + content-length: ['3428'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:19:32 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:18:03Z"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:19:33 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: 'b''b\''b\\\''{"location": "westus", "tags": {}, "identity": {"type": "SystemAssigned, + UserAssigned", "userAssignedIdentities": {"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005": + {}}}, "properties": {"containers": [{"name": "clicontainer000004", "properties": + {"image": "alpine:latest", "ports": [{"protocol": "TCP", "port": 80}], "resources": + {"requests": {"memoryInGB": 1.5, "cpu": 1.0}}}}], "restartPolicy": "Always", + "ipAddress": {"ports": [{"protocol": "TCP", "port": 80}], "type": "Public"}, + "osType": "Linux"}}\\\''\''''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Length: ['677'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004?api-version=2018-10-01 + response: + body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000004","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"40.83.218.26","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005":{"principalId":"bb327d04-b389-4ae3-a61a-d7c15718136f","clientId":"c42f27f1-9abe-4af9-9516-2a1a24411571"}},"principalId":"4f29bb01-763e-4c38-8b11-dad40518af22","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned, + UserAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004","name":"clicontainer000004","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/e172eb6d-63e7-434a-96ec-524e1fd04b41?api-version=2018-06-01'] + cache-control: [no-cache] + content-length: ['1254'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:19:41 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['81'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['95'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/e172eb6d-63e7-434a-96ec-524e1fd04b41?api-version=2018-06-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004","status":"Succeeded","startTime":"2018-10-17T20:19:41.6935382Z","properties":{"events":[{"count":2,"firstTimestamp":"2018-10-17T20:19:46Z","lastTimestamp":"2018-10-17T20:19:49Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:19:48Z","lastTimestamp":"2018-10-17T20:19:51Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:49Z","lastTimestamp":"2018-10-17T20:19:49Z","name":"Created","message":"Created + container with id 1971fe773838af0b78f16e693107986b6e7807fcbcb8028d8f827e26698d4927","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:49Z","lastTimestamp":"2018-10-17T20:19:49Z","name":"Started","message":"Started + container with id 1971fe773838af0b78f16e693107986b6e7807fcbcb8028d8f827e26698d4927","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:51Z","lastTimestamp":"2018-10-17T20:19:51Z","name":"Created","message":"Created + container with id 507f4bd807a9102d82c2507802d9420d70fcf753d7519a27cff514b8ce9d8f55","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:51Z","lastTimestamp":"2018-10-17T20:19:51Z","name":"Started","message":"Started + container with id 507f4bd807a9102d82c2507802d9420d70fcf753d7519a27cff514b8ce9d8f55","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:19:51Z","lastTimestamp":"2018-10-17T20:19:52Z","name":"BackOff","message":"Back-off + restarting failed container","type":"Warning"}]}}'} + headers: + cache-control: [no-cache] + content-length: ['1741'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:20:12 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004?api-version=2018-10-01 + response: + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000004","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":2,"currentState":{"state":"Terminated","startTime":"2018-10-17T20:20:05Z","exitCode":0,"finishTime":"2018-10-17T20:20:06Z","detailStatus":"Completed"},"previousState":{"state":"Terminated","startTime":"2018-10-17T20:19:51Z","exitCode":0,"finishTime":"2018-10-17T20:19:51Z","detailStatus":"Completed"},"events":[{"count":3,"firstTimestamp":"2018-10-17T20:19:46Z","lastTimestamp":"2018-10-17T20:20:04Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-17T20:19:48Z","lastTimestamp":"2018-10-17T20:20:05Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:49Z","lastTimestamp":"2018-10-17T20:19:49Z","name":"Created","message":"Created + container with id 1971fe773838af0b78f16e693107986b6e7807fcbcb8028d8f827e26698d4927","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:49Z","lastTimestamp":"2018-10-17T20:19:49Z","name":"Started","message":"Started + container with id 1971fe773838af0b78f16e693107986b6e7807fcbcb8028d8f827e26698d4927","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:51Z","lastTimestamp":"2018-10-17T20:19:51Z","name":"Created","message":"Created + container with id 507f4bd807a9102d82c2507802d9420d70fcf753d7519a27cff514b8ce9d8f55","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:51Z","lastTimestamp":"2018-10-17T20:19:51Z","name":"Started","message":"Started + container with id 507f4bd807a9102d82c2507802d9420d70fcf753d7519a27cff514b8ce9d8f55","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-17T20:19:51Z","lastTimestamp":"2018-10-17T20:20:07Z","name":"BackOff","message":"Back-off + restarting failed container","type":"Warning"},{"count":1,"firstTimestamp":"2018-10-17T20:20:05Z","lastTimestamp":"2018-10-17T20:20:05Z","name":"Created","message":"Created + container with id 8a780bd83415d30c217bc7cd2139325cafbfaeb9cf43aa75f3b3ee3ad01bd447","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:20:06Z","lastTimestamp":"2018-10-17T20:20:06Z","name":"Started","message":"Started + container with id 8a780bd83415d30c217bc7cd2139325cafbfaeb9cf43aa75f3b3ee3ad01bd447","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"40.83.218.26","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Succeeded"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005":{"principalId":"bb327d04-b389-4ae3-a61a-d7c15718136f","clientId":"c42f27f1-9abe-4af9-9516-2a1a24411571"}},"principalId":"4f29bb01-763e-4c38-8b11-dad40518af22","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned, + UserAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004","name":"clicontainer000004","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + headers: + cache-control: [no-cache] + content-length: ['3497'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:20:12 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 17 Oct 2018 20:20:13 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdJUjVEQUlNS1k0UlpMUUhTUk9BTUNLQ0lNSERQU1ZRNU5PTHxDQzc1MkM4RDE0RThEQjUyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-deletes: ['14998'] + status: {code: 202, message: Accepted} +version: 1 diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_vnet.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_vnet.yaml new file mode 100644 index 00000000000..d807aca7727 --- /dev/null +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_vnet.yaml @@ -0,0 +1,176 @@ +interactions: +- request: + body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", + "date": "2018-10-17T20:20:14Z"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['110'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:20:14Z"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:20:15 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:20:14Z"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:20:14 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:20:14Z"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:20:15 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:20:14Z"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:20:15 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: 'b''b\''b\\\''{"location": "westus", "tags": {}, "properties": {"containers": + [{"name": "clicontainer000002", "properties": {"image": "nginx", "ports": [{"protocol": + "TCP", "port": 80}], "resources": {"requests": {"memoryInGB": 1.5, "cpu": 1.0}}}}], + "restartPolicy": "Always", "ipAddress": {"ports": [{"protocol": "TCP", "port": + 80}], "type": "Private"}, "osType": "Linux", "networkProfile": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkProfiles/nprofile000005"}}}\\\''\''''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Length: ['591'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 + response: + body: {string: '{"error":{"code":"NetworkProfileNotFound","message":"Network profile + ''/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkProfiles/nprofile000005'' + is not found for container group ''clicontainer000002''."}}'} + headers: + cache-control: [no-cache] + content-length: ['330'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:20:16 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['90'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['97'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 400, message: Bad Request} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 17 Oct 2018 20:20:17 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdETUpSVkJNTElHNEg0QjdKWTJENEtINEI0M0NHSVRGQ0hFSnwyNjU4MkU3NjgzMkRENzI2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-deletes: ['14999'] + status: {code: 202, message: Accepted} +version: 1 diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_git_repo_volume_mount.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_git_repo_volume_mount.yaml new file mode 100644 index 00000000000..97a5818bdff --- /dev/null +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_git_repo_volume_mount.yaml @@ -0,0 +1,213 @@ +interactions: +- request: + body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", + "date": "2018-10-17T20:20:18Z"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['110'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:20:18Z"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:20:19 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:20:18Z"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:20:19 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: 'b''{"location": "westus", "tags": {}, "properties": {"containers": [{"name": + "clicontainer000002", "properties": {"image": "nginx", "resources": {"requests": + {"memoryInGB": 1.5, "cpu": 1.0}}, "volumeMounts": [{"name": "gitrepo", "mountPath": + "/src"}]}}], "restartPolicy": "Always", "osType": "Linux", "volumes": [{"name": + "gitrepo", "gitRepo": {"directory": "./test", "repository": "https://github.com/yolo3301/dumb-flow.git", + "revision": "5604f0a8f11bfe13e621418ab6f6a71973e208ce"}}]}}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Length: ['481'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 + response: + body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000002","properties":{"image":"nginx","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Waiting","detailStatus":"ContainerCreating"}},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}},"volumeMounts":[{"name":"gitrepo","mountPath":"/src"}]}}],"restartPolicy":"Always","osType":"Linux","volumes":[{"name":"gitrepo","gitRepo":{"repository":"https://github.com/yolo3301/dumb-flow.git","directory":"./test","revision":"5604f0a8f11bfe13e621418ab6f6a71973e208ce"}}],"instanceView":{"state":"Pending"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/d8a6a606-8457-4f6f-b627-ed23053e2d5b?api-version=2018-06-01'] + cache-control: [no-cache] + content-length: ['979'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:20:21 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['89'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['96'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/d8a6a606-8457-4f6f-b627-ed23053e2d5b?api-version=2018-06-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-17T20:20:22.5817049Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-10-17T20:20:25Z","lastTimestamp":"2018-10-17T20:20:25Z","name":"Pulling","message":"pulling + image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:20:33Z","lastTimestamp":"2018-10-17T20:20:33Z","name":"Pulled","message":"Successfully + pulled image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:20:34Z","lastTimestamp":"2018-10-17T20:20:34Z","name":"Created","message":"Created + container with id 3b92f23ee776fe01a5339c9d0bb27d5e9f56f455714f096cfc401349916de72a","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:20:34Z","lastTimestamp":"2018-10-17T20:20:34Z","name":"Started","message":"Started + container with id 3b92f23ee776fe01a5339c9d0bb27d5e9f56f455714f096cfc401349916de72a","type":"Normal"}]}}'} + headers: + cache-control: [no-cache] + content-length: ['1097'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:20:52 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 + response: + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"nginx","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T20:20:34Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T20:20:25Z","lastTimestamp":"2018-10-17T20:20:25Z","name":"Pulling","message":"pulling + image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:20:33Z","lastTimestamp":"2018-10-17T20:20:33Z","name":"Pulled","message":"Successfully + pulled image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:20:34Z","lastTimestamp":"2018-10-17T20:20:34Z","name":"Created","message":"Created + container with id 3b92f23ee776fe01a5339c9d0bb27d5e9f56f455714f096cfc401349916de72a","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:20:34Z","lastTimestamp":"2018-10-17T20:20:34Z","name":"Started","message":"Started + container with id 3b92f23ee776fe01a5339c9d0bb27d5e9f56f455714f096cfc401349916de72a","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}},"volumeMounts":[{"name":"gitrepo","mountPath":"/src"}]}}],"restartPolicy":"Always","osType":"Linux","volumes":[{"name":"gitrepo","gitRepo":{"repository":"https://github.com/yolo3301/dumb-flow.git","directory":"./test","revision":"5604f0a8f11bfe13e621418ab6f6a71973e208ce"}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + headers: + cache-control: [no-cache] + content-length: ['1807'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:20:53 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container show] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 + response: + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"nginx","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T20:20:34Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T20:20:25Z","lastTimestamp":"2018-10-17T20:20:25Z","name":"Pulling","message":"pulling + image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:20:33Z","lastTimestamp":"2018-10-17T20:20:33Z","name":"Pulled","message":"Successfully + pulled image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:20:34Z","lastTimestamp":"2018-10-17T20:20:34Z","name":"Created","message":"Created + container with id 3b92f23ee776fe01a5339c9d0bb27d5e9f56f455714f096cfc401349916de72a","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:20:34Z","lastTimestamp":"2018-10-17T20:20:34Z","name":"Started","message":"Started + container with id 3b92f23ee776fe01a5339c9d0bb27d5e9f56f455714f096cfc401349916de72a","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}},"volumeMounts":[{"name":"gitrepo","mountPath":"/src"}]}}],"restartPolicy":"Always","osType":"Linux","volumes":[{"name":"gitrepo","gitRepo":{"repository":"https://github.com/yolo3301/dumb-flow.git","directory":"./test","revision":"5604f0a8f11bfe13e621418ab6f6a71973e208ce"}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + headers: + cache-control: [no-cache] + content-length: ['1807'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 20:20:54 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 17 Oct 2018 20:20:54 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkczSEY2R1lOVFBYT1dSR1FIQkNEUVBITkczR0VFUVJPWVZCU3wzMDY3N0FCMUZBNTNBQ0NCLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-deletes: ['14999'] + status: {code: 202, message: Accepted} +version: 1 From c38d57051f422cc6d36674ac75054c08b49dba8d Mon Sep 17 00:00:00 2001 From: sakreter Date: Wed, 17 Oct 2018 14:31:03 -0700 Subject: [PATCH 08/13] fixing conflicts and rerecording tests --- .../recordings/test_container_create.yaml | 72 ++-- .../test_container_create_with_acr.yaml | 68 ++-- .../test_container_create_with_msi.yaml | 340 +++++++++++------- .../test_container_create_with_vnet.yaml | 30 +- .../test_container_git_repo_volume_mount.yaml | 66 ++-- .../tests/latest/test_container_commands.py | 14 +- 6 files changed, 335 insertions(+), 255 deletions(-) diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create.yaml index 5c03074fba2..574a202d4a8 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create.yaml +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create.yaml @@ -1,7 +1,7 @@ interactions: - request: body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", - "date": "2018-10-17T20:13:15Z"}}' + "date": "2018-10-17T21:22:03Z"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -16,12 +16,12 @@ interactions: method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:13:15Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:22:03Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:13:16 GMT'] + date: ['Wed, 17 Oct 2018 21:22:04 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -43,12 +43,12 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:13:15Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:22:03Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:13:17 GMT'] + date: ['Wed, 17 Oct 2018 21:22:05 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -81,18 +81,18 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","command":["/bin/sh","-c","while - true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"104.42.60.190","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}],"instanceView":{"state":"Pending"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"104.42.218.170","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}],"instanceView":{"state":"Pending"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/1b09d3d3-9cc9-46f3-a177-09d3ea5692ca?api-version=2018-06-01'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/0ee6ff86-f95a-42fa-9591-7348c3df402e?api-version=2018-06-01'] cache-control: [no-cache] - content-length: ['1155'] + content-length: ['1156'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:13:30 GMT'] + date: ['Wed, 17 Oct 2018 21:22:12 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['91'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['94'] x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['99'] x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} @@ -107,18 +107,18 @@ interactions: msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.49] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/1b09d3d3-9cc9-46f3-a177-09d3ea5692ca?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/0ee6ff86-f95a-42fa-9591-7348c3df402e?api-version=2018-06-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-17T20:13:26.7327266Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-10-17T20:13:35Z","lastTimestamp":"2018-10-17T20:13:35Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:13:38Z","lastTimestamp":"2018-10-17T20:13:38Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:13:38Z","lastTimestamp":"2018-10-17T20:13:38Z","name":"Created","message":"Created - container with id 2948e413395fd65b211c70f5ca735243b4e4790ba55075639986be8274ce9c17","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:13:38Z","lastTimestamp":"2018-10-17T20:13:38Z","name":"Started","message":"Started - container with id 2948e413395fd65b211c70f5ca735243b4e4790ba55075639986be8274ce9c17","type":"Normal"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-17T21:22:11.8081806Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-10-17T21:22:16Z","lastTimestamp":"2018-10-17T21:22:16Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:22:19Z","lastTimestamp":"2018-10-17T21:22:19Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:22:19Z","lastTimestamp":"2018-10-17T21:22:19Z","name":"Created","message":"Created + container with id 56697bf17eb0622dd2353d163611ab725bdccdb4daca345d89e808bde177796e","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:22:19Z","lastTimestamp":"2018-10-17T21:22:19Z","name":"Started","message":"Started + container with id 56697bf17eb0622dd2353d163611ab725bdccdb4daca345d89e808bde177796e","type":"Normal"}]}}'} headers: cache-control: [no-cache] content-length: ['1113'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:14:00 GMT'] + date: ['Wed, 17 Oct 2018 21:22:42 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -140,16 +140,16 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","command":["/bin/sh","-c","while - true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T20:13:38Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T20:13:35Z","lastTimestamp":"2018-10-17T20:13:35Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:13:38Z","lastTimestamp":"2018-10-17T20:13:38Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:13:38Z","lastTimestamp":"2018-10-17T20:13:38Z","name":"Created","message":"Created - container with id 2948e413395fd65b211c70f5ca735243b4e4790ba55075639986be8274ce9c17","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:13:38Z","lastTimestamp":"2018-10-17T20:13:38Z","name":"Started","message":"Started - container with id 2948e413395fd65b211c70f5ca735243b4e4790ba55075639986be8274ce9c17","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"104.42.60.190","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T21:22:19Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T21:22:16Z","lastTimestamp":"2018-10-17T21:22:16Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:22:19Z","lastTimestamp":"2018-10-17T21:22:19Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:22:19Z","lastTimestamp":"2018-10-17T21:22:19Z","name":"Created","message":"Created + container with id 56697bf17eb0622dd2353d163611ab725bdccdb4daca345d89e808bde177796e","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:22:19Z","lastTimestamp":"2018-10-17T21:22:19Z","name":"Started","message":"Started + container with id 56697bf17eb0622dd2353d163611ab725bdccdb4daca345d89e808bde177796e","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"104.42.218.170","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] - content-length: ['2103'] + content-length: ['2104'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:15:40 GMT'] + date: ['Wed, 17 Oct 2018 21:22:42 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -172,16 +172,16 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","command":["/bin/sh","-c","while - true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T20:13:38Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T20:13:35Z","lastTimestamp":"2018-10-17T20:13:35Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:13:38Z","lastTimestamp":"2018-10-17T20:13:38Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:13:38Z","lastTimestamp":"2018-10-17T20:13:38Z","name":"Created","message":"Created - container with id 2948e413395fd65b211c70f5ca735243b4e4790ba55075639986be8274ce9c17","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:13:38Z","lastTimestamp":"2018-10-17T20:13:38Z","name":"Started","message":"Started - container with id 2948e413395fd65b211c70f5ca735243b4e4790ba55075639986be8274ce9c17","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"104.42.60.190","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T21:22:19Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T21:22:16Z","lastTimestamp":"2018-10-17T21:22:16Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:22:19Z","lastTimestamp":"2018-10-17T21:22:19Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:22:19Z","lastTimestamp":"2018-10-17T21:22:19Z","name":"Created","message":"Created + container with id 56697bf17eb0622dd2353d163611ab725bdccdb4daca345d89e808bde177796e","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:22:19Z","lastTimestamp":"2018-10-17T21:22:19Z","name":"Started","message":"Started + container with id 56697bf17eb0622dd2353d163611ab725bdccdb4daca345d89e808bde177796e","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"104.42.218.170","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] - content-length: ['2103'] + content-length: ['2104'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:15:44 GMT'] + date: ['Wed, 17 Oct 2018 21:22:43 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -204,12 +204,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups?api-version=2018-10-01 response: body: {string: '{"value":[{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","command":["/bin/sh","-c","while - true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"104.42.60.190","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}]},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}]}'} + true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"104.42.218.170","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}]},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}]}'} headers: cache-control: [no-cache] - content-length: ['1134'] + content-length: ['1135'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:15:45 GMT'] + date: ['Wed, 17 Oct 2018 21:22:43 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -237,9 +237,9 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Oct 2018 20:15:46 GMT'] + date: ['Wed, 17 Oct 2018 21:22:45 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkczSExFRVRHN1YyNFBKMlRXRkc3V0oyWVdPSUVSVDZZTjZUVHwyOTgxNkUyNDdENzBEOUUyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdBMlNBU1NaQVZBUzJFUlhON1JPSTVPSVFJNTJQTzI1UTNXVHwzMUU0ODgyMDg1QjZFOTNCLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_acr.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_acr.yaml index 0184be2a712..f8f90815533 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_acr.yaml +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_acr.yaml @@ -1,7 +1,7 @@ interactions: - request: body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", - "date": "2018-10-17T20:15:46Z"}}' + "date": "2018-10-17T21:22:45Z"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -16,17 +16,17 @@ interactions: method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:15:46Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:22:45Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:17:27 GMT'] + date: ['Wed, 17 Oct 2018 21:22:47 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} - request: body: null @@ -43,12 +43,12 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:15:46Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:22:45Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:17:27 GMT'] + date: ['Wed, 17 Oct 2018 21:22:47 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -77,17 +77,17 @@ interactions: response: body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000002","properties":{"image":"clitestregistry1.azurecr.io/nginx:latest","ports":[],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"imageRegistryCredentials":[{"server":"clitestregistry1.azurecr.io","username":"clitestregistry1"}],"restartPolicy":"Always","osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/81ddb545-b9d8-47e3-a4b8-3073b3927def?api-version=2018-06-01'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/4ec152ed-dca6-4052-8fe8-38f3477d2c55?api-version=2018-06-01'] cache-control: [no-cache] content-length: ['780'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:17:30 GMT'] + date: ['Wed, 17 Oct 2018 21:22:56 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['84'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['98'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['92'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['99'] x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 201, message: Created} - request: @@ -101,18 +101,18 @@ interactions: msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.49] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/81ddb545-b9d8-47e3-a4b8-3073b3927def?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/4ec152ed-dca6-4052-8fe8-38f3477d2c55?api-version=2018-06-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-17T20:17:30.7450547Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-10-17T20:17:39Z","lastTimestamp":"2018-10-17T20:17:39Z","name":"Pulling","message":"pulling - image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:17:45Z","lastTimestamp":"2018-10-17T20:17:45Z","name":"Pulled","message":"Successfully - pulled image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:17:45Z","lastTimestamp":"2018-10-17T20:17:45Z","name":"Created","message":"Created - container with id baa521b408701342588fb380b836034c05f5c0cf0d384943ae98a05bb0591d45","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:17:45Z","lastTimestamp":"2018-10-17T20:17:45Z","name":"Started","message":"Started - container with id baa521b408701342588fb380b836034c05f5c0cf0d384943ae98a05bb0591d45","type":"Normal"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-17T21:22:56.4936702Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-10-17T21:23:06Z","lastTimestamp":"2018-10-17T21:23:06Z","name":"Pulling","message":"pulling + image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:23:11Z","lastTimestamp":"2018-10-17T21:23:11Z","name":"Pulled","message":"Successfully + pulled image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:23:16Z","lastTimestamp":"2018-10-17T21:23:16Z","name":"Created","message":"Created + container","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:23:16Z","lastTimestamp":"2018-10-17T21:23:16Z","name":"Started","message":"Started + container","type":"Normal"}]}}'} headers: cache-control: [no-cache] - content-length: ['1167'] + content-length: ['1021'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:18:01 GMT'] + date: ['Wed, 17 Oct 2018 21:23:27 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -133,16 +133,16 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"clitestregistry1.azurecr.io/nginx:latest","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T20:17:45Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T20:17:39Z","lastTimestamp":"2018-10-17T20:17:39Z","name":"Pulling","message":"pulling - image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:17:45Z","lastTimestamp":"2018-10-17T20:17:45Z","name":"Pulled","message":"Successfully - pulled image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:17:45Z","lastTimestamp":"2018-10-17T20:17:45Z","name":"Created","message":"Created - container with id baa521b408701342588fb380b836034c05f5c0cf0d384943ae98a05bb0591d45","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:17:45Z","lastTimestamp":"2018-10-17T20:17:45Z","name":"Started","message":"Started - container with id baa521b408701342588fb380b836034c05f5c0cf0d384943ae98a05bb0591d45","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"imageRegistryCredentials":[{"server":"clitestregistry1.azurecr.io","username":"clitestregistry1"}],"restartPolicy":"Always","osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"clitestregistry1.azurecr.io/nginx:latest","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T21:23:16Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T21:23:06Z","lastTimestamp":"2018-10-17T21:23:06Z","name":"Pulling","message":"pulling + image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:23:11Z","lastTimestamp":"2018-10-17T21:23:11Z","name":"Pulled","message":"Successfully + pulled image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:23:16Z","lastTimestamp":"2018-10-17T21:23:16Z","name":"Created","message":"Created + container","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:23:16Z","lastTimestamp":"2018-10-17T21:23:16Z","name":"Started","message":"Started + container","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"imageRegistryCredentials":[{"server":"clitestregistry1.azurecr.io","username":"clitestregistry1"}],"restartPolicy":"Always","osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] - content-length: ['1782'] + content-length: ['1636'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:18:01 GMT'] + date: ['Wed, 17 Oct 2018 21:23:27 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -164,16 +164,16 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"clitestregistry1.azurecr.io/nginx:latest","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T20:17:45Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T20:17:39Z","lastTimestamp":"2018-10-17T20:17:39Z","name":"Pulling","message":"pulling - image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:17:45Z","lastTimestamp":"2018-10-17T20:17:45Z","name":"Pulled","message":"Successfully - pulled image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:17:45Z","lastTimestamp":"2018-10-17T20:17:45Z","name":"Created","message":"Created - container with id baa521b408701342588fb380b836034c05f5c0cf0d384943ae98a05bb0591d45","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:17:45Z","lastTimestamp":"2018-10-17T20:17:45Z","name":"Started","message":"Started - container with id baa521b408701342588fb380b836034c05f5c0cf0d384943ae98a05bb0591d45","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"imageRegistryCredentials":[{"server":"clitestregistry1.azurecr.io","username":"clitestregistry1"}],"restartPolicy":"Always","osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"clitestregistry1.azurecr.io/nginx:latest","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T21:23:16Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T21:23:06Z","lastTimestamp":"2018-10-17T21:23:06Z","name":"Pulling","message":"pulling + image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:23:11Z","lastTimestamp":"2018-10-17T21:23:11Z","name":"Pulled","message":"Successfully + pulled image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:23:16Z","lastTimestamp":"2018-10-17T21:23:16Z","name":"Created","message":"Created + container","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:23:16Z","lastTimestamp":"2018-10-17T21:23:16Z","name":"Started","message":"Started + container","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"imageRegistryCredentials":[{"server":"clitestregistry1.azurecr.io","username":"clitestregistry1"}],"restartPolicy":"Always","osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] - content-length: ['1782'] + content-length: ['1636'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:18:01 GMT'] + date: ['Wed, 17 Oct 2018 21:23:28 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -201,9 +201,9 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Oct 2018 20:18:02 GMT'] + date: ['Wed, 17 Oct 2018 21:23:29 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdLWEpFNTdDQU9LUEZHU1lJQUJTSUtQN1pUUEhQSzVPWlZaUXwxOTBBOTlCMzQyMTdGNzI1LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdPNFlHMklVSTNWWVJCM0tGVVVOUTVVTVE1NzVQNkNVRE5CVHxDN0YwMkRERTE2RUIyMDM5LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_msi.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_msi.yaml index cb6e2fef74c..e1b3a230acf 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_msi.yaml +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_msi.yaml @@ -1,7 +1,7 @@ interactions: - request: body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", - "date": "2018-10-17T20:18:03Z"}}' + "date": "2018-10-17T21:23:29Z"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -16,12 +16,12 @@ interactions: method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:18:03Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:23:29Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:18:03 GMT'] + date: ['Wed, 17 Oct 2018 21:23:30 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -43,12 +43,12 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:18:03Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:23:29Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:18:05 GMT'] + date: ['Wed, 17 Oct 2018 21:23:31 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -68,22 +68,107 @@ interactions: msrest_azure/0.4.34 azure-mgmt-msi/0.2.0 Azure-SDK-For-Python AZURECLI/2.0.49] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005?api-version=2015-08-31-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000006?api-version=2015-08-31-preview response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005","name":"cliaciidentity000005","type":"Microsoft.ManagedIdentity/userAssignedIdentities","location":"westus","tags":{},"properties":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","principalId":"bb327d04-b389-4ae3-a61a-d7c15718136f","clientId":"c42f27f1-9abe-4af9-9516-2a1a24411571","clientSecretUrl":"https://control-westus.identity.azure.net/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005/credentials?tid=72f988bf-86f1-41af-91ab-2d7cd011db47&oid=bb327d04-b389-4ae3-a61a-d7c15718136f&aid=c42f27f1-9abe-4af9-9516-2a1a24411571"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000006","name":"cliaciidentity000006","type":"Microsoft.ManagedIdentity/userAssignedIdentities","location":"westus","tags":{},"properties":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","principalId":"b3855dcb-318f-4beb-ad99-4e599af42284","clientId":"588cec8a-a607-408c-91a3-87de071d234e","clientSecretUrl":"https://control-westus.identity.azure.net/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000006/credentials?tid=72f988bf-86f1-41af-91ab-2d7cd011db47&oid=b3855dcb-318f-4beb-ad99-4e599af42284&aid=588cec8a-a607-408c-91a3-87de071d234e"}}'} headers: cache-control: [no-cache] content-length: ['936'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:18:07 GMT'] + date: ['Wed, 17 Oct 2018 21:23:33 GMT'] expires: ['-1'] - location: [/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005] + location: [/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000006] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1196'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:23:29Z"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 17 Oct 2018 21:23:34 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: '{"sku": {"name": "Standard_RAGRS"}, "kind": "Storage", "location": "westus", + "properties": {"supportsHttpsTrafficOnly": false}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account create] + Connection: [keep-alive] + Content-Length: ['127'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-storage/2.0.0rc4 Azure-SDK-For-Python AZURECLI/2.0.49] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clistorage000005?api-version=2018-03-01-preview + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + content-type: [text/plain; charset=utf-8] + date: ['Wed, 17 Oct 2018 21:23:35 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/5fd42441-1a8b-4a06-bdff-d9bff70393a2?monitor=true&api-version=2018-03-01-preview'] + pragma: [no-cache] + server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 + Microsoft-HTTPAPI/2.0'] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account create] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-storage/2.0.0rc4 Azure-SDK-For-Python AZURECLI/2.0.49] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/5fd42441-1a8b-4a06-bdff-d9bff70393a2?monitor=true&api-version=2018-03-01-preview + response: + body: {string: '{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clistorage000005","name":"clistorage000005","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-10-17T21:23:35.9200664Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-10-17T21:23:35.9200664Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-10-17T21:23:35.8240915Z","primaryEndpoints":{"blob":"https://clistorage000005.blob.core.windows.net/","queue":"https://clistorage000005.queue.core.windows.net/","table":"https://clistorage000005.table.core.windows.net/","file":"https://clistorage000005.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available","secondaryEndpoints":{"blob":"https://clistorage000005-secondary.blob.core.windows.net/","queue":"https://clistorage000005-secondary.queue.core.windows.net/","table":"https://clistorage000005-secondary.table.core.windows.net/"}}}'} + headers: + cache-control: [no-cache] + content-length: ['1412'] + content-type: [application/json] + date: ['Wed, 17 Oct 2018 21:23:53 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 + Microsoft-HTTPAPI/2.0'] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} - request: body: null headers: @@ -99,12 +184,12 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:18:03Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:23:29Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:18:07 GMT'] + date: ['Wed, 17 Oct 2018 21:23:54 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -131,20 +216,20 @@ interactions: method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.183.97","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"principalId":"fa12093a-7da7-419c-9d0d-4afe35181abd","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"40.78.83.41","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"principalId":"1a278f4d-6cca-4133-bb73-29a9ddedcecf","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/b8f007c9-5c45-426b-ad0a-09abdfc3965e?api-version=2018-06-01'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/093d04eb-2ee4-48af-a904-7f8df1f109a4?api-version=2018-06-01'] cache-control: [no-cache] - content-length: ['884'] + content-length: ['882'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:18:17 GMT'] + date: ['Wed, 17 Oct 2018 21:24:05 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['92'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['99'] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['93'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['98'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} - request: body: null @@ -157,19 +242,18 @@ interactions: msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.49] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/b8f007c9-5c45-426b-ad0a-09abdfc3965e?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/093d04eb-2ee4-48af-a904-7f8df1f109a4?api-version=2018-06-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-17T20:18:18.2708838Z","properties":{"events":[{"count":2,"firstTimestamp":"2018-10-17T20:18:28Z","lastTimestamp":"2018-10-17T20:18:31Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:30Z","lastTimestamp":"2018-10-17T20:18:33Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:31Z","lastTimestamp":"2018-10-17T20:18:33Z","name":"Created","message":"Created - container","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:31Z","lastTimestamp":"2018-10-17T20:18:33Z","name":"Started","message":"Started - container","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:34Z","lastTimestamp":"2018-10-17T20:18:35Z","name":"BackOff","message":"Back-off - restarting failed container","type":"Warning"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-17T21:24:05.1869577Z","properties":{"events":[{"count":2,"firstTimestamp":"2018-10-17T21:24:14Z","lastTimestamp":"2018-10-17T21:24:18Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T21:24:17Z","lastTimestamp":"2018-10-17T21:24:19Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:17Z","lastTimestamp":"2018-10-17T21:24:17Z","name":"Created","message":"Created + container with id 5f7381280f7bac43f7f36e5deb7a6533d316668cbaa4ef37162ffe6a1f106040","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:17Z","lastTimestamp":"2018-10-17T21:24:17Z","name":"Started","message":"Started + container with id 5f7381280f7bac43f7f36e5deb7a6533d316668cbaa4ef37162ffe6a1f106040","type":"Normal"}]}}'} headers: cache-control: [no-cache] - content-length: ['1141'] + content-length: ['1113'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:18:49 GMT'] + date: ['Wed, 17 Oct 2018 21:24:35 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -191,17 +275,19 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":1,"currentState":{"state":"Waiting","detailStatus":"CrashLoopBackOff: - Back-off 10s restarting failed"},"previousState":{"state":"Terminated","startTime":"2018-10-17T20:18:33Z","exitCode":0,"finishTime":"2018-10-17T20:18:33Z","detailStatus":"Completed"},"events":[{"count":2,"firstTimestamp":"2018-10-17T20:18:28Z","lastTimestamp":"2018-10-17T20:18:31Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:30Z","lastTimestamp":"2018-10-17T20:18:33Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:31Z","lastTimestamp":"2018-10-17T20:18:33Z","name":"Created","message":"Created - container","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:31Z","lastTimestamp":"2018-10-17T20:18:33Z","name":"Started","message":"Started - container","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:34Z","lastTimestamp":"2018-10-17T20:18:35Z","name":"BackOff","message":"Back-off - restarting failed container","type":"Warning"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.183.97","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"principalId":"fa12093a-7da7-419c-9d0d-4afe35181abd","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + Back-off 10s restarting failed"},"previousState":{"state":"Terminated","startTime":"2018-10-17T21:24:20Z","exitCode":0,"finishTime":"2018-10-17T21:24:20Z","detailStatus":"Completed"},"events":[{"count":2,"firstTimestamp":"2018-10-17T21:24:14Z","lastTimestamp":"2018-10-17T21:24:18Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T21:24:17Z","lastTimestamp":"2018-10-17T21:24:19Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:17Z","lastTimestamp":"2018-10-17T21:24:17Z","name":"Created","message":"Created + container with id 5f7381280f7bac43f7f36e5deb7a6533d316668cbaa4ef37162ffe6a1f106040","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:17Z","lastTimestamp":"2018-10-17T21:24:17Z","name":"Started","message":"Started + container with id 5f7381280f7bac43f7f36e5deb7a6533d316668cbaa4ef37162ffe6a1f106040","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:20Z","lastTimestamp":"2018-10-17T21:24:20Z","name":"Created","message":"Created + container with id 1eeed247cfb52e699c0efe1b49124437dc11fe4c10bf3723bd0d1b877ae7e95d","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:20Z","lastTimestamp":"2018-10-17T21:24:20Z","name":"Started","message":"Started + container with id 1eeed247cfb52e699c0efe1b49124437dc11fe4c10bf3723bd0d1b877ae7e95d","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T21:24:21Z","lastTimestamp":"2018-10-17T21:24:22Z","name":"BackOff","message":"Back-off + restarting failed container","type":"Warning"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"40.78.83.41","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"principalId":"1a278f4d-6cca-4133-bb73-29a9ddedcecf","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] - content-length: ['2023'] + content-length: ['2621'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:18:48 GMT'] + date: ['Wed, 17 Oct 2018 21:24:36 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -224,12 +310,12 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:18:03Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:23:29Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:18:49 GMT'] + date: ['Wed, 17 Oct 2018 21:24:36 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -249,7 +335,7 @@ interactions: AZURECLI/2.0.49] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli/providers/Microsoft.Storage/storageAccounts/cliacistorageaccount/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Contributor%27&api-version=2018-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clistorage000005/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Contributor%27&api-version=2018-01-01-preview response: body: {string: '{"value":[{"properties":{"roleName":"Contributor","type":"BuiltInRole","description":"Lets you manage everything except access to resources.","assignableScopes":["/"],"permissions":[{"actions":["*"],"notActions":["Microsoft.Authorization/*/Delete","Microsoft.Authorization/*/Write","Microsoft.Authorization/elevateAccess/Action","Microsoft.Blueprint/blueprintAssignments/write","Microsoft.Blueprint/blueprintAssignments/delete"],"dataActions":[],"notDataActions":[]}],"createdOn":"0001-01-01T08:00:00.0000000Z","updatedOn":"2018-05-30T19:22:32.4538167Z","createdBy":null,"updatedBy":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c","type":"Microsoft.Authorization/roleDefinitions","name":"b24988ac-6180-42a0-ab88-20f7382dd24c"}]}'} @@ -257,7 +343,7 @@ interactions: cache-control: [no-cache] content-length: ['832'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:18:49 GMT'] + date: ['Wed, 17 Oct 2018 21:24:36 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-IIS/10.0] @@ -289,26 +375,28 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":1,"currentState":{"state":"Waiting","detailStatus":"CrashLoopBackOff: - Back-off 10s restarting failed"},"previousState":{"state":"Terminated","startTime":"2018-10-17T20:18:33Z","exitCode":0,"finishTime":"2018-10-17T20:18:33Z","detailStatus":"Completed"},"events":[{"count":2,"firstTimestamp":"2018-10-17T20:18:28Z","lastTimestamp":"2018-10-17T20:18:31Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:30Z","lastTimestamp":"2018-10-17T20:18:33Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:31Z","lastTimestamp":"2018-10-17T20:18:33Z","name":"Created","message":"Created - container","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:31Z","lastTimestamp":"2018-10-17T20:18:33Z","name":"Started","message":"Started - container","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:34Z","lastTimestamp":"2018-10-17T20:18:35Z","name":"BackOff","message":"Back-off - restarting failed container","type":"Warning"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.183.97","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"principalId":"fa12093a-7da7-419c-9d0d-4afe35181abd","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + Back-off 10s restarting failed"},"previousState":{"state":"Terminated","startTime":"2018-10-17T21:24:20Z","exitCode":0,"finishTime":"2018-10-17T21:24:20Z","detailStatus":"Completed"},"events":[{"count":3,"firstTimestamp":"2018-10-17T21:24:14Z","lastTimestamp":"2018-10-17T21:24:37Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T21:24:17Z","lastTimestamp":"2018-10-17T21:24:19Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:17Z","lastTimestamp":"2018-10-17T21:24:17Z","name":"Created","message":"Created + container with id 5f7381280f7bac43f7f36e5deb7a6533d316668cbaa4ef37162ffe6a1f106040","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:17Z","lastTimestamp":"2018-10-17T21:24:17Z","name":"Started","message":"Started + container with id 5f7381280f7bac43f7f36e5deb7a6533d316668cbaa4ef37162ffe6a1f106040","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:20Z","lastTimestamp":"2018-10-17T21:24:20Z","name":"Created","message":"Created + container with id 1eeed247cfb52e699c0efe1b49124437dc11fe4c10bf3723bd0d1b877ae7e95d","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:20Z","lastTimestamp":"2018-10-17T21:24:20Z","name":"Started","message":"Started + container with id 1eeed247cfb52e699c0efe1b49124437dc11fe4c10bf3723bd0d1b877ae7e95d","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T21:24:21Z","lastTimestamp":"2018-10-17T21:24:22Z","name":"BackOff","message":"Back-off + restarting failed container","type":"Warning"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"40.78.83.41","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"principalId":"1a278f4d-6cca-4133-bb73-29a9ddedcecf","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] - content-length: ['2023'] + content-length: ['2621'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:18:50 GMT'] + date: ['Wed, 17 Oct 2018 21:24:37 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: ['Accept-Encoding,Accept-Encoding'] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['83'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['97'] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['91'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['98'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null @@ -325,17 +413,20 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":1,"currentState":{"state":"Waiting","detailStatus":"CrashLoopBackOff: - Back-off 10s restarting failed"},"previousState":{"state":"Terminated","startTime":"2018-10-17T20:18:33Z","exitCode":0,"finishTime":"2018-10-17T20:18:33Z","detailStatus":"Completed"},"events":[{"count":3,"firstTimestamp":"2018-10-17T20:18:28Z","lastTimestamp":"2018-10-17T20:18:51Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:30Z","lastTimestamp":"2018-10-17T20:18:33Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:31Z","lastTimestamp":"2018-10-17T20:18:33Z","name":"Created","message":"Created - container","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:31Z","lastTimestamp":"2018-10-17T20:18:33Z","name":"Started","message":"Started - container","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:18:34Z","lastTimestamp":"2018-10-17T20:18:35Z","name":"BackOff","message":"Back-off - restarting failed container","type":"Warning"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.183.97","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"principalId":"fa12093a-7da7-419c-9d0d-4afe35181abd","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + Back-off 10s restarting failed"},"previousState":{"state":"Terminated","startTime":"2018-10-17T21:24:20Z","exitCode":0,"finishTime":"2018-10-17T21:24:20Z","detailStatus":"Completed"},"events":[{"count":3,"firstTimestamp":"2018-10-17T21:24:14Z","lastTimestamp":"2018-10-17T21:24:37Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-17T21:24:17Z","lastTimestamp":"2018-10-17T21:24:38Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:17Z","lastTimestamp":"2018-10-17T21:24:17Z","name":"Created","message":"Created + container with id 5f7381280f7bac43f7f36e5deb7a6533d316668cbaa4ef37162ffe6a1f106040","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:17Z","lastTimestamp":"2018-10-17T21:24:17Z","name":"Started","message":"Started + container with id 5f7381280f7bac43f7f36e5deb7a6533d316668cbaa4ef37162ffe6a1f106040","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:20Z","lastTimestamp":"2018-10-17T21:24:20Z","name":"Created","message":"Created + container with id 1eeed247cfb52e699c0efe1b49124437dc11fe4c10bf3723bd0d1b877ae7e95d","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:20Z","lastTimestamp":"2018-10-17T21:24:20Z","name":"Started","message":"Started + container with id 1eeed247cfb52e699c0efe1b49124437dc11fe4c10bf3723bd0d1b877ae7e95d","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T21:24:21Z","lastTimestamp":"2018-10-17T21:24:22Z","name":"BackOff","message":"Back-off + restarting failed container","type":"Warning"},{"count":1,"firstTimestamp":"2018-10-17T21:24:38Z","lastTimestamp":"2018-10-17T21:24:38Z","name":"Created","message":"Created + container with id 0fc2b07fbcf4ec337bcd2c753b8a176cc4e5b6a7c742f8450046b33b4a3a4128","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"40.78.83.41","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"principalId":"1a278f4d-6cca-4133-bb73-29a9ddedcecf","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] - content-length: ['2023'] + content-length: ['2848'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:18:50 GMT'] + date: ['Wed, 17 Oct 2018 21:24:38 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -345,7 +436,7 @@ interactions: status: {code: 200, message: OK} - request: body: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c", - "principalId": "fa12093a-7da7-419c-9d0d-4afe35181abd"}}' + "principalId": "1a278f4d-6cca-4133-bb73-29a9ddedcecf"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -358,14 +449,14 @@ interactions: AZURECLI/2.0.49] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli/providers/Microsoft.Storage/storageAccounts/cliacistorageaccount/providers/Microsoft.Authorization/roleAssignments/fd046d5d-5d77-47a5-ba1c-ed8c4cc5a361?api-version=2018-01-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clistorage000005/providers/Microsoft.Authorization/roleAssignments/647db81c-cadc-44bd-8175-c2498a9177de?api-version=2018-01-01-preview response: - body: {string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c","principalId":"fa12093a-7da7-419c-9d0d-4afe35181abd","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli/providers/Microsoft.Storage/storageAccounts/cliacistorageaccount","createdOn":"2018-10-17T20:18:52.7464040Z","updatedOn":"2018-10-17T20:18:52.7464040Z","createdBy":null,"updatedBy":"facd2063-6d5d-4fd5-81f2-8d956c047170"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-cli/providers/Microsoft.Storage/storageAccounts/cliacistorageaccount/providers/Microsoft.Authorization/roleAssignments/fd046d5d-5d77-47a5-ba1c-ed8c4cc5a361","type":"Microsoft.Authorization/roleAssignments","name":"fd046d5d-5d77-47a5-ba1c-ed8c4cc5a361"}'} + body: {string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c","principalId":"1a278f4d-6cca-4133-bb73-29a9ddedcecf","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clistorage000005","createdOn":"2018-10-17T21:24:39.9400862Z","updatedOn":"2018-10-17T21:24:39.9400862Z","createdBy":null,"updatedBy":"facd2063-6d5d-4fd5-81f2-8d956c047170"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clistorage000005/providers/Microsoft.Authorization/roleAssignments/647db81c-cadc-44bd-8175-c2498a9177de","type":"Microsoft.Authorization/roleAssignments","name":"647db81c-cadc-44bd-8175-c2498a9177de"}'} headers: cache-control: [no-cache] - content-length: ['901'] + content-length: ['1025'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:18:54 GMT'] + date: ['Wed, 17 Oct 2018 21:24:42 GMT'] expires: ['-1'] pragma: [no-cache] server: [Microsoft-IIS/10.0] @@ -390,12 +481,12 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:18:03Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:23:29Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:18:54 GMT'] + date: ['Wed, 17 Oct 2018 21:24:42 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -404,7 +495,7 @@ interactions: status: {code: 200, message: OK} - request: body: 'b''b\''b\\\''{"location": "westus", "tags": {}, "identity": {"type": "UserAssigned", - "userAssignedIdentities": {"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005": + "userAssignedIdentities": {"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000006": {}}}, "properties": {"containers": [{"name": "clicontainer000003", "properties": {"image": "alpine:latest", "ports": [{"protocol": "TCP", "port": 80}], "resources": {"requests": {"memoryInGB": 1.5, "cpu": 1.0}}}}], "restartPolicy": "Always", @@ -424,19 +515,19 @@ interactions: method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000003","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"168.62.31.19","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005":{"principalId":"bb327d04-b389-4ae3-a61a-d7c15718136f","clientId":"c42f27f1-9abe-4af9-9516-2a1a24411571"}},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"UserAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003","name":"clicontainer000003","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000003","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"40.83.216.18","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000006":{"principalId":"b3855dcb-318f-4beb-ad99-4e599af42284","clientId":"588cec8a-a607-408c-91a3-87de071d234e"}},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"UserAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003","name":"clicontainer000003","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/20ec46cd-02f2-47d8-acd8-4a490a50542b?api-version=2018-06-01'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/d4da06b3-8ca3-4dd0-98d2-9979c4955896?api-version=2018-06-01'] cache-control: [no-cache] content-length: ['1185'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:19:01 GMT'] + date: ['Wed, 17 Oct 2018 21:24:48 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['91'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['98'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['92'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['97'] x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} - request: @@ -450,21 +541,18 @@ interactions: msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.49] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/20ec46cd-02f2-47d8-acd8-4a490a50542b?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/d4da06b3-8ca3-4dd0-98d2-9979c4955896?api-version=2018-06-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003","status":"Succeeded","startTime":"2018-10-17T20:19:02.115362Z","properties":{"events":[{"count":2,"firstTimestamp":"2018-10-17T20:19:04Z","lastTimestamp":"2018-10-17T20:19:09Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:19:07Z","lastTimestamp":"2018-10-17T20:19:10Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:08Z","lastTimestamp":"2018-10-17T20:19:08Z","name":"Created","message":"Created - container with id d74f95991cecf81dbf41e6b42d1ba26c0c7632d8e421cf39b0ad20b59ec1f449","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:08Z","lastTimestamp":"2018-10-17T20:19:08Z","name":"Started","message":"Started - container with id d74f95991cecf81dbf41e6b42d1ba26c0c7632d8e421cf39b0ad20b59ec1f449","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:10Z","lastTimestamp":"2018-10-17T20:19:10Z","name":"Created","message":"Created - container with id d77a1c76f82e7a49f7b35f212d2d0126ba100386235682605bc7e7f3b959e47b","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:10Z","lastTimestamp":"2018-10-17T20:19:10Z","name":"Started","message":"Started - container with id d77a1c76f82e7a49f7b35f212d2d0126ba100386235682605bc7e7f3b959e47b","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:11Z","lastTimestamp":"2018-10-17T20:19:11Z","name":"BackOff","message":"Back-off - restarting failed container","type":"Warning"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003","status":"Succeeded","startTime":"2018-10-17T21:24:49.1183783Z","properties":{"events":[{"count":2,"firstTimestamp":"2018-10-17T21:24:58Z","lastTimestamp":"2018-10-17T21:25:02Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T21:25:00Z","lastTimestamp":"2018-10-17T21:25:03Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T21:25:01Z","lastTimestamp":"2018-10-17T21:25:03Z","name":"Created","message":"Created + container","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:25:01Z","lastTimestamp":"2018-10-17T21:25:01Z","name":"Started","message":"Started + container","type":"Normal"}]}}'} headers: cache-control: [no-cache] - content-length: ['1740'] + content-length: ['967'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:19:31 GMT'] + date: ['Wed, 17 Oct 2018 21:25:19 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -485,21 +573,18 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000003","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":2,"currentState":{"state":"Terminated","startTime":"2018-10-17T20:19:28Z","exitCode":0,"finishTime":"2018-10-17T20:19:28Z","detailStatus":"Completed"},"previousState":{"state":"Terminated","startTime":"2018-10-17T20:19:10Z","exitCode":0,"finishTime":"2018-10-17T20:19:10Z","detailStatus":"Completed"},"events":[{"count":3,"firstTimestamp":"2018-10-17T20:19:04Z","lastTimestamp":"2018-10-17T20:19:27Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-17T20:19:07Z","lastTimestamp":"2018-10-17T20:19:28Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:08Z","lastTimestamp":"2018-10-17T20:19:08Z","name":"Created","message":"Created - container with id d74f95991cecf81dbf41e6b42d1ba26c0c7632d8e421cf39b0ad20b59ec1f449","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:08Z","lastTimestamp":"2018-10-17T20:19:08Z","name":"Started","message":"Started - container with id d74f95991cecf81dbf41e6b42d1ba26c0c7632d8e421cf39b0ad20b59ec1f449","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:10Z","lastTimestamp":"2018-10-17T20:19:10Z","name":"Created","message":"Created - container with id d77a1c76f82e7a49f7b35f212d2d0126ba100386235682605bc7e7f3b959e47b","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:10Z","lastTimestamp":"2018-10-17T20:19:10Z","name":"Started","message":"Started - container with id d77a1c76f82e7a49f7b35f212d2d0126ba100386235682605bc7e7f3b959e47b","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-17T20:19:11Z","lastTimestamp":"2018-10-17T20:19:29Z","name":"BackOff","message":"Back-off - restarting failed container","type":"Warning"},{"count":1,"firstTimestamp":"2018-10-17T20:19:28Z","lastTimestamp":"2018-10-17T20:19:28Z","name":"Created","message":"Created - container with id 8bc8790cb09d0d62f0baec3f6134ff447466c2108bb4aa66fa88109215935306","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:28Z","lastTimestamp":"2018-10-17T20:19:28Z","name":"Started","message":"Started - container with id 8bc8790cb09d0d62f0baec3f6134ff447466c2108bb4aa66fa88109215935306","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"168.62.31.19","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Succeeded"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005":{"principalId":"bb327d04-b389-4ae3-a61a-d7c15718136f","clientId":"c42f27f1-9abe-4af9-9516-2a1a24411571"}},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"UserAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003","name":"clicontainer000003","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000003","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":1,"currentState":{"state":"Waiting","detailStatus":"CrashLoopBackOff: + Back-off 10s restarting failed"},"previousState":{"state":"Terminated","startTime":"2018-10-17T21:25:04Z","exitCode":0,"finishTime":"2018-10-17T21:25:04Z","detailStatus":"Completed"},"events":[{"count":2,"firstTimestamp":"2018-10-17T21:24:58Z","lastTimestamp":"2018-10-17T21:25:02Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T21:25:00Z","lastTimestamp":"2018-10-17T21:25:03Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T21:25:01Z","lastTimestamp":"2018-10-17T21:25:03Z","name":"Created","message":"Created + container","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T21:25:01Z","lastTimestamp":"2018-10-17T21:25:04Z","name":"Started","message":"Started + container","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-17T21:25:05Z","lastTimestamp":"2018-10-17T21:25:07Z","name":"BackOff","message":"Back-off + restarting failed container","type":"Warning"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"40.83.216.18","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000006":{"principalId":"b3855dcb-318f-4beb-ad99-4e599af42284","clientId":"588cec8a-a607-408c-91a3-87de071d234e"}},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"UserAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003","name":"clicontainer000003","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] - content-length: ['3428'] + content-length: ['2324'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:19:32 GMT'] + date: ['Wed, 17 Oct 2018 21:25:20 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -522,12 +607,12 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:18:03Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:23:29Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:19:33 GMT'] + date: ['Wed, 17 Oct 2018 21:25:20 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -536,7 +621,7 @@ interactions: status: {code: 200, message: OK} - request: body: 'b''b\''b\\\''{"location": "westus", "tags": {}, "identity": {"type": "SystemAssigned, - UserAssigned", "userAssignedIdentities": {"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005": + UserAssigned", "userAssignedIdentities": {"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000006": {}}}, "properties": {"containers": [{"name": "clicontainer000004", "properties": {"image": "alpine:latest", "ports": [{"protocol": "TCP", "port": 80}], "resources": {"requests": {"memoryInGB": 1.5, "cpu": 1.0}}}}], "restartPolicy": "Always", @@ -556,19 +641,19 @@ interactions: method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000004","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"40.83.218.26","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005":{"principalId":"bb327d04-b389-4ae3-a61a-d7c15718136f","clientId":"c42f27f1-9abe-4af9-9516-2a1a24411571"}},"principalId":"4f29bb01-763e-4c38-8b11-dad40518af22","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned, + body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000004","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.61.214","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000006":{"principalId":"b3855dcb-318f-4beb-ad99-4e599af42284","clientId":"588cec8a-a607-408c-91a3-87de071d234e"}},"principalId":"97cdb832-4a89-40c1-92e5-9eb3817e5ce4","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned, UserAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004","name":"clicontainer000004","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/e172eb6d-63e7-434a-96ec-524e1fd04b41?api-version=2018-06-01'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/d17029c4-c8c0-477f-b737-df628afa0d32?api-version=2018-06-01'] cache-control: [no-cache] - content-length: ['1254'] + content-length: ['1255'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:19:41 GMT'] + date: ['Wed, 17 Oct 2018 21:25:29 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['81'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['90'] x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['95'] x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} @@ -583,21 +668,18 @@ interactions: msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.49] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/e172eb6d-63e7-434a-96ec-524e1fd04b41?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/d17029c4-c8c0-477f-b737-df628afa0d32?api-version=2018-06-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004","status":"Succeeded","startTime":"2018-10-17T20:19:41.6935382Z","properties":{"events":[{"count":2,"firstTimestamp":"2018-10-17T20:19:46Z","lastTimestamp":"2018-10-17T20:19:49Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:19:48Z","lastTimestamp":"2018-10-17T20:19:51Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:49Z","lastTimestamp":"2018-10-17T20:19:49Z","name":"Created","message":"Created - container with id 1971fe773838af0b78f16e693107986b6e7807fcbcb8028d8f827e26698d4927","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:49Z","lastTimestamp":"2018-10-17T20:19:49Z","name":"Started","message":"Started - container with id 1971fe773838af0b78f16e693107986b6e7807fcbcb8028d8f827e26698d4927","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:51Z","lastTimestamp":"2018-10-17T20:19:51Z","name":"Created","message":"Created - container with id 507f4bd807a9102d82c2507802d9420d70fcf753d7519a27cff514b8ce9d8f55","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:51Z","lastTimestamp":"2018-10-17T20:19:51Z","name":"Started","message":"Started - container with id 507f4bd807a9102d82c2507802d9420d70fcf753d7519a27cff514b8ce9d8f55","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T20:19:51Z","lastTimestamp":"2018-10-17T20:19:52Z","name":"BackOff","message":"Back-off - restarting failed container","type":"Warning"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004","status":"Succeeded","startTime":"2018-10-17T21:25:29.3350095Z","properties":{"events":[{"count":2,"firstTimestamp":"2018-10-17T21:25:39Z","lastTimestamp":"2018-10-17T21:25:43Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T21:25:42Z","lastTimestamp":"2018-10-17T21:25:44Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:25:42Z","lastTimestamp":"2018-10-17T21:25:42Z","name":"Created","message":"Created + container with id 1a659e607dd4527d56bff38711a3c737383b7c979b649969f1033921e959a37f","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:25:42Z","lastTimestamp":"2018-10-17T21:25:42Z","name":"Started","message":"Started + container with id 1a659e607dd4527d56bff38711a3c737383b7c979b649969f1033921e959a37f","type":"Normal"}]}}'} headers: cache-control: [no-cache] - content-length: ['1741'] + content-length: ['1113'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:20:12 GMT'] + date: ['Wed, 17 Oct 2018 21:25:59 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -618,22 +700,22 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000004","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":2,"currentState":{"state":"Terminated","startTime":"2018-10-17T20:20:05Z","exitCode":0,"finishTime":"2018-10-17T20:20:06Z","detailStatus":"Completed"},"previousState":{"state":"Terminated","startTime":"2018-10-17T20:19:51Z","exitCode":0,"finishTime":"2018-10-17T20:19:51Z","detailStatus":"Completed"},"events":[{"count":3,"firstTimestamp":"2018-10-17T20:19:46Z","lastTimestamp":"2018-10-17T20:20:04Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-17T20:19:48Z","lastTimestamp":"2018-10-17T20:20:05Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:49Z","lastTimestamp":"2018-10-17T20:19:49Z","name":"Created","message":"Created - container with id 1971fe773838af0b78f16e693107986b6e7807fcbcb8028d8f827e26698d4927","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:49Z","lastTimestamp":"2018-10-17T20:19:49Z","name":"Started","message":"Started - container with id 1971fe773838af0b78f16e693107986b6e7807fcbcb8028d8f827e26698d4927","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:51Z","lastTimestamp":"2018-10-17T20:19:51Z","name":"Created","message":"Created - container with id 507f4bd807a9102d82c2507802d9420d70fcf753d7519a27cff514b8ce9d8f55","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:19:51Z","lastTimestamp":"2018-10-17T20:19:51Z","name":"Started","message":"Started - container with id 507f4bd807a9102d82c2507802d9420d70fcf753d7519a27cff514b8ce9d8f55","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-17T20:19:51Z","lastTimestamp":"2018-10-17T20:20:07Z","name":"BackOff","message":"Back-off - restarting failed container","type":"Warning"},{"count":1,"firstTimestamp":"2018-10-17T20:20:05Z","lastTimestamp":"2018-10-17T20:20:05Z","name":"Created","message":"Created - container with id 8a780bd83415d30c217bc7cd2139325cafbfaeb9cf43aa75f3b3ee3ad01bd447","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:20:06Z","lastTimestamp":"2018-10-17T20:20:06Z","name":"Started","message":"Started - container with id 8a780bd83415d30c217bc7cd2139325cafbfaeb9cf43aa75f3b3ee3ad01bd447","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"40.83.218.26","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Succeeded"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005":{"principalId":"bb327d04-b389-4ae3-a61a-d7c15718136f","clientId":"c42f27f1-9abe-4af9-9516-2a1a24411571"}},"principalId":"4f29bb01-763e-4c38-8b11-dad40518af22","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned, + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000004","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":2,"currentState":{"state":"Terminated","startTime":"2018-10-17T21:25:59Z","exitCode":0,"finishTime":"2018-10-17T21:26:00Z","detailStatus":"Completed"},"previousState":{"state":"Terminated","startTime":"2018-10-17T21:25:44Z","exitCode":0,"finishTime":"2018-10-17T21:25:44Z","detailStatus":"Completed"},"events":[{"count":3,"firstTimestamp":"2018-10-17T21:25:39Z","lastTimestamp":"2018-10-17T21:25:57Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-17T21:25:42Z","lastTimestamp":"2018-10-17T21:25:59Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:25:42Z","lastTimestamp":"2018-10-17T21:25:42Z","name":"Created","message":"Created + container with id 1a659e607dd4527d56bff38711a3c737383b7c979b649969f1033921e959a37f","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:25:42Z","lastTimestamp":"2018-10-17T21:25:42Z","name":"Started","message":"Started + container with id 1a659e607dd4527d56bff38711a3c737383b7c979b649969f1033921e959a37f","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:25:44Z","lastTimestamp":"2018-10-17T21:25:44Z","name":"Created","message":"Created + container with id d02548f8d3e4922be62a5997df599e1ebaf44c4ac4dff90518a4c4998e18c16e","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:25:44Z","lastTimestamp":"2018-10-17T21:25:44Z","name":"Started","message":"Started + container with id d02548f8d3e4922be62a5997df599e1ebaf44c4ac4dff90518a4c4998e18c16e","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T21:25:45Z","lastTimestamp":"2018-10-17T21:25:46Z","name":"BackOff","message":"Back-off + restarting failed container","type":"Warning"},{"count":1,"firstTimestamp":"2018-10-17T21:25:59Z","lastTimestamp":"2018-10-17T21:25:59Z","name":"Created","message":"Created + container with id e6a3a9942e8f6b63982eaf576f87b02c0c5296f3ff62ac3a82dcedcd77468b6a","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:26:00Z","lastTimestamp":"2018-10-17T21:26:00Z","name":"Started","message":"Started + container with id e6a3a9942e8f6b63982eaf576f87b02c0c5296f3ff62ac3a82dcedcd77468b6a","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.61.214","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Succeeded"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000006":{"principalId":"b3855dcb-318f-4beb-ad99-4e599af42284","clientId":"588cec8a-a607-408c-91a3-87de071d234e"}},"principalId":"97cdb832-4a89-40c1-92e5-9eb3817e5ce4","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned, UserAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004","name":"clicontainer000004","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] - content-length: ['3497'] + content-length: ['3498'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:20:12 GMT'] + date: ['Wed, 17 Oct 2018 21:25:59 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -661,12 +743,12 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Oct 2018 20:20:13 GMT'] + date: ['Wed, 17 Oct 2018 21:26:00 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdJUjVEQUlNS1k0UlpMUUhTUk9BTUNLQ0lNSERQU1ZRNU5PTHxDQzc1MkM4RDE0RThEQjUyLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdOVllEVUlYSjJSM1U2TzJaVUY0N01OVlRYNTVLU09MUFdHTHxBNUQyOThCMzkzQjI2RTM3LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-deletes: ['14998'] + x-ms-ratelimit-remaining-subscription-deletes: ['14999'] status: {code: 202, message: Accepted} version: 1 diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_vnet.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_vnet.yaml index d807aca7727..47c56d3b0fa 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_vnet.yaml +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_vnet.yaml @@ -1,7 +1,7 @@ interactions: - request: body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", - "date": "2018-10-17T20:20:14Z"}}' + "date": "2018-10-17T21:26:01Z"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -16,12 +16,12 @@ interactions: method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:20:14Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:26:01Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:20:15 GMT'] + date: ['Wed, 17 Oct 2018 21:26:03 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -43,12 +43,12 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:20:14Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:26:01Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:20:14 GMT'] + date: ['Wed, 17 Oct 2018 21:26:02 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -70,12 +70,12 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:20:14Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:26:01Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:20:15 GMT'] + date: ['Wed, 17 Oct 2018 21:26:02 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -97,12 +97,12 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:20:14Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:26:01Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:20:15 GMT'] + date: ['Wed, 17 Oct 2018 21:26:04 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -136,14 +136,14 @@ interactions: cache-control: [no-cache] content-length: ['330'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:20:16 GMT'] + date: ['Wed, 17 Oct 2018 21:26:05 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['90'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['97'] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['89'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['94'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 400, message: Bad Request} - request: body: null @@ -165,9 +165,9 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Oct 2018 20:20:17 GMT'] + date: ['Wed, 17 Oct 2018 21:26:06 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdETUpSVkJNTElHNEg0QjdKWTJENEtINEI0M0NHSVRGQ0hFSnwyNjU4MkU3NjgzMkRENzI2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdOVjJHTlBETU5HVFBPWDRKSFZQSkQzV1VPMzJYSzJENkFQTnw1Qjc3Q0Q3M0IzRUJEMzhELVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_git_repo_volume_mount.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_git_repo_volume_mount.yaml index 97a5818bdff..bcddf843ac5 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_git_repo_volume_mount.yaml +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_git_repo_volume_mount.yaml @@ -1,7 +1,7 @@ interactions: - request: body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", - "date": "2018-10-17T20:20:18Z"}}' + "date": "2018-10-17T21:26:06Z"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -16,12 +16,12 @@ interactions: method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:20:18Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:26:06Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:20:19 GMT'] + date: ['Wed, 17 Oct 2018 21:26:06 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -43,12 +43,12 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T20:20:18Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:26:06Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:20:19 GMT'] + date: ['Wed, 17 Oct 2018 21:26:08 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -76,20 +76,20 @@ interactions: method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000002","properties":{"image":"nginx","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Waiting","detailStatus":"ContainerCreating"}},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}},"volumeMounts":[{"name":"gitrepo","mountPath":"/src"}]}}],"restartPolicy":"Always","osType":"Linux","volumes":[{"name":"gitrepo","gitRepo":{"repository":"https://github.com/yolo3301/dumb-flow.git","directory":"./test","revision":"5604f0a8f11bfe13e621418ab6f6a71973e208ce"}}],"instanceView":{"state":"Pending"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000002","properties":{"image":"nginx","ports":[],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}},"volumeMounts":[{"name":"gitrepo","mountPath":"/src"}]}}],"restartPolicy":"Always","osType":"Linux","volumes":[{"name":"gitrepo","gitRepo":{"repository":"https://github.com/yolo3301/dumb-flow.git","directory":"./test","revision":"5604f0a8f11bfe13e621418ab6f6a71973e208ce"}}],"instanceView":{"state":"Pending"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/d8a6a606-8457-4f6f-b627-ed23053e2d5b?api-version=2018-06-01'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/2fc69a74-0011-4972-af08-8a11934283bf?api-version=2018-06-01'] cache-control: [no-cache] - content-length: ['979'] + content-length: ['875'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:20:21 GMT'] + date: ['Wed, 17 Oct 2018 21:26:11 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['89'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['96'] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['88'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['93'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} - request: body: null @@ -102,18 +102,18 @@ interactions: msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.49] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/d8a6a606-8457-4f6f-b627-ed23053e2d5b?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/2fc69a74-0011-4972-af08-8a11934283bf?api-version=2018-06-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-17T20:20:22.5817049Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-10-17T20:20:25Z","lastTimestamp":"2018-10-17T20:20:25Z","name":"Pulling","message":"pulling - image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:20:33Z","lastTimestamp":"2018-10-17T20:20:33Z","name":"Pulled","message":"Successfully - pulled image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:20:34Z","lastTimestamp":"2018-10-17T20:20:34Z","name":"Created","message":"Created - container with id 3b92f23ee776fe01a5339c9d0bb27d5e9f56f455714f096cfc401349916de72a","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:20:34Z","lastTimestamp":"2018-10-17T20:20:34Z","name":"Started","message":"Started - container with id 3b92f23ee776fe01a5339c9d0bb27d5e9f56f455714f096cfc401349916de72a","type":"Normal"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-17T21:26:11.6944821Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-10-17T21:26:20Z","lastTimestamp":"2018-10-17T21:26:20Z","name":"Pulling","message":"pulling + image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:26:29Z","lastTimestamp":"2018-10-17T21:26:29Z","name":"Pulled","message":"Successfully + pulled image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:26:29Z","lastTimestamp":"2018-10-17T21:26:29Z","name":"Created","message":"Created + container with id aaef2ee40872e81ab87827e55c540932496410cbcd9e9a280aa2cbbaaa125a4f","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:26:30Z","lastTimestamp":"2018-10-17T21:26:30Z","name":"Started","message":"Started + container with id aaef2ee40872e81ab87827e55c540932496410cbcd9e9a280aa2cbbaaa125a4f","type":"Normal"}]}}'} headers: cache-control: [no-cache] content-length: ['1097'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:20:52 GMT'] + date: ['Wed, 17 Oct 2018 21:26:42 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -134,16 +134,16 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"nginx","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T20:20:34Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T20:20:25Z","lastTimestamp":"2018-10-17T20:20:25Z","name":"Pulling","message":"pulling - image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:20:33Z","lastTimestamp":"2018-10-17T20:20:33Z","name":"Pulled","message":"Successfully - pulled image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:20:34Z","lastTimestamp":"2018-10-17T20:20:34Z","name":"Created","message":"Created - container with id 3b92f23ee776fe01a5339c9d0bb27d5e9f56f455714f096cfc401349916de72a","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:20:34Z","lastTimestamp":"2018-10-17T20:20:34Z","name":"Started","message":"Started - container with id 3b92f23ee776fe01a5339c9d0bb27d5e9f56f455714f096cfc401349916de72a","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}},"volumeMounts":[{"name":"gitrepo","mountPath":"/src"}]}}],"restartPolicy":"Always","osType":"Linux","volumes":[{"name":"gitrepo","gitRepo":{"repository":"https://github.com/yolo3301/dumb-flow.git","directory":"./test","revision":"5604f0a8f11bfe13e621418ab6f6a71973e208ce"}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"nginx","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T21:26:30Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T21:26:20Z","lastTimestamp":"2018-10-17T21:26:20Z","name":"Pulling","message":"pulling + image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:26:29Z","lastTimestamp":"2018-10-17T21:26:29Z","name":"Pulled","message":"Successfully + pulled image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:26:29Z","lastTimestamp":"2018-10-17T21:26:29Z","name":"Created","message":"Created + container with id aaef2ee40872e81ab87827e55c540932496410cbcd9e9a280aa2cbbaaa125a4f","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:26:30Z","lastTimestamp":"2018-10-17T21:26:30Z","name":"Started","message":"Started + container with id aaef2ee40872e81ab87827e55c540932496410cbcd9e9a280aa2cbbaaa125a4f","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}},"volumeMounts":[{"name":"gitrepo","mountPath":"/src"}]}}],"restartPolicy":"Always","osType":"Linux","volumes":[{"name":"gitrepo","gitRepo":{"repository":"https://github.com/yolo3301/dumb-flow.git","directory":"./test","revision":"5604f0a8f11bfe13e621418ab6f6a71973e208ce"}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] content-length: ['1807'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:20:53 GMT'] + date: ['Wed, 17 Oct 2018 21:26:42 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -165,16 +165,16 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"nginx","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T20:20:34Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T20:20:25Z","lastTimestamp":"2018-10-17T20:20:25Z","name":"Pulling","message":"pulling - image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:20:33Z","lastTimestamp":"2018-10-17T20:20:33Z","name":"Pulled","message":"Successfully - pulled image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:20:34Z","lastTimestamp":"2018-10-17T20:20:34Z","name":"Created","message":"Created - container with id 3b92f23ee776fe01a5339c9d0bb27d5e9f56f455714f096cfc401349916de72a","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T20:20:34Z","lastTimestamp":"2018-10-17T20:20:34Z","name":"Started","message":"Started - container with id 3b92f23ee776fe01a5339c9d0bb27d5e9f56f455714f096cfc401349916de72a","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}},"volumeMounts":[{"name":"gitrepo","mountPath":"/src"}]}}],"restartPolicy":"Always","osType":"Linux","volumes":[{"name":"gitrepo","gitRepo":{"repository":"https://github.com/yolo3301/dumb-flow.git","directory":"./test","revision":"5604f0a8f11bfe13e621418ab6f6a71973e208ce"}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"nginx","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T21:26:30Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T21:26:20Z","lastTimestamp":"2018-10-17T21:26:20Z","name":"Pulling","message":"pulling + image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:26:29Z","lastTimestamp":"2018-10-17T21:26:29Z","name":"Pulled","message":"Successfully + pulled image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:26:29Z","lastTimestamp":"2018-10-17T21:26:29Z","name":"Created","message":"Created + container with id aaef2ee40872e81ab87827e55c540932496410cbcd9e9a280aa2cbbaaa125a4f","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:26:30Z","lastTimestamp":"2018-10-17T21:26:30Z","name":"Started","message":"Started + container with id aaef2ee40872e81ab87827e55c540932496410cbcd9e9a280aa2cbbaaa125a4f","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}},"volumeMounts":[{"name":"gitrepo","mountPath":"/src"}]}}],"restartPolicy":"Always","osType":"Linux","volumes":[{"name":"gitrepo","gitRepo":{"repository":"https://github.com/yolo3301/dumb-flow.git","directory":"./test","revision":"5604f0a8f11bfe13e621418ab6f6a71973e208ce"}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] content-length: ['1807'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 20:20:54 GMT'] + date: ['Wed, 17 Oct 2018 21:26:42 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -202,9 +202,9 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Oct 2018 20:20:54 GMT'] + date: ['Wed, 17 Oct 2018 21:26:43 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkczSEY2R1lOVFBYT1dSR1FIQkNEUVBITkczR0VFUVJPWVZCU3wzMDY3N0FCMUZBNTNBQ0NCLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdONjdNS1VSMklPSDRXWEsyMktCRjZRUFJMTFJBNlE3WlVEV3xFMTQ1ODVBOTU0Q0FBNkRGLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/test_container_commands.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/test_container_commands.py index f913abf81fd..4a8217a6bb5 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/test_container_commands.py +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/test_container_commands.py @@ -118,27 +118,25 @@ def test_container_create(self, resource_group, resource_group_location): # Test create container using managed identities. @ResourceGroupPreparer() def test_container_create_with_msi(self, resource_group, resource_group_location): - from msrestazure.tools import resource_id - from knack.util import CLIError container_group_name1 = self.create_random_name('clicontainer', 16) container_group_name2 = self.create_random_name('clicontainer', 16) container_group_name3 = self.create_random_name('clicontainer', 16) image = 'alpine:latest' os_type = 'Linux' ip_address_type = 'Public' + storage_account_name = self.create_random_name('clistorage', 16) user_assigned_identity_name = self.create_random_name('cliaciidentity', 20) system_assigned_identity = '[system]' - msi_scope = resource_id(subscription=self.get_subscription_id(), - resource_group="azure-cli", - namespace='Microsoft.Storage', type='storageAccounts', - name='cliacistorageaccount') self.kwargs.update({ - 'user_assigned_identity_name': user_assigned_identity_name + 'user_assigned_identity_name': user_assigned_identity_name, + 'storage_account_name': storage_account_name, }) msi_identity_result = self.cmd('identity create -g {rg} -n {user_assigned_identity_name}').get_output_in_json() + storage_account_result = self.cmd('az storage account create -n {storage_account_name} -g {rg} ').get_output_in_json() + self.kwargs.update({ 'container_group_name1': container_group_name1, 'container_group_name2': container_group_name2, @@ -149,7 +147,7 @@ def test_container_create_with_msi(self, resource_group, resource_group_location 'ip_address_type': ip_address_type, 'user_assigned_identity': msi_identity_result['id'], 'system_assigned_identity': system_assigned_identity, - 'msi_scope': msi_scope + 'msi_scope': storage_account_result['id'] }) # Test create system assigned identity From 998921ab8076266a0fb283e941892010618f10f2 Mon Sep 17 00:00:00 2001 From: sakreter Date: Wed, 17 Oct 2018 14:46:54 -0700 Subject: [PATCH 09/13] removing whitespace --- .../container/tests/latest/test_container_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/test_container_commands.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/test_container_commands.py index 4a8217a6bb5..1fdf71b34c5 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/test_container_commands.py +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/test_container_commands.py @@ -160,7 +160,7 @@ def test_container_create_with_msi(self, resource_group, resource_group_location self.check('identity.type', 'SystemAssigned'), self.exists('ipAddress.ip'), self.check('containers[0].image', '{image}')]) - + # Test create system assigned identity with scope self.cmd('container create -g {rg} -n {container_group_name1} --image {image} --os-type {os_type} ' '--ip-address {ip_address_type} --assign-identity --scope {msi_scope}', From 1b86f5ce1422d3853b85416a0dfcc2430fa6bdd8 Mon Sep 17 00:00:00 2001 From: sakreter Date: Wed, 17 Oct 2018 17:21:00 -0700 Subject: [PATCH 10/13] making non predictble test live only --- .../cli/command_modules/container/_help.py | 2 + .../recordings/test_container_create.yaml | 78 +-- .../test_container_create_with_acr.yaml | 96 ++-- .../test_container_create_with_msi.yaml | 458 ++++-------------- .../test_container_create_with_msi_scope.yaml | 373 ++++++++++++++ .../test_container_create_with_vnet.yaml | 32 +- .../test_container_git_repo_volume_mount.yaml | 64 +-- .../tests/latest/test_container_commands.py | 55 ++- 8 files changed, 666 insertions(+), 492 deletions(-) create mode 100644 src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_msi_scope.yaml diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_help.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_help.py index c2996981eac..39adb6b26dd 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_help.py +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_help.py @@ -41,6 +41,8 @@ text: az container create -g MyResourceGroup --name myapp --log-analytics-workspace myworkspace - name: Create a container group with a system assigned identity. text: az container create -g MyResourceGroup --name myapp --image myimage:latest --assign-identity + - name: Create a container group with a system assigned identity. The group will have a 'Contributor' role with access to a storage account. + text: az container create -g MyResourceGroup --name myapp --image myimage:latest --assign-identity --scope /subscriptions/99999999-1bf0-4dda-aec3-cb9272f09590/MyResourceGroup/myRG/providers/Microsoft.Storage/storageAccounts/storage1 - name: Create a container group with a user assigned identity. text: az container create -g MyResourceGroup --name myapp --image myimage:latest --assign-identity /subscriptions/mySubscrpitionId/resourcegroups/myRG/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myID - name: Create a container group with both system and user assigned identity. diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create.yaml index 574a202d4a8..b33a932ece0 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create.yaml +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create.yaml @@ -1,7 +1,7 @@ interactions: - request: body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", - "date": "2018-10-17T21:22:03Z"}}' + "date": "2018-10-18T00:14:09Z"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -16,17 +16,17 @@ interactions: method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:22:03Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-18T00:14:09Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:22:04 GMT'] + date: ['Thu, 18 Oct 2018 00:14:13 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 201, message: Created} - request: body: null @@ -43,12 +43,12 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:22:03Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-18T00:14:09Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:22:05 GMT'] + date: ['Thu, 18 Oct 2018 00:14:13 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -81,20 +81,20 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","command":["/bin/sh","-c","while - true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"104.42.218.170","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}],"instanceView":{"state":"Pending"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"instanceView":{"restartCount":0,"currentState":{"state":"Waiting","detailStatus":"ContainerCreating"}},"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"40.78.53.223","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}],"instanceView":{"state":"Pending"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/0ee6ff86-f95a-42fa-9591-7348c3df402e?api-version=2018-06-01'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/b3ab9b00-2f70-4988-a18b-fbe8e4737277?api-version=2018-06-01'] cache-control: [no-cache] - content-length: ['1156'] + content-length: ['1258'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:22:12 GMT'] + date: ['Thu, 18 Oct 2018 00:14:18 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['94'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['86'] x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['99'] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 201, message: Created} - request: body: null @@ -107,18 +107,18 @@ interactions: msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.49] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/0ee6ff86-f95a-42fa-9591-7348c3df402e?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/b3ab9b00-2f70-4988-a18b-fbe8e4737277?api-version=2018-06-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-17T21:22:11.8081806Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-10-17T21:22:16Z","lastTimestamp":"2018-10-17T21:22:16Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:22:19Z","lastTimestamp":"2018-10-17T21:22:19Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:22:19Z","lastTimestamp":"2018-10-17T21:22:19Z","name":"Created","message":"Created - container with id 56697bf17eb0622dd2353d163611ab725bdccdb4daca345d89e808bde177796e","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:22:19Z","lastTimestamp":"2018-10-17T21:22:19Z","name":"Started","message":"Started - container with id 56697bf17eb0622dd2353d163611ab725bdccdb4daca345d89e808bde177796e","type":"Normal"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-18T00:14:18.048917Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-10-18T00:14:20Z","lastTimestamp":"2018-10-18T00:14:20Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:14:22Z","lastTimestamp":"2018-10-18T00:14:22Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:14:22Z","lastTimestamp":"2018-10-18T00:14:22Z","name":"Created","message":"Created + container with id 4803e8035713583eca044ffef3e90d7fb3fe54b48d59151186d3cd3934c9987c","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:14:22Z","lastTimestamp":"2018-10-18T00:14:22Z","name":"Started","message":"Started + container with id 4803e8035713583eca044ffef3e90d7fb3fe54b48d59151186d3cd3934c9987c","type":"Normal"}]}}'} headers: cache-control: [no-cache] - content-length: ['1113'] + content-length: ['1112'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:22:42 GMT'] + date: ['Thu, 18 Oct 2018 00:14:48 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -140,16 +140,16 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","command":["/bin/sh","-c","while - true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T21:22:19Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T21:22:16Z","lastTimestamp":"2018-10-17T21:22:16Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:22:19Z","lastTimestamp":"2018-10-17T21:22:19Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:22:19Z","lastTimestamp":"2018-10-17T21:22:19Z","name":"Created","message":"Created - container with id 56697bf17eb0622dd2353d163611ab725bdccdb4daca345d89e808bde177796e","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:22:19Z","lastTimestamp":"2018-10-17T21:22:19Z","name":"Started","message":"Started - container with id 56697bf17eb0622dd2353d163611ab725bdccdb4daca345d89e808bde177796e","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"104.42.218.170","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-18T00:14:22Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-18T00:14:20Z","lastTimestamp":"2018-10-18T00:14:20Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:14:22Z","lastTimestamp":"2018-10-18T00:14:22Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:14:22Z","lastTimestamp":"2018-10-18T00:14:22Z","name":"Created","message":"Created + container with id 4803e8035713583eca044ffef3e90d7fb3fe54b48d59151186d3cd3934c9987c","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:14:22Z","lastTimestamp":"2018-10-18T00:14:22Z","name":"Started","message":"Started + container with id 4803e8035713583eca044ffef3e90d7fb3fe54b48d59151186d3cd3934c9987c","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"40.78.53.223","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] - content-length: ['2104'] + content-length: ['2102'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:22:42 GMT'] + date: ['Thu, 18 Oct 2018 00:14:49 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -172,16 +172,16 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","command":["/bin/sh","-c","while - true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T21:22:19Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T21:22:16Z","lastTimestamp":"2018-10-17T21:22:16Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:22:19Z","lastTimestamp":"2018-10-17T21:22:19Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:22:19Z","lastTimestamp":"2018-10-17T21:22:19Z","name":"Created","message":"Created - container with id 56697bf17eb0622dd2353d163611ab725bdccdb4daca345d89e808bde177796e","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:22:19Z","lastTimestamp":"2018-10-17T21:22:19Z","name":"Started","message":"Started - container with id 56697bf17eb0622dd2353d163611ab725bdccdb4daca345d89e808bde177796e","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"104.42.218.170","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-18T00:14:22Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-18T00:14:20Z","lastTimestamp":"2018-10-18T00:14:20Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:14:22Z","lastTimestamp":"2018-10-18T00:14:22Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:14:22Z","lastTimestamp":"2018-10-18T00:14:22Z","name":"Created","message":"Created + container with id 4803e8035713583eca044ffef3e90d7fb3fe54b48d59151186d3cd3934c9987c","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:14:22Z","lastTimestamp":"2018-10-18T00:14:22Z","name":"Started","message":"Started + container with id 4803e8035713583eca044ffef3e90d7fb3fe54b48d59151186d3cd3934c9987c","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"40.78.53.223","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] - content-length: ['2104'] + content-length: ['2102'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:22:43 GMT'] + date: ['Thu, 18 Oct 2018 00:14:50 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -204,12 +204,12 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups?api-version=2018-10-01 response: body: {string: '{"value":[{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","command":["/bin/sh","-c","while - true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"104.42.218.170","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}]},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}]}'} + true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"40.78.53.223","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}]},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}]}'} headers: cache-control: [no-cache] - content-length: ['1135'] + content-length: ['1133'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:22:43 GMT'] + date: ['Thu, 18 Oct 2018 00:14:50 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -237,9 +237,9 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Oct 2018 21:22:45 GMT'] + date: ['Thu, 18 Oct 2018 00:14:52 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdBMlNBU1NaQVZBUzJFUlhON1JPSTVPSVFJNTJQTzI1UTNXVHwzMUU0ODgyMDg1QjZFOTNCLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdUQ1E3QkZNRklJSTRFQkNFWUFQUDZHWlVLS0w0R1ZXNFc2N3xBQjdDNEYzRDA4RUUzNDY3LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_acr.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_acr.yaml index f8f90815533..08092c3f5dd 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_acr.yaml +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_acr.yaml @@ -1,7 +1,7 @@ interactions: - request: body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", - "date": "2018-10-17T21:22:45Z"}}' + "date": "2018-10-18T00:14:52Z"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -16,12 +16,12 @@ interactions: method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:22:45Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-18T00:14:52Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:22:47 GMT'] + date: ['Thu, 18 Oct 2018 00:14:53 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -43,12 +43,12 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:22:45Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-18T00:14:52Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:22:47 GMT'] + date: ['Thu, 18 Oct 2018 00:14:53 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -77,18 +77,18 @@ interactions: response: body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000002","properties":{"image":"clitestregistry1.azurecr.io/nginx:latest","ports":[],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"imageRegistryCredentials":[{"server":"clitestregistry1.azurecr.io","username":"clitestregistry1"}],"restartPolicy":"Always","osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/4ec152ed-dca6-4052-8fe8-38f3477d2c55?api-version=2018-06-01'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/70b208c3-7bca-4591-b9a3-855fa2b4d2e8?api-version=2018-06-01'] cache-control: [no-cache] content-length: ['780'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:22:56 GMT'] + date: ['Thu, 18 Oct 2018 00:15:00 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['92'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['99'] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['85'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['98'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} - request: body: null @@ -101,18 +101,44 @@ interactions: msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.49] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/4ec152ed-dca6-4052-8fe8-38f3477d2c55?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/70b208c3-7bca-4591-b9a3-855fa2b4d2e8?api-version=2018-06-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Pending","startTime":"2018-10-18T00:15:01.0060422Z","properties":{"events":[]}}'} + headers: + cache-control: [no-cache] + content-length: ['311'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 18 Oct 2018 00:15:31 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/70b208c3-7bca-4591-b9a3-855fa2b4d2e8?api-version=2018-06-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-17T21:22:56.4936702Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-10-17T21:23:06Z","lastTimestamp":"2018-10-17T21:23:06Z","name":"Pulling","message":"pulling - image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:23:11Z","lastTimestamp":"2018-10-17T21:23:11Z","name":"Pulled","message":"Successfully - pulled image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:23:16Z","lastTimestamp":"2018-10-17T21:23:16Z","name":"Created","message":"Created - container","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:23:16Z","lastTimestamp":"2018-10-17T21:23:16Z","name":"Started","message":"Started - container","type":"Normal"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-18T00:15:01.0060422Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-10-18T00:15:18Z","lastTimestamp":"2018-10-18T00:15:18Z","name":"Pulling","message":"pulling + image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:15:27Z","lastTimestamp":"2018-10-18T00:15:27Z","name":"Pulled","message":"Successfully + pulled image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:15:28Z","lastTimestamp":"2018-10-18T00:15:28Z","name":"Created","message":"Created + container with id c2d3aad29390141604536df07486ef3e2991623a11734b45d7300da71a266631","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:15:29Z","lastTimestamp":"2018-10-18T00:15:29Z","name":"Started","message":"Started + container with id c2d3aad29390141604536df07486ef3e2991623a11734b45d7300da71a266631","type":"Normal"}]}}'} headers: cache-control: [no-cache] - content-length: ['1021'] + content-length: ['1167'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:23:27 GMT'] + date: ['Thu, 18 Oct 2018 00:16:01 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -133,16 +159,16 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"clitestregistry1.azurecr.io/nginx:latest","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T21:23:16Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T21:23:06Z","lastTimestamp":"2018-10-17T21:23:06Z","name":"Pulling","message":"pulling - image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:23:11Z","lastTimestamp":"2018-10-17T21:23:11Z","name":"Pulled","message":"Successfully - pulled image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:23:16Z","lastTimestamp":"2018-10-17T21:23:16Z","name":"Created","message":"Created - container","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:23:16Z","lastTimestamp":"2018-10-17T21:23:16Z","name":"Started","message":"Started - container","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"imageRegistryCredentials":[{"server":"clitestregistry1.azurecr.io","username":"clitestregistry1"}],"restartPolicy":"Always","osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"clitestregistry1.azurecr.io/nginx:latest","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-18T00:15:28Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-18T00:15:18Z","lastTimestamp":"2018-10-18T00:15:18Z","name":"Pulling","message":"pulling + image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:15:27Z","lastTimestamp":"2018-10-18T00:15:27Z","name":"Pulled","message":"Successfully + pulled image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:15:28Z","lastTimestamp":"2018-10-18T00:15:28Z","name":"Created","message":"Created + container with id c2d3aad29390141604536df07486ef3e2991623a11734b45d7300da71a266631","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:15:29Z","lastTimestamp":"2018-10-18T00:15:29Z","name":"Started","message":"Started + container with id c2d3aad29390141604536df07486ef3e2991623a11734b45d7300da71a266631","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"imageRegistryCredentials":[{"server":"clitestregistry1.azurecr.io","username":"clitestregistry1"}],"restartPolicy":"Always","osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] - content-length: ['1636'] + content-length: ['1782'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:23:27 GMT'] + date: ['Thu, 18 Oct 2018 00:16:02 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -164,16 +190,16 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"clitestregistry1.azurecr.io/nginx:latest","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T21:23:16Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T21:23:06Z","lastTimestamp":"2018-10-17T21:23:06Z","name":"Pulling","message":"pulling - image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:23:11Z","lastTimestamp":"2018-10-17T21:23:11Z","name":"Pulled","message":"Successfully - pulled image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:23:16Z","lastTimestamp":"2018-10-17T21:23:16Z","name":"Created","message":"Created - container","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:23:16Z","lastTimestamp":"2018-10-17T21:23:16Z","name":"Started","message":"Started - container","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"imageRegistryCredentials":[{"server":"clitestregistry1.azurecr.io","username":"clitestregistry1"}],"restartPolicy":"Always","osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"clitestregistry1.azurecr.io/nginx:latest","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-18T00:15:28Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-18T00:15:18Z","lastTimestamp":"2018-10-18T00:15:18Z","name":"Pulling","message":"pulling + image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:15:27Z","lastTimestamp":"2018-10-18T00:15:27Z","name":"Pulled","message":"Successfully + pulled image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:15:28Z","lastTimestamp":"2018-10-18T00:15:28Z","name":"Created","message":"Created + container with id c2d3aad29390141604536df07486ef3e2991623a11734b45d7300da71a266631","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:15:29Z","lastTimestamp":"2018-10-18T00:15:29Z","name":"Started","message":"Started + container with id c2d3aad29390141604536df07486ef3e2991623a11734b45d7300da71a266631","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"imageRegistryCredentials":[{"server":"clitestregistry1.azurecr.io","username":"clitestregistry1"}],"restartPolicy":"Always","osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] - content-length: ['1636'] + content-length: ['1782'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:23:28 GMT'] + date: ['Thu, 18 Oct 2018 00:16:08 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -201,12 +227,12 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Oct 2018 21:23:29 GMT'] + date: ['Thu, 18 Oct 2018 00:16:09 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdPNFlHMklVSTNWWVJCM0tGVVVOUTVVTVE1NzVQNkNVRE5CVHxDN0YwMkRERTE2RUIyMDM5LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdNR1VOSkdVR0ZQRFdLNDdLUEtVNTVDSU4zNFlXVkREREdYMnxFOENGMTI3NTZFMzBFM0ZCLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-deletes: ['14999'] + x-ms-ratelimit-remaining-subscription-deletes: ['14998'] status: {code: 202, message: Accepted} version: 1 diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_msi.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_msi.yaml index e1b3a230acf..c40fb9cfd94 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_msi.yaml +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_msi.yaml @@ -1,7 +1,7 @@ interactions: - request: body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", - "date": "2018-10-17T21:23:29Z"}}' + "date": "2018-10-18T00:16:09Z"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -16,17 +16,17 @@ interactions: method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:23:29Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-18T00:16:09Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:23:30 GMT'] + date: ['Thu, 18 Oct 2018 00:16:10 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 201, message: Created} - request: body: null @@ -43,12 +43,12 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:23:29Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-18T00:16:09Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:23:31 GMT'] + date: ['Thu, 18 Oct 2018 00:16:10 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -68,107 +68,22 @@ interactions: msrest_azure/0.4.34 azure-mgmt-msi/0.2.0 Azure-SDK-For-Python AZURECLI/2.0.49] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000006?api-version=2015-08-31-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005?api-version=2015-08-31-preview response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000006","name":"cliaciidentity000006","type":"Microsoft.ManagedIdentity/userAssignedIdentities","location":"westus","tags":{},"properties":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","principalId":"b3855dcb-318f-4beb-ad99-4e599af42284","clientId":"588cec8a-a607-408c-91a3-87de071d234e","clientSecretUrl":"https://control-westus.identity.azure.net/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000006/credentials?tid=72f988bf-86f1-41af-91ab-2d7cd011db47&oid=b3855dcb-318f-4beb-ad99-4e599af42284&aid=588cec8a-a607-408c-91a3-87de071d234e"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005","name":"cliaciidentity000005","type":"Microsoft.ManagedIdentity/userAssignedIdentities","location":"westus","tags":{},"properties":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","principalId":"b84711d3-5a43-42ec-9595-04e831b7552a","clientId":"cc2aec49-4d0c-4d60-a860-ef6f85623455","clientSecretUrl":"https://control-westus.identity.azure.net/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005/credentials?tid=72f988bf-86f1-41af-91ab-2d7cd011db47&oid=b84711d3-5a43-42ec-9595-04e831b7552a&aid=cc2aec49-4d0c-4d60-a860-ef6f85623455"}}'} headers: cache-control: [no-cache] content-length: ['936'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:23:33 GMT'] + date: ['Thu, 18 Oct 2018 00:16:14 GMT'] expires: ['-1'] - location: [/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000006] + location: [/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005] pragma: [no-cache] server: [Microsoft-HTTPAPI/2.0] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [storage account create] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python - AZURECLI/2.0.49] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:23:29Z"},"properties":{"provisioningState":"Succeeded"}}'} - headers: - cache-control: [no-cache] - content-length: ['384'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:23:34 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: '{"sku": {"name": "Standard_RAGRS"}, "kind": "Storage", "location": "westus", - "properties": {"supportsHttpsTrafficOnly": false}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [storage account create] - Connection: [keep-alive] - Content-Length: ['127'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-storage/2.0.0rc4 Azure-SDK-For-Python AZURECLI/2.0.49] - accept-language: [en-US] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clistorage000005?api-version=2018-03-01-preview - response: - body: {string: ''} - headers: - cache-control: [no-cache] - content-length: ['0'] - content-type: [text/plain; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:23:35 GMT'] - expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/5fd42441-1a8b-4a06-bdff-d9bff70393a2?monitor=true&api-version=2018-03-01-preview'] - pragma: [no-cache] - server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 - Microsoft-HTTPAPI/2.0'] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - status: {code: 202, message: Accepted} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [storage account create] - Connection: [keep-alive] - User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-storage/2.0.0rc4 Azure-SDK-For-Python AZURECLI/2.0.49] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/5fd42441-1a8b-4a06-bdff-d9bff70393a2?monitor=true&api-version=2018-03-01-preview - response: - body: {string: '{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clistorage000005","name":"clistorage000005","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-10-17T21:23:35.9200664Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-10-17T21:23:35.9200664Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-10-17T21:23:35.8240915Z","primaryEndpoints":{"blob":"https://clistorage000005.blob.core.windows.net/","queue":"https://clistorage000005.queue.core.windows.net/","table":"https://clistorage000005.table.core.windows.net/","file":"https://clistorage000005.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available","secondaryEndpoints":{"blob":"https://clistorage000005-secondary.blob.core.windows.net/","queue":"https://clistorage000005-secondary.queue.core.windows.net/","table":"https://clistorage000005-secondary.table.core.windows.net/"}}}'} - headers: - cache-control: [no-cache] - content-length: ['1412'] - content-type: [application/json] - date: ['Wed, 17 Oct 2018 21:23:53 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 - Microsoft-HTTPAPI/2.0'] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} - request: body: null headers: @@ -184,12 +99,12 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:23:29Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-18T00:16:09Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:23:54 GMT'] + date: ['Thu, 18 Oct 2018 00:16:14 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -216,20 +131,20 @@ interactions: method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"40.78.83.41","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"principalId":"1a278f4d-6cca-4133-bb73-29a9ddedcecf","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Waiting","detailStatus":"ContainerCreating"}},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.215.201","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"principalId":"1e2a2ff9-fe3f-4a88-9637-89c8f712a188","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/093d04eb-2ee4-48af-a904-7f8df1f109a4?api-version=2018-06-01'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/3aacea1c-0f55-47f8-bc7e-2dfaefc9c719?api-version=2018-06-01'] cache-control: [no-cache] - content-length: ['882'] + content-length: ['989'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:24:05 GMT'] + date: ['Thu, 18 Oct 2018 00:16:21 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['93'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['98'] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['84'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['99'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 201, message: Created} - request: body: null @@ -242,18 +157,21 @@ interactions: msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.49] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/093d04eb-2ee4-48af-a904-7f8df1f109a4?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/3aacea1c-0f55-47f8-bc7e-2dfaefc9c719?api-version=2018-06-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-17T21:24:05.1869577Z","properties":{"events":[{"count":2,"firstTimestamp":"2018-10-17T21:24:14Z","lastTimestamp":"2018-10-17T21:24:18Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T21:24:17Z","lastTimestamp":"2018-10-17T21:24:19Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:17Z","lastTimestamp":"2018-10-17T21:24:17Z","name":"Created","message":"Created - container with id 5f7381280f7bac43f7f36e5deb7a6533d316668cbaa4ef37162ffe6a1f106040","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:17Z","lastTimestamp":"2018-10-17T21:24:17Z","name":"Started","message":"Started - container with id 5f7381280f7bac43f7f36e5deb7a6533d316668cbaa4ef37162ffe6a1f106040","type":"Normal"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-18T00:16:21.7464181Z","properties":{"events":[{"count":2,"firstTimestamp":"2018-10-18T00:16:24Z","lastTimestamp":"2018-10-18T00:16:27Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-18T00:16:26Z","lastTimestamp":"2018-10-18T00:16:29Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:16:26Z","lastTimestamp":"2018-10-18T00:16:26Z","name":"Created","message":"Created + container with id 3bb22d56eb4bc772419befdbb65d795fd98397b986a58e7e152d6898ef80e26f","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:16:27Z","lastTimestamp":"2018-10-18T00:16:27Z","name":"Started","message":"Started + container with id 3bb22d56eb4bc772419befdbb65d795fd98397b986a58e7e152d6898ef80e26f","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:16:29Z","lastTimestamp":"2018-10-18T00:16:29Z","name":"Created","message":"Created + container with id e7ea80d8d611c23323b2c912eef11436004d7278a993412e7af7393377378d7f","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:16:29Z","lastTimestamp":"2018-10-18T00:16:29Z","name":"Started","message":"Started + container with id e7ea80d8d611c23323b2c912eef11436004d7278a993412e7af7393377378d7f","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:16:29Z","lastTimestamp":"2018-10-18T00:16:29Z","name":"BackOff","message":"Back-off + restarting failed container","type":"Warning"}]}}'} headers: cache-control: [no-cache] - content-length: ['1113'] + content-length: ['1741'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:24:35 GMT'] + date: ['Thu, 18 Oct 2018 00:16:52 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -274,20 +192,21 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":1,"currentState":{"state":"Waiting","detailStatus":"CrashLoopBackOff: - Back-off 10s restarting failed"},"previousState":{"state":"Terminated","startTime":"2018-10-17T21:24:20Z","exitCode":0,"finishTime":"2018-10-17T21:24:20Z","detailStatus":"Completed"},"events":[{"count":2,"firstTimestamp":"2018-10-17T21:24:14Z","lastTimestamp":"2018-10-17T21:24:18Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T21:24:17Z","lastTimestamp":"2018-10-17T21:24:19Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:17Z","lastTimestamp":"2018-10-17T21:24:17Z","name":"Created","message":"Created - container with id 5f7381280f7bac43f7f36e5deb7a6533d316668cbaa4ef37162ffe6a1f106040","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:17Z","lastTimestamp":"2018-10-17T21:24:17Z","name":"Started","message":"Started - container with id 5f7381280f7bac43f7f36e5deb7a6533d316668cbaa4ef37162ffe6a1f106040","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:20Z","lastTimestamp":"2018-10-17T21:24:20Z","name":"Created","message":"Created - container with id 1eeed247cfb52e699c0efe1b49124437dc11fe4c10bf3723bd0d1b877ae7e95d","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:20Z","lastTimestamp":"2018-10-17T21:24:20Z","name":"Started","message":"Started - container with id 1eeed247cfb52e699c0efe1b49124437dc11fe4c10bf3723bd0d1b877ae7e95d","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T21:24:21Z","lastTimestamp":"2018-10-17T21:24:22Z","name":"BackOff","message":"Back-off - restarting failed container","type":"Warning"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"40.78.83.41","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"principalId":"1a278f4d-6cca-4133-bb73-29a9ddedcecf","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":2,"currentState":{"state":"Terminated","startTime":"2018-10-18T00:16:46Z","exitCode":0,"finishTime":"2018-10-18T00:16:46Z","detailStatus":"Completed"},"previousState":{"state":"Terminated","startTime":"2018-10-18T00:16:29Z","exitCode":0,"finishTime":"2018-10-18T00:16:29Z","detailStatus":"Completed"},"events":[{"count":3,"firstTimestamp":"2018-10-18T00:16:24Z","lastTimestamp":"2018-10-18T00:16:44Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-18T00:16:26Z","lastTimestamp":"2018-10-18T00:16:45Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:16:26Z","lastTimestamp":"2018-10-18T00:16:26Z","name":"Created","message":"Created + container with id 3bb22d56eb4bc772419befdbb65d795fd98397b986a58e7e152d6898ef80e26f","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:16:27Z","lastTimestamp":"2018-10-18T00:16:27Z","name":"Started","message":"Started + container with id 3bb22d56eb4bc772419befdbb65d795fd98397b986a58e7e152d6898ef80e26f","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:16:29Z","lastTimestamp":"2018-10-18T00:16:29Z","name":"Created","message":"Created + container with id e7ea80d8d611c23323b2c912eef11436004d7278a993412e7af7393377378d7f","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:16:29Z","lastTimestamp":"2018-10-18T00:16:29Z","name":"Started","message":"Started + container with id e7ea80d8d611c23323b2c912eef11436004d7278a993412e7af7393377378d7f","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-18T00:16:29Z","lastTimestamp":"2018-10-18T00:16:47Z","name":"BackOff","message":"Back-off + restarting failed container","type":"Warning"},{"count":1,"firstTimestamp":"2018-10-18T00:16:46Z","lastTimestamp":"2018-10-18T00:16:46Z","name":"Created","message":"Created + container with id e463678ad51b661eb8d1a52200be6a69dd2b725f254c7175a7b901f2724b420b","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:16:46Z","lastTimestamp":"2018-10-18T00:16:46Z","name":"Started","message":"Started + container with id e463678ad51b661eb8d1a52200be6a69dd2b725f254c7175a7b901f2724b420b","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.215.201","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Succeeded"}},"identity":{"principalId":"1e2a2ff9-fe3f-4a88-9637-89c8f712a188","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] - content-length: ['2621'] + content-length: ['3128'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:24:36 GMT'] + date: ['Thu, 18 Oct 2018 00:16:52 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -310,183 +229,12 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:23:29Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-18T00:16:09Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:24:36 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [container create] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-authorization/0.50.0 Azure-SDK-For-Python - AZURECLI/2.0.49] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clistorage000005/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Contributor%27&api-version=2018-01-01-preview - response: - body: {string: '{"value":[{"properties":{"roleName":"Contributor","type":"BuiltInRole","description":"Lets - you manage everything except access to resources.","assignableScopes":["/"],"permissions":[{"actions":["*"],"notActions":["Microsoft.Authorization/*/Delete","Microsoft.Authorization/*/Write","Microsoft.Authorization/elevateAccess/Action","Microsoft.Blueprint/blueprintAssignments/write","Microsoft.Blueprint/blueprintAssignments/delete"],"dataActions":[],"notDataActions":[]}],"createdOn":"0001-01-01T08:00:00.0000000Z","updatedOn":"2018-05-30T19:22:32.4538167Z","createdBy":null,"updatedBy":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c","type":"Microsoft.Authorization/roleDefinitions","name":"b24988ac-6180-42a0-ab88-20f7382dd24c"}]}'} - headers: - cache-control: [no-cache] - content-length: ['832'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:24:36 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/10.0] - set-cookie: [x-ms-gateway-slice=productionb; path=/; secure; HttpOnly] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - x-ms-request-charge: ['1'] - status: {code: 200, message: OK} -- request: - body: 'b''{"location": "westus", "tags": {}, "identity": {"type": "SystemAssigned"}, - "properties": {"containers": [{"name": "clicontainer000002", "properties": {"image": - "alpine:latest", "ports": [{"protocol": "TCP", "port": 80}], "resources": {"requests": - {"memoryInGB": 1.5, "cpu": 1.0}}}}], "restartPolicy": "Always", "ipAddress": - {"ports": [{"protocol": "TCP", "port": 80}], "type": "Public"}, "osType": "Linux"}}''' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [container create] - Connection: [keep-alive] - Content-Length: ['405'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.49] - accept-language: [en-US] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 - response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":1,"currentState":{"state":"Waiting","detailStatus":"CrashLoopBackOff: - Back-off 10s restarting failed"},"previousState":{"state":"Terminated","startTime":"2018-10-17T21:24:20Z","exitCode":0,"finishTime":"2018-10-17T21:24:20Z","detailStatus":"Completed"},"events":[{"count":3,"firstTimestamp":"2018-10-17T21:24:14Z","lastTimestamp":"2018-10-17T21:24:37Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T21:24:17Z","lastTimestamp":"2018-10-17T21:24:19Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:17Z","lastTimestamp":"2018-10-17T21:24:17Z","name":"Created","message":"Created - container with id 5f7381280f7bac43f7f36e5deb7a6533d316668cbaa4ef37162ffe6a1f106040","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:17Z","lastTimestamp":"2018-10-17T21:24:17Z","name":"Started","message":"Started - container with id 5f7381280f7bac43f7f36e5deb7a6533d316668cbaa4ef37162ffe6a1f106040","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:20Z","lastTimestamp":"2018-10-17T21:24:20Z","name":"Created","message":"Created - container with id 1eeed247cfb52e699c0efe1b49124437dc11fe4c10bf3723bd0d1b877ae7e95d","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:20Z","lastTimestamp":"2018-10-17T21:24:20Z","name":"Started","message":"Started - container with id 1eeed247cfb52e699c0efe1b49124437dc11fe4c10bf3723bd0d1b877ae7e95d","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T21:24:21Z","lastTimestamp":"2018-10-17T21:24:22Z","name":"BackOff","message":"Back-off - restarting failed container","type":"Warning"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"40.78.83.41","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"principalId":"1a278f4d-6cca-4133-bb73-29a9ddedcecf","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} - headers: - cache-control: [no-cache] - content-length: ['2621'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:24:37 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: ['Accept-Encoding,Accept-Encoding'] - x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['91'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['98'] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [container create] - Connection: [keep-alive] - User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.49] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 - response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":1,"currentState":{"state":"Waiting","detailStatus":"CrashLoopBackOff: - Back-off 10s restarting failed"},"previousState":{"state":"Terminated","startTime":"2018-10-17T21:24:20Z","exitCode":0,"finishTime":"2018-10-17T21:24:20Z","detailStatus":"Completed"},"events":[{"count":3,"firstTimestamp":"2018-10-17T21:24:14Z","lastTimestamp":"2018-10-17T21:24:37Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-17T21:24:17Z","lastTimestamp":"2018-10-17T21:24:38Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:17Z","lastTimestamp":"2018-10-17T21:24:17Z","name":"Created","message":"Created - container with id 5f7381280f7bac43f7f36e5deb7a6533d316668cbaa4ef37162ffe6a1f106040","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:17Z","lastTimestamp":"2018-10-17T21:24:17Z","name":"Started","message":"Started - container with id 5f7381280f7bac43f7f36e5deb7a6533d316668cbaa4ef37162ffe6a1f106040","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:20Z","lastTimestamp":"2018-10-17T21:24:20Z","name":"Created","message":"Created - container with id 1eeed247cfb52e699c0efe1b49124437dc11fe4c10bf3723bd0d1b877ae7e95d","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:24:20Z","lastTimestamp":"2018-10-17T21:24:20Z","name":"Started","message":"Started - container with id 1eeed247cfb52e699c0efe1b49124437dc11fe4c10bf3723bd0d1b877ae7e95d","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T21:24:21Z","lastTimestamp":"2018-10-17T21:24:22Z","name":"BackOff","message":"Back-off - restarting failed container","type":"Warning"},{"count":1,"firstTimestamp":"2018-10-17T21:24:38Z","lastTimestamp":"2018-10-17T21:24:38Z","name":"Created","message":"Created - container with id 0fc2b07fbcf4ec337bcd2c753b8a176cc4e5b6a7c742f8450046b33b4a3a4128","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"40.78.83.41","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"principalId":"1a278f4d-6cca-4133-bb73-29a9ddedcecf","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} - headers: - cache-control: [no-cache] - content-length: ['2848'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:24:38 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: ['Accept-Encoding,Accept-Encoding'] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c", - "principalId": "1a278f4d-6cca-4133-bb73-29a9ddedcecf"}}' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [container create] - Connection: [keep-alive] - Content-Length: ['233'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-authorization/0.50.0 Azure-SDK-For-Python - AZURECLI/2.0.49] - accept-language: [en-US] - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clistorage000005/providers/Microsoft.Authorization/roleAssignments/647db81c-cadc-44bd-8175-c2498a9177de?api-version=2018-01-01-preview - response: - body: {string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c","principalId":"1a278f4d-6cca-4133-bb73-29a9ddedcecf","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clistorage000005","createdOn":"2018-10-17T21:24:39.9400862Z","updatedOn":"2018-10-17T21:24:39.9400862Z","createdBy":null,"updatedBy":"facd2063-6d5d-4fd5-81f2-8d956c047170"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clistorage000005/providers/Microsoft.Authorization/roleAssignments/647db81c-cadc-44bd-8175-c2498a9177de","type":"Microsoft.Authorization/roleAssignments","name":"647db81c-cadc-44bd-8175-c2498a9177de"}'} - headers: - cache-control: [no-cache] - content-length: ['1025'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:24:42 GMT'] - expires: ['-1'] - pragma: [no-cache] - server: [Microsoft-IIS/10.0] - set-cookie: [x-ms-gateway-slice=productionb; path=/; secure; HttpOnly] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - x-ms-request-charge: ['3'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [container create] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python - AZURECLI/2.0.49] - accept-language: [en-US] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 - response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:23:29Z"},"properties":{"provisioningState":"Succeeded"}}'} - headers: - cache-control: [no-cache] - content-length: ['384'] - content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:24:42 GMT'] + date: ['Thu, 18 Oct 2018 00:16:54 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -495,7 +243,7 @@ interactions: status: {code: 200, message: OK} - request: body: 'b''b\''b\\\''{"location": "westus", "tags": {}, "identity": {"type": "UserAssigned", - "userAssignedIdentities": {"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000006": + "userAssignedIdentities": {"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005": {}}}, "properties": {"containers": [{"name": "clicontainer000003", "properties": {"image": "alpine:latest", "ports": [{"protocol": "TCP", "port": 80}], "resources": {"requests": {"memoryInGB": 1.5, "cpu": 1.0}}}}], "restartPolicy": "Always", @@ -515,20 +263,20 @@ interactions: method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000003","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"40.83.216.18","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000006":{"principalId":"b3855dcb-318f-4beb-ad99-4e599af42284","clientId":"588cec8a-a607-408c-91a3-87de071d234e"}},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"UserAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003","name":"clicontainer000003","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000003","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"168.62.10.231","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005":{"principalId":"b84711d3-5a43-42ec-9595-04e831b7552a","clientId":"cc2aec49-4d0c-4d60-a860-ef6f85623455"}},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"UserAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003","name":"clicontainer000003","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/d4da06b3-8ca3-4dd0-98d2-9979c4955896?api-version=2018-06-01'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/37e024d0-0abf-43b2-9b23-c92aa324f3c5?api-version=2018-06-01'] cache-control: [no-cache] - content-length: ['1185'] + content-length: ['1186'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:24:48 GMT'] + date: ['Thu, 18 Oct 2018 00:17:01 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['92'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['97'] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['83'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['98'] + x-ms-ratelimit-remaining-subscription-writes: ['1196'] status: {code: 201, message: Created} - request: body: null @@ -541,18 +289,21 @@ interactions: msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.49] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/d4da06b3-8ca3-4dd0-98d2-9979c4955896?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/37e024d0-0abf-43b2-9b23-c92aa324f3c5?api-version=2018-06-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003","status":"Succeeded","startTime":"2018-10-17T21:24:49.1183783Z","properties":{"events":[{"count":2,"firstTimestamp":"2018-10-17T21:24:58Z","lastTimestamp":"2018-10-17T21:25:02Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T21:25:00Z","lastTimestamp":"2018-10-17T21:25:03Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T21:25:01Z","lastTimestamp":"2018-10-17T21:25:03Z","name":"Created","message":"Created - container","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:25:01Z","lastTimestamp":"2018-10-17T21:25:01Z","name":"Started","message":"Started - container","type":"Normal"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003","status":"Succeeded","startTime":"2018-10-18T00:17:02.210261Z","properties":{"events":[{"count":2,"firstTimestamp":"2018-10-18T00:17:07Z","lastTimestamp":"2018-10-18T00:17:11Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-18T00:17:10Z","lastTimestamp":"2018-10-18T00:17:13Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:17:10Z","lastTimestamp":"2018-10-18T00:17:10Z","name":"Created","message":"Created + container with id 669cd041bc577e46993ac2736b88187a8e4828f667efb350d130ad297440580d","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:17:11Z","lastTimestamp":"2018-10-18T00:17:11Z","name":"Started","message":"Started + container with id 669cd041bc577e46993ac2736b88187a8e4828f667efb350d130ad297440580d","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:17:13Z","lastTimestamp":"2018-10-18T00:17:13Z","name":"Created","message":"Created + container with id a95b6e50b319884e79e8126821d7dc55b34e45cb09dba952e2bf0a5bf4b7df64","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:17:13Z","lastTimestamp":"2018-10-18T00:17:13Z","name":"Started","message":"Started + container with id a95b6e50b319884e79e8126821d7dc55b34e45cb09dba952e2bf0a5bf4b7df64","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:17:14Z","lastTimestamp":"2018-10-18T00:17:14Z","name":"BackOff","message":"Back-off + restarting failed container","type":"Warning"}]}}'} headers: cache-control: [no-cache] - content-length: ['967'] + content-length: ['1740'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:25:19 GMT'] + date: ['Thu, 18 Oct 2018 00:17:32 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -573,18 +324,21 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000003","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":1,"currentState":{"state":"Waiting","detailStatus":"CrashLoopBackOff: - Back-off 10s restarting failed"},"previousState":{"state":"Terminated","startTime":"2018-10-17T21:25:04Z","exitCode":0,"finishTime":"2018-10-17T21:25:04Z","detailStatus":"Completed"},"events":[{"count":2,"firstTimestamp":"2018-10-17T21:24:58Z","lastTimestamp":"2018-10-17T21:25:02Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T21:25:00Z","lastTimestamp":"2018-10-17T21:25:03Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T21:25:01Z","lastTimestamp":"2018-10-17T21:25:03Z","name":"Created","message":"Created - container","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T21:25:01Z","lastTimestamp":"2018-10-17T21:25:04Z","name":"Started","message":"Started - container","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-17T21:25:05Z","lastTimestamp":"2018-10-17T21:25:07Z","name":"BackOff","message":"Back-off - restarting failed container","type":"Warning"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"40.83.216.18","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000006":{"principalId":"b3855dcb-318f-4beb-ad99-4e599af42284","clientId":"588cec8a-a607-408c-91a3-87de071d234e"}},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"UserAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003","name":"clicontainer000003","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000003","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":2,"currentState":{"state":"Terminated","startTime":"2018-10-18T00:17:29Z","exitCode":0,"finishTime":"2018-10-18T00:17:29Z","detailStatus":"Completed"},"previousState":{"state":"Terminated","startTime":"2018-10-18T00:17:13Z","exitCode":0,"finishTime":"2018-10-18T00:17:13Z","detailStatus":"Completed"},"events":[{"count":3,"firstTimestamp":"2018-10-18T00:17:07Z","lastTimestamp":"2018-10-18T00:17:27Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-18T00:17:10Z","lastTimestamp":"2018-10-18T00:17:28Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:17:10Z","lastTimestamp":"2018-10-18T00:17:10Z","name":"Created","message":"Created + container with id 669cd041bc577e46993ac2736b88187a8e4828f667efb350d130ad297440580d","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:17:11Z","lastTimestamp":"2018-10-18T00:17:11Z","name":"Started","message":"Started + container with id 669cd041bc577e46993ac2736b88187a8e4828f667efb350d130ad297440580d","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:17:13Z","lastTimestamp":"2018-10-18T00:17:13Z","name":"Created","message":"Created + container with id a95b6e50b319884e79e8126821d7dc55b34e45cb09dba952e2bf0a5bf4b7df64","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:17:13Z","lastTimestamp":"2018-10-18T00:17:13Z","name":"Started","message":"Started + container with id a95b6e50b319884e79e8126821d7dc55b34e45cb09dba952e2bf0a5bf4b7df64","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-18T00:17:14Z","lastTimestamp":"2018-10-18T00:17:30Z","name":"BackOff","message":"Back-off + restarting failed container","type":"Warning"},{"count":1,"firstTimestamp":"2018-10-18T00:17:29Z","lastTimestamp":"2018-10-18T00:17:29Z","name":"Created","message":"Created + container with id 6ce9b8db835710669c2996054b416f5def923a1de906a06db114a849ad8d4d08","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:17:29Z","lastTimestamp":"2018-10-18T00:17:29Z","name":"Started","message":"Started + container with id 6ce9b8db835710669c2996054b416f5def923a1de906a06db114a849ad8d4d08","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"168.62.10.231","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Succeeded"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005":{"principalId":"b84711d3-5a43-42ec-9595-04e831b7552a","clientId":"cc2aec49-4d0c-4d60-a860-ef6f85623455"}},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"UserAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003","name":"clicontainer000003","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] - content-length: ['2324'] + content-length: ['3429'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:25:20 GMT'] + date: ['Thu, 18 Oct 2018 00:17:33 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -607,12 +361,12 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:23:29Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-18T00:16:09Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:25:20 GMT'] + date: ['Thu, 18 Oct 2018 00:17:35 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -621,7 +375,7 @@ interactions: status: {code: 200, message: OK} - request: body: 'b''b\''b\\\''{"location": "westus", "tags": {}, "identity": {"type": "SystemAssigned, - UserAssigned", "userAssignedIdentities": {"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000006": + UserAssigned", "userAssignedIdentities": {"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005": {}}}, "properties": {"containers": [{"name": "clicontainer000004", "properties": {"image": "alpine:latest", "ports": [{"protocol": "TCP", "port": 80}], "resources": {"requests": {"memoryInGB": 1.5, "cpu": 1.0}}}}], "restartPolicy": "Always", @@ -641,21 +395,21 @@ interactions: method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000004","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.61.214","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000006":{"principalId":"b3855dcb-318f-4beb-ad99-4e599af42284","clientId":"588cec8a-a607-408c-91a3-87de071d234e"}},"principalId":"97cdb832-4a89-40c1-92e5-9eb3817e5ce4","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned, + body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000004","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.40.13.70","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005":{"principalId":"b84711d3-5a43-42ec-9595-04e831b7552a","clientId":"cc2aec49-4d0c-4d60-a860-ef6f85623455"}},"principalId":"fff35e2a-8751-4e64-8fc8-21d04f4580a0","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned, UserAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004","name":"clicontainer000004","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/d17029c4-c8c0-477f-b737-df628afa0d32?api-version=2018-06-01'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/c0af7683-80a7-4de4-be2b-1eb9699df057?api-version=2018-06-01'] cache-control: [no-cache] - content-length: ['1255'] + content-length: ['1254'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:25:29 GMT'] + date: ['Thu, 18 Oct 2018 00:17:42 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['90'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['95'] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['82'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['97'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 201, message: Created} - request: body: null @@ -668,18 +422,19 @@ interactions: msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.49] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/d17029c4-c8c0-477f-b737-df628afa0d32?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/c0af7683-80a7-4de4-be2b-1eb9699df057?api-version=2018-06-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004","status":"Succeeded","startTime":"2018-10-17T21:25:29.3350095Z","properties":{"events":[{"count":2,"firstTimestamp":"2018-10-17T21:25:39Z","lastTimestamp":"2018-10-17T21:25:43Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T21:25:42Z","lastTimestamp":"2018-10-17T21:25:44Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:25:42Z","lastTimestamp":"2018-10-17T21:25:42Z","name":"Created","message":"Created - container with id 1a659e607dd4527d56bff38711a3c737383b7c979b649969f1033921e959a37f","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:25:42Z","lastTimestamp":"2018-10-17T21:25:42Z","name":"Started","message":"Started - container with id 1a659e607dd4527d56bff38711a3c737383b7c979b649969f1033921e959a37f","type":"Normal"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004","status":"Succeeded","startTime":"2018-10-18T00:17:43.0744749Z","properties":{"events":[{"count":2,"firstTimestamp":"2018-10-18T00:18:00Z","lastTimestamp":"2018-10-18T00:18:04Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-18T00:18:03Z","lastTimestamp":"2018-10-18T00:18:06Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-18T00:18:03Z","lastTimestamp":"2018-10-18T00:18:06Z","name":"Created","message":"Created + container","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-18T00:18:04Z","lastTimestamp":"2018-10-18T00:18:07Z","name":"Started","message":"Started + container","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:18:08Z","lastTimestamp":"2018-10-18T00:18:08Z","name":"BackOff","message":"Back-off + restarting failed container","type":"Warning"}]}}'} headers: cache-control: [no-cache] - content-length: ['1113'] + content-length: ['1141'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:25:59 GMT'] + date: ['Thu, 18 Oct 2018 00:18:12 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -700,22 +455,19 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000004","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":2,"currentState":{"state":"Terminated","startTime":"2018-10-17T21:25:59Z","exitCode":0,"finishTime":"2018-10-17T21:26:00Z","detailStatus":"Completed"},"previousState":{"state":"Terminated","startTime":"2018-10-17T21:25:44Z","exitCode":0,"finishTime":"2018-10-17T21:25:44Z","detailStatus":"Completed"},"events":[{"count":3,"firstTimestamp":"2018-10-17T21:25:39Z","lastTimestamp":"2018-10-17T21:25:57Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-17T21:25:42Z","lastTimestamp":"2018-10-17T21:25:59Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:25:42Z","lastTimestamp":"2018-10-17T21:25:42Z","name":"Created","message":"Created - container with id 1a659e607dd4527d56bff38711a3c737383b7c979b649969f1033921e959a37f","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:25:42Z","lastTimestamp":"2018-10-17T21:25:42Z","name":"Started","message":"Started - container with id 1a659e607dd4527d56bff38711a3c737383b7c979b649969f1033921e959a37f","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:25:44Z","lastTimestamp":"2018-10-17T21:25:44Z","name":"Created","message":"Created - container with id d02548f8d3e4922be62a5997df599e1ebaf44c4ac4dff90518a4c4998e18c16e","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:25:44Z","lastTimestamp":"2018-10-17T21:25:44Z","name":"Started","message":"Started - container with id d02548f8d3e4922be62a5997df599e1ebaf44c4ac4dff90518a4c4998e18c16e","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-17T21:25:45Z","lastTimestamp":"2018-10-17T21:25:46Z","name":"BackOff","message":"Back-off - restarting failed container","type":"Warning"},{"count":1,"firstTimestamp":"2018-10-17T21:25:59Z","lastTimestamp":"2018-10-17T21:25:59Z","name":"Created","message":"Created - container with id e6a3a9942e8f6b63982eaf576f87b02c0c5296f3ff62ac3a82dcedcd77468b6a","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:26:00Z","lastTimestamp":"2018-10-17T21:26:00Z","name":"Started","message":"Started - container with id e6a3a9942e8f6b63982eaf576f87b02c0c5296f3ff62ac3a82dcedcd77468b6a","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.61.214","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Succeeded"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000006":{"principalId":"b3855dcb-318f-4beb-ad99-4e599af42284","clientId":"588cec8a-a607-408c-91a3-87de071d234e"}},"principalId":"97cdb832-4a89-40c1-92e5-9eb3817e5ce4","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned, + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000004","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":1,"currentState":{"state":"Waiting","detailStatus":"CrashLoopBackOff: + Back-off 10s restarting failed"},"previousState":{"state":"Terminated","startTime":"2018-10-18T00:18:06Z","exitCode":0,"finishTime":"2018-10-18T00:18:07Z","detailStatus":"Completed"},"events":[{"count":2,"firstTimestamp":"2018-10-18T00:18:00Z","lastTimestamp":"2018-10-18T00:18:04Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-18T00:18:03Z","lastTimestamp":"2018-10-18T00:18:06Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-18T00:18:03Z","lastTimestamp":"2018-10-18T00:18:06Z","name":"Created","message":"Created + container","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-18T00:18:04Z","lastTimestamp":"2018-10-18T00:18:07Z","name":"Started","message":"Started + container","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-18T00:18:08Z","lastTimestamp":"2018-10-18T00:18:10Z","name":"BackOff","message":"Back-off + restarting failed container","type":"Warning"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.40.13.70","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Running"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005":{"principalId":"b84711d3-5a43-42ec-9595-04e831b7552a","clientId":"cc2aec49-4d0c-4d60-a860-ef6f85623455"}},"principalId":"fff35e2a-8751-4e64-8fc8-21d04f4580a0","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned, UserAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004","name":"clicontainer000004","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] - content-length: ['3498'] + content-length: ['2393'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:25:59 GMT'] + date: ['Thu, 18 Oct 2018 00:18:13 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -743,9 +495,9 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Oct 2018 21:26:00 GMT'] + date: ['Thu, 18 Oct 2018 00:18:14 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdOVllEVUlYSjJSM1U2TzJaVUY0N01OVlRYNTVLU09MUFdHTHxBNUQyOThCMzkzQjI2RTM3LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdFM0ZPS1JBM0FCWFlLT1JTRU1SR1NFU0pQU0RVNEJCS0NHWnwyNjNFN0E5MjJFMEJCNTBBLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_msi_scope.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_msi_scope.yaml new file mode 100644 index 00000000000..e6f53b9f7c6 --- /dev/null +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_msi_scope.yaml @@ -0,0 +1,373 @@ +interactions: +- request: + body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", + "date": "2018-10-18T00:18:15Z"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group create] + Connection: [keep-alive] + Content-Length: ['110'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-18T00:18:15Z"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 18 Oct 2018 00:18:16 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-18T00:18:15Z"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 18 Oct 2018 00:18:15 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: '{"sku": {"name": "Standard_RAGRS"}, "kind": "Storage", "location": "westus", + "properties": {"supportsHttpsTrafficOnly": false}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account create] + Connection: [keep-alive] + Content-Length: ['127'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-storage/2.0.0rc4 Azure-SDK-For-Python AZURECLI/2.0.49] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clistorage000003?api-version=2018-03-01-preview + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + content-type: [text/plain; charset=utf-8] + date: ['Thu, 18 Oct 2018 00:18:17 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/b87c81da-9cc7-43bd-9b5a-9937153d8732?monitor=true&api-version=2018-03-01-preview'] + pragma: [no-cache] + server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 + Microsoft-HTTPAPI/2.0'] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [storage account create] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-storage/2.0.0rc4 Azure-SDK-For-Python AZURECLI/2.0.49] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/westus/asyncoperations/b87c81da-9cc7-43bd-9b5a-9937153d8732?monitor=true&api-version=2018-03-01-preview + response: + body: {string: '{"sku":{"name":"Standard_RAGRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clistorage000003","name":"clistorage000003","type":"Microsoft.Storage/storageAccounts","location":"westus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":false,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2018-10-18T00:18:17.9588946Z"},"blob":{"enabled":true,"lastEnabledTime":"2018-10-18T00:18:17.9588946Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2018-10-18T00:18:17.8650992Z","primaryEndpoints":{"blob":"https://clistorage000003.blob.core.windows.net/","queue":"https://clistorage000003.queue.core.windows.net/","table":"https://clistorage000003.table.core.windows.net/","file":"https://clistorage000003.file.core.windows.net/"},"primaryLocation":"westus","statusOfPrimary":"available","secondaryLocation":"eastus","statusOfSecondary":"available","secondaryEndpoints":{"blob":"https://clistorage000003-secondary.blob.core.windows.net/","queue":"https://clistorage000003-secondary.queue.core.windows.net/","table":"https://clistorage000003-secondary.table.core.windows.net/"}}}'} + headers: + cache-control: [no-cache] + content-length: ['1412'] + content-type: [application/json] + date: ['Thu, 18 Oct 2018 00:18:35 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: ['Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 + Microsoft-HTTPAPI/2.0'] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-18T00:18:15Z"},"properties":{"provisioningState":"Succeeded"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 18 Oct 2018 00:18:35 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-authorization/0.50.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clistorage000003/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Contributor%27&api-version=2018-01-01-preview + response: + body: {string: '{"value":[{"properties":{"roleName":"Contributor","type":"BuiltInRole","description":"Lets + you manage everything except access to resources.","assignableScopes":["/"],"permissions":[{"actions":["*"],"notActions":["Microsoft.Authorization/*/Delete","Microsoft.Authorization/*/Write","Microsoft.Authorization/elevateAccess/Action","Microsoft.Blueprint/blueprintAssignments/write","Microsoft.Blueprint/blueprintAssignments/delete"],"dataActions":[],"notDataActions":[]}],"createdOn":"0001-01-01T08:00:00.0000000Z","updatedOn":"2018-05-30T19:22:32.4538167Z","createdBy":null,"updatedBy":null},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c","type":"Microsoft.Authorization/roleDefinitions","name":"b24988ac-6180-42a0-ab88-20f7382dd24c"}]}'} + headers: + cache-control: [no-cache] + content-length: ['832'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 18 Oct 2018 00:18:36 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/10.0] + set-cookie: [x-ms-gateway-slice=productionb; path=/; secure; HttpOnly] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-request-charge: ['1'] + status: {code: 200, message: OK} +- request: + body: 'b''{"location": "westus", "tags": {}, "identity": {"type": "SystemAssigned"}, + "properties": {"containers": [{"name": "clicontainer000002", "properties": {"image": + "alpine:latest", "ports": [{"protocol": "TCP", "port": 80}], "resources": {"requests": + {"memoryInGB": 1.5, "cpu": 1.0}}}}], "restartPolicy": "Always", "ipAddress": + {"ports": [{"protocol": "TCP", "port": 80}], "type": "Public"}, "osType": "Linux"}}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Length: ['405'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 + response: + body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"168.62.28.155","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"principalId":"b07c5b68-8717-498b-ace5-27f9343a9738","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/e5494aa4-efa1-4c7e-8e91-eba1dd221ad2?api-version=2018-06-01'] + cache-control: [no-cache] + content-length: ['884'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 18 Oct 2018 00:18:49 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['81'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['96'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/e5494aa4-efa1-4c7e-8e91-eba1dd221ad2?api-version=2018-06-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-18T00:18:48.871447Z","properties":{"events":[{"count":2,"firstTimestamp":"2018-10-18T00:18:53Z","lastTimestamp":"2018-10-18T00:18:56Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-18T00:18:56Z","lastTimestamp":"2018-10-18T00:18:58Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:18:56Z","lastTimestamp":"2018-10-18T00:18:56Z","name":"Created","message":"Created + container with id 3b1c97d9e1792152870a18236afb2335d668c835cd70d16968baf0d0b6c3703d","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:18:56Z","lastTimestamp":"2018-10-18T00:18:56Z","name":"Started","message":"Started + container with id 3b1c97d9e1792152870a18236afb2335d668c835cd70d16968baf0d0b6c3703d","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:18:59Z","lastTimestamp":"2018-10-18T00:18:59Z","name":"Created","message":"Created + container with id 30ea725d370fb82f8f12e3ceebe1996421999869739fb239c9971f9c395e0c5d","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:18:59Z","lastTimestamp":"2018-10-18T00:18:59Z","name":"Started","message":"Started + container with id 30ea725d370fb82f8f12e3ceebe1996421999869739fb239c9971f9c395e0c5d","type":"Normal"}]}}'} + headers: + cache-control: [no-cache] + content-length: ['1566'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 18 Oct 2018 00:19:19 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 + response: + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":2,"currentState":{"state":"Terminated","startTime":"2018-10-18T00:19:18Z","exitCode":0,"finishTime":"2018-10-18T00:19:18Z","detailStatus":"Completed"},"previousState":{"state":"Terminated","startTime":"2018-10-18T00:18:59Z","exitCode":0,"finishTime":"2018-10-18T00:18:59Z","detailStatus":"Completed"},"events":[{"count":3,"firstTimestamp":"2018-10-18T00:18:53Z","lastTimestamp":"2018-10-18T00:19:16Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-18T00:18:56Z","lastTimestamp":"2018-10-18T00:19:18Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:18:56Z","lastTimestamp":"2018-10-18T00:18:56Z","name":"Created","message":"Created + container with id 3b1c97d9e1792152870a18236afb2335d668c835cd70d16968baf0d0b6c3703d","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:18:56Z","lastTimestamp":"2018-10-18T00:18:56Z","name":"Started","message":"Started + container with id 3b1c97d9e1792152870a18236afb2335d668c835cd70d16968baf0d0b6c3703d","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:18:59Z","lastTimestamp":"2018-10-18T00:18:59Z","name":"Created","message":"Created + container with id 30ea725d370fb82f8f12e3ceebe1996421999869739fb239c9971f9c395e0c5d","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:18:59Z","lastTimestamp":"2018-10-18T00:18:59Z","name":"Started","message":"Started + container with id 30ea725d370fb82f8f12e3ceebe1996421999869739fb239c9971f9c395e0c5d","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-18T00:19:00Z","lastTimestamp":"2018-10-18T00:19:19Z","name":"BackOff","message":"Back-off + restarting failed container","type":"Warning"},{"count":1,"firstTimestamp":"2018-10-18T00:19:18Z","lastTimestamp":"2018-10-18T00:19:18Z","name":"Created","message":"Created + container with id 72968856c829c31596ff9edcddf33910e347ee0f8742113475b23b9c8dc42427","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:19:18Z","lastTimestamp":"2018-10-18T00:19:18Z","name":"Started","message":"Started + container with id 72968856c829c31596ff9edcddf33910e347ee0f8742113475b23b9c8dc42427","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"168.62.28.155","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Succeeded"}},"identity":{"principalId":"b07c5b68-8717-498b-ace5-27f9343a9738","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + headers: + cache-control: [no-cache] + content-length: ['3127'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 18 Oct 2018 00:19:19 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 + response: + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":2,"currentState":{"state":"Terminated","startTime":"2018-10-18T00:19:18Z","exitCode":0,"finishTime":"2018-10-18T00:19:18Z","detailStatus":"Completed"},"previousState":{"state":"Terminated","startTime":"2018-10-18T00:18:59Z","exitCode":0,"finishTime":"2018-10-18T00:18:59Z","detailStatus":"Completed"},"events":[{"count":3,"firstTimestamp":"2018-10-18T00:18:53Z","lastTimestamp":"2018-10-18T00:19:16Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-18T00:18:56Z","lastTimestamp":"2018-10-18T00:19:18Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:18:56Z","lastTimestamp":"2018-10-18T00:18:56Z","name":"Created","message":"Created + container with id 3b1c97d9e1792152870a18236afb2335d668c835cd70d16968baf0d0b6c3703d","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:18:56Z","lastTimestamp":"2018-10-18T00:18:56Z","name":"Started","message":"Started + container with id 3b1c97d9e1792152870a18236afb2335d668c835cd70d16968baf0d0b6c3703d","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:18:59Z","lastTimestamp":"2018-10-18T00:18:59Z","name":"Created","message":"Created + container with id 30ea725d370fb82f8f12e3ceebe1996421999869739fb239c9971f9c395e0c5d","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:18:59Z","lastTimestamp":"2018-10-18T00:18:59Z","name":"Started","message":"Started + container with id 30ea725d370fb82f8f12e3ceebe1996421999869739fb239c9971f9c395e0c5d","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-18T00:19:00Z","lastTimestamp":"2018-10-18T00:19:19Z","name":"BackOff","message":"Back-off + restarting failed container","type":"Warning"},{"count":1,"firstTimestamp":"2018-10-18T00:19:18Z","lastTimestamp":"2018-10-18T00:19:18Z","name":"Created","message":"Created + container with id 72968856c829c31596ff9edcddf33910e347ee0f8742113475b23b9c8dc42427","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:19:18Z","lastTimestamp":"2018-10-18T00:19:18Z","name":"Started","message":"Started + container with id 72968856c829c31596ff9edcddf33910e347ee0f8742113475b23b9c8dc42427","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"168.62.28.155","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Succeeded"}},"identity":{"principalId":"b07c5b68-8717-498b-ace5-27f9343a9738","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + headers: + cache-control: [no-cache] + content-length: ['3127'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 18 Oct 2018 00:19:20 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: '{"properties": {"roleDefinitionId": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c", + "principalId": "b07c5b68-8717-498b-ace5-27f9343a9738"}}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Length: ['233'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-authorization/0.50.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clistorage000003/providers/Microsoft.Authorization/roleAssignments/ac6d8f6a-d06c-4826-9944-7bf92c239e3c?api-version=2018-01-01-preview + response: + body: {string: '{"properties":{"roleDefinitionId":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Authorization/roleDefinitions/b24988ac-6180-42a0-ab88-20f7382dd24c","principalId":"b07c5b68-8717-498b-ace5-27f9343a9738","principalType":"ServicePrincipal","scope":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clistorage000003","createdOn":"2018-10-18T00:19:21.4624026Z","updatedOn":"2018-10-18T00:19:21.4624026Z","createdBy":null,"updatedBy":"facd2063-6d5d-4fd5-81f2-8d956c047170"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Storage/storageAccounts/clistorage000003/providers/Microsoft.Authorization/roleAssignments/ac6d8f6a-d06c-4826-9944-7bf92c239e3c","type":"Microsoft.Authorization/roleAssignments","name":"ac6d8f6a-d06c-4826-9944-7bf92c239e3c"}'} + headers: + cache-control: [no-cache] + content-length: ['1025'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 18 Oct 2018 00:19:23 GMT'] + expires: ['-1'] + pragma: [no-cache] + server: [Microsoft-IIS/10.0] + set-cookie: [x-ms-gateway-slice=productionb; path=/; secure; HttpOnly] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-request-charge: ['3'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.49] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Thu, 18 Oct 2018 00:19:24 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdaSTVYSzdKUFNQTUpIVVRYM1ZMRllZMlk3NFg3UUVZNTZPVnxFQjY2RUFCQ0Y5NjkzRDQzLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-deletes: ['14998'] + status: {code: 202, message: Accepted} +version: 1 diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_vnet.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_vnet.yaml index 47c56d3b0fa..6a6c755a333 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_vnet.yaml +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_vnet.yaml @@ -1,7 +1,7 @@ interactions: - request: body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", - "date": "2018-10-17T21:26:01Z"}}' + "date": "2018-10-18T00:19:24Z"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -16,17 +16,17 @@ interactions: method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:26:01Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-18T00:19:24Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:26:03 GMT'] + date: ['Thu, 18 Oct 2018 00:19:25 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 201, message: Created} - request: body: null @@ -43,12 +43,12 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:26:01Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-18T00:19:24Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:26:02 GMT'] + date: ['Thu, 18 Oct 2018 00:19:25 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -70,12 +70,12 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:26:01Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-18T00:19:24Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:26:02 GMT'] + date: ['Thu, 18 Oct 2018 00:19:26 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -97,12 +97,12 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:26:01Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-18T00:19:24Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:26:04 GMT'] + date: ['Thu, 18 Oct 2018 00:19:27 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -136,14 +136,14 @@ interactions: cache-control: [no-cache] content-length: ['330'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:26:05 GMT'] + date: ['Thu, 18 Oct 2018 00:19:27 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['89'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['94'] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['80'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['95'] + x-ms-ratelimit-remaining-subscription-writes: ['1197'] status: {code: 400, message: Bad Request} - request: body: null @@ -165,9 +165,9 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Oct 2018 21:26:06 GMT'] + date: ['Thu, 18 Oct 2018 00:19:28 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdOVjJHTlBETU5HVFBPWDRKSFZQSkQzV1VPMzJYSzJENkFQTnw1Qjc3Q0Q3M0IzRUJEMzhELVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkc2V0w3R1BYRlpPQTRFWUtCWUdMV0RPQVJTUFBBQlhRTE9RNnwwOTE4MDE2RTg0MjEwQjNDLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_git_repo_volume_mount.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_git_repo_volume_mount.yaml index bcddf843ac5..1674f571de4 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_git_repo_volume_mount.yaml +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_git_repo_volume_mount.yaml @@ -1,7 +1,7 @@ interactions: - request: body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", - "date": "2018-10-17T21:26:06Z"}}' + "date": "2018-10-18T00:19:29Z"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -16,12 +16,12 @@ interactions: method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:26:06Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-18T00:19:29Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:26:06 GMT'] + date: ['Thu, 18 Oct 2018 00:19:29 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -43,12 +43,12 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-17T21:26:06Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-18T00:19:29Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:26:08 GMT'] + date: ['Thu, 18 Oct 2018 00:19:30 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -78,18 +78,18 @@ interactions: response: body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000002","properties":{"image":"nginx","ports":[],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}},"volumeMounts":[{"name":"gitrepo","mountPath":"/src"}]}}],"restartPolicy":"Always","osType":"Linux","volumes":[{"name":"gitrepo","gitRepo":{"repository":"https://github.com/yolo3301/dumb-flow.git","directory":"./test","revision":"5604f0a8f11bfe13e621418ab6f6a71973e208ce"}}],"instanceView":{"state":"Pending"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/2fc69a74-0011-4972-af08-8a11934283bf?api-version=2018-06-01'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/868fb2df-7036-4aaa-8e89-51bd491e359c?api-version=2018-06-01'] cache-control: [no-cache] content-length: ['875'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:26:11 GMT'] + date: ['Thu, 18 Oct 2018 00:19:34 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['88'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['93'] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['79'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['94'] + x-ms-ratelimit-remaining-subscription-writes: ['1196'] status: {code: 201, message: Created} - request: body: null @@ -102,18 +102,18 @@ interactions: msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python AZURECLI/2.0.49] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/2fc69a74-0011-4972-af08-8a11934283bf?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/868fb2df-7036-4aaa-8e89-51bd491e359c?api-version=2018-06-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-17T21:26:11.6944821Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-10-17T21:26:20Z","lastTimestamp":"2018-10-17T21:26:20Z","name":"Pulling","message":"pulling - image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:26:29Z","lastTimestamp":"2018-10-17T21:26:29Z","name":"Pulled","message":"Successfully - pulled image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:26:29Z","lastTimestamp":"2018-10-17T21:26:29Z","name":"Created","message":"Created - container with id aaef2ee40872e81ab87827e55c540932496410cbcd9e9a280aa2cbbaaa125a4f","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:26:30Z","lastTimestamp":"2018-10-17T21:26:30Z","name":"Started","message":"Started - container with id aaef2ee40872e81ab87827e55c540932496410cbcd9e9a280aa2cbbaaa125a4f","type":"Normal"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-18T00:19:33.9513339Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-10-18T00:19:50Z","lastTimestamp":"2018-10-18T00:19:50Z","name":"Pulling","message":"pulling + image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:19:59Z","lastTimestamp":"2018-10-18T00:19:59Z","name":"Pulled","message":"Successfully + pulled image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:19:59Z","lastTimestamp":"2018-10-18T00:19:59Z","name":"Created","message":"Created + container with id ab9239e7502df26d00a3013ffa70f874613ad313cbf0a64630f83b2c3748d133","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:19:59Z","lastTimestamp":"2018-10-18T00:19:59Z","name":"Started","message":"Started + container with id ab9239e7502df26d00a3013ffa70f874613ad313cbf0a64630f83b2c3748d133","type":"Normal"}]}}'} headers: cache-control: [no-cache] content-length: ['1097'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:26:42 GMT'] + date: ['Thu, 18 Oct 2018 00:20:04 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -134,16 +134,16 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"nginx","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T21:26:30Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T21:26:20Z","lastTimestamp":"2018-10-17T21:26:20Z","name":"Pulling","message":"pulling - image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:26:29Z","lastTimestamp":"2018-10-17T21:26:29Z","name":"Pulled","message":"Successfully - pulled image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:26:29Z","lastTimestamp":"2018-10-17T21:26:29Z","name":"Created","message":"Created - container with id aaef2ee40872e81ab87827e55c540932496410cbcd9e9a280aa2cbbaaa125a4f","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:26:30Z","lastTimestamp":"2018-10-17T21:26:30Z","name":"Started","message":"Started - container with id aaef2ee40872e81ab87827e55c540932496410cbcd9e9a280aa2cbbaaa125a4f","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}},"volumeMounts":[{"name":"gitrepo","mountPath":"/src"}]}}],"restartPolicy":"Always","osType":"Linux","volumes":[{"name":"gitrepo","gitRepo":{"repository":"https://github.com/yolo3301/dumb-flow.git","directory":"./test","revision":"5604f0a8f11bfe13e621418ab6f6a71973e208ce"}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"nginx","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-18T00:19:59Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-18T00:19:50Z","lastTimestamp":"2018-10-18T00:19:50Z","name":"Pulling","message":"pulling + image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:19:59Z","lastTimestamp":"2018-10-18T00:19:59Z","name":"Pulled","message":"Successfully + pulled image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:19:59Z","lastTimestamp":"2018-10-18T00:19:59Z","name":"Created","message":"Created + container with id ab9239e7502df26d00a3013ffa70f874613ad313cbf0a64630f83b2c3748d133","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:19:59Z","lastTimestamp":"2018-10-18T00:19:59Z","name":"Started","message":"Started + container with id ab9239e7502df26d00a3013ffa70f874613ad313cbf0a64630f83b2c3748d133","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}},"volumeMounts":[{"name":"gitrepo","mountPath":"/src"}]}}],"restartPolicy":"Always","osType":"Linux","volumes":[{"name":"gitrepo","gitRepo":{"repository":"https://github.com/yolo3301/dumb-flow.git","directory":"./test","revision":"5604f0a8f11bfe13e621418ab6f6a71973e208ce"}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] content-length: ['1807'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:26:42 GMT'] + date: ['Thu, 18 Oct 2018 00:20:04 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -165,16 +165,16 @@ interactions: method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"nginx","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-17T21:26:30Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-17T21:26:20Z","lastTimestamp":"2018-10-17T21:26:20Z","name":"Pulling","message":"pulling - image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:26:29Z","lastTimestamp":"2018-10-17T21:26:29Z","name":"Pulled","message":"Successfully - pulled image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:26:29Z","lastTimestamp":"2018-10-17T21:26:29Z","name":"Created","message":"Created - container with id aaef2ee40872e81ab87827e55c540932496410cbcd9e9a280aa2cbbaaa125a4f","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-17T21:26:30Z","lastTimestamp":"2018-10-17T21:26:30Z","name":"Started","message":"Started - container with id aaef2ee40872e81ab87827e55c540932496410cbcd9e9a280aa2cbbaaa125a4f","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}},"volumeMounts":[{"name":"gitrepo","mountPath":"/src"}]}}],"restartPolicy":"Always","osType":"Linux","volumes":[{"name":"gitrepo","gitRepo":{"repository":"https://github.com/yolo3301/dumb-flow.git","directory":"./test","revision":"5604f0a8f11bfe13e621418ab6f6a71973e208ce"}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"nginx","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-10-18T00:19:59Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-18T00:19:50Z","lastTimestamp":"2018-10-18T00:19:50Z","name":"Pulling","message":"pulling + image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:19:59Z","lastTimestamp":"2018-10-18T00:19:59Z","name":"Pulled","message":"Successfully + pulled image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:19:59Z","lastTimestamp":"2018-10-18T00:19:59Z","name":"Created","message":"Created + container with id ab9239e7502df26d00a3013ffa70f874613ad313cbf0a64630f83b2c3748d133","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-18T00:19:59Z","lastTimestamp":"2018-10-18T00:19:59Z","name":"Started","message":"Started + container with id ab9239e7502df26d00a3013ffa70f874613ad313cbf0a64630f83b2c3748d133","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}},"volumeMounts":[{"name":"gitrepo","mountPath":"/src"}]}}],"restartPolicy":"Always","osType":"Linux","volumes":[{"name":"gitrepo","gitRepo":{"repository":"https://github.com/yolo3301/dumb-flow.git","directory":"./test","revision":"5604f0a8f11bfe13e621418ab6f6a71973e208ce"}}],"instanceView":{"events":[],"state":"Running"}},"identity":{"type":"None"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] content-length: ['1807'] content-type: [application/json; charset=utf-8] - date: ['Wed, 17 Oct 2018 21:26:42 GMT'] + date: ['Thu, 18 Oct 2018 00:20:05 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -202,12 +202,12 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 17 Oct 2018 21:26:43 GMT'] + date: ['Thu, 18 Oct 2018 00:20:05 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdONjdNS1VSMklPSDRXWEsyMktCRjZRUFJMTFJBNlE3WlVEV3xFMTQ1ODVBOTU0Q0FBNkRGLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdFUkxFQk9ZRTRWWkhKRTRMUEVVUkkzWFBGNjdKVEJBRERFUnxDOTRDNEQyM0IxMTNDNjZCLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-deletes: ['14999'] + x-ms-ratelimit-remaining-subscription-deletes: ['14998'] status: {code: 202, message: Accepted} version: 1 diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/test_container_commands.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/test_container_commands.py index 1fdf71b34c5..7c93e3096c6 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/test_container_commands.py +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/test_container_commands.py @@ -5,7 +5,7 @@ import time import unittest -from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer +from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer, live_only class AzureContainerInstanceScenarioTest(ScenarioTest): @@ -124,19 +124,15 @@ def test_container_create_with_msi(self, resource_group, resource_group_location image = 'alpine:latest' os_type = 'Linux' ip_address_type = 'Public' - storage_account_name = self.create_random_name('clistorage', 16) user_assigned_identity_name = self.create_random_name('cliaciidentity', 20) system_assigned_identity = '[system]' self.kwargs.update({ 'user_assigned_identity_name': user_assigned_identity_name, - 'storage_account_name': storage_account_name, }) msi_identity_result = self.cmd('identity create -g {rg} -n {user_assigned_identity_name}').get_output_in_json() - storage_account_result = self.cmd('az storage account create -n {storage_account_name} -g {rg} ').get_output_in_json() - self.kwargs.update({ 'container_group_name1': container_group_name1, 'container_group_name2': container_group_name2, @@ -147,7 +143,6 @@ def test_container_create_with_msi(self, resource_group, resource_group_location 'ip_address_type': ip_address_type, 'user_assigned_identity': msi_identity_result['id'], 'system_assigned_identity': system_assigned_identity, - 'msi_scope': storage_account_result['id'] }) # Test create system assigned identity @@ -161,17 +156,6 @@ def test_container_create_with_msi(self, resource_group, resource_group_location self.exists('ipAddress.ip'), self.check('containers[0].image', '{image}')]) - # Test create system assigned identity with scope - self.cmd('container create -g {rg} -n {container_group_name1} --image {image} --os-type {os_type} ' - '--ip-address {ip_address_type} --assign-identity --scope {msi_scope}', - checks=[self.check('name', '{container_group_name1}'), - self.check('location', '{resource_group_location}'), - self.check('provisioningState', 'Succeeded'), - self.check('osType', '{os_type}'), - self.check('identity.type', 'SystemAssigned'), - self.exists('ipAddress.ip'), - self.check('containers[0].image', '{image}')]) - # Test create user assigned identity self.cmd('container create -g {rg} -n {container_group_name2} --image {image} --os-type {os_type} ' '--ip-address {ip_address_type} --assign-identity {user_assigned_identity}', @@ -194,6 +178,43 @@ def test_container_create_with_msi(self, resource_group, resource_group_location self.exists('ipAddress.ip'), self.check('containers[0].image', '{image}')]) + # Test create container using managed identities with scope. + @live_only() + @ResourceGroupPreparer() + def test_container_create_with_msi_scope(self, resource_group, resource_group_location): + container_group_name = self.create_random_name('clicontainer', 16) + image = 'alpine:latest' + os_type = 'Linux' + ip_address_type = 'Public' + storage_account_name = self.create_random_name('clistorage', 16) + + self.kwargs.update({ + 'storage_account_name': storage_account_name + }) + + storage_account_result = self.cmd('az storage account create -n {storage_account_name} -g {rg} ').get_output_in_json() + + self.kwargs.update({ + 'container_group_name1': container_group_name, + 'resource_group_location': resource_group_location, + 'image': image, + 'os_type': os_type, + 'ip_address_type': ip_address_type, + 'msi_scope': storage_account_result['id'] + }) + + # Test create system assigned identity with scope + self.cmd('container create -g {rg} -n {container_group_name1} --image {image} --os-type {os_type} ' + '--ip-address {ip_address_type} --assign-identity --scope {msi_scope}', + checks=[self.check('name', '{container_group_name1}'), + self.check('location', '{resource_group_location}'), + self.check('provisioningState', 'Succeeded'), + self.check('osType', '{os_type}'), + self.check('identity.type', 'SystemAssigned'), + self.exists('ipAddress.ip'), + self.check('containers[0].image', '{image}')]) + + # Test create container with azure container registry image. # An ACR instance is required to re-record this test with 'nginx:latest' image available in the url. # see https://docs.microsoft.com/en-us/azure/container-registry/container-registry-get-started-docker-cli From b535664e9615d7480ff8b3450d38b29ab1a4c173 Mon Sep 17 00:00:00 2001 From: sakreter Date: Thu, 18 Oct 2018 08:44:22 -0700 Subject: [PATCH 11/13] Fixing blank lines --- .../container/tests/latest/test_container_commands.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/test_container_commands.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/test_container_commands.py index 7c93e3096c6..3d096271d1b 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/test_container_commands.py +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/test_container_commands.py @@ -214,7 +214,6 @@ def test_container_create_with_msi_scope(self, resource_group, resource_group_lo self.exists('ipAddress.ip'), self.check('containers[0].image', '{image}')]) - # Test create container with azure container registry image. # An ACR instance is required to re-record this test with 'nginx:latest' image available in the url. # see https://docs.microsoft.com/en-us/azure/container-registry/container-registry-get-started-docker-cli From ebf1d8489d1178f8249e7f4f76251673c0079bcc Mon Sep 17 00:00:00 2001 From: sakreter Date: Thu, 18 Oct 2018 09:28:16 -0700 Subject: [PATCH 12/13] allow role assignment for --no-wait aswell --- .../azure/cli/command_modules/container/custom.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py index c1e2eb66713..ab239d05ae5 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py @@ -219,12 +219,9 @@ def create_container(cmd, tags=tags) container_group_client = cf_container_groups(cmd.cli_ctx) - if no_wait: - return sdk_no_wait(no_wait, container_group_client.create_or_update, resource_group_name, - name, cgroup) - lro = LongRunningOperation(cmd.cli_ctx)(sdk_no_wait(no_wait, container_group_client.create_or_update, - resource_group_name, name, cgroup)) + lro = sdk_no_wait(no_wait, container_group_client.create_or_update, resource_group_name, + name, cgroup) if assign_identity is not None and identity_scope: cg = container_group_client.get(resource_group_name, name) From 9f9bfb279be3f40646565a28169b093457512278 Mon Sep 17 00:00:00 2001 From: sakreter Date: Thu, 18 Oct 2018 09:47:54 -0700 Subject: [PATCH 13/13] removed unused imports --- .../azure/cli/command_modules/container/custom.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py index ab239d05ae5..7f98d99955e 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py @@ -35,7 +35,6 @@ GitRepoVolume, LogAnalytics, ContainerGroupDiagnostics, ContainerGroupNetworkProfile, ContainerGroupIpAddressType, ResourceIdentityType, ContainerGroupIdentity) from azure.cli.core.util import sdk_no_wait -from azure.cli.core.commands import LongRunningOperation from ._client_factory import (cf_container_groups, cf_container, cf_log_analytics, cf_resource, cf_network, get_auth_management_client)