diff --git a/src/command_modules/azure-cli-container/HISTORY.rst b/src/command_modules/azure-cli-container/HISTORY.rst index ede3050fa58..9fcccf9a096 100644 --- a/src/command_modules/azure-cli-container/HISTORY.rst +++ b/src/command_modules/azure-cli-container/HISTORY.rst @@ -12,6 +12,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 c5a7b617cc4..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 @@ -34,6 +34,19 @@ 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_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/_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/_params.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_params.py index bc49d3793fa..2f7db97557a 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 eba089ad5ad..17fd63d586a 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 @@ -51,6 +51,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 79bf5357989..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,8 +35,8 @@ GitRepoVolume, LogAnalytics, ContainerGroupDiagnostics, ContainerGroupNetworkProfile, ContainerGroupIpAddressType, ResourceIdentityType, ContainerGroupIdentity) from azure.cli.core.util import sdk_no_wait -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 +105,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,7 +218,15 @@ 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) + + 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) + _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): @@ -234,6 +245,25 @@ 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): + 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') + + assignment_client = get_auth_management_client(cmd.cli_ctx, identity_scope).role_assignments + + role_assignment_guid = str(_gen_guid()) + + create_params = RoleAssignmentCreateParameters( + role_definition_id=role_definition_id, + principal_id=identity_principle_id + ) + return assignment_client.create(identity_scope, role_assignment_guid, create_params, custom_headers=None) + + def _get_resource(client, resource_group_name, *subresources): from msrestazure.azure_exceptions import CloudError try: @@ -801,3 +831,8 @@ 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() 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 2d67d50a01a..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-10T18:02:58Z"}}' + "date": "2018-10-18T00:14:09Z"}}' 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.48] + 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-10T18:02:58Z"},"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, 10 Oct 2018 18:03:01 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 @@ -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.48] + 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-10T18:02:58Z"},"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, 10 Oct 2018 18:03:01 GMT'] + date: ['Thu, 18 Oct 2018 00:14:13 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.48] + 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="}],"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":"168.62.220.70","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/cd209c1a-64b6-4306-a620-300047c1eac8?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: ['1259'] + content-length: ['1258'] content-type: [application/json; charset=utf-8] - date: ['Wed, 10 Oct 2018 18:03:09 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: ['77'] + 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 @@ -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.48] + AZURECLI/2.0.49] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/cd209c1a-64b6-4306-a620-300047c1eac8?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-10T18:03:09.6015827Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-10-10T18:03:12Z","lastTimestamp":"2018-10-10T18:03:12Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:03:14Z","lastTimestamp":"2018-10-10T18:03:14Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:03:14Z","lastTimestamp":"2018-10-10T18:03:14Z","name":"Created","message":"Created - container with id 3a80f036ea7c5731952d7c6cfc26737b9738f953f9865c5b6fceef82471af964","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:03:15Z","lastTimestamp":"2018-10-10T18:03:15Z","name":"Started","message":"Started - container with id 3a80f036ea7c5731952d7c6cfc26737b9738f953f9865c5b6fceef82471af964","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, 10 Oct 2018 18:03:40 GMT'] + date: ['Thu, 18 Oct 2018 00:14:48 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.48] + 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-10T18:03:14Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-10T18:03:12Z","lastTimestamp":"2018-10-10T18:03:12Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:03:14Z","lastTimestamp":"2018-10-10T18:03:14Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:03:14Z","lastTimestamp":"2018-10-10T18:03:14Z","name":"Created","message":"Created - container with id 3a80f036ea7c5731952d7c6cfc26737b9738f953f9865c5b6fceef82471af964","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:03:15Z","lastTimestamp":"2018-10-10T18:03:15Z","name":"Started","message":"Started - container with id 3a80f036ea7c5731952d7c6cfc26737b9738f953f9865c5b6fceef82471af964","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":"168.62.220.70","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: ['2103'] + content-length: ['2102'] content-type: [application/json; charset=utf-8] - date: ['Wed, 10 Oct 2018 18:03:40 GMT'] + date: ['Thu, 18 Oct 2018 00:14:49 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.48] + 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-10T18:03:14Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-10T18:03:12Z","lastTimestamp":"2018-10-10T18:03:12Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:03:14Z","lastTimestamp":"2018-10-10T18:03:14Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:03:14Z","lastTimestamp":"2018-10-10T18:03:14Z","name":"Created","message":"Created - container with id 3a80f036ea7c5731952d7c6cfc26737b9738f953f9865c5b6fceef82471af964","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:03:15Z","lastTimestamp":"2018-10-10T18:03:15Z","name":"Started","message":"Started - container with id 3a80f036ea7c5731952d7c6cfc26737b9738f953f9865c5b6fceef82471af964","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":"168.62.220.70","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: ['2103'] + content-length: ['2102'] content-type: [application/json; charset=utf-8] - date: ['Wed, 10 Oct 2018 18:03:41 GMT'] + date: ['Thu, 18 Oct 2018 00:14:50 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.48] + 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":"168.62.220.70","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: ['1134'] + content-length: ['1133'] content-type: [application/json; charset=utf-8] - date: ['Wed, 10 Oct 2018 18:03:41 GMT'] + date: ['Thu, 18 Oct 2018 00:14:50 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.48] + 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: ['Wed, 10 Oct 2018 18:03:42 GMT'] + date: ['Thu, 18 Oct 2018 00:14:52 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdGV1UyWFlOWEJRNTVLVk1UN0dQRk1LSURJQ0kySzY0MzdCUHw2NTAxOUFEMTNGQ0VBMDJELVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?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 4d78282f4e1..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-10T18:03:43Z"}}' + "date": "2018-10-18T00:14:52Z"}}' 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.48] + 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-10T18:03:43Z"},"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, 10 Oct 2018 18:03:44 GMT'] + date: ['Thu, 18 Oct 2018 00:14:53 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.48] + 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-10T18:03:43Z"},"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, 10 Oct 2018 18:03:44 GMT'] + date: ['Thu, 18 Oct 2018 00:14:53 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.48] + 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":[],"instanceView":{"restartCount":0,"currentState":{"state":"Waiting","detailStatus":"ContainerCreating"}},"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":{}}'} + 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/512f5c90-4b45-4e94-9eec-5ccb4be334c5?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: ['884'] + content-length: ['780'] content-type: [application/json; charset=utf-8] - date: ['Wed, 10 Oct 2018 18:03:46 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: ['76'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['85'] x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['98'] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} - request: body: null @@ -99,20 +99,46 @@ 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.48] + 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":"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/512f5c90-4b45-4e94-9eec-5ccb4be334c5?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":"Succeeded","startTime":"2018-10-10T18:03:47.0606167Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-10-10T18:03:49Z","lastTimestamp":"2018-10-10T18:03:49Z","name":"Pulling","message":"pulling - image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:03:56Z","lastTimestamp":"2018-10-10T18:03:56Z","name":"Pulled","message":"Successfully - pulled image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:03:56Z","lastTimestamp":"2018-10-10T18:03:56Z","name":"Created","message":"Created - container with id 5cd5855b92d814696ac78195edbc70771f72c8062bee2f6761b8739f9e6fa46b","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:03:56Z","lastTimestamp":"2018-10-10T18:03:56Z","name":"Started","message":"Started - container with id 5cd5855b92d814696ac78195edbc70771f72c8062bee2f6761b8739f9e6fa46b","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: ['1167'] content-type: [application/json; charset=utf-8] - date: ['Wed, 10 Oct 2018 18:04:17 GMT'] + date: ['Thu, 18 Oct 2018 00:16:01 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -129,20 +155,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.48] + 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-10T18:03:56Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-10T18:03:49Z","lastTimestamp":"2018-10-10T18:03:49Z","name":"Pulling","message":"pulling - image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:03:56Z","lastTimestamp":"2018-10-10T18:03:56Z","name":"Pulled","message":"Successfully - pulled image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:03:56Z","lastTimestamp":"2018-10-10T18:03:56Z","name":"Created","message":"Created - container with id 5cd5855b92d814696ac78195edbc70771f72c8062bee2f6761b8739f9e6fa46b","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:03:56Z","lastTimestamp":"2018-10-10T18:03:56Z","name":"Started","message":"Started - container with id 5cd5855b92d814696ac78195edbc70771f72c8062bee2f6761b8739f9e6fa46b","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: ['1782'] content-type: [application/json; charset=utf-8] - date: ['Wed, 10 Oct 2018 18:04:17 GMT'] + date: ['Thu, 18 Oct 2018 00:16:02 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -159,21 +185,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.48] + 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-10T18:03:56Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-10T18:03:49Z","lastTimestamp":"2018-10-10T18:03:49Z","name":"Pulling","message":"pulling - image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:03:56Z","lastTimestamp":"2018-10-10T18:03:56Z","name":"Pulled","message":"Successfully - pulled image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:03:56Z","lastTimestamp":"2018-10-10T18:03:56Z","name":"Created","message":"Created - container with id 5cd5855b92d814696ac78195edbc70771f72c8062bee2f6761b8739f9e6fa46b","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:03:56Z","lastTimestamp":"2018-10-10T18:03:56Z","name":"Started","message":"Started - container with id 5cd5855b92d814696ac78195edbc70771f72c8062bee2f6761b8739f9e6fa46b","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: ['1782'] content-type: [application/json; charset=utf-8] - date: ['Wed, 10 Oct 2018 18:04:19 GMT'] + date: ['Thu, 18 Oct 2018 00:16:08 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -192,7 +218,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.48] + 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,12 +227,12 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 10 Oct 2018 18:04:19 GMT'] + date: ['Thu, 18 Oct 2018 00:16:09 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdHVFBBSDUzUlZFV1EzQzRBQVQzTVhCMkZURE1MTFFXUE1CSHxCQzM5NjFBQjFGNEU2RTlCLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?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 b7de51542de..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-10T18:04:20Z"}}' + "date": "2018-10-18T00:16:09Z"}}' 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.48] + 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-10T18:04: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-18T00:16:09Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 10 Oct 2018 18:04:20 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 @@ -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.48] + 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-10T18:04: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-18T00:16:09Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 10 Oct 2018 18:04:22 GMT'] + date: ['Thu, 18 Oct 2018 00:16:10 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -65,24 +65,24 @@ 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.48] + 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":"e5d28e26-36cc-4d5e-b21e-f43039f53e85","clientId":"317a2b62-3aa4-4513-9fa0-a5b933838136","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=e5d28e26-36cc-4d5e-b21e-f43039f53e85&aid=317a2b62-3aa4-4513-9fa0-a5b933838136"}}'} + 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, 10 Oct 2018 18:04:24 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/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: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} - request: body: null @@ -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.48] + 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-10T18:04: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-18T00:16:09Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 10 Oct 2018 18:04:24 GMT'] + date: ['Thu, 18 Oct 2018 00:16:14 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -126,25 +126,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.48] + 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":"40.83.180.179","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"principalId":"5d89bd47-26a4-4821-b22f-759a94630fbc","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/9c003a7f-a538-4bc5-ac16-7a448ff45db5?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: ['884'] + content-length: ['989'] content-type: [application/json; charset=utf-8] - date: ['Wed, 10 Oct 2018 18:04:33 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: ['75'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['97'] - 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 @@ -155,23 +155,23 @@ 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.48] + AZURECLI/2.0.49] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/9c003a7f-a538-4bc5-ac16-7a448ff45db5?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-10T18:04:33.0343257Z","properties":{"events":[{"count":2,"firstTimestamp":"2018-10-10T18:04:37Z","lastTimestamp":"2018-10-10T18:04:41Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-10T18:04:40Z","lastTimestamp":"2018-10-10T18:04:42Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:04:40Z","lastTimestamp":"2018-10-10T18:04:40Z","name":"Created","message":"Created - container with id 218e37f4a932530af21345b286eb44016049c55184e6383f2fd7f5f75324930f","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:04:40Z","lastTimestamp":"2018-10-10T18:04:40Z","name":"Started","message":"Started - container with id 218e37f4a932530af21345b286eb44016049c55184e6383f2fd7f5f75324930f","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:04:42Z","lastTimestamp":"2018-10-10T18:04:42Z","name":"Created","message":"Created - container with id 5525bf68397cb722843d68ba3ca10036ff68d04f4ca2721a75a5a07a3aa09d28","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:04:42Z","lastTimestamp":"2018-10-10T18:04:42Z","name":"Started","message":"Started - container with id 5525bf68397cb722843d68ba3ca10036ff68d04f4ca2721a75a5a07a3aa09d28","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-10T18:04:43Z","lastTimestamp":"2018-10-10T18:04:44Z","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-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: ['1741'] content-type: [application/json; charset=utf-8] - date: ['Wed, 10 Oct 2018 18:05:03 GMT'] + date: ['Thu, 18 Oct 2018 00:16:52 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -188,25 +188,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.48] + 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-10T18:04:58Z","exitCode":0,"finishTime":"2018-10-10T18:04:58Z","detailStatus":"Completed"},"previousState":{"state":"Terminated","startTime":"2018-10-10T18:04:42Z","exitCode":0,"finishTime":"2018-10-10T18:04:42Z","detailStatus":"Completed"},"events":[{"count":3,"firstTimestamp":"2018-10-10T18:04:37Z","lastTimestamp":"2018-10-10T18:04:56Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-10T18:04:40Z","lastTimestamp":"2018-10-10T18:04:58Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:04:40Z","lastTimestamp":"2018-10-10T18:04:40Z","name":"Created","message":"Created - container with id 218e37f4a932530af21345b286eb44016049c55184e6383f2fd7f5f75324930f","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:04:40Z","lastTimestamp":"2018-10-10T18:04:40Z","name":"Started","message":"Started - container with id 218e37f4a932530af21345b286eb44016049c55184e6383f2fd7f5f75324930f","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:04:42Z","lastTimestamp":"2018-10-10T18:04:42Z","name":"Created","message":"Created - container with id 5525bf68397cb722843d68ba3ca10036ff68d04f4ca2721a75a5a07a3aa09d28","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:04:42Z","lastTimestamp":"2018-10-10T18:04:42Z","name":"Started","message":"Started - container with id 5525bf68397cb722843d68ba3ca10036ff68d04f4ca2721a75a5a07a3aa09d28","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-10T18:04:43Z","lastTimestamp":"2018-10-10T18:04:58Z","name":"BackOff","message":"Back-off - restarting failed container","type":"Warning"},{"count":1,"firstTimestamp":"2018-10-10T18:04:58Z","lastTimestamp":"2018-10-10T18:04:58Z","name":"Created","message":"Created - container with id e1cfb00deb2e973c871eb6523b810e51ff6c3db7e0c1816146f01a18596f9643","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:04:58Z","lastTimestamp":"2018-10-10T18:04:58Z","name":"Started","message":"Started - container with id e1cfb00deb2e973c871eb6523b810e51ff6c3db7e0c1816146f01a18596f9643","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"40.83.180.179","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Succeeded"}},"identity":{"principalId":"5d89bd47-26a4-4821-b22f-759a94630fbc","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: ['3127'] + content-length: ['3128'] content-type: [application/json; charset=utf-8] - date: ['Wed, 10 Oct 2018 18:05:02 GMT'] + date: ['Thu, 18 Oct 2018 00:16:52 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -224,17 +224,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.48] + 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-10T18:04: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-18T00:16:09Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 10 Oct 2018 18:05:04 GMT'] + date: ['Thu, 18 Oct 2018 00:16:54 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -258,25 +258,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.48] + 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.62.139","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005":{"principalId":"e5d28e26-36cc-4d5e-b21e-f43039f53e85","clientId":"317a2b62-3aa4-4513-9fa0-a5b933838136"}},"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/6c39b240-2067-41e1-bb3f-998756392843?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: ['1186'] content-type: [application/json; charset=utf-8] - date: ['Wed, 10 Oct 2018 18:05:10 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: ['75'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['96'] - 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 @@ -287,20 +287,23 @@ 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.48] + AZURECLI/2.0.49] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/6c39b240-2067-41e1-bb3f-998756392843?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-10T18:05:09.9068848Z","properties":{"events":[{"count":2,"firstTimestamp":"2018-10-10T18:05:15Z","lastTimestamp":"2018-10-10T18:05:19Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:05:18Z","lastTimestamp":"2018-10-10T18:05:18Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:05:19Z","lastTimestamp":"2018-10-10T18:05:19Z","name":"Created","message":"Created - container","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:05:19Z","lastTimestamp":"2018-10-10T18:05:19Z","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, 10 Oct 2018 18:05:42 GMT'] + date: ['Thu, 18 Oct 2018 00:17:32 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -317,21 +320,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.48] + 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-10T18:05:36Z","exitCode":0,"finishTime":"2018-10-10T18:05:36Z","detailStatus":"Completed"},"previousState":{"state":"Terminated","startTime":"2018-10-10T18:05:21Z","exitCode":0,"finishTime":"2018-10-10T18:05:21Z","detailStatus":"Completed"},"events":[{"count":3,"firstTimestamp":"2018-10-10T18:05:15Z","lastTimestamp":"2018-10-10T18:05:34Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-10T18:05:18Z","lastTimestamp":"2018-10-10T18:05:36Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-10T18:05:19Z","lastTimestamp":"2018-10-10T18:05:36Z","name":"Created","message":"Created - container","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-10T18:05:19Z","lastTimestamp":"2018-10-10T18:05:36Z","name":"Started","message":"Started - container","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-10T18:05:22Z","lastTimestamp":"2018-10-10T18:05:37Z","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.62.139","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":"e5d28e26-36cc-4d5e-b21e-f43039f53e85","clientId":"317a2b62-3aa4-4513-9fa0-a5b933838136"}},"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: ['2375'] + content-length: ['3429'] content-type: [application/json; charset=utf-8] - date: ['Wed, 10 Oct 2018 18:05:43 GMT'] + date: ['Thu, 18 Oct 2018 00:17:33 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -349,17 +356,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.48] + 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-10T18:04: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-18T00:16:09Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Wed, 10 Oct 2018 18:05:43 GMT'] + date: ['Thu, 18 Oct 2018 00:17:35 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -383,25 +390,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.48] + 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":[],"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.190.178","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005":{"principalId":"e5d28e26-36cc-4d5e-b21e-f43039f53e85","clientId":"317a2b62-3aa4-4513-9fa0-a5b933838136"}},"principalId":"c6e3a411-abf0-44a0-b25b-cc0cb3ae9ea8","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/437a3177-526b-47e1-a6b5-a37180d3986f?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: ['1360'] + content-length: ['1254'] content-type: [application/json; charset=utf-8] - date: ['Wed, 10 Oct 2018 18:05:48 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: ['74'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['95'] + 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: @@ -413,23 +420,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.48] + AZURECLI/2.0.49] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/437a3177-526b-47e1-a6b5-a37180d3986f?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-10T18:05:48.9947547Z","properties":{"events":[{"count":2,"firstTimestamp":"2018-10-10T18:05:50Z","lastTimestamp":"2018-10-10T18:05:54Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-10T18:05:52Z","lastTimestamp":"2018-10-10T18:05:55Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:05:53Z","lastTimestamp":"2018-10-10T18:05:53Z","name":"Created","message":"Created - container with id 1d4128c4855c3e79741ed98935e2ab2981ce3a41f60f5c453b0d825b17df2e06","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:05:53Z","lastTimestamp":"2018-10-10T18:05:53Z","name":"Started","message":"Started - container with id 1d4128c4855c3e79741ed98935e2ab2981ce3a41f60f5c453b0d825b17df2e06","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:05:55Z","lastTimestamp":"2018-10-10T18:05:55Z","name":"Created","message":"Created - container with id 5a505e87076b46377d4daf9c5a41fe6d5e7b62b01be1967dfe30df167b6bd150","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:05:56Z","lastTimestamp":"2018-10-10T18:05:56Z","name":"Started","message":"Started - container with id 5a505e87076b46377d4daf9c5a41fe6d5e7b62b01be1967dfe30df167b6bd150","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-10T18:05:56Z","lastTimestamp":"2018-10-10T18:05:58Z","name":"BackOff","message":"Back-off + 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: ['1741'] + content-length: ['1141'] content-type: [application/json; charset=utf-8] - date: ['Wed, 10 Oct 2018 18:06:18 GMT'] + date: ['Thu, 18 Oct 2018 00:18:12 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -446,26 +451,23 @@ 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.48] + 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-10T18:06:12Z","exitCode":0,"finishTime":"2018-10-10T18:06:12Z","detailStatus":"Completed"},"previousState":{"state":"Terminated","startTime":"2018-10-10T18:05:55Z","exitCode":0,"finishTime":"2018-10-10T18:05:56Z","detailStatus":"Completed"},"events":[{"count":3,"firstTimestamp":"2018-10-10T18:05:50Z","lastTimestamp":"2018-10-10T18:06:10Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-10T18:05:52Z","lastTimestamp":"2018-10-10T18:06:12Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:05:53Z","lastTimestamp":"2018-10-10T18:05:53Z","name":"Created","message":"Created - container with id 1d4128c4855c3e79741ed98935e2ab2981ce3a41f60f5c453b0d825b17df2e06","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:05:53Z","lastTimestamp":"2018-10-10T18:05:53Z","name":"Started","message":"Started - container with id 1d4128c4855c3e79741ed98935e2ab2981ce3a41f60f5c453b0d825b17df2e06","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:05:55Z","lastTimestamp":"2018-10-10T18:05:55Z","name":"Created","message":"Created - container with id 5a505e87076b46377d4daf9c5a41fe6d5e7b62b01be1967dfe30df167b6bd150","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:05:56Z","lastTimestamp":"2018-10-10T18:05:56Z","name":"Started","message":"Started - container with id 5a505e87076b46377d4daf9c5a41fe6d5e7b62b01be1967dfe30df167b6bd150","type":"Normal"},{"count":4,"firstTimestamp":"2018-10-10T18:05:56Z","lastTimestamp":"2018-10-10T18:06:13Z","name":"BackOff","message":"Back-off - restarting failed container","type":"Warning"},{"count":1,"firstTimestamp":"2018-10-10T18:06:12Z","lastTimestamp":"2018-10-10T18:06:12Z","name":"Created","message":"Created - container with id 75811eb7d1361715deefc48ef727d437042b8ba64cee1a30dda99419bbceae4a","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:06:12Z","lastTimestamp":"2018-10-10T18:06:12Z","name":"Started","message":"Started - container with id 75811eb7d1361715deefc48ef727d437042b8ba64cee1a30dda99419bbceae4a","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.190.178","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":"e5d28e26-36cc-4d5e-b21e-f43039f53e85","clientId":"317a2b62-3aa4-4513-9fa0-a5b933838136"}},"principalId":"c6e3a411-abf0-44a0-b25b-cc0cb3ae9ea8","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: ['3499'] + content-length: ['2393'] content-type: [application/json; charset=utf-8] - date: ['Wed, 10 Oct 2018 18:06:19 GMT'] + date: ['Thu, 18 Oct 2018 00:18:13 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -484,7 +486,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.48] + 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,9 +495,9 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 10 Oct 2018 18:06:20 GMT'] + date: ['Thu, 18 Oct 2018 00:18:14 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdDVk43Q1VMQVRIUE5CMkZGUTY2SUdTNkVRVEVWMjJNSFRKSnxCQjc4QTVBQTE0ODFBN0Q3LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?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 a3124642e82..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-10T18:06:21Z"}}' + "date": "2018-10-18T00:19:24Z"}}' 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.48] + 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-10T18:06:21Z"},"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, 10 Oct 2018 18:06:22 GMT'] + date: ['Thu, 18 Oct 2018 00:19:25 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.48] + 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-10T18:06:21Z"},"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, 10 Oct 2018 18:06:22 GMT'] + date: ['Thu, 18 Oct 2018 00:19:25 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.48] + 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-10T18:06:21Z"},"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, 10 Oct 2018 18:06:22 GMT'] + date: ['Thu, 18 Oct 2018 00:19:26 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.48] + 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-10T18:06:21Z"},"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, 10 Oct 2018 18:06:22 GMT'] + date: ['Thu, 18 Oct 2018 00:19:27 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.48] + 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: ['Wed, 10 Oct 2018 18:06:25 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: ['77'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['99'] - 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 @@ -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.48] + 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,9 +165,9 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Wed, 10 Oct 2018 18:06:25 GMT'] + date: ['Thu, 18 Oct 2018 00:19:28 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdQSVc0SEdIQ1VVNUE0SUNIWDZXTUU2NlZBVVg1TkdXNE5CVnxENkFDRkMwQUNGMjY2RjkxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?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 65079c1928c..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-10T18:06:26Z"}}' + "date": "2018-10-18T00:19:29Z"}}' 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.48] + 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-10T18:06:26Z"},"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, 10 Oct 2018 18:06:26 GMT'] + date: ['Thu, 18 Oct 2018 00:19:29 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.48] + 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-10T18:06:26Z"},"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, 10 Oct 2018 18:06:26 GMT'] + date: ['Thu, 18 Oct 2018 00:19:30 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.48] + 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/7fec0291-b70e-4d60-a9ca-77cfd555ec89?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, 10 Oct 2018 18:06:34 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: ['76'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['98'] - 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 @@ -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.48] + AZURECLI/2.0.49] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/7fec0291-b70e-4d60-a9ca-77cfd555ec89?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-10T18:06:34.6271889Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-10-10T18:06:39Z","lastTimestamp":"2018-10-10T18:06:39Z","name":"Pulling","message":"pulling - image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:06:48Z","lastTimestamp":"2018-10-10T18:06:48Z","name":"Pulled","message":"Successfully - pulled image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:06:48Z","lastTimestamp":"2018-10-10T18:06:48Z","name":"Created","message":"Created - container with id e9c84f9b96e0504a1ac3ea530bed32343141d4c6b9adeadac6fbfc9e625240e7","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:06:48Z","lastTimestamp":"2018-10-10T18:06:48Z","name":"Started","message":"Started - container with id e9c84f9b96e0504a1ac3ea530bed32343141d4c6b9adeadac6fbfc9e625240e7","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, 10 Oct 2018 18:07:04 GMT'] + date: ['Thu, 18 Oct 2018 00:20:04 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.48] + 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-10T18:06:48Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-10T18:06:39Z","lastTimestamp":"2018-10-10T18:06:39Z","name":"Pulling","message":"pulling - image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:06:48Z","lastTimestamp":"2018-10-10T18:06:48Z","name":"Pulled","message":"Successfully - pulled image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:06:48Z","lastTimestamp":"2018-10-10T18:06:48Z","name":"Created","message":"Created - container with id e9c84f9b96e0504a1ac3ea530bed32343141d4c6b9adeadac6fbfc9e625240e7","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:06:48Z","lastTimestamp":"2018-10-10T18:06:48Z","name":"Started","message":"Started - container with id e9c84f9b96e0504a1ac3ea530bed32343141d4c6b9adeadac6fbfc9e625240e7","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, 10 Oct 2018 18:07:05 GMT'] + date: ['Thu, 18 Oct 2018 00:20:04 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.48] + 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-10T18:06:48Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-10-10T18:06:39Z","lastTimestamp":"2018-10-10T18:06:39Z","name":"Pulling","message":"pulling - image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:06:48Z","lastTimestamp":"2018-10-10T18:06:48Z","name":"Pulled","message":"Successfully - pulled image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:06:48Z","lastTimestamp":"2018-10-10T18:06:48Z","name":"Created","message":"Created - container with id e9c84f9b96e0504a1ac3ea530bed32343141d4c6b9adeadac6fbfc9e625240e7","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-10T18:06:48Z","lastTimestamp":"2018-10-10T18:06:48Z","name":"Started","message":"Started - container with id e9c84f9b96e0504a1ac3ea530bed32343141d4c6b9adeadac6fbfc9e625240e7","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, 10 Oct 2018 18:07:06 GMT'] + date: ['Thu, 18 Oct 2018 00:20:05 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.48] + 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: ['Wed, 10 Oct 2018 18:07:06 GMT'] + date: ['Thu, 18 Oct 2018 00:20:05 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdGSkxRVUNLSUtESFlFUFBVV1pGWkhBNlZYN0dHUUszNVJBWHxENTJGRTFCMzEzNEE3MDM2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?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] 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 279baec1e4f..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 @@ -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): @@ -128,7 +128,7 @@ def test_container_create_with_msi(self, resource_group, resource_group_location system_assigned_identity = '[system]' self.kwargs.update({ - 'user_assigned_identity_name': user_assigned_identity_name + 'user_assigned_identity_name': user_assigned_identity_name, }) msi_identity_result = self.cmd('identity create -g {rg} -n {user_assigned_identity_name}').get_output_in_json() @@ -142,7 +142,7 @@ 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, }) # Test create system assigned identity @@ -178,6 +178,42 @@ 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 diff --git a/src/command_modules/azure-cli-container/setup.py b/src/command_modules/azure-cli-container/setup.py index ad6594207bc..f6436762ec0 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',