From d8aa50ec2269e716932041cc2494326e962397f7 Mon Sep 17 00:00:00 2001 From: sakreter Date: Mon, 8 Oct 2018 16:19:33 -0700 Subject: [PATCH 01/17] Adding vnet-resource-group --- src/command_modules/azure-cli-container/HISTORY.rst | 5 +++++ .../azure/cli/command_modules/container/_params.py | 1 + .../azure/cli/command_modules/container/custom.py | 10 ++++++++-- src/command_modules/azure-cli-container/setup.py | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/command_modules/azure-cli-container/HISTORY.rst b/src/command_modules/azure-cli-container/HISTORY.rst index d663ff4031f..f668b61b7f5 100644 --- a/src/command_modules/azure-cli-container/HISTORY.rst +++ b/src/command_modules/azure-cli-container/HISTORY.rst @@ -3,6 +3,11 @@ Release History =============== +0.3.6 ++++++ +* Allow using only subnet ID to setup a virtual network for the container group +* Add '--vnet-resource-group' to allow creating vnet and subnet in seperate resource group from container group + 0.3.5 +++++ * Minor changes 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 02c139fe070..6110b8f973c 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 @@ -81,6 +81,7 @@ def load_arguments(self, _): with self.argument_context('container create', arg_group='Network') as c: c.argument('network_profile', network_profile_type) + c.argument('vnet_resource_group', help='The name of the resource group for the vnet.') c.argument('vnet_name', help='The name of the VNET when creating a new one or referencing an existing one.') c.argument('vnet_address_prefix', help='The IP address prefix to use when creating a new VNET in CIDR format.') c.argument('subnet', options_list=['--subnet'], validator=validate_subnet, help='The name of the subnet when creating a new VNET or referencing an existing one. Can also reference an existing subnet by 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 4898a3076b9..f2219efe287 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 @@ -90,6 +90,7 @@ def create_container(cmd, azure_file_volume_mount_path=None, log_analytics_workspace=None, log_analytics_workspace_key=None, + vnet_resource_group=None, vnet_name=None, vnet_address_prefix='10.0.0.0/16', subnet=None, @@ -178,8 +179,8 @@ def create_container(cmd, environment_variables = environment_variables or secure_environment_variables # Set up VNET, subnet and network profile if needed - if subnet and vnet_name and not network_profile: - network_profile = _get_vnet_network_profile(cmd, location, resource_group_name, vnet_name, vnet_address_prefix, subnet, subnet_address_prefix) + if subnet and not network_profile: + network_profile = _get_vnet_network_profile(cmd, location, vnet_resource_group or resource_group_name, vnet_name, vnet_address_prefix, subnet, subnet_address_prefix) cg_network_profile = None if network_profile: @@ -247,6 +248,7 @@ def _get_vnet_network_profile(cmd, location, resource_group_name, vnet_name, vne subnet = _get_resource(ncf.subnets, resource_group_name, vnet_name, subnet_name) # For an existing subnet, validate and add delegation if needed if subnet: + logger.info('Using existing subnet "%s"', subnet_name) for endpoint in (subnet.service_endpoints or []): if endpoint.service != "Microsoft.ContainerInstance": raise CLIError("Can not use subnet with existing service links other than 'Microsoft.ContainerInstance'.") @@ -260,6 +262,7 @@ def _get_vnet_network_profile(cmd, location, resource_group_name, vnet_name, vne network_profile = _get_resource(ncf.network_profiles, resource_group_name, default_network_profile_name) if network_profile: + logger.info('Using existing network profile "%s"', default_network_profile_name) return network_profile.id # Create new subnet and Vnet if not exists @@ -268,6 +271,7 @@ def _get_vnet_network_profile(cmd, location, resource_group_name, vnet_name, vne 'AddressSpace', resource_type=ResourceType.MGMT_NETWORK) vnet = _get_resource(ncf.virtual_networks, resource_group_name, vnet_name) if not vnet: + logger.info('Creating new vnet "%s" in resource group "%s"', vnet_name, resource_group_name) ncf.virtual_networks.create_or_update(resource_group_name, vnet_name, VirtualNetwork(name=vnet_name, @@ -279,6 +283,7 @@ def _get_vnet_network_profile(cmd, location, resource_group_name, vnet_name, vne address_prefix=subnet_address_prefix, delegations=[aci_delegation]) + logger.info('Creating new subnet "%s" in resource group "%s"', subnet_name, resource_group_name) subnet = ncf.subnets.create_or_update(resource_group_name, vnet_name, subnet_name, subnet).result() NetworkProfile, ContainerNetworkInterfaceConfiguration, IPConfigurationProfile = cmd.get_models('NetworkProfile', @@ -299,6 +304,7 @@ def _get_vnet_network_profile(cmd, location, resource_group_name, vnet_name, vne )] ) + logger.info('Creating network profile "%s"', default_network_profile_name) network_profile = ncf.network_profiles.create_or_update(resource_group_name, default_network_profile_name, network_profile).result() return network_profile.id diff --git a/src/command_modules/azure-cli-container/setup.py b/src/command_modules/azure-cli-container/setup.py index 2ee4636d3b4..247b530c2f2 100644 --- a/src/command_modules/azure-cli-container/setup.py +++ b/src/command_modules/azure-cli-container/setup.py @@ -14,7 +14,7 @@ logger.warn("Wheel is not available, disabling bdist_wheel hook") cmdclass = {} -VERSION = "0.3.5" +VERSION = "0.3.6" CLASSIFIERS = [ 'Development Status :: 4 - Beta', From 7ec3de545e9fd557d4e1c8b26ff87c9098df91f8 Mon Sep 17 00:00:00 2001 From: sakreter Date: Mon, 8 Oct 2018 16:22:45 -0700 Subject: [PATCH 02/17] fixing wording for more clear content --- src/command_modules/azure-cli-container/HISTORY.rst | 2 +- .../azure/cli/command_modules/container/_params.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/command_modules/azure-cli-container/HISTORY.rst b/src/command_modules/azure-cli-container/HISTORY.rst index f668b61b7f5..ebf4e5fccd8 100644 --- a/src/command_modules/azure-cli-container/HISTORY.rst +++ b/src/command_modules/azure-cli-container/HISTORY.rst @@ -6,7 +6,7 @@ Release History 0.3.6 +++++ * Allow using only subnet ID to setup a virtual network for the container group -* Add '--vnet-resource-group' to allow creating vnet and subnet in seperate resource group from container group +* Add '--vnet-resource-group' to allow creating vnet and subnet in seperate resource group from the container group 0.3.5 +++++ 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 6110b8f973c..f378f529c60 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 @@ -81,7 +81,7 @@ def load_arguments(self, _): with self.argument_context('container create', arg_group='Network') as c: c.argument('network_profile', network_profile_type) - c.argument('vnet_resource_group', help='The name of the resource group for the vnet.') + c.argument('vnet_resource_group', help='The name of the resource group for the vnet and subnet.') c.argument('vnet_name', help='The name of the VNET when creating a new one or referencing an existing one.') c.argument('vnet_address_prefix', help='The IP address prefix to use when creating a new VNET in CIDR format.') c.argument('subnet', options_list=['--subnet'], validator=validate_subnet, help='The name of the subnet when creating a new VNET or referencing an existing one. Can also reference an existing subnet by ID.') From 398dc67387ea68acc32d19a96a26c88fbbc37dda Mon Sep 17 00:00:00 2001 From: sakreter Date: Mon, 8 Oct 2018 16:37:38 -0700 Subject: [PATCH 03/17] Removing vnet-resource-group --- src/command_modules/azure-cli-container/HISTORY.rst | 1 - .../azure/cli/command_modules/container/_params.py | 1 - .../azure/cli/command_modules/container/custom.py | 3 +-- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/command_modules/azure-cli-container/HISTORY.rst b/src/command_modules/azure-cli-container/HISTORY.rst index ebf4e5fccd8..c05541f1cab 100644 --- a/src/command_modules/azure-cli-container/HISTORY.rst +++ b/src/command_modules/azure-cli-container/HISTORY.rst @@ -6,7 +6,6 @@ Release History 0.3.6 +++++ * Allow using only subnet ID to setup a virtual network for the container group -* Add '--vnet-resource-group' to allow creating vnet and subnet in seperate resource group from the container group 0.3.5 +++++ 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 f378f529c60..02c139fe070 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 @@ -81,7 +81,6 @@ def load_arguments(self, _): with self.argument_context('container create', arg_group='Network') as c: c.argument('network_profile', network_profile_type) - c.argument('vnet_resource_group', help='The name of the resource group for the vnet and subnet.') c.argument('vnet_name', help='The name of the VNET when creating a new one or referencing an existing one.') c.argument('vnet_address_prefix', help='The IP address prefix to use when creating a new VNET in CIDR format.') c.argument('subnet', options_list=['--subnet'], validator=validate_subnet, help='The name of the subnet when creating a new VNET or referencing an existing one. Can also reference an existing subnet by 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 f2219efe287..70887eb5b51 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 @@ -90,7 +90,6 @@ def create_container(cmd, azure_file_volume_mount_path=None, log_analytics_workspace=None, log_analytics_workspace_key=None, - vnet_resource_group=None, vnet_name=None, vnet_address_prefix='10.0.0.0/16', subnet=None, @@ -180,7 +179,7 @@ def create_container(cmd, # Set up VNET, subnet and network profile if needed if subnet and not network_profile: - network_profile = _get_vnet_network_profile(cmd, location, vnet_resource_group or resource_group_name, vnet_name, vnet_address_prefix, subnet, subnet_address_prefix) + network_profile = _get_vnet_network_profile(cmd, location, resource_group_name, vnet_name, vnet_address_prefix, subnet, subnet_address_prefix) cg_network_profile = None if network_profile: From ca92ef8da1db20efb2a01e089f606ca51424c7b1 Mon Sep 17 00:00:00 2001 From: sakreter Date: Tue, 9 Oct 2018 11:58:24 -0700 Subject: [PATCH 04/17] allow passing in vnet name or id --- .../azure-cli-container/HISTORY.rst | 1 + .../cli/command_modules/container/_params.py | 2 +- .../command_modules/container/_validators.py | 2 +- .../cli/command_modules/container/custom.py | 30 ++++++++++++------- 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/src/command_modules/azure-cli-container/HISTORY.rst b/src/command_modules/azure-cli-container/HISTORY.rst index 048729c085d..0247b6f636c 100644 --- a/src/command_modules/azure-cli-container/HISTORY.rst +++ b/src/command_modules/azure-cli-container/HISTORY.rst @@ -6,6 +6,7 @@ Release History 0.3.6 +++++ * Allow using only subnet ID to setup a virtual network for the container group +* Allow using vnet name or resource id to enable using vnets from different resource groups * 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/_params.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_params.py index 571655fe147..bfe37ae8464 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 @@ -81,7 +81,7 @@ def load_arguments(self, _): with self.argument_context('container create', arg_group='Network') as c: c.argument('network_profile', network_profile_type) - c.argument('vnet_name', help='The name of the VNET when creating a new one or referencing an existing one.') + c.argument('vnet', help='The name of the VNET when creating a new one or referencing an existing one. Can also reference an existing subnet by ID. This allows using vnets from other resource groups.') c.argument('vnet_address_prefix', help='The IP address prefix to use when creating a new VNET in CIDR format.') c.argument('subnet', options_list=['--subnet'], validator=validate_subnet, help='The name of the subnet when creating a new VNET or referencing an existing one. Can also reference an existing subnet by ID.') c.argument('subnet_address_prefix', help='The subnet IP address prefix to use when creating a new VNET in CIDR format.') diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_validators.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/_validators.py index 1849a4a325e..a1a664fe4f9 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 @@ -53,7 +53,7 @@ def validate_image(ns): def validate_subnet(ns): from msrestazure.tools import is_valid_resource_id - if not is_valid_resource_id(ns.subnet) and ((ns.vnet_name and not ns.subnet) or (ns.subnet and not ns.vnet_name)): + if not is_valid_resource_id(ns.subnet) and ((ns.vnet and not ns.subnet) or (ns.subnet and not ns.vnet)): raise CLIError('usage error: --vnet-name NAME --subnet NAME | --subnet 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 70a2e279a7c..663408f047d 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 @@ -90,7 +90,7 @@ def create_container(cmd, azure_file_volume_mount_path=None, log_analytics_workspace=None, log_analytics_workspace_key=None, - vnet_name=None, + vnet=None, vnet_address_prefix='10.0.0.0/16', subnet=None, subnet_address_prefix='10.0.0.0/24', @@ -178,7 +178,7 @@ def create_container(cmd, # Set up VNET, subnet and network profile if needed if subnet and not network_profile: - network_profile = _get_vnet_network_profile(cmd, location, resource_group_name, vnet_name, vnet_address_prefix, subnet, subnet_address_prefix) + network_profile = _get_vnet_network_profile(cmd, location, resource_group_name, vnet, vnet_address_prefix, subnet, subnet_address_prefix) cg_network_profile = None if network_profile: @@ -222,37 +222,45 @@ def _get_resource(client, resource_group_name, *subresources): raise -def _get_vnet_network_profile(cmd, location, resource_group_name, vnet_name, vnet_address_prefix, subnet, subnet_address_prefix): +def _get_vnet_network_profile(cmd, location, resource_group_name, vnet, vnet_address_prefix, subnet, subnet_address_prefix): from azure.cli.core.profiles import ResourceType from msrestazure.tools import parse_resource_id, is_valid_resource_id containerInstanceDelegationServiceName = "Microsoft.ContainerInstance/containerGroups" Delegation = cmd.get_models('Delegation', resource_type=ResourceType.MGMT_NETWORK) aci_delegation = Delegation( - name="Microsoft.ContainerInstance.containerGroups", - service_name="Microsoft.ContainerInstance/containerGroups" + name=containerInstanceDelegationServiceName, + service_name=containerInstanceDelegationServiceName ) ncf = cf_network(cmd.cli_ctx) + vnet_name = vnet subnet_name = subnet if is_valid_resource_id(subnet): parsed_subnet_id = parse_resource_id(subnet) subnet_name = parsed_subnet_id['resource_name'] vnet_name = parsed_subnet_id['name'] + resource_group_name = parsed_subnet_id['resource_group'] + elif is_valid_resource_id(vnet): + parsed_vnet_id = parse_resource_id(vnet) + vnet_name = parsed_vnet_id['resource_name'] + resource_group_name = parsed_vnet_id['resource_group'] default_network_profile_name = "aci-network-profile-{}-{}".format(vnet_name, subnet_name) subnet = _get_resource(ncf.subnets, resource_group_name, vnet_name, subnet_name) # For an existing subnet, validate and add delegation if needed if subnet: - logger.info('Using existing subnet "%s"', subnet_name) - for endpoint in (subnet.service_endpoints or []): - if endpoint.service != "Microsoft.ContainerInstance": - raise CLIError("Can not use subnet with existing service links other than 'Microsoft.ContainerInstance'.") + logger.info('Using existing subnet "%s" in resource group "%s"', subnet.name, resource_group_name) + for sal in (subnet.service_association_links or []): + if sal.linked_resource_type != containerInstanceDelegationServiceName: + raise CLIError("Can not use subnet with existing service association links other than {}.".format(containerInstanceDelegationServiceName)) if not subnet.delegations: + logger.info('Adding ACI delegation to the existing subnet.') subnet.delegations = [aci_delegation] + subnet = ncf.subnets.create_or_update(resource_group_name, vnet_name, subnet_name, subnet).result() else: for delegation in subnet.delegations: if delegation.service_name != containerInstanceDelegationServiceName: @@ -267,6 +275,7 @@ def _get_vnet_network_profile(cmd, location, resource_group_name, vnet_name, vne else: Subnet, VirtualNetwork, AddressSpace = cmd.get_models('Subnet', 'VirtualNetwork', 'AddressSpace', resource_type=ResourceType.MGMT_NETWORK) + vnet = _get_resource(ncf.virtual_networks, resource_group_name, vnet_name) if not vnet: logger.info('Creating new vnet "%s" in resource group "%s"', vnet_name, resource_group_name) @@ -288,7 +297,6 @@ def _get_vnet_network_profile(cmd, location, resource_group_name, vnet_name, vne 'ContainerNetworkInterfaceConfiguration', 'IPConfigurationProfile', resource_type=ResourceType.MGMT_NETWORK) - # In all cases, create the network profile with aci NIC network_profile = NetworkProfile( name=default_network_profile_name, @@ -302,7 +310,7 @@ def _get_vnet_network_profile(cmd, location, resource_group_name, vnet_name, vne )] ) - logger.info('Creating network profile "%s"', default_network_profile_name) + logger.info('Creating network profile "%s" in resource group "%s"', default_network_profile_name, resource_group_name) network_profile = ncf.network_profiles.create_or_update(resource_group_name, default_network_profile_name, network_profile).result() return network_profile.id From 497d4e4056e4eca8242513179a17bf95b3affd1a Mon Sep 17 00:00:00 2001 From: sakreter Date: Tue, 9 Oct 2018 13:50:29 -0700 Subject: [PATCH 05/17] updating container module version --- src/command_modules/azure-cli-container/HISTORY.rst | 5 ++++- src/command_modules/azure-cli-container/setup.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/command_modules/azure-cli-container/HISTORY.rst b/src/command_modules/azure-cli-container/HISTORY.rst index 0247b6f636c..80e862f7aee 100644 --- a/src/command_modules/azure-cli-container/HISTORY.rst +++ b/src/command_modules/azure-cli-container/HISTORY.rst @@ -3,10 +3,13 @@ Release History =============== -0.3.6 +0.3.7 +++++ * Allow using only subnet ID to setup a virtual network for the container group * Allow using vnet name or resource id to enable using vnets from different resource groups + +0.3.6 ++++++ * 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/setup.py b/src/command_modules/azure-cli-container/setup.py index 247b530c2f2..8a5dbb1a8c8 100644 --- a/src/command_modules/azure-cli-container/setup.py +++ b/src/command_modules/azure-cli-container/setup.py @@ -14,7 +14,7 @@ logger.warn("Wheel is not available, disabling bdist_wheel hook") cmdclass = {} -VERSION = "0.3.6" +VERSION = "0.3.7" CLASSIFIERS = [ 'Development Status :: 4 - Beta', From 61e6796b258be8ae32ed285acbaf90c98cf52611 Mon Sep 17 00:00:00 2001 From: sakreter Date: Tue, 9 Oct 2018 13:53:31 -0700 Subject: [PATCH 06/17] adding wording change for the LRP in container warning. --- .../azure/cli/command_modules/container/_validators.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 a1a664fe4f9..ffadc47fbb7 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 @@ -46,7 +46,8 @@ def validate_image(ns): if ns.image.split(':')[0] in short_running_images and not ns.command_line: logger.warning('Image "%s" has no long running process. The "--command-line" argument must be used to start a ' 'long running process inside the container for the container group to stay running. ' - 'Ex: /bin/bash', + 'Ex: "tail -f /dev/null" ' + 'For more imformation visit https://aka.ms/aci/troubleshoot', ns.image) From 36f9422d66552f813d42acab605ecfce5ba5d174 Mon Sep 17 00:00:00 2001 From: sakreter Date: Tue, 9 Oct 2018 14:11:33 -0700 Subject: [PATCH 07/17] reverting version back to current version --- src/command_modules/azure-cli-container/HISTORY.rst | 5 +---- src/command_modules/azure-cli-container/setup.py | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/command_modules/azure-cli-container/HISTORY.rst b/src/command_modules/azure-cli-container/HISTORY.rst index 80e862f7aee..0247b6f636c 100644 --- a/src/command_modules/azure-cli-container/HISTORY.rst +++ b/src/command_modules/azure-cli-container/HISTORY.rst @@ -3,13 +3,10 @@ Release History =============== -0.3.7 +0.3.6 +++++ * Allow using only subnet ID to setup a virtual network for the container group * Allow using vnet name or resource id to enable using vnets from different resource groups - -0.3.6 -+++++ * 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/setup.py b/src/command_modules/azure-cli-container/setup.py index 8a5dbb1a8c8..247b530c2f2 100644 --- a/src/command_modules/azure-cli-container/setup.py +++ b/src/command_modules/azure-cli-container/setup.py @@ -14,7 +14,7 @@ logger.warn("Wheel is not available, disabling bdist_wheel hook") cmdclass = {} -VERSION = "0.3.7" +VERSION = "0.3.6" CLASSIFIERS = [ 'Development Status :: 4 - Beta', From fce06812a8a0b226804243be791fdf3009046d7d Mon Sep 17 00:00:00 2001 From: sakreter Date: Wed, 10 Oct 2018 09:23:36 -0700 Subject: [PATCH 08/17] Adding private option for --ip-address --- src/command_modules/azure-cli-container/HISTORY.rst | 1 + .../azure/cli/command_modules/container/_params.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/command_modules/azure-cli-container/HISTORY.rst b/src/command_modules/azure-cli-container/HISTORY.rst index 0247b6f636c..c202cecceeb 100644 --- a/src/command_modules/azure-cli-container/HISTORY.rst +++ b/src/command_modules/azure-cli-container/HISTORY.rst @@ -5,6 +5,7 @@ Release History 0.3.6 +++++ +* Make 'Private' a valid type to pass to '--ip-address' * Allow using only subnet ID to setup a virtual network for the container group * Allow using vnet name or resource id to enable using vnets from different resource groups * Show warning when creating a container group with an image without a long running process 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 bfe37ae8464..3e8c869423d 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 @@ -16,7 +16,7 @@ # pylint: disable=line-too-long -IP_ADDRESS_TYPES = ['Public'] +IP_ADDRESS_TYPES = ['Public', 'Private'] def _environment_variables_type(value): From a868528583129becd56f0938278066440c4bc064 Mon Sep 17 00:00:00 2001 From: sakreter Date: Wed, 10 Oct 2018 10:11:03 -0700 Subject: [PATCH 09/17] updating tests for new parameters --- .../command_modules/container/_validators.py | 2 +- .../recordings/test_container_create.yaml | 248 ------------------ .../test_container_create_with_acr.yaml | 212 --------------- .../test_container_create_with_vnet.yaml | 176 ------------- .../test_container_git_repo_volume_mount.yaml | 157 ++--------- .../tests/latest/test_container_commands.py | 10 +- 6 files changed, 21 insertions(+), 784 deletions(-) delete mode 100644 src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create.yaml delete mode 100644 src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_acr.yaml delete mode 100644 src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_vnet.yaml 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 ffadc47fbb7..82958ff4631 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 @@ -55,7 +55,7 @@ def validate_subnet(ns): from msrestazure.tools import is_valid_resource_id if not is_valid_resource_id(ns.subnet) and ((ns.vnet and not ns.subnet) or (ns.subnet and not ns.vnet)): - raise CLIError('usage error: --vnet-name NAME --subnet NAME | --subnet ID') + raise CLIError('usage error: --vnet NAME --subnet NAME | --vnet ID --subnet NAME | --subnet ID') def validate_network_profile(cmd, ns): 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 deleted file mode 100644 index 4fc744831ae..00000000000 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create.yaml +++ /dev/null @@ -1,248 +0,0 @@ -interactions: -- request: - body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", - "date": "2018-09-13T21:23:11Z"}}' - 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.17134-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.46] - 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-09-13T21:23:11Z"},"properties":{"provisioningState":"Succeeded"}}'} - headers: - cache-control: [no-cache] - content-length: ['384'] - content-type: [application/json; charset=utf-8] - date: ['Thu, 13 Sep 2018 21:23:12 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1196'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [container create] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.2 (Windows-10-10.0.17134-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.46] - 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-09-13T21:23:11Z"},"properties":{"provisioningState":"Succeeded"}}'} - headers: - cache-control: [no-cache] - content-length: ['384'] - content-type: [application/json; charset=utf-8] - date: ['Thu, 13 Sep 2018 21:23:13 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: 'b''{"location": "westus", "tags": {}, "properties": {"containers": [{"name": - "clicontainer000002", "properties": {"image": "alpine:latest", "command": ["/bin/sh", - "-c", "while true; do echo hello; sleep 20; done"], "ports": [{"protocol": "TCP", - "port": 8000}, {"protocol": "TCP", "port": 8001}], "environmentVariables": [{"name": - "KEY1", "value": "VALUE1"}, {"name": "KEY2", "value": "FOO=BAR="}], "resources": - {"requests": {"memoryInGB": 1.0, "cpu": 1.0}}, "volumeMounts": [{"name": "secrets", - "mountPath": "/s"}]}}], "restartPolicy": "Never", "ipAddress": {"ports": [{"protocol": - "TCP", "port": 8000}, {"protocol": "TCP", "port": 8001}], "type": "Public", - "dnsNameLabel": "clicontainer000002"}, "osType": "Linux", "volumes": [{"name": - "secrets", "secret": {"secret1": "c3VwZXJhd2Vzb21lc2VjcmV0", "secret2": "bm90aGluZyB0byBzZWU="}}]}}''' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [container create] - Connection: [keep-alive] - Content-Length: ['829'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.2 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-containerinstance/1.1.0 Azure-SDK-For-Python - AZURECLI/2.0.46] - 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-09-01 - response: - body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","command":["/bin/sh","-c","while - true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"104.40.1.238","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}],"instanceView":{"state":"Pending"}},"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/0dace47d-1d08-435d-ae35-3239fc2cf682?api-version=2018-06-01'] - cache-control: [no-cache] - content-length: ['1127'] - content-type: [application/json; charset=utf-8] - date: ['Thu, 13 Sep 2018 21:23: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: ['79'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['96'] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [container create] - Connection: [keep-alive] - User-Agent: [python/3.6.2 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-containerinstance/1.1.0 Azure-SDK-For-Python - AZURECLI/2.0.46] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/0dace47d-1d08-435d-ae35-3239fc2cf682?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-09-13T21:23:18.1455044Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-09-13T21:23:23Z","lastTimestamp":"2018-09-13T21:23:23Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-13T21:23:25Z","lastTimestamp":"2018-09-13T21:23:25Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-13T21:23:25Z","lastTimestamp":"2018-09-13T21:23:25Z","name":"Created","message":"Created - container with id 83133fdf5ad4f740c2720eb402e440355bef26697c849d6f84dc6bb24e1c0747","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-13T21:23:25Z","lastTimestamp":"2018-09-13T21:23:25Z","name":"Started","message":"Started - container with id 83133fdf5ad4f740c2720eb402e440355bef26697c849d6f84dc6bb24e1c0747","type":"Normal"}]}}'} - headers: - cache-control: [no-cache] - content-length: ['1113'] - content-type: [application/json; charset=utf-8] - date: ['Thu, 13 Sep 2018 21:23:48 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: ['Accept-Encoding,Accept-Encoding'] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [container create] - Connection: [keep-alive] - User-Agent: [python/3.6.2 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-containerinstance/1.1.0 Azure-SDK-For-Python - AZURECLI/2.0.46] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-09-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-09-13T21:23:25Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-09-13T21:23:23Z","lastTimestamp":"2018-09-13T21:23:23Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-13T21:23:25Z","lastTimestamp":"2018-09-13T21:23:25Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-13T21:23:25Z","lastTimestamp":"2018-09-13T21:23:25Z","name":"Created","message":"Created - container with id 83133fdf5ad4f740c2720eb402e440355bef26697c849d6f84dc6bb24e1c0747","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-13T21:23:25Z","lastTimestamp":"2018-09-13T21:23:25Z","name":"Started","message":"Started - container with id 83133fdf5ad4f740c2720eb402e440355bef26697c849d6f84dc6bb24e1c0747","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"104.40.1.238","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}],"instanceView":{"events":[],"state":"Running"}},"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: ['2075'] - content-type: [application/json; charset=utf-8] - date: ['Thu, 13 Sep 2018 21:23:49 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: ['Accept-Encoding,Accept-Encoding'] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [container show] - Connection: [keep-alive] - User-Agent: [python/3.6.2 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-containerinstance/1.1.0 Azure-SDK-For-Python - AZURECLI/2.0.46] - 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-09-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-09-13T21:23:25Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-09-13T21:23:23Z","lastTimestamp":"2018-09-13T21:23:23Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-13T21:23:25Z","lastTimestamp":"2018-09-13T21:23:25Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-13T21:23:25Z","lastTimestamp":"2018-09-13T21:23:25Z","name":"Created","message":"Created - container with id 83133fdf5ad4f740c2720eb402e440355bef26697c849d6f84dc6bb24e1c0747","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-13T21:23:25Z","lastTimestamp":"2018-09-13T21:23:25Z","name":"Started","message":"Started - container with id 83133fdf5ad4f740c2720eb402e440355bef26697c849d6f84dc6bb24e1c0747","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"104.40.1.238","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}],"instanceView":{"events":[],"state":"Running"}},"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: ['2075'] - content-type: [application/json; charset=utf-8] - date: ['Thu, 13 Sep 2018 21:23:50 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: ['Accept-Encoding,Accept-Encoding'] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [container list] - Connection: [keep-alive] - User-Agent: [python/3.6.2 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-containerinstance/1.1.0 Azure-SDK-For-Python - AZURECLI/2.0.46] - 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-09-01 - response: - body: {string: '{"value":[{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","command":["/bin/sh","-c","while - true; do echo hello; sleep 20; done"],"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"environmentVariables":[{"name":"KEY1","value":"VALUE1"},{"name":"KEY2","value":"FOO=BAR="}],"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"secrets","mountPath":"/s"}]}}],"restartPolicy":"Never","ipAddress":{"ports":[{"protocol":"TCP","port":8000},{"protocol":"TCP","port":8001}],"ip":"104.40.1.238","type":"Public","dnsNameLabel":"clicontainer000002","fqdn":"clicontainer000002.westus.azurecontainer.io"},"osType":"Linux","volumes":[{"name":"secrets","secret":{}}]},"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: ['1106'] - content-type: [application/json; charset=utf-8] - date: ['Thu, 13 Sep 2018 21:23:50 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: ['Accept-Encoding,Accept-Encoding'] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: 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.17134-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.46] - 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, 13 Sep 2018 21:23:51 GMT'] - expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdRQUlQVURETlg1R1NHS1lCNVRWVjNIQVhINUE3UEtYWUhBVXw2OTk2RUQ4MUZCQkY2MjUzLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-deletes: ['14999'] - status: {code: 202, message: Accepted} -version: 1 diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_acr.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_acr.yaml deleted file mode 100644 index 99729351bf2..00000000000 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_acr.yaml +++ /dev/null @@ -1,212 +0,0 @@ -interactions: -- request: - body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", - "date": "2018-09-13T21:23:52Z"}}' - 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.17134-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.46] - 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-09-13T21:23:52Z"},"properties":{"provisioningState":"Succeeded"}}'} - headers: - cache-control: [no-cache] - content-length: ['384'] - content-type: [application/json; charset=utf-8] - date: ['Thu, 13 Sep 2018 21:23:53 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [container create] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.2 (Windows-10-10.0.17134-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.46] - 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-09-13T21:23:52Z"},"properties":{"provisioningState":"Succeeded"}}'} - headers: - cache-control: [no-cache] - content-length: ['384'] - content-type: [application/json; charset=utf-8] - date: ['Thu, 13 Sep 2018 21:23:53 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: 'b''{"location": "westus", "tags": {}, "properties": {"containers": [{"name": - "clicontainer000002", "properties": {"image": "clitestregistry1.azurecr.io/nginx:latest", - "resources": {"requests": {"memoryInGB": 1.5, "cpu": 1.0}}}}], "imageRegistryCredentials": - [{"server": "clitestregistry1.azurecr.io", "username": "clitestregistry1", "password": - "EsYA8DyuSaNv+3HyGyHoiIIafktf0kE6"}], "restartPolicy": "Always", "osType": "Linux"}}''' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [container create] - Connection: [keep-alive] - Content-Length: ['424'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.2 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-containerinstance/1.1.0 Azure-SDK-For-Python - AZURECLI/2.0.46] - 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-09-01 - response: - body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000002","properties":{"image":"clitestregistry1.azurecr.io/nginx:latest","ports":[],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"imageRegistryCredentials":[{"server":"clitestregistry1.azurecr.io","username":"clitestregistry1"}],"restartPolicy":"Always","osType":"Linux","instanceView":{"state":"Pending"}},"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/2bf5e277-bffb-4665-953d-c8001d9f089b?api-version=2018-06-01'] - cache-control: [no-cache] - content-length: ['753'] - content-type: [application/json; charset=utf-8] - date: ['Thu, 13 Sep 2018 21:23:57 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: ['78'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['95'] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [container create] - Connection: [keep-alive] - User-Agent: [python/3.6.2 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-containerinstance/1.1.0 Azure-SDK-For-Python - AZURECLI/2.0.46] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/2bf5e277-bffb-4665-953d-c8001d9f089b?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-09-13T21:23:57.507357Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-09-13T21:24:02Z","lastTimestamp":"2018-09-13T21:24:02Z","name":"Pulling","message":"pulling - image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-13T21:24:10Z","lastTimestamp":"2018-09-13T21:24:10Z","name":"Pulled","message":"Successfully - pulled image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-13T21:24:10Z","lastTimestamp":"2018-09-13T21:24:10Z","name":"Created","message":"Created - container with id 8f8c2258ef446d718b6d1a448c579c77ef58ff40e78ea83146fb307c11d11c09","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-13T21:24:10Z","lastTimestamp":"2018-09-13T21:24:10Z","name":"Started","message":"Started - container with id 8f8c2258ef446d718b6d1a448c579c77ef58ff40e78ea83146fb307c11d11c09","type":"Normal"}]}}'} - headers: - cache-control: [no-cache] - content-length: ['1166'] - content-type: [application/json; charset=utf-8] - date: ['Thu, 13 Sep 2018 21:24:30 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.17134-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-containerinstance/1.1.0 Azure-SDK-For-Python - AZURECLI/2.0.46] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-09-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-09-13T21:24:10Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-09-13T21:24:02Z","lastTimestamp":"2018-09-13T21:24:02Z","name":"Pulling","message":"pulling - image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-13T21:24:10Z","lastTimestamp":"2018-09-13T21:24:10Z","name":"Pulled","message":"Successfully - pulled image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-13T21:24:10Z","lastTimestamp":"2018-09-13T21:24:10Z","name":"Created","message":"Created - container with id 8f8c2258ef446d718b6d1a448c579c77ef58ff40e78ea83146fb307c11d11c09","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-13T21:24:10Z","lastTimestamp":"2018-09-13T21:24:10Z","name":"Started","message":"Started - container with id 8f8c2258ef446d718b6d1a448c579c77ef58ff40e78ea83146fb307c11d11c09","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"}},"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: ['1755'] - content-type: [application/json; charset=utf-8] - date: ['Thu, 13 Sep 2018 21:24:30 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: ['Accept-Encoding,Accept-Encoding'] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [container show] - Connection: [keep-alive] - User-Agent: [python/3.6.2 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-containerinstance/1.1.0 Azure-SDK-For-Python - AZURECLI/2.0.46] - 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-09-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-09-13T21:24:10Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-09-13T21:24:02Z","lastTimestamp":"2018-09-13T21:24:02Z","name":"Pulling","message":"pulling - image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-13T21:24:10Z","lastTimestamp":"2018-09-13T21:24:10Z","name":"Pulled","message":"Successfully - pulled image \"clitestregistry1.azurecr.io/nginx:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-13T21:24:10Z","lastTimestamp":"2018-09-13T21:24:10Z","name":"Created","message":"Created - container with id 8f8c2258ef446d718b6d1a448c579c77ef58ff40e78ea83146fb307c11d11c09","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-13T21:24:10Z","lastTimestamp":"2018-09-13T21:24:10Z","name":"Started","message":"Started - container with id 8f8c2258ef446d718b6d1a448c579c77ef58ff40e78ea83146fb307c11d11c09","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"}},"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: ['1755'] - content-type: [application/json; charset=utf-8] - date: ['Thu, 13 Sep 2018 21:24:30 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: ['Accept-Encoding,Accept-Encoding'] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [group delete] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.2 (Windows-10-10.0.17134-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.46] - 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, 13 Sep 2018 21:24:32 GMT'] - expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdRSEFPSU1KSVRLSExHWFdEN0w3V0dUSDRRS0ZBWkZNSFdPN3wzNkJFMjM0NjBCN0ZDQUNCLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?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 deleted file mode 100644 index b03e47abe20..00000000000 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_vnet.yaml +++ /dev/null @@ -1,176 +0,0 @@ -interactions: -- request: - body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", - "date": "2018-09-13T21:24:32Z"}}' - 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.17134-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.46] - 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-09-13T21:24:32Z"},"properties":{"provisioningState":"Succeeded"}}'} - headers: - cache-control: [no-cache] - content-length: ['384'] - content-type: [application/json; charset=utf-8] - date: ['Thu, 13 Sep 2018 21:24:33 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [container create] - Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.2 (Windows-10-10.0.17134-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.46] - 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-09-13T21:24:32Z"},"properties":{"provisioningState":"Succeeded"}}'} - headers: - cache-control: [no-cache] - content-length: ['384'] - content-type: [application/json; charset=utf-8] - date: ['Thu, 13 Sep 2018 21:24:33 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: 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.17134-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.46] - 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-09-13T21:24:32Z"},"properties":{"provisioningState":"Succeeded"}}'} - headers: - cache-control: [no-cache] - content-length: ['384'] - content-type: [application/json; charset=utf-8] - date: ['Thu, 13 Sep 2018 21:24:33 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: 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.17134-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.46] - 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-09-13T21:24:32Z"},"properties":{"provisioningState":"Succeeded"}}'} - headers: - cache-control: [no-cache] - content-length: ['384'] - content-type: [application/json; charset=utf-8] - date: ['Thu, 13 Sep 2018 21:24:34 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - vary: [Accept-Encoding] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: 'b''b\''b\\\''{"location": "westus", "tags": {}, "properties": {"containers": - [{"name": "clicontainer000002", "properties": {"image": "nginx", "ports": [{"protocol": - "TCP", "port": 80}], "resources": {"requests": {"memoryInGB": 1.5, "cpu": 1.0}}}}], - "restartPolicy": "Always", "ipAddress": {"ports": [{"protocol": "TCP", "port": - 80}], "type": "Private"}, "osType": "Linux", "networkProfile": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkProfiles/nprofile000005"}}}\\\''\''''' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [container create] - Connection: [keep-alive] - Content-Length: ['591'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.2 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-containerinstance/1.1.0 Azure-SDK-For-Python - AZURECLI/2.0.46] - 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-09-01 - response: - body: {string: '{"error":{"code":"NetworkProfileNotFound","message":"Network profile - ''/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkProfiles/nprofile000005'' - is not found for container group ''clicontainer000002''."}}'} - headers: - cache-control: [no-cache] - content-length: ['330'] - content-type: [application/json; charset=utf-8] - date: ['Thu, 13 Sep 2018 21:24:35 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: ['73'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['98'] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] - status: {code: 400, message: Bad Request} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [group delete] - Connection: [keep-alive] - Content-Length: ['0'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.2 (Windows-10-10.0.17134-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.46] - 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, 13 Sep 2018 21:24:36 GMT'] - expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkczNVBKMzY1TEFDRFhGWk1TRDNXVExCN0xXWlNRUTI0UEdJTXxBNkU5NUUzRDhDQUVBQjIzLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-deletes: ['14999'] - status: {code: 202, message: Accepted} -version: 1 diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_git_repo_volume_mount.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_git_repo_volume_mount.yaml index ccc77441304..aef4ec6450a 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-09-13T21:24:36Z"}}' + "date": "2018-10-10T17:10:37Z"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -9,24 +9,24 @@ interactions: Connection: [keep-alive] Content-Length: ['110'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.2 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 + 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.46] + AZURECLI/2.0.48] 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-09-13T21:24:36Z"},"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-10T17:10:37Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Thu, 13 Sep 2018 21:24:37 GMT'] + date: ['Wed, 10 Oct 2018 17:10:41 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 @@ -36,152 +36,25 @@ interactions: CommandName: [container create] Connection: [keep-alive] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.2 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 + 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.46] + AZURECLI/2.0.48] 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-09-13T21:24:36Z"},"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-10T17:10:37Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Thu, 13 Sep 2018 21:24:37 GMT'] + date: ['Wed, 10 Oct 2018 17:10:42 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] vary: [Accept-Encoding] x-content-type-options: [nosniff] status: {code: 200, message: OK} -- request: - body: 'b''{"location": "westus", "tags": {}, "properties": {"containers": [{"name": - "clicontainer000002", "properties": {"image": "nginx", "resources": {"requests": - {"memoryInGB": 1.5, "cpu": 1.0}}, "volumeMounts": [{"name": "gitrepo", "mountPath": - "/src"}]}}], "restartPolicy": "Always", "osType": "Linux", "volumes": [{"name": - "gitrepo", "gitRepo": {"directory": "./test", "repository": "https://github.com/yolo3301/dumb-flow.git", - "revision": "5604f0a8f11bfe13e621418ab6f6a71973e208ce"}}]}}''' - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [container create] - Connection: [keep-alive] - Content-Length: ['481'] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.2 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-containerinstance/1.1.0 Azure-SDK-For-Python - AZURECLI/2.0.46] - 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-09-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"}},"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/2f61535b-a2cc-4320-9fbc-4077a4e1a451?api-version=2018-06-01'] - cache-control: [no-cache] - content-length: ['848'] - content-type: [application/json; charset=utf-8] - date: ['Thu, 13 Sep 2018 21:24:41 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['72'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['97'] - x-ms-ratelimit-remaining-subscription-writes: ['1197'] - status: {code: 201, message: Created} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [container create] - Connection: [keep-alive] - User-Agent: [python/3.6.2 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-containerinstance/1.1.0 Azure-SDK-For-Python - AZURECLI/2.0.46] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/2f61535b-a2cc-4320-9fbc-4077a4e1a451?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-09-13T21:24:41.3360931Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-09-13T21:24:46Z","lastTimestamp":"2018-09-13T21:24:46Z","name":"Pulling","message":"pulling - image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-13T21:24:53Z","lastTimestamp":"2018-09-13T21:24:53Z","name":"Pulled","message":"Successfully - pulled image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-13T21:24:58Z","lastTimestamp":"2018-09-13T21:24:58Z","name":"Created","message":"Created - container","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-13T21:24:59Z","lastTimestamp":"2018-09-13T21:24:59Z","name":"Started","message":"Started - container","type":"Normal"}]}}'} - headers: - cache-control: [no-cache] - content-length: ['951'] - content-type: [application/json; charset=utf-8] - date: ['Thu, 13 Sep 2018 21:25:11 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.17134-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-containerinstance/1.1.0 Azure-SDK-For-Python - AZURECLI/2.0.46] - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-09-01 - response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"nginx","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-09-13T21:24:59Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-09-13T21:24:46Z","lastTimestamp":"2018-09-13T21:24:46Z","name":"Pulling","message":"pulling - image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-13T21:24:53Z","lastTimestamp":"2018-09-13T21:24:53Z","name":"Pulled","message":"Successfully - pulled image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-13T21:24:58Z","lastTimestamp":"2018-09-13T21:24:58Z","name":"Created","message":"Created - container","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-13T21:24:59Z","lastTimestamp":"2018-09-13T21:24:59Z","name":"Started","message":"Started - container","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"}},"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: ['1634'] - content-type: [application/json; charset=utf-8] - date: ['Thu, 13 Sep 2018 21:25:12 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: ['Accept-Encoding,Accept-Encoding'] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} -- request: - body: null - headers: - Accept: [application/json] - Accept-Encoding: ['gzip, deflate'] - CommandName: [container show] - Connection: [keep-alive] - User-Agent: [python/3.6.2 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-containerinstance/1.1.0 Azure-SDK-For-Python - AZURECLI/2.0.46] - 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-09-01 - response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"nginx","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Running","startTime":"2018-09-13T21:24:59Z","detailStatus":""},"events":[{"count":1,"firstTimestamp":"2018-09-13T21:24:46Z","lastTimestamp":"2018-09-13T21:24:46Z","name":"Pulling","message":"pulling - image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-13T21:24:53Z","lastTimestamp":"2018-09-13T21:24:53Z","name":"Pulled","message":"Successfully - pulled image \"nginx\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-13T21:24:58Z","lastTimestamp":"2018-09-13T21:24:58Z","name":"Created","message":"Created - container","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-13T21:24:59Z","lastTimestamp":"2018-09-13T21:24:59Z","name":"Started","message":"Started - container","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"}},"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: ['1634'] - content-type: [application/json; charset=utf-8] - date: ['Thu, 13 Sep 2018 21:25:12 GMT'] - expires: ['-1'] - pragma: [no-cache] - strict-transport-security: [max-age=31536000; includeSubDomains] - transfer-encoding: [chunked] - vary: ['Accept-Encoding,Accept-Encoding'] - x-content-type-options: [nosniff] - status: {code: 200, message: OK} - request: body: null headers: @@ -191,9 +64,9 @@ interactions: Connection: [keep-alive] Content-Length: ['0'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.2 (Windows-10-10.0.17134-SP0) requests/2.19.1 msrest/0.5.5 + 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.46] + AZURECLI/2.0.48] 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,12 +75,12 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Thu, 13 Sep 2018 21:25:14 GMT'] + date: ['Wed, 10 Oct 2018 17:10:47 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdHRlpGS1NHSktOQkZXRjdBNE5DUTNCRFNUMlZSQk9QSU9PWHxCQkYwQ0MwM0E2MTkxQkRFLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdBN1BVMklFVVNSWk4yVjVUTUFYTUZQTDNVMjJFSko2RFNKTXwzMzMyQjdBOUQwOUNCMkUzLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-deletes: ['14998'] + x-ms-ratelimit-remaining-subscription-deletes: ['14999'] status: {code: 202, message: Accepted} version: 1 diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/test_container_commands.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/test_container_commands.py index b64a802aaf3..83ecf139d72 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 @@ -125,7 +125,7 @@ def test_container_create_with_acr(self, resource_group, resource_group_location registry_username = 'clitestregistry1' registry_server = '{}.azurecr.io'.format(registry_username) image = '{}/nginx:latest'.format(registry_server) - password = 'EsYA8DyuSaNv+3HyGyHoiIIafktf0kE6' + password = '5+36OCtbIwfy8g5glC4bQQrFsfmMc3iD' self.kwargs.update({ 'container_group_name': container_group_name, @@ -182,18 +182,18 @@ def test_container_create_with_vnet(self, resource_group, resource_group_locatio self.kwargs.update({ 'container_group_name': container_group_name, 'resource_group_location': resource_group_location, - 'vnet_name': vnet_name, + 'vnet': vnet_name, 'subnet_name': subnet_name, 'network_profile_name': network_profile_name, 'network_profile_id': network_profile_id }) # Vnet name with no subnet - with self.assertRaisesRegexp(CLIError, "usage error: --vnet-name NAME --subnet NAME | --subnet ID"): - self.cmd('container create -g {rg} -n {container_group_name} --image nginx --vnet-name {vnet_name}') + with self.assertRaisesRegexp(CLIError, "usage error: --vnet NAME --subnet NAME | --vnet ID --subnet NAME | --subnet ID"): + self.cmd('container create -g {rg} -n {container_group_name} --image nginx --vnet {vnet_name}') # Subnet name with no vnet name - with self.assertRaisesRegexp(CLIError, "usage error: --vnet-name NAME --subnet NAME | --subnet ID"): + with self.assertRaisesRegexp(CLIError, "usage error: --vnet NAME --subnet NAME | --vnet ID --subnet NAME | --subnet ID"): self.cmd('container create -g {rg} -n {container_group_name} --image nginx ' '--subnet {subnet_name} ') From a4347bd17c205fd3c2819749520c45b5380113e5 Mon Sep 17 00:00:00 2001 From: sakreter Date: Wed, 10 Oct 2018 11:07:41 -0700 Subject: [PATCH 10/17] updating tests recordings --- .../recordings/test_container_create.yaml | 248 ++++++++++++++++++ .../test_container_create_with_acr.yaml | 212 +++++++++++++++ .../test_container_create_with_msi.yaml | 210 +++++++-------- .../test_container_create_with_vnet.yaml | 176 +++++++++++++ .../test_container_git_repo_volume_mount.yaml | 213 +++++++++++++++ .../tests/latest/test_container_commands.py | 2 +- 6 files changed, 955 insertions(+), 106 deletions(-) create mode 100644 src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create.yaml create mode 100644 src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_acr.yaml create mode 100644 src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_vnet.yaml create mode 100644 src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_git_repo_volume_mount.yaml diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create.yaml new file mode 100644 index 00000000000..2d67d50a01a --- /dev/null +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create.yaml @@ -0,0 +1,248 @@ +interactions: +- request: + body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", + "date": "2018-10-10T18:02:58Z"}}' + 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.48] + 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"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 10 Oct 2018 18:03:01 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.48] + 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"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 10 Oct 2018 18:03:01 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: 'b''{"location": "westus", "tags": {}, "properties": {"containers": [{"name": + "clicontainer000002", "properties": {"image": "alpine:latest", "command": ["/bin/sh", + "-c", "while true; do echo hello; sleep 20; done"], "ports": [{"protocol": "TCP", + "port": 8000}, {"protocol": "TCP", "port": 8001}], "environmentVariables": [{"name": + "KEY1", "value": "VALUE1"}, {"name": "KEY2", "value": "FOO=BAR="}], "resources": + {"requests": {"memoryInGB": 1.0, "cpu": 1.0}}, "volumeMounts": [{"name": "secrets", + "mountPath": "/s"}]}}], "restartPolicy": "Never", "ipAddress": {"ports": [{"protocol": + "TCP", "port": 8000}, {"protocol": "TCP", "port": 8001}], "type": "Public", + "dnsNameLabel": "clicontainer000002"}, "osType": "Linux", "volumes": [{"name": + "secrets", "secret": {"secret1": "c3VwZXJhd2Vzb21lc2VjcmV0", "secret2": "bm90aGluZyB0byBzZWU="}}]}}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Length: ['829'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.48] + 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":{}}'} + 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'] + cache-control: [no-cache] + content-length: ['1259'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 10 Oct 2018 18:03:09 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: ['1199'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.48] + 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 + 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"}]}}'} + headers: + cache-control: [no-cache] + content-length: ['1113'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 10 Oct 2018 18:03:40 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container 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.48] + 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":{}}'} + headers: + cache-control: [no-cache] + content-length: ['2103'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 10 Oct 2018 18:03:40 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container show] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.48] + 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":{}}'} + headers: + cache-control: [no-cache] + content-length: ['2103'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 10 Oct 2018 18:03:41 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container list] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.48] + 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":{}}]}'} + headers: + cache-control: [no-cache] + content-length: ['1134'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 10 Oct 2018 18:03:41 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.48] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 10 Oct 2018 18:03:42 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdGV1UyWFlOWEJRNTVLVk1UN0dQRk1LSURJQ0kySzY0MzdCUHw2NTAxOUFEMTNGQ0VBMDJELVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-deletes: ['14999'] + status: {code: 202, message: Accepted} +version: 1 diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_acr.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_acr.yaml new file mode 100644 index 00000000000..4d78282f4e1 --- /dev/null +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_acr.yaml @@ -0,0 +1,212 @@ +interactions: +- request: + body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", + "date": "2018-10-10T18:03:43Z"}}' + 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.48] + 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"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 10 Oct 2018 18:03:44 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.48] + 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"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 10 Oct 2018 18:03:44 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: 'b''{"location": "westus", "tags": {}, "properties": {"containers": [{"name": + "clicontainer000002", "properties": {"image": "clitestregistry1.azurecr.io/nginx:latest", + "resources": {"requests": {"memoryInGB": 1.5, "cpu": 1.0}}}}], "imageRegistryCredentials": + [{"server": "clitestregistry1.azurecr.io", "username": "clitestregistry1", "password": + "5+36OCtbIwfy8g5glC4bQQrFsfmMc3iD"}], "restartPolicy": "Always", "osType": "Linux"}}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Length: ['424'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.48] + 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":{}}'} + 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'] + cache-control: [no-cache] + content-length: ['884'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 10 Oct 2018 18:03:46 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: ['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.48] + 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 + 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"}]}}'} + headers: + cache-control: [no-cache] + content-length: ['1167'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 10 Oct 2018 18:04:17 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.48] + 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":{}}'} + headers: + cache-control: [no-cache] + content-length: ['1782'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 10 Oct 2018 18:04:17 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container show] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.48] + 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":{}}'} + headers: + cache-control: [no-cache] + content-length: ['1782'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 10 Oct 2018 18:04: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: [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.48] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 10 Oct 2018 18:04:19 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdHVFBBSDUzUlZFV1EzQzRBQVQzTVhCMkZURE1MTFFXUE1CSHxCQzM5NjFBQjFGNEU2RTlCLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-deletes: ['14999'] + status: {code: 202, message: Accepted} +version: 1 diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_msi.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_msi.yaml index c596d3ddcb9..b7de51542de 100644 --- a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_msi.yaml +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_msi.yaml @@ -1,7 +1,7 @@ interactions: - request: body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", - "date": "2018-10-09T22:15:39Z"}}' + "date": "2018-10-10T18:04:20Z"}}' headers: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] @@ -11,22 +11,22 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.48] accept-language: [en-US] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-09T22:15:39Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-10T18:04:20Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:15:40 GMT'] + date: ['Wed, 10 Oct 2018 18:04:20 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} - request: body: null @@ -38,17 +38,17 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.48] accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-09T22:15:39Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-10T18:04:20Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:15:41 GMT'] + date: ['Wed, 10 Oct 2018 18:04:22 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -65,17 +65,17 @@ interactions: Content-Length: ['22'] Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 - msrest_azure/0.4.34 azure-mgmt-msi/0.2.0 Azure-SDK-For-Python AZURECLI/2.0.47] + msrest_azure/0.4.34 azure-mgmt-msi/0.2.0 Azure-SDK-For-Python AZURECLI/2.0.48] accept-language: [en-US] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005?api-version=2015-08-31-preview response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005","name":"cliaciidentity000005","type":"Microsoft.ManagedIdentity/userAssignedIdentities","location":"westus","tags":{},"properties":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","principalId":"4bcbb5c3-4c15-48de-9442-adbd32ad93ed","clientId":"2aa393be-8bfb-430b-a4b9-a0bb403649a6","clientSecretUrl":"https://control-westus.identity.azure.net/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005/credentials?tid=72f988bf-86f1-41af-91ab-2d7cd011db47&oid=4bcbb5c3-4c15-48de-9442-adbd32ad93ed&aid=2aa393be-8bfb-430b-a4b9-a0bb403649a6"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005","name":"cliaciidentity000005","type":"Microsoft.ManagedIdentity/userAssignedIdentities","location":"westus","tags":{},"properties":{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","principalId":"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"}}'} headers: cache-control: [no-cache] content-length: ['936'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:15:43 GMT'] + date: ['Wed, 10 Oct 2018 18:04:24 GMT'] expires: ['-1'] location: [/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005] pragma: [no-cache] @@ -94,17 +94,17 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.48] accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-09T22:15:39Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-10T18:04:20Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:15:44 GMT'] + date: ['Wed, 10 Oct 2018 18:04:24 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -126,23 +126,23 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.48] accept-language: [en-US] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"168.61.17.91","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"principalId":"f414fa19-31b8-46f8-843e-f73bc7b11fa9","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"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":{}}'} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/a72f504f-a8fc-42b4-b11b-c78daa4ae314?api-version=2018-06-01'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/9c003a7f-a538-4bc5-ac16-7a448ff45db5?api-version=2018-06-01'] cache-control: [no-cache] - content-length: ['883'] + content-length: ['884'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:15:52 GMT'] + date: ['Wed, 10 Oct 2018 18:04:33 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['83'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['75'] x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['97'] x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} @@ -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.47] + AZURECLI/2.0.48] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/a72f504f-a8fc-42b4-b11b-c78daa4ae314?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/9c003a7f-a538-4bc5-ac16-7a448ff45db5?api-version=2018-06-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-09T22:15:52.5521865Z","properties":{"events":[{"count":2,"firstTimestamp":"2018-10-09T22:16:01Z","lastTimestamp":"2018-10-09T22:16:04Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-09T22:16:03Z","lastTimestamp":"2018-10-09T22:16:06Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:16:03Z","lastTimestamp":"2018-10-09T22:16:03Z","name":"Created","message":"Created - container with id 2315021daba9de086e853ad04497bb2da32ef27d47678746495960c7f0e00061","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:16:04Z","lastTimestamp":"2018-10-09T22:16:04Z","name":"Started","message":"Started - container with id 2315021daba9de086e853ad04497bb2da32ef27d47678746495960c7f0e00061","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:16:06Z","lastTimestamp":"2018-10-09T22:16:06Z","name":"Created","message":"Created - container with id 7b10e0a6cf311667580ab8436520ac555501a0d1c186ec5e4a9f1e2ef1a36076","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:16:06Z","lastTimestamp":"2018-10-09T22:16:06Z","name":"Started","message":"Started - container with id 7b10e0a6cf311667580ab8436520ac555501a0d1c186ec5e4a9f1e2ef1a36076","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:16:07Z","lastTimestamp":"2018-10-09T22:16:07Z","name":"BackOff","message":"Back-off + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","status":"Succeeded","startTime":"2018-10-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 restarting failed container","type":"Warning"}]}}'} headers: cache-control: [no-cache] content-length: ['1741'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:16:22 GMT'] + date: ['Wed, 10 Oct 2018 18:05:03 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.47] + AZURECLI/2.0.48] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":2,"currentState":{"state":"Terminated","startTime":"2018-10-09T22:16:21Z","exitCode":0,"finishTime":"2018-10-09T22:16:21Z","detailStatus":"Completed"},"previousState":{"state":"Terminated","startTime":"2018-10-09T22:16:06Z","exitCode":0,"finishTime":"2018-10-09T22:16:06Z","detailStatus":"Completed"},"events":[{"count":3,"firstTimestamp":"2018-10-09T22:16:01Z","lastTimestamp":"2018-10-09T22:16:20Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-09T22:16:03Z","lastTimestamp":"2018-10-09T22:16:21Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:16:03Z","lastTimestamp":"2018-10-09T22:16:03Z","name":"Created","message":"Created - container with id 2315021daba9de086e853ad04497bb2da32ef27d47678746495960c7f0e00061","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:16:04Z","lastTimestamp":"2018-10-09T22:16:04Z","name":"Started","message":"Started - container with id 2315021daba9de086e853ad04497bb2da32ef27d47678746495960c7f0e00061","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:16:06Z","lastTimestamp":"2018-10-09T22:16:06Z","name":"Created","message":"Created - container with id 7b10e0a6cf311667580ab8436520ac555501a0d1c186ec5e4a9f1e2ef1a36076","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:16:06Z","lastTimestamp":"2018-10-09T22:16:06Z","name":"Started","message":"Started - container with id 7b10e0a6cf311667580ab8436520ac555501a0d1c186ec5e4a9f1e2ef1a36076","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-09T22:16:07Z","lastTimestamp":"2018-10-09T22:16:22Z","name":"BackOff","message":"Back-off - restarting failed container","type":"Warning"},{"count":1,"firstTimestamp":"2018-10-09T22:16:21Z","lastTimestamp":"2018-10-09T22:16:21Z","name":"Created","message":"Created - container with id a2cd1ce17a021c308314929b85fbbd1026de165f3e484d66477504a1625bc063","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:16:21Z","lastTimestamp":"2018-10-09T22:16:21Z","name":"Started","message":"Started - container with id a2cd1ce17a021c308314929b85fbbd1026de165f3e484d66477504a1625bc063","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"168.61.17.91","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Succeeded"}},"identity":{"principalId":"f414fa19-31b8-46f8-843e-f73bc7b11fa9","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002","name":"clicontainer000002","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000002","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":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":{}}'} headers: cache-control: [no-cache] - content-length: ['3126'] + content-length: ['3127'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:16:23 GMT'] + date: ['Wed, 10 Oct 2018 18:05:02 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.47] + AZURECLI/2.0.48] accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-09T22:15:39Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-10T18:04:20Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:16:25 GMT'] + date: ['Wed, 10 Oct 2018 18:05:04 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -258,23 +258,23 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.48] accept-language: [en-US] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000003","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.158.129","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005":{"principalId":"4bcbb5c3-4c15-48de-9442-adbd32ad93ed","clientId":"2aa393be-8bfb-430b-a4b9-a0bb403649a6"}},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"UserAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003","name":"clicontainer000003","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000003","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.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":{}}'} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/65687022-7cd1-47e0-be42-199356b4194d?api-version=2018-06-01'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/6c39b240-2067-41e1-bb3f-998756392843?api-version=2018-06-01'] cache-control: [no-cache] - content-length: ['1187'] + content-length: ['1186'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:16:31 GMT'] + date: ['Wed, 10 Oct 2018 18:05:10 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['82'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['75'] x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['96'] x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} @@ -287,20 +287,20 @@ interactions: Connection: [keep-alive] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.48] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/65687022-7cd1-47e0-be42-199356b4194d?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/6c39b240-2067-41e1-bb3f-998756392843?api-version=2018-06-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003","status":"Succeeded","startTime":"2018-10-09T22:16:31.0498322Z","properties":{"events":[{"count":2,"firstTimestamp":"2018-10-09T22:16:36Z","lastTimestamp":"2018-10-09T22:16:41Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-09T22:16:39Z","lastTimestamp":"2018-10-09T22:16:42Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:16:40Z","lastTimestamp":"2018-10-09T22:16:40Z","name":"Created","message":"Created - container","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:16:40Z","lastTimestamp":"2018-10-09T22:16:40Z","name":"Started","message":"Started + 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"}]}}'} headers: cache-control: [no-cache] content-length: ['967'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:17:00 GMT'] + date: ['Wed, 10 Oct 2018 18:05:42 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -317,21 +317,21 @@ interactions: Connection: [keep-alive] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.48] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000003","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":2,"currentState":{"state":"Terminated","startTime":"2018-10-09T22:16:59Z","exitCode":0,"finishTime":"2018-10-09T22:16:59Z","detailStatus":"Completed"},"previousState":{"state":"Terminated","startTime":"2018-10-09T22:16:43Z","exitCode":0,"finishTime":"2018-10-09T22:16:43Z","detailStatus":"Completed"},"events":[{"count":3,"firstTimestamp":"2018-10-09T22:16:36Z","lastTimestamp":"2018-10-09T22:16:57Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-09T22:16:39Z","lastTimestamp":"2018-10-09T22:16:59Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-09T22:16:40Z","lastTimestamp":"2018-10-09T22:16:59Z","name":"Created","message":"Created - container","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-09T22:16:40Z","lastTimestamp":"2018-10-09T22:16:59Z","name":"Started","message":"Started - container","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-09T22:16:44Z","lastTimestamp":"2018-10-09T22:17:00Z","name":"BackOff","message":"Back-off - restarting failed container","type":"Warning"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"104.42.158.129","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Succeeded"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005":{"principalId":"4bcbb5c3-4c15-48de-9442-adbd32ad93ed","clientId":"2aa393be-8bfb-430b-a4b9-a0bb403649a6"}},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"UserAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000003","name":"clicontainer000003","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000003","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":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":{}}'} headers: cache-control: [no-cache] - content-length: ['2376'] + content-length: ['2375'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:17:01 GMT'] + date: ['Wed, 10 Oct 2018 18:05:43 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -349,17 +349,17 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.48] accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-09T22:15:39Z"},"properties":{"provisioningState":"Succeeded"}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001","name":"clitest.rg000001","location":"westus","tags":{"product":"azurecli","cause":"automation","date":"2018-10-10T18:04:20Z"},"properties":{"provisioningState":"Succeeded"}}'} headers: cache-control: [no-cache] content-length: ['384'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:17:02 GMT'] + date: ['Wed, 10 Oct 2018 18:05:43 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -383,26 +383,26 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.48] accept-language: [en-US] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000004","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"168.62.30.231","type":"Public"},"osType":"Linux","instanceView":{"state":"Pending"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005":{"principalId":"4bcbb5c3-4c15-48de-9442-adbd32ad93ed","clientId":"2aa393be-8bfb-430b-a4b9-a0bb403649a6"}},"principalId":"4c5d4ae7-5df6-4e4c-ae36-156b86ffe299","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned, + body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"clicontainer000004","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"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, UserAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004","name":"clicontainer000004","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/729a82bd-3ab7-46e0-81ee-653b788f956e?api-version=2018-06-01'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/437a3177-526b-47e1-a6b5-a37180d3986f?api-version=2018-06-01'] cache-control: [no-cache] - content-length: ['1255'] + content-length: ['1360'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:17:07 GMT'] + date: ['Wed, 10 Oct 2018 18:05:48 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['81'] - x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['96'] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['74'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['95'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 201, message: Created} - request: body: null @@ -413,23 +413,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.47] + AZURECLI/2.0.48] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/729a82bd-3ab7-46e0-81ee-653b788f956e?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/437a3177-526b-47e1-a6b5-a37180d3986f?api-version=2018-06-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004","status":"Succeeded","startTime":"2018-10-09T22:17:08.1276975Z","properties":{"events":[{"count":2,"firstTimestamp":"2018-10-09T22:17:10Z","lastTimestamp":"2018-10-09T22:17:13Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":2,"firstTimestamp":"2018-10-09T22:17:12Z","lastTimestamp":"2018-10-09T22:17:15Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:17:12Z","lastTimestamp":"2018-10-09T22:17:12Z","name":"Created","message":"Created - container with id f829375aa405870520f30df8c9a67020b6058f47c4b9e3291089ff6068a65c01","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:17:12Z","lastTimestamp":"2018-10-09T22:17:12Z","name":"Started","message":"Started - container with id f829375aa405870520f30df8c9a67020b6058f47c4b9e3291089ff6068a65c01","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:17:15Z","lastTimestamp":"2018-10-09T22:17:15Z","name":"Created","message":"Created - container with id 069d13b8cd2ec948e04332cc64a7cc66afdb8e13994eb471afc1cbac9d09c37b","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:17:15Z","lastTimestamp":"2018-10-09T22:17:15Z","name":"Started","message":"Started - container with id 069d13b8cd2ec948e04332cc64a7cc66afdb8e13994eb471afc1cbac9d09c37b","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:17:15Z","lastTimestamp":"2018-10-09T22:17:15Z","name":"BackOff","message":"Back-off + 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 restarting failed container","type":"Warning"}]}}'} headers: cache-control: [no-cache] content-length: ['1741'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:17:38 GMT'] + date: ['Wed, 10 Oct 2018 18:06:18 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -446,26 +446,26 @@ interactions: Connection: [keep-alive] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.48] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004?api-version=2018-10-01 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000004","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":2,"currentState":{"state":"Terminated","startTime":"2018-10-09T22:17:33Z","exitCode":0,"finishTime":"2018-10-09T22:17:33Z","detailStatus":"Completed"},"previousState":{"state":"Terminated","startTime":"2018-10-09T22:17:15Z","exitCode":0,"finishTime":"2018-10-09T22:17:15Z","detailStatus":"Completed"},"events":[{"count":3,"firstTimestamp":"2018-10-09T22:17:10Z","lastTimestamp":"2018-10-09T22:17:32Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-09T22:17:12Z","lastTimestamp":"2018-10-09T22:17:33Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:17:12Z","lastTimestamp":"2018-10-09T22:17:12Z","name":"Created","message":"Created - container with id f829375aa405870520f30df8c9a67020b6058f47c4b9e3291089ff6068a65c01","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:17:12Z","lastTimestamp":"2018-10-09T22:17:12Z","name":"Started","message":"Started - container with id f829375aa405870520f30df8c9a67020b6058f47c4b9e3291089ff6068a65c01","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:17:15Z","lastTimestamp":"2018-10-09T22:17:15Z","name":"Created","message":"Created - container with id 069d13b8cd2ec948e04332cc64a7cc66afdb8e13994eb471afc1cbac9d09c37b","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:17:15Z","lastTimestamp":"2018-10-09T22:17:15Z","name":"Started","message":"Started - container with id 069d13b8cd2ec948e04332cc64a7cc66afdb8e13994eb471afc1cbac9d09c37b","type":"Normal"},{"count":3,"firstTimestamp":"2018-10-09T22:17:15Z","lastTimestamp":"2018-10-09T22:17:34Z","name":"BackOff","message":"Back-off - restarting failed container","type":"Warning"},{"count":1,"firstTimestamp":"2018-10-09T22:17:33Z","lastTimestamp":"2018-10-09T22:17:33Z","name":"Created","message":"Created - container with id e8bdc0ec5dc10115c214ae1b204c4c6280333b656ed0c802a9f15c3810728e1d","type":"Normal"},{"count":1,"firstTimestamp":"2018-10-09T22:17:33Z","lastTimestamp":"2018-10-09T22:17:33Z","name":"Started","message":"Started - container with id e8bdc0ec5dc10115c214ae1b204c4c6280333b656ed0c802a9f15c3810728e1d","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.5,"cpu":1.0}}}}],"restartPolicy":"Always","ipAddress":{"ports":[{"protocol":"TCP","port":80}],"ip":"168.62.30.231","type":"Public"},"osType":"Linux","instanceView":{"events":[],"state":"Succeeded"}},"identity":{"userAssignedIdentities":{"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001/providers/Microsoft.ManagedIdentity/userAssignedIdentities/cliaciidentity000005":{"principalId":"4bcbb5c3-4c15-48de-9442-adbd32ad93ed","clientId":"2aa393be-8bfb-430b-a4b9-a0bb403649a6"}},"principalId":"4c5d4ae7-5df6-4e4c-ae36-156b86ffe299","tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","type":"SystemAssigned, + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"clicontainer000004","properties":{"image":"alpine:latest","ports":[{"protocol":"TCP","port":80}],"environmentVariables":[],"instanceView":{"restartCount":2,"currentState":{"state":"Terminated","startTime":"2018-10-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, UserAssigned"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000004","name":"clicontainer000004","type":"Microsoft.ContainerInstance/containerGroups","location":"westus","tags":{}}'} headers: cache-control: [no-cache] - content-length: ['3498'] + content-length: ['3499'] content-type: [application/json; charset=utf-8] - date: ['Tue, 09 Oct 2018 22:17:38 GMT'] + date: ['Wed, 10 Oct 2018 18:06:19 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -484,7 +484,7 @@ interactions: Content-Type: [application/json; charset=utf-8] User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python - AZURECLI/2.0.47] + AZURECLI/2.0.48] 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 +493,9 @@ interactions: headers: cache-control: [no-cache] content-length: ['0'] - date: ['Tue, 09 Oct 2018 22:17:39 GMT'] + date: ['Wed, 10 Oct 2018 18:06:20 GMT'] expires: ['-1'] - location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkcyRUZWREtUT0ZGU05OU0xWUlBSQU9CSURPTUJOUENDQ0JTQXxDRDU2M0U5QjU1RTdEQzAzLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdDVk43Q1VMQVRIUE5CMkZGUTY2SUdTNkVRVEVWMjJNSFRKSnxCQjc4QTVBQTE0ODFBN0Q3LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?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_vnet.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_vnet.yaml new file mode 100644 index 00000000000..a3124642e82 --- /dev/null +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_create_with_vnet.yaml @@ -0,0 +1,176 @@ +interactions: +- request: + body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", + "date": "2018-10-10T18:06:21Z"}}' + 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.48] + 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"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 10 Oct 2018 18:06:22 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.48] + 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"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 10 Oct 2018 18:06:22 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.48] + 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"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 10 Oct 2018 18:06:22 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.48] + 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"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 10 Oct 2018 18:06:22 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: 'b''b\''b\\\''{"location": "westus", "tags": {}, "properties": {"containers": + [{"name": "clicontainer000002", "properties": {"image": "nginx", "ports": [{"protocol": + "TCP", "port": 80}], "resources": {"requests": {"memoryInGB": 1.5, "cpu": 1.0}}}}], + "restartPolicy": "Always", "ipAddress": {"ports": [{"protocol": "TCP", "port": + 80}], "type": "Private"}, "osType": "Linux", "networkProfile": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkProfiles/nprofile000005"}}}\\\''\''''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Length: ['591'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.48] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.ContainerInstance/containerGroups/clicontainer000002?api-version=2018-10-01 + response: + body: {string: '{"error":{"code":"NetworkProfileNotFound","message":"Network profile + ''/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg000001/providers/Microsoft.Network/networkProfiles/nprofile000005'' + is not found for container group ''clicontainer000002''."}}'} + headers: + cache-control: [no-cache] + content-length: ['330'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 10 Oct 2018 18:06:25 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'] + status: {code: 400, message: Bad Request} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.48] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 10 Oct 2018 18:06:25 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdQSVc0SEdIQ1VVNUE0SUNIWDZXTUU2NlZBVVg1TkdXNE5CVnxENkFDRkMwQUNGMjY2RjkxLVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-deletes: ['14999'] + status: {code: 202, message: Accepted} +version: 1 diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_git_repo_volume_mount.yaml b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_git_repo_volume_mount.yaml new file mode 100644 index 00000000000..65079c1928c --- /dev/null +++ b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/recordings/test_container_git_repo_volume_mount.yaml @@ -0,0 +1,213 @@ +interactions: +- request: + body: '{"location": "westus", "tags": {"product": "azurecli", "cause": "automation", + "date": "2018-10-10T18:06:26Z"}}' + 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.48] + 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"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 10 Oct 2018 18:06:26 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.48] + 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"}}'} + headers: + cache-control: [no-cache] + content-length: ['384'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 10 Oct 2018 18:06:26 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: 'b''{"location": "westus", "tags": {}, "properties": {"containers": [{"name": + "clicontainer000002", "properties": {"image": "nginx", "resources": {"requests": + {"memoryInGB": 1.5, "cpu": 1.0}}, "volumeMounts": [{"name": "gitrepo", "mountPath": + "/src"}]}}], "restartPolicy": "Always", "osType": "Linux", "volumes": [{"name": + "gitrepo", "gitRepo": {"directory": "./test", "repository": "https://github.com/yolo3301/dumb-flow.git", + "revision": "5604f0a8f11bfe13e621418ab6f6a71973e208ce"}}]}}''' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + Content-Length: ['481'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.48] + 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'] + cache-control: [no-cache] + content-length: ['875'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 10 Oct 2018 18:06:34 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['76'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['98'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 201, message: Created} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container create] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.48] + 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 + 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"}]}}'} + headers: + cache-control: [no-cache] + content-length: ['1097'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 10 Oct 2018 18:07:04 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.48] + 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":{}}'} + headers: + cache-control: [no-cache] + content-length: ['1807'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 10 Oct 2018 18:07:05 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [container show] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.2.0 Azure-SDK-For-Python + AZURECLI/2.0.48] + 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":{}}'} + headers: + cache-control: [no-cache] + content-length: ['1807'] + content-type: [application/json; charset=utf-8] + date: ['Wed, 10 Oct 2018 18:07:06 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: ['Accept-Encoding,Accept-Encoding'] + x-content-type-options: [nosniff] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + CommandName: [group delete] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/3.6.2 (Windows-10-10.0.17763-SP0) requests/2.19.1 msrest/0.5.5 + msrest_azure/0.4.34 resourcemanagementclient/2.0.0 Azure-SDK-For-Python + AZURECLI/2.0.48] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/clitest.rg000001?api-version=2018-05-01 + response: + body: {string: ''} + headers: + cache-control: [no-cache] + content-length: ['0'] + date: ['Wed, 10 Oct 2018 18:07:06 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTElURVNUOjJFUkdGSkxRVUNLSUtESFlFUFBVV1pGWkhBNlZYN0dHUUszNVJBWHxENTJGRTFCMzEzNEE3MDM2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?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/test_container_commands.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/tests/latest/test_container_commands.py index 54e0340aadc..279baec1e4f 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 @@ -245,7 +245,7 @@ def test_container_create_with_vnet(self, resource_group, resource_group_locatio self.kwargs.update({ 'container_group_name': container_group_name, 'resource_group_location': resource_group_location, - 'vnet': vnet_name, + 'vnet_name': vnet_name, 'subnet_name': subnet_name, 'network_profile_name': network_profile_name, 'network_profile_id': network_profile_id From c79f51944ef5d933c369fddb989e7f7dc28b7472 Mon Sep 17 00:00:00 2001 From: sakreter Date: Mon, 15 Oct 2018 10:22:29 -0700 Subject: [PATCH 11/17] Removing the ability to create VNET by passing the resource ID --- .../azure/cli/command_modules/container/custom.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py index 777451ddb1f..f110c981604 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 @@ -269,6 +269,7 @@ def _get_vnet_network_profile(cmd, location, resource_group_name, vnet, vnet_add parsed_vnet_id = parse_resource_id(vnet) vnet_name = parsed_vnet_id['resource_name'] resource_group_name = parsed_vnet_id['resource_group'] + ncf.virtual_networks.get(resource_group_name, vnet_name) default_network_profile_name = "aci-network-profile-{}-{}".format(vnet_name, subnet_name) From 57639806d27aad80c475bd617a2c9f6fec398529 Mon Sep 17 00:00:00 2001 From: sakreter Date: Mon, 15 Oct 2018 14:06:04 -0700 Subject: [PATCH 12/17] adding --vnet-name back for backwards compatability --- .../azure/cli/command_modules/container/_params.py | 2 ++ .../azure/cli/command_modules/container/_validators.py | 7 +++++++ .../azure/cli/command_modules/container/custom.py | 1 + 3 files changed, 10 insertions(+) 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 afddf3d6bc1..716da7a0881 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 @@ -83,6 +83,8 @@ def load_arguments(self, _): with self.argument_context('container create', arg_group='Network') as c: c.argument('network_profile', network_profile_type) c.argument('vnet', help='The name of the VNET when creating a new one or referencing an existing one. Can also reference an existing subnet by ID. This allows using vnets from other resource groups.') + c.argument('vnet_name', help='The name of the VNET when creating a new one or referencing an existing one.', + deprecate_info=c.deprecate(redirect="--vnet", hide="0.3.5")) c.argument('vnet_address_prefix', help='The IP address prefix to use when creating a new VNET in CIDR format.') c.argument('subnet', options_list=['--subnet'], validator=validate_subnet, help='The name of the subnet when creating a new VNET or referencing an existing one. Can also reference an existing subnet by ID.') c.argument('subnet_address_prefix', help='The subnet IP address prefix to use when creating a new VNET in CIDR format.') 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 82958ff4631..c6968a17708 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 @@ -54,6 +54,13 @@ def validate_image(ns): def validate_subnet(ns): from msrestazure.tools import is_valid_resource_id + # vnet_name is depricated, using for backwards compatability + if ns.vnet_name and not ns.vnet: + ns.vnet = ns.vnet_name + print(ns.vnet_name) + print(ns.vnet) + print(ns) + if not is_valid_resource_id(ns.subnet) and ((ns.vnet and not ns.subnet) or (ns.subnet and not ns.vnet)): raise CLIError('usage error: --vnet NAME --subnet NAME | --vnet ID --subnet NAME | --subnet 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 f110c981604..9499af1301e 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 @@ -92,6 +92,7 @@ def create_container(cmd, log_analytics_workspace=None, log_analytics_workspace_key=None, vnet=None, + vnet_name=None, vnet_address_prefix='10.0.0.0/16', subnet=None, subnet_address_prefix='10.0.0.0/24', From b7db5b134038bf526ef18ae47fd24062238b306a Mon Sep 17 00:00:00 2001 From: sakreter Date: Tue, 16 Oct 2018 15:05:21 -0700 Subject: [PATCH 13/17] Fixing based on feedback --- .../azure/cli/command_modules/container/_params.py | 2 +- .../azure/cli/command_modules/container/_validators.py | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) 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 716da7a0881..bc49d3793fa 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 @@ -82,7 +82,7 @@ def load_arguments(self, _): with self.argument_context('container create', arg_group='Network') as c: c.argument('network_profile', network_profile_type) - c.argument('vnet', help='The name of the VNET when creating a new one or referencing an existing one. Can also reference an existing subnet by ID. This allows using vnets from other resource groups.') + c.argument('vnet', help='The name of the VNET when creating a new one or referencing an existing one. Can also reference an existing vnet by ID. This allows using vnets from other resource groups.') c.argument('vnet_name', help='The name of the VNET when creating a new one or referencing an existing one.', deprecate_info=c.deprecate(redirect="--vnet", hide="0.3.5")) c.argument('vnet_address_prefix', help='The IP address prefix to use when creating a new VNET in CIDR format.') 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 c6968a17708..0ed443b9307 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 @@ -57,9 +57,6 @@ def validate_subnet(ns): # vnet_name is depricated, using for backwards compatability if ns.vnet_name and not ns.vnet: ns.vnet = ns.vnet_name - print(ns.vnet_name) - print(ns.vnet) - print(ns) if not is_valid_resource_id(ns.subnet) and ((ns.vnet and not ns.subnet) or (ns.subnet and not ns.vnet)): raise CLIError('usage error: --vnet NAME --subnet NAME | --vnet ID --subnet NAME | --subnet ID') From 01be673cc27ed8584fe8a5a327567c5c90b76142 Mon Sep 17 00:00:00 2001 From: sakreter Date: Tue, 16 Oct 2018 15:35:22 -0700 Subject: [PATCH 14/17] Bumping the version for CItests --- src/command_modules/azure-cli-container/HISTORY.rst | 5 ++++- src/command_modules/azure-cli-container/setup.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/command_modules/azure-cli-container/HISTORY.rst b/src/command_modules/azure-cli-container/HISTORY.rst index 25287a113ca..ede3050fa58 100644 --- a/src/command_modules/azure-cli-container/HISTORY.rst +++ b/src/command_modules/azure-cli-container/HISTORY.rst @@ -3,11 +3,14 @@ Release History =============== -0.3.6 +0.3.7 +++++ * Make 'Private' a valid type to pass to '--ip-address' * Allow using only subnet ID to setup a virtual network for the container group * Allow using vnet name or resource id to enable using vnets from different resource groups + +0.3.6 ++++++ * Add '--assign-identity' for adding a MSI identity to a container group * 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/setup.py b/src/command_modules/azure-cli-container/setup.py index 7411a2c655e..2a21cd09b48 100644 --- a/src/command_modules/azure-cli-container/setup.py +++ b/src/command_modules/azure-cli-container/setup.py @@ -14,7 +14,7 @@ logger.warn("Wheel is not available, disabling bdist_wheel hook") cmdclass = {} -VERSION = "0.3.6" +VERSION = "0.3.7" CLASSIFIERS = [ 'Development Status :: 4 - Beta', From 99e3b57abbdf472fef8477e75240093a02ac9aa8 Mon Sep 17 00:00:00 2001 From: sakreter Date: Tue, 16 Oct 2018 16:05:07 -0700 Subject: [PATCH 15/17] updating container instance sdk version --- src/command_modules/azure-cli-container/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/command_modules/azure-cli-container/setup.py b/src/command_modules/azure-cli-container/setup.py index 2a21cd09b48..ad6594207bc 100644 --- a/src/command_modules/azure-cli-container/setup.py +++ b/src/command_modules/azure-cli-container/setup.py @@ -31,7 +31,7 @@ ] DEPENDENCIES = [ - 'azure-mgmt-containerinstance==1.2.0', + 'azure-mgmt-containerinstance==1.2.1', 'azure-mgmt-loganalytics==0.2.0', 'azure-mgmt-resource==2.0.0', 'azure-mgmt-network==2.2.1', From c558bad2d12a389d0ca182df2c60552e5456489a Mon Sep 17 00:00:00 2001 From: Sam Kreter Date: Tue, 16 Oct 2018 17:56:01 -0700 Subject: [PATCH 16/17] changing casing and removing existance check --- .../azure/cli/command_modules/container/custom.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py b/src/command_modules/azure-cli-container/azure/cli/command_modules/container/custom.py index 9499af1301e..79bf5357989 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 @@ -250,11 +250,11 @@ def _get_vnet_network_profile(cmd, location, resource_group_name, vnet, vnet_add from azure.cli.core.profiles import ResourceType from msrestazure.tools import parse_resource_id, is_valid_resource_id - containerInstanceDelegationServiceName = "Microsoft.ContainerInstance/containerGroups" + aci_delegation_service_name = "Microsoft.ContainerInstance/containerGroups" Delegation = cmd.get_models('Delegation', resource_type=ResourceType.MGMT_NETWORK) aci_delegation = Delegation( - name=containerInstanceDelegationServiceName, - service_name=containerInstanceDelegationServiceName + name=aci_delegation_service_name, + service_name=aci_delegation_service_name ) ncf = cf_network(cmd.cli_ctx) @@ -270,7 +270,6 @@ def _get_vnet_network_profile(cmd, location, resource_group_name, vnet, vnet_add parsed_vnet_id = parse_resource_id(vnet) vnet_name = parsed_vnet_id['resource_name'] resource_group_name = parsed_vnet_id['resource_group'] - ncf.virtual_networks.get(resource_group_name, vnet_name) default_network_profile_name = "aci-network-profile-{}-{}".format(vnet_name, subnet_name) @@ -279,8 +278,8 @@ def _get_vnet_network_profile(cmd, location, resource_group_name, vnet, vnet_add if subnet: logger.info('Using existing subnet "%s" in resource group "%s"', subnet.name, resource_group_name) for sal in (subnet.service_association_links or []): - if sal.linked_resource_type != containerInstanceDelegationServiceName: - raise CLIError("Can not use subnet with existing service association links other than {}.".format(containerInstanceDelegationServiceName)) + if sal.linked_resource_type != aci_delegation_service_name: + raise CLIError("Can not use subnet with existing service association links other than {}.".format(aci_delegation_service_name)) if not subnet.delegations: logger.info('Adding ACI delegation to the existing subnet.') @@ -288,8 +287,8 @@ def _get_vnet_network_profile(cmd, location, resource_group_name, vnet, vnet_add subnet = ncf.subnets.create_or_update(resource_group_name, vnet_name, subnet_name, subnet).result() else: for delegation in subnet.delegations: - if delegation.service_name != containerInstanceDelegationServiceName: - raise CLIError("Can not use subnet with existing delegations other than {}".format(containerInstanceDelegationServiceName)) + if delegation.service_name != aci_delegation_service_name: + raise CLIError("Can not use subnet with existing delegations other than {}".format(aci_delegation_service_name)) network_profile = _get_resource(ncf.network_profiles, resource_group_name, default_network_profile_name) if network_profile: From 487da41443580f304f9e07bdef51af74fa9642b2 Mon Sep 17 00:00:00 2001 From: Sam Kreter Date: Tue, 16 Oct 2018 18:18:44 -0700 Subject: [PATCH 17/17] fixing no image error validation --- .../azure/cli/command_modules/container/_validators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 0ed443b9307..eba089ad5ad 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 @@ -43,7 +43,7 @@ def validate_gitrepo_directory(ns): def validate_image(ns): - if ns.image.split(':')[0] in short_running_images and not ns.command_line: + if ns.image and ns.image.split(':')[0] in short_running_images and not ns.command_line: logger.warning('Image "%s" has no long running process. The "--command-line" argument must be used to start a ' 'long running process inside the container for the container group to stay running. ' 'Ex: "tail -f /dev/null" '