From 6acf0a69f3cd55fe9dd1a29976a4656f8542929b Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 31 Jul 2018 14:29:07 -0700 Subject: [PATCH 1/9] Generated from 130558caf04982e77015ceb76133473847b3f061 (#3054) Fix errors in container group update example --- .../container_group_usage_operations.py | 6 +- .../operations/container_groups_operations.py | 176 ++++++++++++++++-- .../operations/container_operations.py | 12 +- .../operations/operations.py | 6 +- 4 files changed, 168 insertions(+), 32 deletions(-) diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_group_usage_operations.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_group_usage_operations.py index 42b2710e9d49..4da58557ee45 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_group_usage_operations.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_group_usage_operations.py @@ -67,7 +67,7 @@ def list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -76,8 +76,8 @@ def list( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_groups_operations.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_groups_operations.py index 2c5e3b6647f3..0c8da2e1a2ef 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_groups_operations.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_groups_operations.py @@ -78,7 +78,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -87,9 +87,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -152,7 +151,7 @@ def internal_paging(next_link=None, raw=False): # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -161,9 +160,8 @@ def internal_paging(next_link=None, raw=False): header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -222,7 +220,7 @@ def get( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -231,8 +229,8 @@ def get( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -269,6 +267,7 @@ def _create_or_update_initial( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -281,9 +280,8 @@ def _create_or_update_initial( body_content = self._serialize.body(container_group, 'ContainerGroup') # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 201]: exp = CloudError(response) @@ -398,6 +396,7 @@ def update( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -410,9 +409,8 @@ def update( body_content = self._serialize.body(resource, 'Resource') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -468,7 +466,7 @@ def delete( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -477,8 +475,8 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -496,3 +494,141 @@ def delete( return deserialized delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}'} + + + def _restart_initial( + self, resource_group_name, container_group_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'containerGroupName': self._serialize.url("container_group_name", container_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restart( + self, resource_group_name, container_group_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Restarts all containers in a container group. + + Restarts all containers in a contaienr group in place. If container + image has updates, new image will be downloaded. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param container_group_name: The name of the container group. + :type container_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._restart_initial( + resource_group_name=resource_group_name, + container_group_name=container_group_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/restart'} + + def stop( + self, resource_group_name, container_group_name, custom_headers=None, raw=False, **operation_config): + """Stops all containers in a container group. + + Stops all containers in a contaienr group. Compute resources will be + deallocated and billing will stop. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param container_group_name: The name of the container group. + :type container_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.stop.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'containerGroupName': self._serialize.url("container_group_name", container_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerInstance/containerGroups/{containerGroupName}/stop'} diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_operations.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_operations.py index a6d9457580e7..87ca1849c3aa 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_operations.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_operations.py @@ -82,7 +82,7 @@ def list_logs( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -91,8 +91,8 @@ def list_logs( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -157,6 +157,7 @@ def execute_command( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) @@ -169,9 +170,8 @@ def execute_command( body_content = self._serialize.body(container_exec_request, 'ContainerExecRequest') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/operations.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/operations.py index 9de4177e731e..0e14f89fdaf5 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/operations.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/operations.py @@ -60,7 +60,7 @@ def list( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -69,8 +69,8 @@ def list( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) From 82d930de946431c852a8de984ae58b560a92869f Mon Sep 17 00:00:00 2001 From: sakreter Date: Thu, 30 Aug 2018 16:48:06 -0700 Subject: [PATCH 2/9] Adding restart test --- .vscode/settings.json | 3 +- ...ainerinstance.test_container_instance.yaml | 148 ++++++++++++------ .../tests/test_mgmt_containerinstance.py | 3 + 3 files changed, 105 insertions(+), 49 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 86be745c112b..1a0409ac4188 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,6 @@ { "git.ignoreLimitWarning": true, "python.unitTest.pyTestArgs": [], - "python.unitTest.pyTestEnabled": true + "python.unitTest.pyTestEnabled": true, + "python.pythonPath": "${workspaceFolder}\\env\\Scripts\\python.exe" } \ No newline at end of file diff --git a/azure-mgmt-containerinstance/tests/recordings/test_mgmt_containerinstance.test_container_instance.yaml b/azure-mgmt-containerinstance/tests/recordings/test_mgmt_containerinstance.test_container_instance.yaml index 5957bb309e7e..81796cc2b581 100644 --- a/azure-mgmt-containerinstance/tests/recordings/test_mgmt_containerinstance.test_container_instance.yaml +++ b/azure-mgmt-containerinstance/tests/recordings/test_mgmt_containerinstance.test_container_instance.yaml @@ -13,25 +13,24 @@ interactions: Connection: [keep-alive] Content-Length: ['542'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.2 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.5.0 - msrest_azure/0.4.31 azure-mgmt-containerinstance/1.0.0 Azure-SDK-For-Python] + User-Agent: [python/3.6.2 (Windows-10-10.0.17134-SP0) requests/2.18.4 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510?api-version=2018-06-01 response: body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"pycontainer26441510","properties":{"image":"alpine:latest","ports":[],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"empty-volume","mountPath":"/mnt/mydir"}],"livenessProbe":{"exec":{"command":["cat/tmp/healthy"]},"periodSeconds":5}}}],"restartPolicy":"OnFailure","osType":"Linux","volumes":[{"name":"empty-volume","emptyDir":{}}],"instanceView":{"state":"Pending"},"diagnostics":{"logAnalytics":{"workspaceId":"workspaceId"}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510","name":"pycontainer26441510","type":"Microsoft.ContainerInstance/containerGroups","location":"westus"}'} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/West - US/operations/38a57cb2-77ab-4dc6-bc1d-c9267e266050?api-version=2018-02-01-preview'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/a54f2c5b-b07d-48d5-afe2-f585d37cd232?api-version=2018-06-01'] cache-control: [no-cache] content-length: ['864'] content-type: [application/json; charset=utf-8] - date: ['Wed, 20 Jun 2018 17:04:01 GMT'] + date: ['Thu, 30 Aug 2018 23:42:51 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: ['95'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['88'] x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['98'] x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} @@ -41,21 +40,21 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - User-Agent: [python/3.6.2 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.5.0 - msrest_azure/0.4.31 azure-mgmt-containerinstance/1.0.0 Azure-SDK-For-Python] + User-Agent: [python/3.6.2 (Windows-10-10.0.17134-SP0) requests/2.18.4 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.0.0 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/West%20US/operations/38a57cb2-77ab-4dc6-bc1d-c9267e266050?api-version=2018-02-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/a54f2c5b-b07d-48d5-afe2-f585d37cd232?api-version=2018-06-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510","status":"Succeeded","startTime":"2018-06-20T17:04:01.7830474Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-06-20T17:04:06Z","lastTimestamp":"2018-06-20T17:04:06Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-06-20T17:04:08Z","lastTimestamp":"2018-06-20T17:04:08Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-06-20T17:04:08Z","lastTimestamp":"2018-06-20T17:04:08Z","name":"Created","message":"Created - container with id d4c98fbf2fac00198db4b3c803f6a959fc9e3dac9b470f67ffe58ffa29f75f5f","type":"Normal"},{"count":1,"firstTimestamp":"2018-06-20T17:04:09Z","lastTimestamp":"2018-06-20T17:04:09Z","name":"Started","message":"Started - container with id d4c98fbf2fac00198db4b3c803f6a959fc9e3dac9b470f67ffe58ffa29f75f5f","type":"Normal"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510","status":"Succeeded","startTime":"2018-08-30T23:42:50.9976154Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-08-30T23:42:56Z","lastTimestamp":"2018-08-30T23:42:56Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:42:59Z","lastTimestamp":"2018-08-30T23:42:59Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:43:00Z","lastTimestamp":"2018-08-30T23:43:00Z","name":"Created","message":"Created + container","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:43:00Z","lastTimestamp":"2018-08-30T23:43:00Z","name":"Started","message":"Started + container","type":"Normal"}]}}'} headers: cache-control: [no-cache] - content-length: ['1100'] + content-length: ['954'] content-type: [application/json; charset=utf-8] - date: ['Wed, 20 Jun 2018 17:04:32 GMT'] + date: ['Thu, 30 Aug 2018 23:43:21 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -69,21 +68,21 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - User-Agent: [python/3.6.2 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.5.0 - msrest_azure/0.4.31 azure-mgmt-containerinstance/1.0.0 Azure-SDK-For-Python] + User-Agent: [python/3.6.2 (Windows-10-10.0.17134-SP0) requests/2.18.4 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.0.0 Azure-SDK-For-Python] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510?api-version=2018-06-01 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"pycontainer26441510","properties":{"image":"alpine:latest","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Terminated","startTime":"2018-06-20T17:04:09Z","exitCode":0,"finishTime":"2018-06-20T17:04:09Z","detailStatus":"Completed"},"events":[{"count":1,"firstTimestamp":"2018-06-20T17:04:06Z","lastTimestamp":"2018-06-20T17:04:06Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-06-20T17:04:08Z","lastTimestamp":"2018-06-20T17:04:08Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-06-20T17:04:08Z","lastTimestamp":"2018-06-20T17:04:08Z","name":"Created","message":"Created - container with id d4c98fbf2fac00198db4b3c803f6a959fc9e3dac9b470f67ffe58ffa29f75f5f","type":"Normal"},{"count":1,"firstTimestamp":"2018-06-20T17:04:09Z","lastTimestamp":"2018-06-20T17:04:09Z","name":"Started","message":"Started - container with id d4c98fbf2fac00198db4b3c803f6a959fc9e3dac9b470f67ffe58ffa29f75f5f","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"empty-volume","mountPath":"/mnt/mydir"}],"livenessProbe":{"exec":{"command":["cat/tmp/healthy"]},"periodSeconds":5}}}],"restartPolicy":"OnFailure","osType":"Linux","volumes":[{"name":"empty-volume","emptyDir":{}}],"instanceView":{"events":[],"state":"Succeeded"},"diagnostics":{"logAnalytics":{"workspaceId":"workspaceId"}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510","name":"pycontainer26441510","type":"Microsoft.ContainerInstance/containerGroups","location":"westus"}'} + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"pycontainer26441510","properties":{"image":"alpine:latest","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Terminated","startTime":"2018-08-30T23:43:00Z","exitCode":0,"finishTime":"2018-08-30T23:43:00Z","detailStatus":"Completed"},"events":[{"count":1,"firstTimestamp":"2018-08-30T23:42:56Z","lastTimestamp":"2018-08-30T23:42:56Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:42:59Z","lastTimestamp":"2018-08-30T23:42:59Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:43:00Z","lastTimestamp":"2018-08-30T23:43:00Z","name":"Created","message":"Created + container","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:43:00Z","lastTimestamp":"2018-08-30T23:43:00Z","name":"Started","message":"Started + container","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"empty-volume","mountPath":"/mnt/mydir"}],"livenessProbe":{"exec":{"command":["cat/tmp/healthy"]},"periodSeconds":5}}}],"restartPolicy":"OnFailure","osType":"Linux","volumes":[{"name":"empty-volume","emptyDir":{}}],"instanceView":{"events":[],"state":"Succeeded"},"diagnostics":{"logAnalytics":{"workspaceId":"workspaceId"}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510","name":"pycontainer26441510","type":"Microsoft.ContainerInstance/containerGroups","location":"westus"}'} headers: cache-control: [no-cache] - content-length: ['1875'] + content-length: ['1729'] content-type: [application/json; charset=utf-8] - date: ['Wed, 20 Jun 2018 17:04:33 GMT'] + date: ['Thu, 30 Aug 2018 23:43:22 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -97,23 +96,22 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.2 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.5.0 - msrest_azure/0.4.31 azure-mgmt-containerinstance/1.0.0 Azure-SDK-For-Python] + User-Agent: [python/3.6.2 (Windows-10-10.0.17134-SP0) requests/2.18.4 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510?api-version=2018-06-01 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"pycontainer26441510","properties":{"image":"alpine:latest","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Terminated","startTime":"2018-06-20T17:04:09Z","exitCode":0,"finishTime":"2018-06-20T17:04:09Z","detailStatus":"Completed"},"events":[{"count":1,"firstTimestamp":"2018-06-20T17:04:06Z","lastTimestamp":"2018-06-20T17:04:06Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-06-20T17:04:08Z","lastTimestamp":"2018-06-20T17:04:08Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-06-20T17:04:08Z","lastTimestamp":"2018-06-20T17:04:08Z","name":"Created","message":"Created - container with id d4c98fbf2fac00198db4b3c803f6a959fc9e3dac9b470f67ffe58ffa29f75f5f","type":"Normal"},{"count":1,"firstTimestamp":"2018-06-20T17:04:09Z","lastTimestamp":"2018-06-20T17:04:09Z","name":"Started","message":"Started - container with id d4c98fbf2fac00198db4b3c803f6a959fc9e3dac9b470f67ffe58ffa29f75f5f","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"empty-volume","mountPath":"/mnt/mydir"}],"livenessProbe":{"exec":{"command":["cat/tmp/healthy"]},"periodSeconds":5}}}],"restartPolicy":"OnFailure","osType":"Linux","volumes":[{"name":"empty-volume","emptyDir":{}}],"instanceView":{"events":[],"state":"Succeeded"},"diagnostics":{"logAnalytics":{"workspaceId":"workspaceId"}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510","name":"pycontainer26441510","type":"Microsoft.ContainerInstance/containerGroups","location":"westus"}'} + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"pycontainer26441510","properties":{"image":"alpine:latest","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Terminated","startTime":"2018-08-30T23:43:00Z","exitCode":0,"finishTime":"2018-08-30T23:43:00Z","detailStatus":"Completed"},"events":[{"count":1,"firstTimestamp":"2018-08-30T23:42:56Z","lastTimestamp":"2018-08-30T23:42:56Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:42:59Z","lastTimestamp":"2018-08-30T23:42:59Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:43:00Z","lastTimestamp":"2018-08-30T23:43:00Z","name":"Created","message":"Created + container","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:43:00Z","lastTimestamp":"2018-08-30T23:43:00Z","name":"Started","message":"Started + container","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"empty-volume","mountPath":"/mnt/mydir"}],"livenessProbe":{"exec":{"command":["cat/tmp/healthy"]},"periodSeconds":5}}}],"restartPolicy":"OnFailure","osType":"Linux","volumes":[{"name":"empty-volume","emptyDir":{}}],"instanceView":{"events":[],"state":"Succeeded"},"diagnostics":{"logAnalytics":{"workspaceId":"workspaceId"}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510","name":"pycontainer26441510","type":"Microsoft.ContainerInstance/containerGroups","location":"westus"}'} headers: cache-control: [no-cache] - content-length: ['1875'] + content-length: ['1729'] content-type: [application/json; charset=utf-8] - date: ['Wed, 20 Jun 2018 17:04:34 GMT'] + date: ['Thu, 30 Aug 2018 23:43:22 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -127,9 +125,8 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.2 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.5.0 - msrest_azure/0.4.31 azure-mgmt-containerinstance/1.0.0 Azure-SDK-For-Python] + User-Agent: [python/3.6.2 (Windows-10-10.0.17134-SP0) requests/2.18.4 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups?api-version=2018-06-01 @@ -139,7 +136,7 @@ interactions: cache-control: [no-cache] content-length: ['843'] content-type: [application/json; charset=utf-8] - date: ['Wed, 20 Jun 2018 17:04:34 GMT'] + date: ['Thu, 30 Aug 2018 23:43:23 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -155,25 +152,25 @@ interactions: Connection: [keep-alive] Content-Length: ['66'] Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.2 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.5.0 - msrest_azure/0.4.31 azure-mgmt-containerinstance/1.0.0 Azure-SDK-For-Python] + User-Agent: [python/3.6.2 (Windows-10-10.0.17134-SP0) requests/2.18.4 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510/containers/pycontainer26441510/exec?api-version=2018-06-01 response: - body: {string: '{"webSocketUri":"wss://bridge-linux-17.westus.management.azurecontainer.io/exec/caas-b366c4d398d2446186000db440d682dd/bridge-9658fa886f0ac586?rows=24&cols=80&api-version=2018-02-01-preview","password":"ACurGmg7CGUu_utlaXMzgOBUkdalQU_3shgrdGzsV5A[[EOM]]"}'} + body: {string: '{"webSocketUri":"wss://bridge-linux-08.westus.management.azurecontainer.io/exec/caas-9a69277d97fb4f91be640769080de1b7/bridge-9658fa886f0ac586?rows=24&cols=80&api-version=2018-02-01-preview","password":"u2gf8dqIHz3yK8quvdtH7SoPjcOlBgEACgrP2II4ssc[[EOM]]"}'} headers: cache-control: [no-cache] content-length: ['254'] content-type: [application/json; charset=utf-8] - date: ['Wed, 20 Jun 2018 17:04:35 GMT'] + date: ['Thu, 30 Aug 2018 23:43:24 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: ['Accept-Encoding,Accept-Encoding'] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1199'] + x-ms-ratelimit-remaining-subscription-writes: ['1198'] status: {code: 200, message: OK} - request: body: null @@ -181,9 +178,8 @@ interactions: Accept: [application/json] Accept-Encoding: ['gzip, deflate'] Connection: [keep-alive] - Content-Type: [application/json; charset=utf-8] - User-Agent: [python/3.6.2 (Windows-10-10.0.16299-SP0) requests/2.18.4 msrest/0.5.0 - msrest_azure/0.4.31 azure-mgmt-containerinstance/1.0.0 Azure-SDK-For-Python] + User-Agent: [python/3.6.2 (Windows-10-10.0.17134-SP0) requests/2.18.4 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510/containers/pycontainer26441510/logs?api-version=2018-06-01 @@ -193,7 +189,63 @@ interactions: cache-control: [no-cache] content-length: ['14'] content-type: [application/json; charset=utf-8] - date: ['Wed, 20 Jun 2018 17:04:35 GMT'] + date: ['Thu, 30 Aug 2018 23:43:24 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'] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [python/3.6.2 (Windows-10-10.0.17134-SP0) requests/2.18.4 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.0.0 Azure-SDK-For-Python] + accept-language: [en-US] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510/restart?api-version=2018-06-01 + response: + body: {string: ''} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/369bf192-e099-4806-9a7f-c62cb0acdec6?api-version=2018-06-01'] + cache-control: [no-cache] + date: ['Thu, 30 Aug 2018 23:43:25 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 204, message: No Content} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/3.6.2 (Windows-10-10.0.17134-SP0) requests/2.18.4 msrest/0.5.4 + msrest_azure/0.4.34 azure-mgmt-containerinstance/1.0.0 Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/369bf192-e099-4806-9a7f-c62cb0acdec6?api-version=2018-06-01 + response: + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510","status":"Succeeded","startTime":"2018-08-30T23:43:26.1540249Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-08-30T23:42:56Z","lastTimestamp":"2018-08-30T23:42:56Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:42:59Z","lastTimestamp":"2018-08-30T23:42:59Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:43:00Z","lastTimestamp":"2018-08-30T23:43:00Z","name":"Created","message":"Created + container","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:43:00Z","lastTimestamp":"2018-08-30T23:43:00Z","name":"Started","message":"Started + container","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:43:27Z","lastTimestamp":"2018-08-30T23:43:27Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:43:28Z","lastTimestamp":"2018-08-30T23:43:28Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:43:29Z","lastTimestamp":"2018-08-30T23:43:29Z","name":"Created","message":"Created + container","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:43:29Z","lastTimestamp":"2018-08-30T23:43:29Z","name":"Started","message":"Started + container","type":"Normal"}]}}'} + headers: + cache-control: [no-cache] + content-length: ['1609'] + content-type: [application/json; charset=utf-8] + date: ['Thu, 30 Aug 2018 23:43:56 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] diff --git a/azure-mgmt-containerinstance/tests/test_mgmt_containerinstance.py b/azure-mgmt-containerinstance/tests/test_mgmt_containerinstance.py index 4b4d56439155..0d2fa0387549 100644 --- a/azure-mgmt-containerinstance/tests/test_mgmt_containerinstance.py +++ b/azure-mgmt-containerinstance/tests/test_mgmt_containerinstance.py @@ -127,6 +127,9 @@ def test_container_instance(self, resource_group, location): # Testing Container_List_Logs containerLogResponse = self.client.container.list_logs(resource_group.name, container_group.name, container_group.containers[0].name) + # Testing Restart Container Group + poller = self.client.container_groups.restart(resource_group.name, container_group_name) + poller.result() From d2f2705d2f33aef6febea08900e95b1ba4f0c540 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 5 Sep 2018 16:02:03 -0700 Subject: [PATCH 3/9] Generated from 5e3cbec47d171de4a66d7303dbc455298817a1e5 (#3265) Adding new changes to the september swagger --- .../container_instance_management_client.py | 2 +- .../mgmt/containerinstance/models/__init__.py | 5 +++ .../models/container_group.py | 6 ++++ .../models/container_group_network_profile.py | 34 +++++++++++++++++++ .../container_group_network_profile_py3.py | 34 +++++++++++++++++++ .../models/container_group_py3.py | 8 ++++- ...tainer_instance_management_client_enums.py | 6 ++++ .../containerinstance/models/log_analytics.py | 10 ++++++ .../models/log_analytics_py3.py | 12 ++++++- .../container_group_usage_operations.py | 4 +-- .../operations/container_groups_operations.py | 8 ++--- .../operations/container_operations.py | 4 +-- .../operations/operations.py | 4 +-- 13 files changed, 124 insertions(+), 13 deletions(-) create mode 100644 azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_network_profile.py create mode 100644 azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_network_profile_py3.py diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/container_instance_management_client.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/container_instance_management_client.py index a969d13ac371..5c9d34847435 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/container_instance_management_client.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/container_instance_management_client.py @@ -86,7 +86,7 @@ def __init__( super(ContainerInstanceManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2018-06-01' + self.api_version = '2018-09-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py index 1ba2cf55de82..9941b6900203 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py @@ -32,6 +32,7 @@ from .container_group_properties_instance_view_py3 import ContainerGroupPropertiesInstanceView from .log_analytics_py3 import LogAnalytics from .container_group_diagnostics_py3 import ContainerGroupDiagnostics + from .container_group_network_profile_py3 import ContainerGroupNetworkProfile from .container_group_py3 import ContainerGroup from .operation_display_py3 import OperationDisplay from .operation_py3 import Operation @@ -67,6 +68,7 @@ from .container_group_properties_instance_view import ContainerGroupPropertiesInstanceView from .log_analytics import LogAnalytics from .container_group_diagnostics import ContainerGroupDiagnostics + from .container_group_network_profile import ContainerGroupNetworkProfile from .container_group import ContainerGroup from .operation_display import OperationDisplay from .operation import Operation @@ -85,6 +87,7 @@ ContainerGroupRestartPolicy, ContainerGroupNetworkProtocol, OperatingSystemTypes, + LogAnalyticsLogType, ContainerInstanceOperationsOrigin, ) @@ -111,6 +114,7 @@ 'ContainerGroupPropertiesInstanceView', 'LogAnalytics', 'ContainerGroupDiagnostics', + 'ContainerGroupNetworkProfile', 'ContainerGroup', 'OperationDisplay', 'Operation', @@ -128,5 +132,6 @@ 'ContainerGroupRestartPolicy', 'ContainerGroupNetworkProtocol', 'OperatingSystemTypes', + 'LogAnalyticsLogType', 'ContainerInstanceOperationsOrigin', ] diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group.py index fa4a94d911e0..47260a4a39ac 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group.py @@ -64,6 +64,10 @@ class ContainerGroup(Resource): :param diagnostics: The diagnostic information for a container group. :type diagnostics: ~azure.mgmt.containerinstance.models.ContainerGroupDiagnostics + :param network_profile: The network profile information for a container + group. + :type network_profile: + ~azure.mgmt.containerinstance.models.ContainerGroupNetworkProfile """ _validation = { @@ -91,6 +95,7 @@ class ContainerGroup(Resource): 'volumes': {'key': 'properties.volumes', 'type': '[Volume]'}, 'instance_view': {'key': 'properties.instanceView', 'type': 'ContainerGroupPropertiesInstanceView'}, 'diagnostics': {'key': 'properties.diagnostics', 'type': 'ContainerGroupDiagnostics'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerGroupNetworkProfile'}, } def __init__(self, **kwargs): @@ -104,3 +109,4 @@ def __init__(self, **kwargs): self.volumes = kwargs.get('volumes', None) self.instance_view = None self.diagnostics = kwargs.get('diagnostics', None) + self.network_profile = kwargs.get('network_profile', None) diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_network_profile.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_network_profile.py new file mode 100644 index 000000000000..026387cb17a8 --- /dev/null +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_network_profile.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerGroupNetworkProfile(Model): + """Container group network profile information. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The identifier for a network profile. + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ContainerGroupNetworkProfile, self).__init__(**kwargs) + self.id = kwargs.get('id', None) diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_network_profile_py3.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_network_profile_py3.py new file mode 100644 index 000000000000..72e54d274eec --- /dev/null +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_network_profile_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ContainerGroupNetworkProfile(Model): + """Container group network profile information. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The identifier for a network profile. + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, *, id: str, **kwargs) -> None: + super(ContainerGroupNetworkProfile, self).__init__(**kwargs) + self.id = id diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_py3.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_py3.py index da93f1668143..c50598dbd643 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_py3.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_group_py3.py @@ -64,6 +64,10 @@ class ContainerGroup(Resource): :param diagnostics: The diagnostic information for a container group. :type diagnostics: ~azure.mgmt.containerinstance.models.ContainerGroupDiagnostics + :param network_profile: The network profile information for a container + group. + :type network_profile: + ~azure.mgmt.containerinstance.models.ContainerGroupNetworkProfile """ _validation = { @@ -91,9 +95,10 @@ class ContainerGroup(Resource): 'volumes': {'key': 'properties.volumes', 'type': '[Volume]'}, 'instance_view': {'key': 'properties.instanceView', 'type': 'ContainerGroupPropertiesInstanceView'}, 'diagnostics': {'key': 'properties.diagnostics', 'type': 'ContainerGroupDiagnostics'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerGroupNetworkProfile'}, } - def __init__(self, *, containers, os_type, location: str=None, tags=None, image_registry_credentials=None, restart_policy=None, ip_address=None, volumes=None, diagnostics=None, **kwargs) -> None: + def __init__(self, *, containers, os_type, location: str=None, tags=None, image_registry_credentials=None, restart_policy=None, ip_address=None, volumes=None, diagnostics=None, network_profile=None, **kwargs) -> None: super(ContainerGroup, self).__init__(location=location, tags=tags, **kwargs) self.provisioning_state = None self.containers = containers @@ -104,3 +109,4 @@ def __init__(self, *, containers, os_type, location: str=None, tags=None, image_ self.volumes = volumes self.instance_view = None self.diagnostics = diagnostics + self.network_profile = network_profile diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_instance_management_client_enums.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_instance_management_client_enums.py index 04280f098e01..a987c8076d04 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_instance_management_client_enums.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_instance_management_client_enums.py @@ -37,6 +37,12 @@ class OperatingSystemTypes(str, Enum): linux = "Linux" +class LogAnalyticsLogType(str, Enum): + + container_insights = "ContainerInsights" + container_instance_logs = "ContainerInstanceLogs" + + class ContainerInstanceOperationsOrigin(str, Enum): user = "User" diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/log_analytics.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/log_analytics.py index 7179478dda9d..b83202bc1dde 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/log_analytics.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/log_analytics.py @@ -21,6 +21,12 @@ class LogAnalytics(Model): :type workspace_id: str :param workspace_key: Required. The workspace key for log analytics :type workspace_key: str + :param log_type: The log type to be used. Possible values include: + 'ContainerInsights', 'ContainerInstanceLogs' + :type log_type: str or + ~azure.mgmt.containerinstance.models.LogAnalyticsLogType + :param metadata: Metadata for log analytics. + :type metadata: dict[str, str] """ _validation = { @@ -31,9 +37,13 @@ class LogAnalytics(Model): _attribute_map = { 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, 'workspace_key': {'key': 'workspaceKey', 'type': 'str'}, + 'log_type': {'key': 'logType', 'type': 'str'}, + 'metadata': {'key': 'metadata', 'type': '{str}'}, } def __init__(self, **kwargs): super(LogAnalytics, self).__init__(**kwargs) self.workspace_id = kwargs.get('workspace_id', None) self.workspace_key = kwargs.get('workspace_key', None) + self.log_type = kwargs.get('log_type', None) + self.metadata = kwargs.get('metadata', None) diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/log_analytics_py3.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/log_analytics_py3.py index a628d09e0d45..c04a396961c3 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/log_analytics_py3.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/log_analytics_py3.py @@ -21,6 +21,12 @@ class LogAnalytics(Model): :type workspace_id: str :param workspace_key: Required. The workspace key for log analytics :type workspace_key: str + :param log_type: The log type to be used. Possible values include: + 'ContainerInsights', 'ContainerInstanceLogs' + :type log_type: str or + ~azure.mgmt.containerinstance.models.LogAnalyticsLogType + :param metadata: Metadata for log analytics. + :type metadata: dict[str, str] """ _validation = { @@ -31,9 +37,13 @@ class LogAnalytics(Model): _attribute_map = { 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, 'workspace_key': {'key': 'workspaceKey', 'type': 'str'}, + 'log_type': {'key': 'logType', 'type': 'str'}, + 'metadata': {'key': 'metadata', 'type': '{str}'}, } - def __init__(self, *, workspace_id: str, workspace_key: str, **kwargs) -> None: + def __init__(self, *, workspace_id: str, workspace_key: str, log_type=None, metadata=None, **kwargs) -> None: super(LogAnalytics, self).__init__(**kwargs) self.workspace_id = workspace_id self.workspace_key = workspace_key + self.log_type = log_type + self.metadata = metadata diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_group_usage_operations.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_group_usage_operations.py index 4da58557ee45..faa702e28f5a 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_group_usage_operations.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_group_usage_operations.py @@ -23,7 +23,7 @@ class ContainerGroupUsageOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2018-06-01". + :ivar api_version: Client API version. Constant value: "2018-09-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-06-01" + self.api_version = "2018-09-01" self.config = config diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_groups_operations.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_groups_operations.py index 0c8da2e1a2ef..5e42762bc234 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_groups_operations.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_groups_operations.py @@ -25,7 +25,7 @@ class ContainerGroupsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2018-06-01". + :ivar api_version: Client API version. Constant value: "2018-09-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-06-01" + self.api_version = "2018-09-01" self.config = config @@ -537,7 +537,7 @@ def restart( self, resource_group_name, container_group_name, custom_headers=None, raw=False, polling=True, **operation_config): """Restarts all containers in a container group. - Restarts all containers in a contaienr group in place. If container + Restarts all containers in a container group in place. If container image has updates, new image will be downloaded. :param resource_group_name: The name of the resource group. @@ -581,7 +581,7 @@ def stop( self, resource_group_name, container_group_name, custom_headers=None, raw=False, **operation_config): """Stops all containers in a container group. - Stops all containers in a contaienr group. Compute resources will be + Stops all containers in a container group. Compute resources will be deallocated and billing will stop. :param resource_group_name: The name of the resource group. diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_operations.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_operations.py index 87ca1849c3aa..67df85731647 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_operations.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/container_operations.py @@ -23,7 +23,7 @@ class ContainerOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2018-06-01". + :ivar api_version: Client API version. Constant value: "2018-09-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-06-01" + self.api_version = "2018-09-01" self.config = config diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/operations.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/operations.py index 0e14f89fdaf5..d80cbac84d72 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/operations.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/operations.py @@ -23,7 +23,7 @@ class Operations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: Client API version. Constant value: "2018-06-01". + :ivar api_version: Client API version. Constant value: "2018-09-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2018-06-01" + self.api_version = "2018-09-01" self.config = config From f834c6f41d36a8b77598fe8fdf0f4e7d69d027f5 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Thu, 6 Sep 2018 10:44:47 -0700 Subject: [PATCH 4/9] Packaging update of azure-mgmt-containerinstance --- azure-mgmt-containerinstance/README.rst | 2 +- azure-mgmt-containerinstance/setup.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/azure-mgmt-containerinstance/README.rst b/azure-mgmt-containerinstance/README.rst index e4f5739fbc89..9f61b79d2a9b 100644 --- a/azure-mgmt-containerinstance/README.rst +++ b/azure-mgmt-containerinstance/README.rst @@ -6,7 +6,7 @@ This is the Microsoft Azure Container Instance Client Library. Azure Resource Manager (ARM) is the next generation of management APIs that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.4, 3.5 and 3.6. +This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. For the older Azure Service Management (ASM) libraries, see `azure-servicemanagement-legacy `__ library. diff --git a/azure-mgmt-containerinstance/setup.py b/azure-mgmt-containerinstance/setup.py index 1f016a4e02ef..72097fec5cdd 100644 --- a/azure-mgmt-containerinstance/setup.py +++ b/azure-mgmt-containerinstance/setup.py @@ -72,12 +72,14 @@ 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', 'License :: OSI Approved :: MIT License', ], zip_safe=False, packages=find_packages(exclude=["tests"]), install_requires=[ - 'msrestazure>=0.4.27,<2.0.0', + 'msrest>=0.5.0', + 'msrestazure>=0.4.32,<2.0.0', 'azure-common~=1.1', ], cmdclass=cmdclass From ea4c0b171ac50a823fd129a650c356d39569887e Mon Sep 17 00:00:00 2001 From: sakreter Date: Thu, 6 Sep 2018 11:04:25 -0700 Subject: [PATCH 5/9] adding new recording files for updates --- ...ainerinstance.test_container_instance.yaml | 102 +++++++++--------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/azure-mgmt-containerinstance/tests/recordings/test_mgmt_containerinstance.test_container_instance.yaml b/azure-mgmt-containerinstance/tests/recordings/test_mgmt_containerinstance.test_container_instance.yaml index 81796cc2b581..378c3bc23262 100644 --- a/azure-mgmt-containerinstance/tests/recordings/test_mgmt_containerinstance.test_container_instance.yaml +++ b/azure-mgmt-containerinstance/tests/recordings/test_mgmt_containerinstance.test_container_instance.yaml @@ -17,20 +17,20 @@ interactions: msrest_azure/0.4.34 azure-mgmt-containerinstance/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510?api-version=2018-09-01 response: body: {string: '{"properties":{"provisioningState":"Pending","containers":[{"name":"pycontainer26441510","properties":{"image":"alpine:latest","ports":[],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"empty-volume","mountPath":"/mnt/mydir"}],"livenessProbe":{"exec":{"command":["cat/tmp/healthy"]},"periodSeconds":5}}}],"restartPolicy":"OnFailure","osType":"Linux","volumes":[{"name":"empty-volume","emptyDir":{}}],"instanceView":{"state":"Pending"},"diagnostics":{"logAnalytics":{"workspaceId":"workspaceId"}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510","name":"pycontainer26441510","type":"Microsoft.ContainerInstance/containerGroups","location":"westus"}'} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/a54f2c5b-b07d-48d5-afe2-f585d37cd232?api-version=2018-06-01'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/0358f7db-0bd3-4096-91f1-8576ea65d12e?api-version=2018-06-01'] cache-control: [no-cache] content-length: ['864'] content-type: [application/json; charset=utf-8] - date: ['Thu, 30 Aug 2018 23:42:51 GMT'] + date: ['Thu, 06 Sep 2018 18:02:53 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['88'] + x-ms-ratelimit-remaining-subscription-resource-requests-pt1h: ['95'] x-ms-ratelimit-remaining-subscription-resource-requests-pt5m: ['98'] x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 201, message: Created} @@ -43,18 +43,18 @@ interactions: User-Agent: [python/3.6.2 (Windows-10-10.0.17134-SP0) requests/2.18.4 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.0.0 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/a54f2c5b-b07d-48d5-afe2-f585d37cd232?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/0358f7db-0bd3-4096-91f1-8576ea65d12e?api-version=2018-06-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510","status":"Succeeded","startTime":"2018-08-30T23:42:50.9976154Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-08-30T23:42:56Z","lastTimestamp":"2018-08-30T23:42:56Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:42:59Z","lastTimestamp":"2018-08-30T23:42:59Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:43:00Z","lastTimestamp":"2018-08-30T23:43:00Z","name":"Created","message":"Created - container","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:43:00Z","lastTimestamp":"2018-08-30T23:43:00Z","name":"Started","message":"Started - container","type":"Normal"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510","status":"Succeeded","startTime":"2018-09-06T18:02:53.7066979Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-09-06T18:03:11Z","lastTimestamp":"2018-09-06T18:03:11Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-06T18:03:13Z","lastTimestamp":"2018-09-06T18:03:13Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-06T18:03:13Z","lastTimestamp":"2018-09-06T18:03:13Z","name":"Created","message":"Created + container with id 41b7e27558992017cd679361313de8157a2b35a3dc76ac79a6d4235dc9835e67","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-06T18:03:13Z","lastTimestamp":"2018-09-06T18:03:13Z","name":"Started","message":"Started + container with id 41b7e27558992017cd679361313de8157a2b35a3dc76ac79a6d4235dc9835e67","type":"Normal"}]}}'} headers: cache-control: [no-cache] - content-length: ['954'] + content-length: ['1100'] content-type: [application/json; charset=utf-8] - date: ['Thu, 30 Aug 2018 23:43:21 GMT'] + date: ['Thu, 06 Sep 2018 18:03:24 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -71,18 +71,18 @@ interactions: User-Agent: [python/3.6.2 (Windows-10-10.0.17134-SP0) requests/2.18.4 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.0.0 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510?api-version=2018-09-01 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"pycontainer26441510","properties":{"image":"alpine:latest","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Terminated","startTime":"2018-08-30T23:43:00Z","exitCode":0,"finishTime":"2018-08-30T23:43:00Z","detailStatus":"Completed"},"events":[{"count":1,"firstTimestamp":"2018-08-30T23:42:56Z","lastTimestamp":"2018-08-30T23:42:56Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:42:59Z","lastTimestamp":"2018-08-30T23:42:59Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:43:00Z","lastTimestamp":"2018-08-30T23:43:00Z","name":"Created","message":"Created - container","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:43:00Z","lastTimestamp":"2018-08-30T23:43:00Z","name":"Started","message":"Started - container","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"empty-volume","mountPath":"/mnt/mydir"}],"livenessProbe":{"exec":{"command":["cat/tmp/healthy"]},"periodSeconds":5}}}],"restartPolicy":"OnFailure","osType":"Linux","volumes":[{"name":"empty-volume","emptyDir":{}}],"instanceView":{"events":[],"state":"Succeeded"},"diagnostics":{"logAnalytics":{"workspaceId":"workspaceId"}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510","name":"pycontainer26441510","type":"Microsoft.ContainerInstance/containerGroups","location":"westus"}'} + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"pycontainer26441510","properties":{"image":"alpine:latest","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Terminated","startTime":"2018-09-06T18:03:13Z","exitCode":0,"finishTime":"2018-09-06T18:03:13Z","detailStatus":"Completed"},"events":[{"count":1,"firstTimestamp":"2018-09-06T18:03:11Z","lastTimestamp":"2018-09-06T18:03:11Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-06T18:03:13Z","lastTimestamp":"2018-09-06T18:03:13Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-06T18:03:13Z","lastTimestamp":"2018-09-06T18:03:13Z","name":"Created","message":"Created + container with id 41b7e27558992017cd679361313de8157a2b35a3dc76ac79a6d4235dc9835e67","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-06T18:03:13Z","lastTimestamp":"2018-09-06T18:03:13Z","name":"Started","message":"Started + container with id 41b7e27558992017cd679361313de8157a2b35a3dc76ac79a6d4235dc9835e67","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"empty-volume","mountPath":"/mnt/mydir"}],"livenessProbe":{"exec":{"command":["cat/tmp/healthy"]},"periodSeconds":5}}}],"restartPolicy":"OnFailure","osType":"Linux","volumes":[{"name":"empty-volume","emptyDir":{}}],"instanceView":{"events":[],"state":"Succeeded"},"diagnostics":{"logAnalytics":{"workspaceId":"workspaceId"}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510","name":"pycontainer26441510","type":"Microsoft.ContainerInstance/containerGroups","location":"westus"}'} headers: cache-control: [no-cache] - content-length: ['1729'] + content-length: ['1875'] content-type: [application/json; charset=utf-8] - date: ['Thu, 30 Aug 2018 23:43:22 GMT'] + date: ['Thu, 06 Sep 2018 18:03:25 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -100,18 +100,18 @@ interactions: msrest_azure/0.4.34 azure-mgmt-containerinstance/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510?api-version=2018-09-01 response: - body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"pycontainer26441510","properties":{"image":"alpine:latest","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Terminated","startTime":"2018-08-30T23:43:00Z","exitCode":0,"finishTime":"2018-08-30T23:43:00Z","detailStatus":"Completed"},"events":[{"count":1,"firstTimestamp":"2018-08-30T23:42:56Z","lastTimestamp":"2018-08-30T23:42:56Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:42:59Z","lastTimestamp":"2018-08-30T23:42:59Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:43:00Z","lastTimestamp":"2018-08-30T23:43:00Z","name":"Created","message":"Created - container","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:43:00Z","lastTimestamp":"2018-08-30T23:43:00Z","name":"Started","message":"Started - container","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"empty-volume","mountPath":"/mnt/mydir"}],"livenessProbe":{"exec":{"command":["cat/tmp/healthy"]},"periodSeconds":5}}}],"restartPolicy":"OnFailure","osType":"Linux","volumes":[{"name":"empty-volume","emptyDir":{}}],"instanceView":{"events":[],"state":"Succeeded"},"diagnostics":{"logAnalytics":{"workspaceId":"workspaceId"}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510","name":"pycontainer26441510","type":"Microsoft.ContainerInstance/containerGroups","location":"westus"}'} + body: {string: '{"properties":{"provisioningState":"Succeeded","containers":[{"name":"pycontainer26441510","properties":{"image":"alpine:latest","ports":[],"environmentVariables":[],"instanceView":{"restartCount":0,"currentState":{"state":"Terminated","startTime":"2018-09-06T18:03:13Z","exitCode":0,"finishTime":"2018-09-06T18:03:13Z","detailStatus":"Completed"},"events":[{"count":1,"firstTimestamp":"2018-09-06T18:03:11Z","lastTimestamp":"2018-09-06T18:03:11Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-06T18:03:13Z","lastTimestamp":"2018-09-06T18:03:13Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-06T18:03:13Z","lastTimestamp":"2018-09-06T18:03:13Z","name":"Created","message":"Created + container with id 41b7e27558992017cd679361313de8157a2b35a3dc76ac79a6d4235dc9835e67","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-06T18:03:13Z","lastTimestamp":"2018-09-06T18:03:13Z","name":"Started","message":"Started + container with id 41b7e27558992017cd679361313de8157a2b35a3dc76ac79a6d4235dc9835e67","type":"Normal"}]},"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"empty-volume","mountPath":"/mnt/mydir"}],"livenessProbe":{"exec":{"command":["cat/tmp/healthy"]},"periodSeconds":5}}}],"restartPolicy":"OnFailure","osType":"Linux","volumes":[{"name":"empty-volume","emptyDir":{}}],"instanceView":{"events":[],"state":"Succeeded"},"diagnostics":{"logAnalytics":{"workspaceId":"workspaceId"}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510","name":"pycontainer26441510","type":"Microsoft.ContainerInstance/containerGroups","location":"westus"}'} headers: cache-control: [no-cache] - content-length: ['1729'] + content-length: ['1875'] content-type: [application/json; charset=utf-8] - date: ['Thu, 30 Aug 2018 23:43:22 GMT'] + date: ['Thu, 06 Sep 2018 18:03:33 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -129,14 +129,14 @@ interactions: msrest_azure/0.4.34 azure-mgmt-containerinstance/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups?api-version=2018-09-01 response: body: {string: '{"value":[{"properties":{"provisioningState":"Succeeded","containers":[{"name":"pycontainer26441510","properties":{"image":"alpine:latest","ports":[],"environmentVariables":[],"resources":{"requests":{"memoryInGB":1.0,"cpu":1.0}},"volumeMounts":[{"name":"empty-volume","mountPath":"/mnt/mydir"}],"livenessProbe":{"exec":{"command":["cat/tmp/healthy"]},"periodSeconds":5}}}],"restartPolicy":"OnFailure","osType":"Linux","volumes":[{"name":"empty-volume","emptyDir":{}}],"diagnostics":{"logAnalytics":{"workspaceId":"workspaceId"}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510","name":"pycontainer26441510","type":"Microsoft.ContainerInstance/containerGroups","location":"westus"}]}'} headers: cache-control: [no-cache] content-length: ['843'] content-type: [application/json; charset=utf-8] - date: ['Thu, 30 Aug 2018 23:43:23 GMT'] + date: ['Thu, 06 Sep 2018 18:03:34 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -156,21 +156,21 @@ interactions: msrest_azure/0.4.34 azure-mgmt-containerinstance/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510/containers/pycontainer26441510/exec?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510/containers/pycontainer26441510/exec?api-version=2018-09-01 response: - body: {string: '{"webSocketUri":"wss://bridge-linux-08.westus.management.azurecontainer.io/exec/caas-9a69277d97fb4f91be640769080de1b7/bridge-9658fa886f0ac586?rows=24&cols=80&api-version=2018-02-01-preview","password":"u2gf8dqIHz3yK8quvdtH7SoPjcOlBgEACgrP2II4ssc[[EOM]]"}'} + body: {string: '{"webSocketUri":"wss://bridge-linux-06.westus.management.azurecontainer.io/exec/caas-1a7f1ac282c843118cc3881a7b0603dd/bridge-9658fa886f0ac586?rows=24&cols=80&api-version=2018-02-01-preview","password":"6eru_Q14EzljWA3MP2ANPkDmQ-JXnAE8LtFPJ03Lxew[[EOM]]"}'} headers: cache-control: [no-cache] content-length: ['254'] content-type: [application/json; charset=utf-8] - date: ['Thu, 30 Aug 2018 23:43:24 GMT'] + date: ['Thu, 06 Sep 2018 18:03:37 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] transfer-encoding: [chunked] vary: ['Accept-Encoding,Accept-Encoding'] x-content-type-options: [nosniff] - x-ms-ratelimit-remaining-subscription-writes: ['1198'] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] status: {code: 200, message: OK} - request: body: null @@ -182,14 +182,14 @@ interactions: msrest_azure/0.4.34 azure-mgmt-containerinstance/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510/containers/pycontainer26441510/logs?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510/containers/pycontainer26441510/logs?api-version=2018-09-01 response: body: {string: '{"content":""}'} headers: cache-control: [no-cache] content-length: ['14'] content-type: [application/json; charset=utf-8] - date: ['Thu, 30 Aug 2018 23:43:24 GMT'] + date: ['Thu, 06 Sep 2018 18:03:38 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -208,13 +208,13 @@ interactions: msrest_azure/0.4.34 azure-mgmt-containerinstance/1.0.0 Azure-SDK-For-Python] accept-language: [en-US] method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510/restart?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510/restart?api-version=2018-09-01 response: body: {string: ''} headers: - azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/369bf192-e099-4806-9a7f-c62cb0acdec6?api-version=2018-06-01'] + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/efbaa5a1-81a3-460e-b750-26909e01ce03?api-version=2018-06-01'] cache-control: [no-cache] - date: ['Thu, 30 Aug 2018 23:43:25 GMT'] + date: ['Thu, 06 Sep 2018 18:03:40 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] @@ -230,22 +230,22 @@ interactions: User-Agent: [python/3.6.2 (Windows-10-10.0.17134-SP0) requests/2.18.4 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-containerinstance/1.0.0 Azure-SDK-For-Python] method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/369bf192-e099-4806-9a7f-c62cb0acdec6?api-version=2018-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerInstance/locations/westus/operations/efbaa5a1-81a3-460e-b750-26909e01ce03?api-version=2018-06-01 response: - body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510","status":"Succeeded","startTime":"2018-08-30T23:43:26.1540249Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-08-30T23:42:56Z","lastTimestamp":"2018-08-30T23:42:56Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:42:59Z","lastTimestamp":"2018-08-30T23:42:59Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:43:00Z","lastTimestamp":"2018-08-30T23:43:00Z","name":"Created","message":"Created - container","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:43:00Z","lastTimestamp":"2018-08-30T23:43:00Z","name":"Started","message":"Started - container","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:43:27Z","lastTimestamp":"2018-08-30T23:43:27Z","name":"Pulling","message":"pulling - image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:43:28Z","lastTimestamp":"2018-08-30T23:43:28Z","name":"Pulled","message":"Successfully - pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:43:29Z","lastTimestamp":"2018-08-30T23:43:29Z","name":"Created","message":"Created - container","type":"Normal"},{"count":1,"firstTimestamp":"2018-08-30T23:43:29Z","lastTimestamp":"2018-08-30T23:43:29Z","name":"Started","message":"Started - container","type":"Normal"}]}}'} + body: {string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_containerinstance_test_container_instance26441510/providers/Microsoft.ContainerInstance/containerGroups/pycontainer26441510","status":"Succeeded","startTime":"2018-09-06T18:03:41.2568351Z","properties":{"events":[{"count":1,"firstTimestamp":"2018-09-06T18:03:11Z","lastTimestamp":"2018-09-06T18:03:11Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-06T18:03:13Z","lastTimestamp":"2018-09-06T18:03:13Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-06T18:03:13Z","lastTimestamp":"2018-09-06T18:03:13Z","name":"Created","message":"Created + container with id 41b7e27558992017cd679361313de8157a2b35a3dc76ac79a6d4235dc9835e67","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-06T18:03:13Z","lastTimestamp":"2018-09-06T18:03:13Z","name":"Started","message":"Started + container with id 41b7e27558992017cd679361313de8157a2b35a3dc76ac79a6d4235dc9835e67","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-06T18:03:42Z","lastTimestamp":"2018-09-06T18:03:42Z","name":"Pulling","message":"pulling + image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-06T18:03:44Z","lastTimestamp":"2018-09-06T18:03:44Z","name":"Pulled","message":"Successfully + pulled image \"alpine:latest\"","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-06T18:03:44Z","lastTimestamp":"2018-09-06T18:03:44Z","name":"Created","message":"Created + container with id c907e51308f23452c10ecd041e7fcb59fff8d96527ce687315320c125dbfba73","type":"Normal"},{"count":1,"firstTimestamp":"2018-09-06T18:03:44Z","lastTimestamp":"2018-09-06T18:03:44Z","name":"Started","message":"Started + container with id c907e51308f23452c10ecd041e7fcb59fff8d96527ce687315320c125dbfba73","type":"Normal"}]}}'} headers: cache-control: [no-cache] - content-length: ['1609'] + content-length: ['1901'] content-type: [application/json; charset=utf-8] - date: ['Thu, 30 Aug 2018 23:43:56 GMT'] + date: ['Thu, 06 Sep 2018 18:04:10 GMT'] expires: ['-1'] pragma: [no-cache] strict-transport-security: [max-age=31536000; includeSubDomains] From f11b7323f8eaa08785caad24ef9e4e7a947ab3a1 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Thu, 6 Sep 2018 11:32:53 -0700 Subject: [PATCH 6/9] Update settings.json --- .vscode/settings.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 1a0409ac4188..e8c154f4987c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,5 @@ { "git.ignoreLimitWarning": true, "python.unitTest.pyTestArgs": [], - "python.unitTest.pyTestEnabled": true, - "python.pythonPath": "${workspaceFolder}\\env\\Scripts\\python.exe" -} \ No newline at end of file + "python.unitTest.pyTestEnabled": true +} From d0e9869201603672d83a7408e56ff2af55413390 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Thu, 6 Sep 2018 13:10:30 -0700 Subject: [PATCH 7/9] ChangeLog --- azure-mgmt-containerinstance/HISTORY.rst | 11 +++++++++++ .../azure/mgmt/containerinstance/version.py | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/azure-mgmt-containerinstance/HISTORY.rst b/azure-mgmt-containerinstance/HISTORY.rst index e1dd07392c15..3dc7e1e3cc22 100644 --- a/azure-mgmt-containerinstance/HISTORY.rst +++ b/azure-mgmt-containerinstance/HISTORY.rst @@ -3,6 +3,17 @@ Release History =============== +1.1.0 (2018-09-06) +++++++++++++++++++ + +**Features** + +- Model LogAnalytics has a new parameter log_type +- Model LogAnalytics has a new parameter metadata +- Model ContainerGroup has a new parameter network_profile +- Added operation ContainerGroupsOperations.stop +- Added operation ContainerGroupsOperations.restart + 1.0.0 (2018-06-13) ++++++++++++++++++ diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/version.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/version.py index a39916c162ce..24b9de3384da 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/version.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "1.1.0" From 5b8b05c5ed1b038c71aa680d854f20c52d2c94c4 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 6 Sep 2018 15:43:16 -0700 Subject: [PATCH 8/9] Generated from 41afecad86851cf0f2955c9042941e245b85d15a (#3285) Adding ability to use private ip --- .../mgmt/containerinstance/models/__init__.py | 2 ++ .../container_instance_management_client_enums.py | 6 ++++++ .../mgmt/containerinstance/models/ip_address.py | 12 ++++++------ .../containerinstance/models/ip_address_py3.py | 14 +++++++------- .../azure/mgmt/containerinstance/version.py | 2 +- 5 files changed, 22 insertions(+), 14 deletions(-) diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py index 9941b6900203..497cd6a01d8f 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/__init__.py @@ -86,6 +86,7 @@ ContainerNetworkProtocol, ContainerGroupRestartPolicy, ContainerGroupNetworkProtocol, + ContainerGroupIpAddressType, OperatingSystemTypes, LogAnalyticsLogType, ContainerInstanceOperationsOrigin, @@ -131,6 +132,7 @@ 'ContainerNetworkProtocol', 'ContainerGroupRestartPolicy', 'ContainerGroupNetworkProtocol', + 'ContainerGroupIpAddressType', 'OperatingSystemTypes', 'LogAnalyticsLogType', 'ContainerInstanceOperationsOrigin', diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_instance_management_client_enums.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_instance_management_client_enums.py index a987c8076d04..773b5b98d246 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_instance_management_client_enums.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/container_instance_management_client_enums.py @@ -31,6 +31,12 @@ class ContainerGroupNetworkProtocol(str, Enum): udp = "UDP" +class ContainerGroupIpAddressType(str, Enum): + + public = "Public" + private = "Private" + + class OperatingSystemTypes(str, Enum): windows = "Windows" diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/ip_address.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/ip_address.py index 07d02792b719..44737b213cc8 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/ip_address.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/ip_address.py @@ -22,9 +22,10 @@ class IpAddress(Model): :param ports: Required. The list of ports exposed on the container group. :type ports: list[~azure.mgmt.containerinstance.models.Port] - :ivar type: Required. Specifies if the IP is exposed to the public - internet. Default value: "Public" . - :vartype type: str + :param type: Required. Specifies if the IP is exposed to the public + internet. Possible values include: 'Public', 'Private' + :type type: str or + ~azure.mgmt.containerinstance.models.ContainerGroupIpAddressType :param ip: The IP exposed to the public internet. :type ip: str :param dns_name_label: The Dns name label for the IP. @@ -35,7 +36,7 @@ class IpAddress(Model): _validation = { 'ports': {'required': True}, - 'type': {'required': True, 'constant': True}, + 'type': {'required': True}, 'fqdn': {'readonly': True}, } @@ -47,11 +48,10 @@ class IpAddress(Model): 'fqdn': {'key': 'fqdn', 'type': 'str'}, } - type = "Public" - def __init__(self, **kwargs): super(IpAddress, self).__init__(**kwargs) self.ports = kwargs.get('ports', None) + self.type = kwargs.get('type', None) self.ip = kwargs.get('ip', None) self.dns_name_label = kwargs.get('dns_name_label', None) self.fqdn = None diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/ip_address_py3.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/ip_address_py3.py index 752618b68479..6b7f214facaa 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/ip_address_py3.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/ip_address_py3.py @@ -22,9 +22,10 @@ class IpAddress(Model): :param ports: Required. The list of ports exposed on the container group. :type ports: list[~azure.mgmt.containerinstance.models.Port] - :ivar type: Required. Specifies if the IP is exposed to the public - internet. Default value: "Public" . - :vartype type: str + :param type: Required. Specifies if the IP is exposed to the public + internet. Possible values include: 'Public', 'Private' + :type type: str or + ~azure.mgmt.containerinstance.models.ContainerGroupIpAddressType :param ip: The IP exposed to the public internet. :type ip: str :param dns_name_label: The Dns name label for the IP. @@ -35,7 +36,7 @@ class IpAddress(Model): _validation = { 'ports': {'required': True}, - 'type': {'required': True, 'constant': True}, + 'type': {'required': True}, 'fqdn': {'readonly': True}, } @@ -47,11 +48,10 @@ class IpAddress(Model): 'fqdn': {'key': 'fqdn', 'type': 'str'}, } - type = "Public" - - def __init__(self, *, ports, ip: str=None, dns_name_label: str=None, **kwargs) -> None: + def __init__(self, *, ports, type, ip: str=None, dns_name_label: str=None, **kwargs) -> None: super(IpAddress, self).__init__(**kwargs) self.ports = ports + self.type = type self.ip = ip self.dns_name_label = dns_name_label self.fqdn = None diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/version.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/version.py index 24b9de3384da..a39916c162ce 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/version.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.1.0" +VERSION = "1.0.0" From 02189d918bbf6a724ef4f39f42a890c32981fec6 Mon Sep 17 00:00:00 2001 From: Laurent Mazuel Date: Thu, 6 Sep 2018 15:47:26 -0700 Subject: [PATCH 9/9] Update version.py --- .../azure/mgmt/containerinstance/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/version.py b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/version.py index a39916c162ce..24b9de3384da 100644 --- a/azure-mgmt-containerinstance/azure/mgmt/containerinstance/version.py +++ b/azure-mgmt-containerinstance/azure/mgmt/containerinstance/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "1.1.0"