diff --git a/src/SDKs/ContainerRegistry/dataplane/AzSdk.RP.props b/src/SDKs/ContainerRegistry/dataplane/AzSdk.RP.props new file mode 100644 index 000000000000..3a03c2f68d64 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/AzSdk.RP.props @@ -0,0 +1,7 @@ + + + + 2018-08-10-preview + $(PackageTags);$(CommonTags);$(AzureApiTag); + + \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/ContainerRegistry.Tests.csproj b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/ContainerRegistry.Tests.csproj new file mode 100644 index 000000000000..0f1f7893846f --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/ContainerRegistry.Tests.csproj @@ -0,0 +1,29 @@ + + + + ContainerRegistry.Tests + Microsoft.Azure.ContainerRegistry tests Library + ContainerRegistry.Tests + 1.0.0 + true + + + + + + + + + + PreserveNewest + + + + + + + + + + + \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/Helpers/ACRTestUtil.cs b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/Helpers/ACRTestUtil.cs new file mode 100644 index 000000000000..9d6a7c18413f --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/Helpers/ACRTestUtil.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. + +namespace ContainerRegistry.Tests +{ + using System; + using System.Net; + using System.Threading.Tasks; + using global::ContainerRegistry.Tests; + using Microsoft.Azure.Management.ContainerRegistry; + using Microsoft.Rest; + using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + using Microsoft.Azure.ContainerRegistry; + + public static class ACRTestUtil + { + private static readonly string _testResourceGroup = "matttest"; + + public static readonly string ProdRepository = "prod/bash"; + public static readonly string TestRepository = "test/bash"; + + public static readonly string ManagedTestRegistry = "managedtestregistry"; + public static readonly string ManagedTestRegistryFullName = "managedtestregistry.azurecr.io"; + public static readonly string ManagedTestRegistryForDeleting = "managedtestregistryfordel"; + + public static readonly string ClassicTestRegistry = "classictestregistry"; + public static readonly string ClassicTestRegistryNameFullName = "classictestregistry.azurecr.io"; + public static readonly string ClassicTestRegistryForDeleting = "classictestregistryfordel"; + + public static async Task GetACRClientAsync(MockContext context, string registryName) + { + var registryManagementClient = context.GetServiceClient(handlers: CreateNewRecordedDelegatingHandler()); + var registry = await registryManagementClient.Registries.GetAsync(_testResourceGroup, registryName); + var registryCredentials = await registryManagementClient.Registries.ListCredentialsAsync(_testResourceGroup, registryName); + var credential = new BasicAuthenticationCredentials() { UserName= registryCredentials.Username, Password = registryCredentials.Passwords[0].Value }; + var acrClient = context.GetServiceClientWithCredentials(credential, handlers: CreateNewRecordedDelegatingHandler()); + acrClient.BaseUri = new Uri($"https://{registry.LoginServer}"); + + return acrClient; + } + + private static RecordedDelegatingHandler CreateNewRecordedDelegatingHandler() + { + return new RecordedDelegatingHandler { StatusCodeToReturn = HttpStatusCode.OK, IsPassThrough = true }; + } + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.ManifestTests/GetAcrManifestAttributesCRReturnsNull.json b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.ManifestTests/GetAcrManifestAttributesCRReturnsNull.json new file mode 100644 index 000000000000..4deebeac7d61 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.ManifestTests/GetAcrManifestAttributesCRReturnsNull.json @@ -0,0 +1,186 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9jbGFzc2ljdGVzdHJlZ2lzdHJ5P2FwaS12ZXJzaW9uPTIwMTctMTAtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9849e2e6-fe8d-44a1-baf1-b3f07f48b6c7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:48 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "4f2b5c8d-610a-4756-9951-24aec97926cd" + ], + "x-ms-correlation-request-id": [ + "4f2b5c8d-610a-4756-9951-24aec97926cd" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181148Z:4f2b5c8d-610a-4756-9951-24aec97926cd" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "685" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Classic\",\r\n \"tier\": \"Classic\"\r\n },\r\n \"type\": \"Microsoft.ContainerRegistry/registries\",\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry\",\r\n \"name\": \"classictestregistry\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"loginServer\": \"classictestregistry.azurecr.io\",\r\n \"creationDate\": \"2018-10-04T17:20:54.3121147Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"adminUserEnabled\": true,\r\n \"storageAccount\": {\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.Storage/storageAccounts/classictestregistr172020\"\r\n },\r\n \"firewallRulesEnabled\": false,\r\n \"firewallRules\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry/listCredentials?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9jbGFzc2ljdGVzdHJlZ2lzdHJ5L2xpc3RDcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTEwLTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "cfda6493-776b-4753-b587-3914d53b07ef" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:48 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "d5a0fe2a-460c-495c-8aef-c505da22f8c0" + ], + "x-ms-correlation-request-id": [ + "d5a0fe2a-460c-495c-8aef-c505da22f8c0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181148Z:d5a0fe2a-460c-495c-8aef-c505da22f8c0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "175" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"username\": \"classictestregistry\",\r\n \"passwords\": [\r\n {\r\n \"name\": \"password\",\r\n \"value\": \"YttZqPE=197fuiZ3Cf7YJIW010OxJvoO\"\r\n },\r\n {\r\n \"name\": \"password2\",\r\n \"value\": \"/cTqNKa2Mp3TrZakL2BBYVcOEIS5OG4i\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/acr/v1/prod%2Fbash/_manifests/sha256:eabe547f78d4c18c708dd97ec3166cf7464cc651f1cbb67e70d407405b7ad7b6", + "EncodedRequestUri": "L2Fjci92MS9wcm9kJTJGYmFzaC9fbWFuaWZlc3RzL3NoYTI1NiUzQWVhYmU1NDdmNzhkNGMxOGM3MDhkZDk3ZWMzMTY2Y2Y3NDY0Y2M2NTFmMWNiYjY3ZTcwZDQwNzQwNWI3YWQ3YjY=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "95eeee59-3126-43ac-9e85-88d70d36ad65" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:50 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Correlation-Request-Id": [ + "9d7817dc-7f91-4985-bb39-99129e2e8e84" + ], + "Content-Length": [ + "70" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ] + }, + "ResponseBody": "{\r\n \"errors\": [\r\n {\r\n \"code\": \"MANIFEST_UNKNOWN\",\r\n \"message\": \"manifest unknown\"\r\n }\r\n ]\r\n}", + "StatusCode": 404 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "dfb63c8c-7c89-4ef8-af13-75c1d873c895" + } +} \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.ManifestTests/GetAcrManifestAttributesMR.json b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.ManifestTests/GetAcrManifestAttributesMR.json new file mode 100644 index 000000000000..797bf0c04674 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.ManifestTests/GetAcrManifestAttributesMR.json @@ -0,0 +1,186 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5P2FwaS12ZXJzaW9uPTIwMTctMTAtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "223378ed-dbea-4d8d-a614-c34d9ea07a48" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "dabf2796-a307-4521-a863-4948f624ba15" + ], + "x-ms-correlation-request-id": [ + "dabf2796-a307-4521-a863-4948f624ba15" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181143Z:dabf2796-a307-4521-a863-4948f624ba15" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "514" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Premium\",\r\n \"tier\": \"Premium\"\r\n },\r\n \"type\": \"Microsoft.ContainerRegistry/registries\",\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry\",\r\n \"name\": \"managedtestregistry\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"loginServer\": \"managedtestregistry.azurecr.io\",\r\n \"creationDate\": \"2018-08-14T20:27:59.2394952Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"adminUserEnabled\": true,\r\n \"firewallRulesEnabled\": false,\r\n \"firewallRules\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry/listCredentials?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5L2xpc3RDcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTEwLTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "360d52cb-060d-455f-829f-11bf37fa7317" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:42 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "30cc1420-388f-4116-9104-0dcd13c79323" + ], + "x-ms-correlation-request-id": [ + "30cc1420-388f-4116-9104-0dcd13c79323" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181143Z:30cc1420-388f-4116-9104-0dcd13c79323" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "175" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"username\": \"managedtestregistry\",\r\n \"passwords\": [\r\n {\r\n \"name\": \"password\",\r\n \"value\": \"2GoQeb3D8vs=2Kn8ijhGJMhkVXDHuHzt\"\r\n },\r\n {\r\n \"name\": \"password2\",\r\n \"value\": \"VBNhobRyJ6EPEKHye+v3Q4e6ujc28kJ/\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/acr/v1/prod%2Fbash/_manifests/sha256:eabe547f78d4c18c708dd97ec3166cf7464cc651f1cbb67e70d407405b7ad7b6", + "EncodedRequestUri": "L2Fjci92MS9wcm9kJTJGYmFzaC9fbWFuaWZlc3RzL3NoYTI1NiUzQWVhYmU1NDdmNzhkNGMxOGM3MDhkZDk3ZWMzMTY2Y2Y3NDY0Y2M2NTFmMWNiYjY3ZTcwZDQwNzQwNWI3YWQ3YjY=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1946147c-2966-4423-8aa1-9e3cb9e694d5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:45 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Correlation-Request-Id": [ + "e9923438-3e55-446e-acd9-a74ba5cb429c" + ], + "Content-Length": [ + "484" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ] + }, + "ResponseBody": "{\r\n \"registry\": \"managedtestregistry.azurecr.io\",\r\n \"imageName\": \"prod/bash\",\r\n \"manifest\": {\r\n \"digest\": \"sha256:eabe547f78d4c18c708dd97ec3166cf7464cc651f1cbb67e70d407405b7ad7b6\",\r\n \"createdTime\": \"2018-09-28T23:37:51.9987277Z\",\r\n \"lastUpdateTime\": \"2018-09-28T23:37:51.9987277Z\",\r\n \"architecture\": \"amd64\",\r\n \"os\": \"linux\",\r\n \"mediaType\": \"application/vnd.docker.distribution.manifest.v2+json\",\r\n \"tags\": [\r\n \"latest\"\r\n ],\r\n \"changeableAttributes\": {\r\n \"deleteEnabled\": true,\r\n \"writeEnabled\": true,\r\n \"readEnabled\": true,\r\n \"listEnabled\": true\r\n }\r\n }\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "dfb63c8c-7c89-4ef8-af13-75c1d873c895" + } +} \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.ManifestTests/GetAcrManifestsCRThrowException.json b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.ManifestTests/GetAcrManifestsCRThrowException.json new file mode 100644 index 000000000000..359eb999fd98 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.ManifestTests/GetAcrManifestsCRThrowException.json @@ -0,0 +1,186 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9jbGFzc2ljdGVzdHJlZ2lzdHJ5P2FwaS12ZXJzaW9uPTIwMTctMTAtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "07f2efc1-31f7-4ded-ae8f-6811507b4982" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "4c6a8de7-aef0-4abd-866a-7edc1b5ba1d8" + ], + "x-ms-correlation-request-id": [ + "4c6a8de7-aef0-4abd-866a-7edc1b5ba1d8" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181122Z:4c6a8de7-aef0-4abd-866a-7edc1b5ba1d8" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "685" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Classic\",\r\n \"tier\": \"Classic\"\r\n },\r\n \"type\": \"Microsoft.ContainerRegistry/registries\",\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry\",\r\n \"name\": \"classictestregistry\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"loginServer\": \"classictestregistry.azurecr.io\",\r\n \"creationDate\": \"2018-10-04T17:20:54.3121147Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"adminUserEnabled\": true,\r\n \"storageAccount\": {\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.Storage/storageAccounts/classictestregistr172020\"\r\n },\r\n \"firewallRulesEnabled\": false,\r\n \"firewallRules\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry/listCredentials?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9jbGFzc2ljdGVzdHJlZ2lzdHJ5L2xpc3RDcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTEwLTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e19fcaa6-4906-42cb-93ef-ecd3753b987b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:21 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "f3839aaf-900e-49c9-a451-7782e2cfa450" + ], + "x-ms-correlation-request-id": [ + "f3839aaf-900e-49c9-a451-7782e2cfa450" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181122Z:f3839aaf-900e-49c9-a451-7782e2cfa450" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "175" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"username\": \"classictestregistry\",\r\n \"passwords\": [\r\n {\r\n \"name\": \"password\",\r\n \"value\": \"YttZqPE=197fuiZ3Cf7YJIW010OxJvoO\"\r\n },\r\n {\r\n \"name\": \"password2\",\r\n \"value\": \"/cTqNKa2Mp3TrZakL2BBYVcOEIS5OG4i\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/acr/v1/prod%2Fbash/_manifests", + "EncodedRequestUri": "L2Fjci92MS9wcm9kJTJGYmFzaC9fbWFuaWZlc3Rz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6f7b4a85-e766-48c0-964d-b2f062968b9a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:24 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Correlation-Request-Id": [ + "f5d38460-aded-478a-bee1-3339d4c005cf" + ], + "Content-Length": [ + "90" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ] + }, + "ResponseBody": "{\r\n \"errors\": [\r\n {\r\n \"code\": \"UNSUPPORTED\",\r\n \"message\": \"The operation is unsupported.\",\r\n \"detail\": {}\r\n }\r\n ]\r\n}", + "StatusCode": 405 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "dfb63c8c-7c89-4ef8-af13-75c1d873c895" + } +} \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.ManifestTests/GetAcrManifestsMR.json b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.ManifestTests/GetAcrManifestsMR.json new file mode 100644 index 000000000000..f60a4408408a --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.ManifestTests/GetAcrManifestsMR.json @@ -0,0 +1,186 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5P2FwaS12ZXJzaW9uPTIwMTctMTAtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "febd5bb4-b618-4785-948f-20330a7e553d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "1ffbc87a-bb3d-4177-a901-e85f472257ea" + ], + "x-ms-correlation-request-id": [ + "1ffbc87a-bb3d-4177-a901-e85f472257ea" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181132Z:1ffbc87a-bb3d-4177-a901-e85f472257ea" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "514" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Premium\",\r\n \"tier\": \"Premium\"\r\n },\r\n \"type\": \"Microsoft.ContainerRegistry/registries\",\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry\",\r\n \"name\": \"managedtestregistry\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"loginServer\": \"managedtestregistry.azurecr.io\",\r\n \"creationDate\": \"2018-08-14T20:27:59.2394952Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"adminUserEnabled\": true,\r\n \"firewallRulesEnabled\": false,\r\n \"firewallRules\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry/listCredentials?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5L2xpc3RDcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTEwLTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "8cf73d69-d538-4179-bd87-56a54ccfffc2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:32 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "dbf8e944-7ee1-4d18-93fd-8938cb4b3b5d" + ], + "x-ms-correlation-request-id": [ + "dbf8e944-7ee1-4d18-93fd-8938cb4b3b5d" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181132Z:dbf8e944-7ee1-4d18-93fd-8938cb4b3b5d" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "175" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"username\": \"managedtestregistry\",\r\n \"passwords\": [\r\n {\r\n \"name\": \"password\",\r\n \"value\": \"2GoQeb3D8vs=2Kn8ijhGJMhkVXDHuHzt\"\r\n },\r\n {\r\n \"name\": \"password2\",\r\n \"value\": \"VBNhobRyJ6EPEKHye+v3Q4e6ujc28kJ/\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/acr/v1/prod%2Fbash/_manifests", + "EncodedRequestUri": "L2Fjci92MS9wcm9kJTJGYmFzaC9fbWFuaWZlc3Rz", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "cb156f5e-e3f0-4c1e-952f-3dbc8347c612" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:35 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Correlation-Request-Id": [ + "476c4cb8-1960-4d99-baa4-71fcf95a3b8c" + ], + "Content-Length": [ + "487" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ] + }, + "ResponseBody": "{\r\n \"registry\": \"managedtestregistry.azurecr.io\",\r\n \"imageName\": \"prod/bash\",\r\n \"manifests\": [\r\n {\r\n \"digest\": \"sha256:eabe547f78d4c18c708dd97ec3166cf7464cc651f1cbb67e70d407405b7ad7b6\",\r\n \"createdTime\": \"2018-09-28T23:37:51.9987277Z\",\r\n \"lastUpdateTime\": \"2018-09-28T23:37:51.9987277Z\",\r\n \"architecture\": \"amd64\",\r\n \"os\": \"linux\",\r\n \"mediaType\": \"application/vnd.docker.distribution.manifest.v2+json\",\r\n \"tags\": [\r\n \"latest\"\r\n ],\r\n \"changeableAttributes\": {\r\n \"deleteEnabled\": true,\r\n \"writeEnabled\": true,\r\n \"readEnabled\": true,\r\n \"listEnabled\": true\r\n }\r\n }\r\n ]\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "dfb63c8c-7c89-4ef8-af13-75c1d873c895" + } +} \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.ManifestTests/GetManifestCR.json b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.ManifestTests/GetManifestCR.json new file mode 100644 index 000000000000..2b2c206c7dbd --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.ManifestTests/GetManifestCR.json @@ -0,0 +1,198 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9jbGFzc2ljdGVzdHJlZ2lzdHJ5P2FwaS12ZXJzaW9uPTIwMTctMTAtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "78f6312e-85a0-41ca-a6bf-334c4d10d2c7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "dfd1ad76-0160-492b-a4e6-229909e10a66" + ], + "x-ms-correlation-request-id": [ + "dfd1ad76-0160-492b-a4e6-229909e10a66" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181137Z:dfd1ad76-0160-492b-a4e6-229909e10a66" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "685" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Classic\",\r\n \"tier\": \"Classic\"\r\n },\r\n \"type\": \"Microsoft.ContainerRegistry/registries\",\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry\",\r\n \"name\": \"classictestregistry\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"loginServer\": \"classictestregistry.azurecr.io\",\r\n \"creationDate\": \"2018-10-04T17:20:54.3121147Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"adminUserEnabled\": true,\r\n \"storageAccount\": {\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.Storage/storageAccounts/classictestregistr172020\"\r\n },\r\n \"firewallRulesEnabled\": false,\r\n \"firewallRules\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry/listCredentials?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9jbGFzc2ljdGVzdHJlZ2lzdHJ5L2xpc3RDcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTEwLTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d1f19366-5953-41a3-83e2-abedafb99d4c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:37 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "60bac01c-2467-479c-b663-1699360a04ab" + ], + "x-ms-correlation-request-id": [ + "60bac01c-2467-479c-b663-1699360a04ab" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181137Z:60bac01c-2467-479c-b663-1699360a04ab" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "175" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"username\": \"classictestregistry\",\r\n \"passwords\": [\r\n {\r\n \"name\": \"password\",\r\n \"value\": \"YttZqPE=197fuiZ3Cf7YJIW010OxJvoO\"\r\n },\r\n {\r\n \"name\": \"password2\",\r\n \"value\": \"/cTqNKa2Mp3TrZakL2BBYVcOEIS5OG4i\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/v2/prod%2Fbash/manifests/latest", + "EncodedRequestUri": "L3YyL3Byb2QlMkZiYXNoL21hbmlmZXN0cy9sYXRlc3Q=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "944868f1-5093-485e-a3fd-ec3fbe2379ba" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:40 GMT" + ], + "ETag": [ + "\"sha256:b00449b9d2a852b1efcc9c450620ad48b4b3b814e48c9ff83356c0d93f405a1b\"" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Content-Digest": [ + "sha256:b00449b9d2a852b1efcc9c450620ad48b4b3b814e48c9ff83356c0d93f405a1b" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Client-Request-Id": [ + "944868f1-5093-485e-a3fd-ec3fbe2379ba" + ], + "X-Ms-Correlation-Request-Id": [ + "2d242bc9-d7a4-4235-a75a-c7358a54f2d3" + ], + "X-Ms-Request-Id": [ + "33941e95-85de-4768-9efe-b5487a4ffe7c" + ], + "Content-Length": [ + "10495" + ], + "Content-Type": [ + "application/vnd.docker.distribution.manifest.v1+prettyjws" + ] + }, + "ResponseBody": "{\r\n \"schemaVersion\": 1,\r\n \"name\": \"prod/bash\",\r\n \"tag\": \"latest\",\r\n \"architecture\": \"amd64\",\r\n \"fsLayers\": [\r\n {\r\n \"blobSum\": \"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4\"\r\n },\r\n {\r\n \"blobSum\": \"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4\"\r\n },\r\n {\r\n \"blobSum\": \"sha256:348ba419c16c1affecad7abcc81d5052ee836782a22817e5253adf3c40cae072\"\r\n },\r\n {\r\n \"blobSum\": \"sha256:fd2c2fa831deb36c3d139de790b5905872f5fe58059c54f081c33e9e43813d27\"\r\n },\r\n {\r\n \"blobSum\": \"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4\"\r\n },\r\n {\r\n \"blobSum\": \"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4\"\r\n },\r\n {\r\n \"blobSum\": \"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4\"\r\n },\r\n {\r\n \"blobSum\": \"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4\"\r\n },\r\n {\r\n \"blobSum\": \"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4\"\r\n },\r\n {\r\n \"blobSum\": \"sha256:4fe2ade4980c2dda4fc95858ebb981489baec8c1e4bd282ab1c3560be8ff9bde\"\r\n }\r\n ],\r\n \"history\": [\r\n {\r\n \"v1Compatibility\": \"{\\\"architecture\\\":\\\"amd64\\\",\\\"config\\\":{\\\"Hostname\\\":\\\"\\\",\\\"Domainname\\\":\\\"\\\",\\\"User\\\":\\\"\\\",\\\"AttachStdin\\\":false,\\\"AttachStdout\\\":false,\\\"AttachStderr\\\":false,\\\"Tty\\\":false,\\\"OpenStdin\\\":false,\\\"StdinOnce\\\":false,\\\"Env\\\":[\\\"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\\\",\\\"_BASH_GPG_KEY=7C0135FB088AAF6C66C650B9BB5869F064EA74AB\\\",\\\"_BASH_VERSION=4.4\\\",\\\"_BASH_PATCH_LEVEL=18\\\",\\\"_BASH_LATEST_PATCH=23\\\"],\\\"Cmd\\\":[\\\"bash\\\"],\\\"ArgsEscaped\\\":true,\\\"Image\\\":\\\"sha256:b7c0039a4de529cd82cd423d2a683277168cf0fc45e1a190dce98866608bc60e\\\",\\\"Volumes\\\":null,\\\"WorkingDir\\\":\\\"\\\",\\\"Entrypoint\\\":[\\\"docker-entrypoint.sh\\\"],\\\"OnBuild\\\":[],\\\"Labels\\\":null},\\\"container\\\":\\\"50e6376d39faeb1683efdb633e1f055fcacec83ed6854e315f151e6767d41c1f\\\",\\\"container_config\\\":{\\\"Hostname\\\":\\\"50e6376d39fa\\\",\\\"Domainname\\\":\\\"\\\",\\\"User\\\":\\\"\\\",\\\"AttachStdin\\\":false,\\\"AttachStdout\\\":false,\\\"AttachStderr\\\":false,\\\"Tty\\\":false,\\\"OpenStdin\\\":false,\\\"StdinOnce\\\":false,\\\"Env\\\":[\\\"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\\\",\\\"_BASH_GPG_KEY=7C0135FB088AAF6C66C650B9BB5869F064EA74AB\\\",\\\"_BASH_VERSION=4.4\\\",\\\"_BASH_PATCH_LEVEL=18\\\",\\\"_BASH_LATEST_PATCH=23\\\"],\\\"Cmd\\\":[\\\"/bin/sh\\\",\\\"-c\\\",\\\"#(nop) \\\",\\\"CMD [\\\\\\\"bash\\\\\\\"]\\\"],\\\"ArgsEscaped\\\":true,\\\"Image\\\":\\\"sha256:b7c0039a4de529cd82cd423d2a683277168cf0fc45e1a190dce98866608bc60e\\\",\\\"Volumes\\\":null,\\\"WorkingDir\\\":\\\"\\\",\\\"Entrypoint\\\":[\\\"docker-entrypoint.sh\\\"],\\\"OnBuild\\\":[],\\\"Labels\\\":{}},\\\"created\\\":\\\"2018-09-11T22:38:32.722959016Z\\\",\\\"docker_version\\\":\\\"17.06.2-ce\\\",\\\"id\\\":\\\"1395982555d3020cfe7f9b405c1ab78826a17ee45d8c39b49d1501d1f15f8f51\\\",\\\"os\\\":\\\"linux\\\",\\\"parent\\\":\\\"586427e062031cb13af2a05b432ec0230cfe9a02f9a56b2c210fa1d7716adfd6\\\",\\\"throwaway\\\":true}\"\r\n },\r\n {\r\n \"v1Compatibility\": \"{\\\"id\\\":\\\"586427e062031cb13af2a05b432ec0230cfe9a02f9a56b2c210fa1d7716adfd6\\\",\\\"parent\\\":\\\"2a25c271a22b0219ead887e7d410beb1403f7232c98ebc5ef72d9ee74a166abd\\\",\\\"created\\\":\\\"2018-09-11T22:38:32.551009012Z\\\",\\\"container_config\\\":{\\\"Cmd\\\":[\\\"/bin/sh -c #(nop) ENTRYPOINT [\\\\\\\"docker-entrypoint.sh\\\\\\\"]\\\"]},\\\"throwaway\\\":true}\"\r\n },\r\n {\r\n \"v1Compatibility\": \"{\\\"id\\\":\\\"2a25c271a22b0219ead887e7d410beb1403f7232c98ebc5ef72d9ee74a166abd\\\",\\\"parent\\\":\\\"2e662f2e9795f4694d2d703c0680b19c77b4f2d763a7f054c81de0d0b3bb61cc\\\",\\\"created\\\":\\\"2018-09-11T22:38:32.375435669Z\\\",\\\"container_config\\\":{\\\"Cmd\\\":[\\\"/bin/sh -c #(nop) COPY file:fdf06dbdd83ac10faaf143ecd72819fb62707a3e7d98847f450da20c672c1bf5 in /usr/local/bin/ \\\"]}}\"\r\n },\r\n {\r\n \"v1Compatibility\": \"{\\\"id\\\":\\\"2e662f2e9795f4694d2d703c0680b19c77b4f2d763a7f054c81de0d0b3bb61cc\\\",\\\"parent\\\":\\\"6f3474755c98a4b9ccc4fb1baae3d383348ef79d08c28ac38e066b942e0370b2\\\",\\\"created\\\":\\\"2018-09-11T22:38:32.046381523Z\\\",\\\"container_config\\\":{\\\"Cmd\\\":[\\\"/bin/sh -c set -ex; \\\\t\\\\tapk add --no-cache --virtual .build-deps \\\\t\\\\tbison \\\\t\\\\tca-certificates \\\\t\\\\tcoreutils \\\\t\\\\tdpkg-dev dpkg \\\\t\\\\tgcc \\\\t\\\\tgnupg \\\\t\\\\tlibc-dev \\\\t\\\\tmake \\\\t\\\\tncurses-dev \\\\t\\\\topenssl \\\\t\\\\tpatch \\\\t\\\\ttar \\\\t; \\\\t\\\\tversion=\\\\\\\"$_BASH_VERSION\\\\\\\"; \\\\tif [ \\\\\\\"$_BASH_PATCH_LEVEL\\\\\\\" -gt 0 ]; then \\\\t\\\\tversion=\\\\\\\"$version.$_BASH_PATCH_LEVEL\\\\\\\"; \\\\tfi; \\\\twget -O bash.tar.gz \\\\\\\"https://ftp.gnu.org/gnu/bash/bash-$version.tar.gz\\\\\\\"; \\\\twget -O bash.tar.gz.sig \\\\\\\"https://ftp.gnu.org/gnu/bash/bash-$version.tar.gz.sig\\\\\\\"; \\\\t\\\\tif [ \\\\\\\"$_BASH_LATEST_PATCH\\\\\\\" -gt \\\\\\\"$_BASH_PATCH_LEVEL\\\\\\\" ]; then \\\\t\\\\tmkdir -p bash-patches; \\\\t\\\\tfirst=\\\\\\\"$(printf '%03d' \\\\\\\"$(( _BASH_PATCH_LEVEL + 1 ))\\\\\\\")\\\\\\\"; \\\\t\\\\tlast=\\\\\\\"$(printf '%03d' \\\\\\\"$_BASH_LATEST_PATCH\\\\\\\")\\\\\\\"; \\\\t\\\\tfor patch in $(seq -w \\\\\\\"$first\\\\\\\" \\\\\\\"$last\\\\\\\"); do \\\\t\\\\t\\\\turl=\\\\\\\"https://ftp.gnu.org/gnu/bash/bash-$_BASH_VERSION-patches/bash${_BASH_VERSION//./}-$patch\\\\\\\"; \\\\t\\\\t\\\\twget -O \\\\\\\"bash-patches/$patch\\\\\\\" \\\\\\\"$url\\\\\\\"; \\\\t\\\\t\\\\twget -O \\\\\\\"bash-patches/$patch.sig\\\\\\\" \\\\\\\"$url.sig\\\\\\\"; \\\\t\\\\tdone; \\\\tfi; \\\\t\\\\texport GNUPGHOME=\\\\\\\"$(mktemp -d)\\\\\\\"; \\\\tgpg --keyserver ha.pool.sks-keyservers.net --recv-keys \\\\\\\"$_BASH_GPG_KEY\\\\\\\"; \\\\tgpg --batch --verify bash.tar.gz.sig bash.tar.gz; \\\\tgpgconf --kill all; \\\\trm bash.tar.gz.sig; \\\\tif [ -d bash-patches ]; then \\\\t\\\\tfor sig in bash-patches/*.sig; do \\\\t\\\\t\\\\tp=\\\\\\\"${sig%.sig}\\\\\\\"; \\\\t\\\\t\\\\tgpg --batch --verify \\\\\\\"$sig\\\\\\\" \\\\\\\"$p\\\\\\\"; \\\\t\\\\t\\\\trm \\\\\\\"$sig\\\\\\\"; \\\\t\\\\tdone; \\\\tfi; \\\\trm -rf \\\\\\\"$GNUPGHOME\\\\\\\"; \\\\t\\\\tmkdir -p /usr/src/bash; \\\\ttar \\\\t\\\\t--extract \\\\t\\\\t--file=bash.tar.gz \\\\t\\\\t--strip-components=1 \\\\t\\\\t--directory=/usr/src/bash \\\\t; \\\\trm bash.tar.gz; \\\\t\\\\tif [ -d bash-patches ]; then \\\\t\\\\tfor p in bash-patches/*; do \\\\t\\\\t\\\\tpatch \\\\t\\\\t\\\\t\\\\t--directory=/usr/src/bash \\\\t\\\\t\\\\t\\\\t--input=\\\\\\\"$(readlink -f \\\\\\\"$p\\\\\\\")\\\\\\\" \\\\t\\\\t\\\\t\\\\t--strip=0 \\\\t\\\\t\\\\t; \\\\t\\\\t\\\\trm \\\\\\\"$p\\\\\\\"; \\\\t\\\\tdone; \\\\t\\\\trmdir bash-patches; \\\\tfi; \\\\t\\\\twget -O alpine-fix-jobs.patch 'https://github.com/alpinelinux/aports/raw/3239e62fb1c7968e923016358345a4dcc7e2f87d/main/bash/fix-jobs.patch'; \\\\techo '0e1a1d0f9d1ec90188beb99e5c6c5c92a2baeb26f9d4f147b4c9e0a2b697d2d13ff3210985b8ebf849f916af1cc124f655bd026b28f37d5abd51be7b9672da9a *alpine-fix-jobs.patch' | sha512sum -c -; \\\\tpatch --directory=/usr/src/bash --input=\\\\\\\"$PWD/alpine-fix-jobs.patch\\\\\\\" --strip=1; \\\\trm alpine-fix-jobs.patch; \\\\t\\\\tcd /usr/src/bash; \\\\tgnuArch=\\\\\\\"$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)\\\\\\\"; \\\\tfor f in config.guess config.sub; do \\\\t\\\\twget -O \\\\\\\"support/$f\\\\\\\" \\\\\\\"https://git.savannah.gnu.org/cgit/config.git/plain/$f?id=7d3d27baf8107b630586c962c057e22149653deb\\\\\\\"; \\\\tdone; \\\\t./configure \\\\t\\\\t--build=\\\\\\\"$gnuArch\\\\\\\" \\\\t\\\\t--enable-readline \\\\t\\\\t--with-curses \\\\t\\\\t--without-bash-malloc \\\\t|| { \\\\t\\\\tcat \\\\u003e\\\\u00262 config.log; \\\\t\\\\tfalse; \\\\t}; \\\\tmake -j \\\\\\\"$(nproc)\\\\\\\"; \\\\tmake install; \\\\tcd /; \\\\trm -r /usr/src/bash; \\\\t\\\\trm -r \\\\t\\\\t/usr/local/share/doc/bash/*.html \\\\t\\\\t/usr/local/share/info \\\\t\\\\t/usr/local/share/locale \\\\t\\\\t/usr/local/share/man \\\\t; \\\\t\\\\trunDeps=\\\\\\\"$( \\\\t\\\\tscanelf --needed --nobanner --format '%n#p' --recursive /usr/local \\\\t\\\\t\\\\t| tr ',' '\\\\\\\\n' \\\\t\\\\t\\\\t| sort -u \\\\t\\\\t\\\\t| awk 'system(\\\\\\\"[ -e /usr/local/lib/\\\\\\\" $1 \\\\\\\" ]\\\\\\\") == 0 { next } { print \\\\\\\"so:\\\\\\\" $1 }' \\\\t)\\\\\\\"; \\\\tapk add --no-cache --virtual .bash-rundeps $runDeps; \\\\tapk del .build-deps; \\\\t\\\\t[ \\\\\\\"$(which bash)\\\\\\\" = '/usr/local/bin/bash' ]; \\\\tbash --version; \\\\t[ \\\\\\\"$(bash -c 'echo \\\\\\\"${BASH_VERSION%%[^0-9.]*}\\\\\\\"')\\\\\\\" = \\\\\\\"$_BASH_VERSION.$_BASH_LATEST_PATCH\\\\\\\" ];\\\"]}}\"\r\n },\r\n {\r\n \"v1Compatibility\": \"{\\\"id\\\":\\\"6f3474755c98a4b9ccc4fb1baae3d383348ef79d08c28ac38e066b942e0370b2\\\",\\\"parent\\\":\\\"1e7dbcf306ac1b04006f8a16bf6577c61641e7d0b2f6bf7a2ee447e27ebd02d9\\\",\\\"created\\\":\\\"2018-09-11T22:37:43.251212091Z\\\",\\\"container_config\\\":{\\\"Cmd\\\":[\\\"/bin/sh -c #(nop) ENV _BASH_LATEST_PATCH=23\\\"]},\\\"throwaway\\\":true}\"\r\n },\r\n {\r\n \"v1Compatibility\": \"{\\\"id\\\":\\\"1e7dbcf306ac1b04006f8a16bf6577c61641e7d0b2f6bf7a2ee447e27ebd02d9\\\",\\\"parent\\\":\\\"7bc1650851f7d5c9774c84e43bf42e1ae0d97664f9d8f8f3130b362cbb17d6e8\\\",\\\"created\\\":\\\"2018-09-11T22:37:43.08803913Z\\\",\\\"container_config\\\":{\\\"Cmd\\\":[\\\"/bin/sh -c #(nop) ENV _BASH_PATCH_LEVEL=18\\\"]},\\\"throwaway\\\":true}\"\r\n },\r\n {\r\n \"v1Compatibility\": \"{\\\"id\\\":\\\"7bc1650851f7d5c9774c84e43bf42e1ae0d97664f9d8f8f3130b362cbb17d6e8\\\",\\\"parent\\\":\\\"15c57f63676e7b76cc1ec9d4f5f044546d85b0a2851d8f0843fff1bb16ad41bc\\\",\\\"created\\\":\\\"2018-09-11T22:37:42.91904665Z\\\",\\\"container_config\\\":{\\\"Cmd\\\":[\\\"/bin/sh -c #(nop) ENV _BASH_VERSION=4.4\\\"]},\\\"throwaway\\\":true}\"\r\n },\r\n {\r\n \"v1Compatibility\": \"{\\\"id\\\":\\\"15c57f63676e7b76cc1ec9d4f5f044546d85b0a2851d8f0843fff1bb16ad41bc\\\",\\\"parent\\\":\\\"1e14a6ee8465a66fa5faddad94b043c6efbbe0743e8f5062d788e54e93e8c4ad\\\",\\\"created\\\":\\\"2018-09-11T22:37:42.726924552Z\\\",\\\"container_config\\\":{\\\"Cmd\\\":[\\\"/bin/sh -c #(nop) ENV _BASH_GPG_KEY=7C0135FB088AAF6C66C650B9BB5869F064EA74AB\\\"]},\\\"throwaway\\\":true}\"\r\n },\r\n {\r\n \"v1Compatibility\": \"{\\\"id\\\":\\\"1e14a6ee8465a66fa5faddad94b043c6efbbe0743e8f5062d788e54e93e8c4ad\\\",\\\"parent\\\":\\\"70034ea7817b10a77d60705f61423abcc61b8bb299571494ddbfd4f1f83f46ee\\\",\\\"created\\\":\\\"2018-09-11T22:19:50.322783064Z\\\",\\\"container_config\\\":{\\\"Cmd\\\":[\\\"/bin/sh -c #(nop) CMD [\\\\\\\"/bin/sh\\\\\\\"]\\\"]},\\\"throwaway\\\":true}\"\r\n },\r\n {\r\n \"v1Compatibility\": \"{\\\"id\\\":\\\"70034ea7817b10a77d60705f61423abcc61b8bb299571494ddbfd4f1f83f46ee\\\",\\\"created\\\":\\\"2018-09-11T22:19:50.165674013Z\\\",\\\"container_config\\\":{\\\"Cmd\\\":[\\\"/bin/sh -c #(nop) ADD file:25c10b1d1b41d46a1827ad0b0d2389c24df6d31430005ff4e9a2d84ea23ebd42 in / \\\"]}}\"\r\n }\r\n ],\r\n \"signatures\": [\r\n {\r\n \"header\": {\r\n \"jwk\": {\r\n \"crv\": \"P-256\",\r\n \"kid\": \"JNKX:C7WE:KSDL:TQFP:SVCV:HTT7:JJN7:VJRB:SAYN:ODWO:DTEU:MF26\",\r\n \"kty\": \"EC\",\r\n \"x\": \"rp1wTZDvDw-9L4vdXNqIIcr2UjLkHe4FDuPlsf802r4\",\r\n \"y\": \"Tv3NMC5InKuzvcshFFp-ogSvhF8pGp8c4sz5lmm9UfM\"\r\n },\r\n \"alg\": \"ES256\"\r\n },\r\n \"signature\": \"yajNoFBOx4NxMzqLLuRMTk3cQu8CIQeS3KF7EPf-S25VxRlDOw-de9DVAwJxsIttVvp11QXRkjAbNIYNQ_viQQ\",\r\n \"protected\": \"eyJmb3JtYXRMZW5ndGgiOjk4NDgsImZvcm1hdFRhaWwiOiJDbjAiLCJ0aW1lIjoiMjAxOC0xMC0wOFQxODoxMTo0MFoifQ\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "dfb63c8c-7c89-4ef8-af13-75c1d873c895" + } +} \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.ManifestTests/GetManifestMR.json b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.ManifestTests/GetManifestMR.json new file mode 100644 index 000000000000..96ee21786519 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.ManifestTests/GetManifestMR.json @@ -0,0 +1,198 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5P2FwaS12ZXJzaW9uPTIwMTctMTAtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d8b2d239-e982-483a-a115-f948e5ad504f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11997" + ], + "x-ms-request-id": [ + "55dbe848-0388-4b60-9ead-8405efcf87c0" + ], + "x-ms-correlation-request-id": [ + "55dbe848-0388-4b60-9ead-8405efcf87c0" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181127Z:55dbe848-0388-4b60-9ead-8405efcf87c0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "514" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Premium\",\r\n \"tier\": \"Premium\"\r\n },\r\n \"type\": \"Microsoft.ContainerRegistry/registries\",\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry\",\r\n \"name\": \"managedtestregistry\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"loginServer\": \"managedtestregistry.azurecr.io\",\r\n \"creationDate\": \"2018-08-14T20:27:59.2394952Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"adminUserEnabled\": true,\r\n \"firewallRulesEnabled\": false,\r\n \"firewallRules\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry/listCredentials?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5L2xpc3RDcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTEwLTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e598aa61-4bf1-4c6a-b125-ea28964ca435" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:27 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-request-id": [ + "887cea0b-7b65-40db-9cb7-cae20d0711d2" + ], + "x-ms-correlation-request-id": [ + "887cea0b-7b65-40db-9cb7-cae20d0711d2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181127Z:887cea0b-7b65-40db-9cb7-cae20d0711d2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "175" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"username\": \"managedtestregistry\",\r\n \"passwords\": [\r\n {\r\n \"name\": \"password\",\r\n \"value\": \"2GoQeb3D8vs=2Kn8ijhGJMhkVXDHuHzt\"\r\n },\r\n {\r\n \"name\": \"password2\",\r\n \"value\": \"VBNhobRyJ6EPEKHye+v3Q4e6ujc28kJ/\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/v2/test%2Fbash/manifests/latest", + "EncodedRequestUri": "L3YyL3Rlc3QlMkZiYXNoL21hbmlmZXN0cy9sYXRlc3Q=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "eb5d1941-3afb-4719-99ff-ff7741e88923" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:30 GMT" + ], + "ETag": [ + "\"sha256:73b93397039026bf313eded16153c9c76c392deb0f15da70836cd216b70e7f74\"" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Content-Digest": [ + "sha256:73b93397039026bf313eded16153c9c76c392deb0f15da70836cd216b70e7f74" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Client-Request-Id": [ + "eb5d1941-3afb-4719-99ff-ff7741e88923" + ], + "X-Ms-Correlation-Request-Id": [ + "a4f3dff2-0145-4ab9-87bd-9db9f9e2d594" + ], + "X-Ms-Request-Id": [ + "cc5c1a11-7418-4fb5-b556-9f3632dbbc1f" + ], + "Content-Length": [ + "10495" + ], + "Content-Type": [ + "application/vnd.docker.distribution.manifest.v1+prettyjws" + ] + }, + "ResponseBody": "{\r\n \"schemaVersion\": 1,\r\n \"name\": \"test/bash\",\r\n \"tag\": \"latest\",\r\n \"architecture\": \"amd64\",\r\n \"fsLayers\": [\r\n {\r\n \"blobSum\": \"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4\"\r\n },\r\n {\r\n \"blobSum\": \"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4\"\r\n },\r\n {\r\n \"blobSum\": \"sha256:348ba419c16c1affecad7abcc81d5052ee836782a22817e5253adf3c40cae072\"\r\n },\r\n {\r\n \"blobSum\": \"sha256:fd2c2fa831deb36c3d139de790b5905872f5fe58059c54f081c33e9e43813d27\"\r\n },\r\n {\r\n \"blobSum\": \"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4\"\r\n },\r\n {\r\n \"blobSum\": \"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4\"\r\n },\r\n {\r\n \"blobSum\": \"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4\"\r\n },\r\n {\r\n \"blobSum\": \"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4\"\r\n },\r\n {\r\n \"blobSum\": \"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4\"\r\n },\r\n {\r\n \"blobSum\": \"sha256:4fe2ade4980c2dda4fc95858ebb981489baec8c1e4bd282ab1c3560be8ff9bde\"\r\n }\r\n ],\r\n \"history\": [\r\n {\r\n \"v1Compatibility\": \"{\\\"architecture\\\":\\\"amd64\\\",\\\"config\\\":{\\\"Hostname\\\":\\\"\\\",\\\"Domainname\\\":\\\"\\\",\\\"User\\\":\\\"\\\",\\\"AttachStdin\\\":false,\\\"AttachStdout\\\":false,\\\"AttachStderr\\\":false,\\\"Tty\\\":false,\\\"OpenStdin\\\":false,\\\"StdinOnce\\\":false,\\\"Env\\\":[\\\"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\\\",\\\"_BASH_GPG_KEY=7C0135FB088AAF6C66C650B9BB5869F064EA74AB\\\",\\\"_BASH_VERSION=4.4\\\",\\\"_BASH_PATCH_LEVEL=18\\\",\\\"_BASH_LATEST_PATCH=23\\\"],\\\"Cmd\\\":[\\\"bash\\\"],\\\"ArgsEscaped\\\":true,\\\"Image\\\":\\\"sha256:b7c0039a4de529cd82cd423d2a683277168cf0fc45e1a190dce98866608bc60e\\\",\\\"Volumes\\\":null,\\\"WorkingDir\\\":\\\"\\\",\\\"Entrypoint\\\":[\\\"docker-entrypoint.sh\\\"],\\\"OnBuild\\\":[],\\\"Labels\\\":null},\\\"container\\\":\\\"50e6376d39faeb1683efdb633e1f055fcacec83ed6854e315f151e6767d41c1f\\\",\\\"container_config\\\":{\\\"Hostname\\\":\\\"50e6376d39fa\\\",\\\"Domainname\\\":\\\"\\\",\\\"User\\\":\\\"\\\",\\\"AttachStdin\\\":false,\\\"AttachStdout\\\":false,\\\"AttachStderr\\\":false,\\\"Tty\\\":false,\\\"OpenStdin\\\":false,\\\"StdinOnce\\\":false,\\\"Env\\\":[\\\"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\\\",\\\"_BASH_GPG_KEY=7C0135FB088AAF6C66C650B9BB5869F064EA74AB\\\",\\\"_BASH_VERSION=4.4\\\",\\\"_BASH_PATCH_LEVEL=18\\\",\\\"_BASH_LATEST_PATCH=23\\\"],\\\"Cmd\\\":[\\\"/bin/sh\\\",\\\"-c\\\",\\\"#(nop) \\\",\\\"CMD [\\\\\\\"bash\\\\\\\"]\\\"],\\\"ArgsEscaped\\\":true,\\\"Image\\\":\\\"sha256:b7c0039a4de529cd82cd423d2a683277168cf0fc45e1a190dce98866608bc60e\\\",\\\"Volumes\\\":null,\\\"WorkingDir\\\":\\\"\\\",\\\"Entrypoint\\\":[\\\"docker-entrypoint.sh\\\"],\\\"OnBuild\\\":[],\\\"Labels\\\":{}},\\\"created\\\":\\\"2018-09-11T22:38:32.722959016Z\\\",\\\"docker_version\\\":\\\"17.06.2-ce\\\",\\\"id\\\":\\\"1395982555d3020cfe7f9b405c1ab78826a17ee45d8c39b49d1501d1f15f8f51\\\",\\\"os\\\":\\\"linux\\\",\\\"parent\\\":\\\"586427e062031cb13af2a05b432ec0230cfe9a02f9a56b2c210fa1d7716adfd6\\\",\\\"throwaway\\\":true}\"\r\n },\r\n {\r\n \"v1Compatibility\": \"{\\\"id\\\":\\\"586427e062031cb13af2a05b432ec0230cfe9a02f9a56b2c210fa1d7716adfd6\\\",\\\"parent\\\":\\\"2a25c271a22b0219ead887e7d410beb1403f7232c98ebc5ef72d9ee74a166abd\\\",\\\"created\\\":\\\"2018-09-11T22:38:32.551009012Z\\\",\\\"container_config\\\":{\\\"Cmd\\\":[\\\"/bin/sh -c #(nop) ENTRYPOINT [\\\\\\\"docker-entrypoint.sh\\\\\\\"]\\\"]},\\\"throwaway\\\":true}\"\r\n },\r\n {\r\n \"v1Compatibility\": \"{\\\"id\\\":\\\"2a25c271a22b0219ead887e7d410beb1403f7232c98ebc5ef72d9ee74a166abd\\\",\\\"parent\\\":\\\"2e662f2e9795f4694d2d703c0680b19c77b4f2d763a7f054c81de0d0b3bb61cc\\\",\\\"created\\\":\\\"2018-09-11T22:38:32.375435669Z\\\",\\\"container_config\\\":{\\\"Cmd\\\":[\\\"/bin/sh -c #(nop) COPY file:fdf06dbdd83ac10faaf143ecd72819fb62707a3e7d98847f450da20c672c1bf5 in /usr/local/bin/ \\\"]}}\"\r\n },\r\n {\r\n \"v1Compatibility\": \"{\\\"id\\\":\\\"2e662f2e9795f4694d2d703c0680b19c77b4f2d763a7f054c81de0d0b3bb61cc\\\",\\\"parent\\\":\\\"6f3474755c98a4b9ccc4fb1baae3d383348ef79d08c28ac38e066b942e0370b2\\\",\\\"created\\\":\\\"2018-09-11T22:38:32.046381523Z\\\",\\\"container_config\\\":{\\\"Cmd\\\":[\\\"/bin/sh -c set -ex; \\\\t\\\\tapk add --no-cache --virtual .build-deps \\\\t\\\\tbison \\\\t\\\\tca-certificates \\\\t\\\\tcoreutils \\\\t\\\\tdpkg-dev dpkg \\\\t\\\\tgcc \\\\t\\\\tgnupg \\\\t\\\\tlibc-dev \\\\t\\\\tmake \\\\t\\\\tncurses-dev \\\\t\\\\topenssl \\\\t\\\\tpatch \\\\t\\\\ttar \\\\t; \\\\t\\\\tversion=\\\\\\\"$_BASH_VERSION\\\\\\\"; \\\\tif [ \\\\\\\"$_BASH_PATCH_LEVEL\\\\\\\" -gt 0 ]; then \\\\t\\\\tversion=\\\\\\\"$version.$_BASH_PATCH_LEVEL\\\\\\\"; \\\\tfi; \\\\twget -O bash.tar.gz \\\\\\\"https://ftp.gnu.org/gnu/bash/bash-$version.tar.gz\\\\\\\"; \\\\twget -O bash.tar.gz.sig \\\\\\\"https://ftp.gnu.org/gnu/bash/bash-$version.tar.gz.sig\\\\\\\"; \\\\t\\\\tif [ \\\\\\\"$_BASH_LATEST_PATCH\\\\\\\" -gt \\\\\\\"$_BASH_PATCH_LEVEL\\\\\\\" ]; then \\\\t\\\\tmkdir -p bash-patches; \\\\t\\\\tfirst=\\\\\\\"$(printf '%03d' \\\\\\\"$(( _BASH_PATCH_LEVEL + 1 ))\\\\\\\")\\\\\\\"; \\\\t\\\\tlast=\\\\\\\"$(printf '%03d' \\\\\\\"$_BASH_LATEST_PATCH\\\\\\\")\\\\\\\"; \\\\t\\\\tfor patch in $(seq -w \\\\\\\"$first\\\\\\\" \\\\\\\"$last\\\\\\\"); do \\\\t\\\\t\\\\turl=\\\\\\\"https://ftp.gnu.org/gnu/bash/bash-$_BASH_VERSION-patches/bash${_BASH_VERSION//./}-$patch\\\\\\\"; \\\\t\\\\t\\\\twget -O \\\\\\\"bash-patches/$patch\\\\\\\" \\\\\\\"$url\\\\\\\"; \\\\t\\\\t\\\\twget -O \\\\\\\"bash-patches/$patch.sig\\\\\\\" \\\\\\\"$url.sig\\\\\\\"; \\\\t\\\\tdone; \\\\tfi; \\\\t\\\\texport GNUPGHOME=\\\\\\\"$(mktemp -d)\\\\\\\"; \\\\tgpg --keyserver ha.pool.sks-keyservers.net --recv-keys \\\\\\\"$_BASH_GPG_KEY\\\\\\\"; \\\\tgpg --batch --verify bash.tar.gz.sig bash.tar.gz; \\\\tgpgconf --kill all; \\\\trm bash.tar.gz.sig; \\\\tif [ -d bash-patches ]; then \\\\t\\\\tfor sig in bash-patches/*.sig; do \\\\t\\\\t\\\\tp=\\\\\\\"${sig%.sig}\\\\\\\"; \\\\t\\\\t\\\\tgpg --batch --verify \\\\\\\"$sig\\\\\\\" \\\\\\\"$p\\\\\\\"; \\\\t\\\\t\\\\trm \\\\\\\"$sig\\\\\\\"; \\\\t\\\\tdone; \\\\tfi; \\\\trm -rf \\\\\\\"$GNUPGHOME\\\\\\\"; \\\\t\\\\tmkdir -p /usr/src/bash; \\\\ttar \\\\t\\\\t--extract \\\\t\\\\t--file=bash.tar.gz \\\\t\\\\t--strip-components=1 \\\\t\\\\t--directory=/usr/src/bash \\\\t; \\\\trm bash.tar.gz; \\\\t\\\\tif [ -d bash-patches ]; then \\\\t\\\\tfor p in bash-patches/*; do \\\\t\\\\t\\\\tpatch \\\\t\\\\t\\\\t\\\\t--directory=/usr/src/bash \\\\t\\\\t\\\\t\\\\t--input=\\\\\\\"$(readlink -f \\\\\\\"$p\\\\\\\")\\\\\\\" \\\\t\\\\t\\\\t\\\\t--strip=0 \\\\t\\\\t\\\\t; \\\\t\\\\t\\\\trm \\\\\\\"$p\\\\\\\"; \\\\t\\\\tdone; \\\\t\\\\trmdir bash-patches; \\\\tfi; \\\\t\\\\twget -O alpine-fix-jobs.patch 'https://github.com/alpinelinux/aports/raw/3239e62fb1c7968e923016358345a4dcc7e2f87d/main/bash/fix-jobs.patch'; \\\\techo '0e1a1d0f9d1ec90188beb99e5c6c5c92a2baeb26f9d4f147b4c9e0a2b697d2d13ff3210985b8ebf849f916af1cc124f655bd026b28f37d5abd51be7b9672da9a *alpine-fix-jobs.patch' | sha512sum -c -; \\\\tpatch --directory=/usr/src/bash --input=\\\\\\\"$PWD/alpine-fix-jobs.patch\\\\\\\" --strip=1; \\\\trm alpine-fix-jobs.patch; \\\\t\\\\tcd /usr/src/bash; \\\\tgnuArch=\\\\\\\"$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)\\\\\\\"; \\\\tfor f in config.guess config.sub; do \\\\t\\\\twget -O \\\\\\\"support/$f\\\\\\\" \\\\\\\"https://git.savannah.gnu.org/cgit/config.git/plain/$f?id=7d3d27baf8107b630586c962c057e22149653deb\\\\\\\"; \\\\tdone; \\\\t./configure \\\\t\\\\t--build=\\\\\\\"$gnuArch\\\\\\\" \\\\t\\\\t--enable-readline \\\\t\\\\t--with-curses \\\\t\\\\t--without-bash-malloc \\\\t|| { \\\\t\\\\tcat \\\\u003e\\\\u00262 config.log; \\\\t\\\\tfalse; \\\\t}; \\\\tmake -j \\\\\\\"$(nproc)\\\\\\\"; \\\\tmake install; \\\\tcd /; \\\\trm -r /usr/src/bash; \\\\t\\\\trm -r \\\\t\\\\t/usr/local/share/doc/bash/*.html \\\\t\\\\t/usr/local/share/info \\\\t\\\\t/usr/local/share/locale \\\\t\\\\t/usr/local/share/man \\\\t; \\\\t\\\\trunDeps=\\\\\\\"$( \\\\t\\\\tscanelf --needed --nobanner --format '%n#p' --recursive /usr/local \\\\t\\\\t\\\\t| tr ',' '\\\\\\\\n' \\\\t\\\\t\\\\t| sort -u \\\\t\\\\t\\\\t| awk 'system(\\\\\\\"[ -e /usr/local/lib/\\\\\\\" $1 \\\\\\\" ]\\\\\\\") == 0 { next } { print \\\\\\\"so:\\\\\\\" $1 }' \\\\t)\\\\\\\"; \\\\tapk add --no-cache --virtual .bash-rundeps $runDeps; \\\\tapk del .build-deps; \\\\t\\\\t[ \\\\\\\"$(which bash)\\\\\\\" = '/usr/local/bin/bash' ]; \\\\tbash --version; \\\\t[ \\\\\\\"$(bash -c 'echo \\\\\\\"${BASH_VERSION%%[^0-9.]*}\\\\\\\"')\\\\\\\" = \\\\\\\"$_BASH_VERSION.$_BASH_LATEST_PATCH\\\\\\\" ];\\\"]}}\"\r\n },\r\n {\r\n \"v1Compatibility\": \"{\\\"id\\\":\\\"6f3474755c98a4b9ccc4fb1baae3d383348ef79d08c28ac38e066b942e0370b2\\\",\\\"parent\\\":\\\"1e7dbcf306ac1b04006f8a16bf6577c61641e7d0b2f6bf7a2ee447e27ebd02d9\\\",\\\"created\\\":\\\"2018-09-11T22:37:43.251212091Z\\\",\\\"container_config\\\":{\\\"Cmd\\\":[\\\"/bin/sh -c #(nop) ENV _BASH_LATEST_PATCH=23\\\"]},\\\"throwaway\\\":true}\"\r\n },\r\n {\r\n \"v1Compatibility\": \"{\\\"id\\\":\\\"1e7dbcf306ac1b04006f8a16bf6577c61641e7d0b2f6bf7a2ee447e27ebd02d9\\\",\\\"parent\\\":\\\"7bc1650851f7d5c9774c84e43bf42e1ae0d97664f9d8f8f3130b362cbb17d6e8\\\",\\\"created\\\":\\\"2018-09-11T22:37:43.08803913Z\\\",\\\"container_config\\\":{\\\"Cmd\\\":[\\\"/bin/sh -c #(nop) ENV _BASH_PATCH_LEVEL=18\\\"]},\\\"throwaway\\\":true}\"\r\n },\r\n {\r\n \"v1Compatibility\": \"{\\\"id\\\":\\\"7bc1650851f7d5c9774c84e43bf42e1ae0d97664f9d8f8f3130b362cbb17d6e8\\\",\\\"parent\\\":\\\"15c57f63676e7b76cc1ec9d4f5f044546d85b0a2851d8f0843fff1bb16ad41bc\\\",\\\"created\\\":\\\"2018-09-11T22:37:42.91904665Z\\\",\\\"container_config\\\":{\\\"Cmd\\\":[\\\"/bin/sh -c #(nop) ENV _BASH_VERSION=4.4\\\"]},\\\"throwaway\\\":true}\"\r\n },\r\n {\r\n \"v1Compatibility\": \"{\\\"id\\\":\\\"15c57f63676e7b76cc1ec9d4f5f044546d85b0a2851d8f0843fff1bb16ad41bc\\\",\\\"parent\\\":\\\"1e14a6ee8465a66fa5faddad94b043c6efbbe0743e8f5062d788e54e93e8c4ad\\\",\\\"created\\\":\\\"2018-09-11T22:37:42.726924552Z\\\",\\\"container_config\\\":{\\\"Cmd\\\":[\\\"/bin/sh -c #(nop) ENV _BASH_GPG_KEY=7C0135FB088AAF6C66C650B9BB5869F064EA74AB\\\"]},\\\"throwaway\\\":true}\"\r\n },\r\n {\r\n \"v1Compatibility\": \"{\\\"id\\\":\\\"1e14a6ee8465a66fa5faddad94b043c6efbbe0743e8f5062d788e54e93e8c4ad\\\",\\\"parent\\\":\\\"70034ea7817b10a77d60705f61423abcc61b8bb299571494ddbfd4f1f83f46ee\\\",\\\"created\\\":\\\"2018-09-11T22:19:50.322783064Z\\\",\\\"container_config\\\":{\\\"Cmd\\\":[\\\"/bin/sh -c #(nop) CMD [\\\\\\\"/bin/sh\\\\\\\"]\\\"]},\\\"throwaway\\\":true}\"\r\n },\r\n {\r\n \"v1Compatibility\": \"{\\\"id\\\":\\\"70034ea7817b10a77d60705f61423abcc61b8bb299571494ddbfd4f1f83f46ee\\\",\\\"created\\\":\\\"2018-09-11T22:19:50.165674013Z\\\",\\\"container_config\\\":{\\\"Cmd\\\":[\\\"/bin/sh -c #(nop) ADD file:25c10b1d1b41d46a1827ad0b0d2389c24df6d31430005ff4e9a2d84ea23ebd42 in / \\\"]}}\"\r\n }\r\n ],\r\n \"signatures\": [\r\n {\r\n \"header\": {\r\n \"jwk\": {\r\n \"crv\": \"P-256\",\r\n \"kid\": \"GFSX:F5MW:YTXR:XUXH:KR5D:K2ND:4GQY:U4GN:G23C:NHAZ:F2GD:CQ4G\",\r\n \"kty\": \"EC\",\r\n \"x\": \"7nqjVr3oNn3Ij02LGGx2lq_P5Cu3viEGaM3gnrPyq1A\",\r\n \"y\": \"cRVHNDWgErFGTTSPR9ilQXGM_xEmXFfXYVs8SQwpU48\"\r\n },\r\n \"alg\": \"ES256\"\r\n },\r\n \"signature\": \"bEyB75q_4Pioajrc4FTBAx005CqDo30Pj38Ne2kPiyKW2m-rI2oHBvCwmYZCay_zIgnSYzm4lwAiVc9QoN_9-w\",\r\n \"protected\": \"eyJmb3JtYXRMZW5ndGgiOjk4NDgsImZvcm1hdFRhaWwiOiJDbjAiLCJ0aW1lIjoiMjAxOC0xMC0wOFQxODoxMTozMFoifQ\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "dfb63c8c-7c89-4ef8-af13-75c1d873c895" + } +} \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.ManifestTests/UpdateAcrManifestAttributesMR.json b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.ManifestTests/UpdateAcrManifestAttributesMR.json new file mode 100644 index 000000000000..27c2f34b987a --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.ManifestTests/UpdateAcrManifestAttributesMR.json @@ -0,0 +1,354 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5P2FwaS12ZXJzaW9uPTIwMTctMTAtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "986f7df5-486e-4e37-8351-f78e3a116780" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:16 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "5328eeee-ed5a-4402-8e4a-3eed252fdb47" + ], + "x-ms-correlation-request-id": [ + "5328eeee-ed5a-4402-8e4a-3eed252fdb47" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181116Z:5328eeee-ed5a-4402-8e4a-3eed252fdb47" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "514" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Premium\",\r\n \"tier\": \"Premium\"\r\n },\r\n \"type\": \"Microsoft.ContainerRegistry/registries\",\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry\",\r\n \"name\": \"managedtestregistry\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"loginServer\": \"managedtestregistry.azurecr.io\",\r\n \"creationDate\": \"2018-08-14T20:27:59.2394952Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"adminUserEnabled\": true,\r\n \"firewallRulesEnabled\": false,\r\n \"firewallRules\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry/listCredentials?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5L2xpc3RDcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTEwLTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "76d222cb-a9b9-432e-89cd-f6ff715d7e58" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:16 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "fe3f54d1-fa49-4501-ac1d-21b7f774bf25" + ], + "x-ms-correlation-request-id": [ + "fe3f54d1-fa49-4501-ac1d-21b7f774bf25" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181116Z:fe3f54d1-fa49-4501-ac1d-21b7f774bf25" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "175" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"username\": \"managedtestregistry\",\r\n \"passwords\": [\r\n {\r\n \"name\": \"password\",\r\n \"value\": \"2GoQeb3D8vs=2Kn8ijhGJMhkVXDHuHzt\"\r\n },\r\n {\r\n \"name\": \"password2\",\r\n \"value\": \"VBNhobRyJ6EPEKHye+v3Q4e6ujc28kJ/\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/acr/v1/prod%2Fbash/_manifests/sha256:eabe547f78d4c18c708dd97ec3166cf7464cc651f1cbb67e70d407405b7ad7b6", + "EncodedRequestUri": "L2Fjci92MS9wcm9kJTJGYmFzaC9fbWFuaWZlc3RzL3NoYTI1NiUzQWVhYmU1NDdmNzhkNGMxOGM3MDhkZDk3ZWMzMTY2Y2Y3NDY0Y2M2NTFmMWNiYjY3ZTcwZDQwNzQwNWI3YWQ3YjY=", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"deleteEnabled\": true,\r\n \"writeEnabled\": false,\r\n \"listEnabled\": true,\r\n \"readEnabled\": true\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c8deddf3-7cfc-4aef-a81c-db7de994ccca" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "103" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:19 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Correlation-Request-Id": [ + "786b939c-fc76-467b-8693-812509b62176" + ] + }, + "ResponseBody": "", + "StatusCode": 204 + }, + { + "RequestUri": "/acr/v1/prod%2Fbash/_manifests/sha256:eabe547f78d4c18c708dd97ec3166cf7464cc651f1cbb67e70d407405b7ad7b6", + "EncodedRequestUri": "L2Fjci92MS9wcm9kJTJGYmFzaC9fbWFuaWZlc3RzL3NoYTI1NiUzQWVhYmU1NDdmNzhkNGMxOGM3MDhkZDk3ZWMzMTY2Y2Y3NDY0Y2M2NTFmMWNiYjY3ZTcwZDQwNzQwNWI3YWQ3YjY=", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"deleteEnabled\": true,\r\n \"writeEnabled\": true,\r\n \"listEnabled\": true,\r\n \"readEnabled\": true\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a3195536-c055-4479-9bb3-bc2d0d8653d5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "102" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:19 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Correlation-Request-Id": [ + "50d00f61-0d04-474d-bdaf-e12d777f33d2" + ] + }, + "ResponseBody": "", + "StatusCode": 204 + }, + { + "RequestUri": "/acr/v1/prod%2Fbash/_manifests/sha256:eabe547f78d4c18c708dd97ec3166cf7464cc651f1cbb67e70d407405b7ad7b6", + "EncodedRequestUri": "L2Fjci92MS9wcm9kJTJGYmFzaC9fbWFuaWZlc3RzL3NoYTI1NiUzQWVhYmU1NDdmNzhkNGMxOGM3MDhkZDk3ZWMzMTY2Y2Y3NDY0Y2M2NTFmMWNiYjY3ZTcwZDQwNzQwNWI3YWQ3YjY=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e8a1a795-c2fb-4a40-acb7-351df2268963" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:19 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Correlation-Request-Id": [ + "229145a3-951c-4586-8ae9-220e0f8b8053" + ], + "Content-Length": [ + "485" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ] + }, + "ResponseBody": "{\r\n \"registry\": \"managedtestregistry.azurecr.io\",\r\n \"imageName\": \"prod/bash\",\r\n \"manifest\": {\r\n \"digest\": \"sha256:eabe547f78d4c18c708dd97ec3166cf7464cc651f1cbb67e70d407405b7ad7b6\",\r\n \"createdTime\": \"2018-09-28T23:37:51.9987277Z\",\r\n \"lastUpdateTime\": \"2018-09-28T23:37:51.9987277Z\",\r\n \"architecture\": \"amd64\",\r\n \"os\": \"linux\",\r\n \"mediaType\": \"application/vnd.docker.distribution.manifest.v2+json\",\r\n \"tags\": [\r\n \"latest\"\r\n ],\r\n \"changeableAttributes\": {\r\n \"deleteEnabled\": true,\r\n \"writeEnabled\": false,\r\n \"readEnabled\": true,\r\n \"listEnabled\": true\r\n }\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/acr/v1/prod%2Fbash/_manifests/sha256:eabe547f78d4c18c708dd97ec3166cf7464cc651f1cbb67e70d407405b7ad7b6", + "EncodedRequestUri": "L2Fjci92MS9wcm9kJTJGYmFzaC9fbWFuaWZlc3RzL3NoYTI1NiUzQWVhYmU1NDdmNzhkNGMxOGM3MDhkZDk3ZWMzMTY2Y2Y3NDY0Y2M2NTFmMWNiYjY3ZTcwZDQwNzQwNWI3YWQ3YjY=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1f9bd36c-eff5-4703-ace1-b01e834fed00" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:19 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Correlation-Request-Id": [ + "cda32e45-4a1a-4293-9d9c-f2017158d7af" + ], + "Content-Length": [ + "484" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ] + }, + "ResponseBody": "{\r\n \"registry\": \"managedtestregistry.azurecr.io\",\r\n \"imageName\": \"prod/bash\",\r\n \"manifest\": {\r\n \"digest\": \"sha256:eabe547f78d4c18c708dd97ec3166cf7464cc651f1cbb67e70d407405b7ad7b6\",\r\n \"createdTime\": \"2018-09-28T23:37:51.9987277Z\",\r\n \"lastUpdateTime\": \"2018-09-28T23:37:51.9987277Z\",\r\n \"architecture\": \"amd64\",\r\n \"os\": \"linux\",\r\n \"mediaType\": \"application/vnd.docker.distribution.manifest.v2+json\",\r\n \"tags\": [\r\n \"latest\"\r\n ],\r\n \"changeableAttributes\": {\r\n \"deleteEnabled\": true,\r\n \"writeEnabled\": true,\r\n \"readEnabled\": true,\r\n \"listEnabled\": true\r\n }\r\n }\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "dfb63c8c-7c89-4ef8-af13-75c1d873c895" + } +} \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.RepositoryTests/DeleteAcrRepositoryCRThrowException.json b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.RepositoryTests/DeleteAcrRepositoryCRThrowException.json new file mode 100644 index 000000000000..c349f73c7f91 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.RepositoryTests/DeleteAcrRepositoryCRThrowException.json @@ -0,0 +1,186 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistryfordel?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9jbGFzc2ljdGVzdHJlZ2lzdHJ5Zm9yZGVsP2FwaS12ZXJzaW9uPTIwMTctMTAtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "29d8320c-065a-4995-84f3-6f8d1c51bcab" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 05 Oct 2018 23:34:24 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "8b7fa3f9-1e7f-4fdd-9f39-74439611e130" + ], + "x-ms-correlation-request-id": [ + "8b7fa3f9-1e7f-4fdd-9f39-74439611e130" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181005T233424Z:8b7fa3f9-1e7f-4fdd-9f39-74439611e130" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "703" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Classic\",\r\n \"tier\": \"Classic\"\r\n },\r\n \"type\": \"Microsoft.ContainerRegistry/registries\",\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistryfordel\",\r\n \"name\": \"classictestregistryfordel\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"loginServer\": \"classictestregistryfordel.azurecr.io\",\r\n \"creationDate\": \"2018-10-03T21:00:53.9007927Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"adminUserEnabled\": true,\r\n \"storageAccount\": {\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.Storage/storageAccounts/classictestregistr210018\"\r\n },\r\n \"firewallRulesEnabled\": false,\r\n \"firewallRules\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistryfordel/listCredentials?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9jbGFzc2ljdGVzdHJlZ2lzdHJ5Zm9yZGVsL2xpc3RDcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTEwLTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "fe1eca49-67da-433c-b66c-4347f411a51b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 05 Oct 2018 23:34:24 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "e8ce2dd7-abec-47b9-b463-02b18eb5d241" + ], + "x-ms-correlation-request-id": [ + "e8ce2dd7-abec-47b9-b463-02b18eb5d241" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181005T233424Z:e8ce2dd7-abec-47b9-b463-02b18eb5d241" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "181" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"username\": \"classictestregistryfordel\",\r\n \"passwords\": [\r\n {\r\n \"name\": \"password\",\r\n \"value\": \"HWTHqmY6jpC8S=dVd8vsWEGlB2winIJe\"\r\n },\r\n {\r\n \"name\": \"password2\",\r\n \"value\": \"jxL/UHmvr+J38p4vdLoc6L2TcujTg1kB\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/acr/v1/prod%2Fbash", + "EncodedRequestUri": "L2Fjci92MS9wcm9kJTJGYmFzaA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2d56725e-0740-46a9-a80b-682a5753e1a2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Fri, 05 Oct 2018 23:34:27 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Correlation-Request-Id": [ + "e23ef96d-5cc9-401a-b6a9-54e5df852ede" + ], + "Content-Length": [ + "90" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ] + }, + "ResponseBody": "{\r\n \"errors\": [\r\n {\r\n \"code\": \"UNSUPPORTED\",\r\n \"message\": \"The operation is unsupported.\",\r\n \"detail\": {}\r\n }\r\n ]\r\n}", + "StatusCode": 405 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "dfb63c8c-7c89-4ef8-af13-75c1d873c895" + } +} \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.RepositoryTests/DeleteAcrRepositoryMR.json b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.RepositoryTests/DeleteAcrRepositoryMR.json new file mode 100644 index 000000000000..9218aa5d1064 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.RepositoryTests/DeleteAcrRepositoryMR.json @@ -0,0 +1,192 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistryfordel?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5Zm9yZGVsP2FwaS12ZXJzaW9uPTIwMTctMTAtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1822055c-e793-48aa-96dc-490a9c2cfdfe" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 05 Oct 2018 23:45:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "59697b90-8f10-46b9-87b1-0a485d705141" + ], + "x-ms-correlation-request-id": [ + "59697b90-8f10-46b9-87b1-0a485d705141" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181005T234510Z:59697b90-8f10-46b9-87b1-0a485d705141" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "534" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"type\": \"Microsoft.ContainerRegistry/registries\",\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistryfordel\",\r\n \"name\": \"managedtestregistryfordel\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"loginServer\": \"managedtestregistryfordel.azurecr.io\",\r\n \"creationDate\": \"2018-10-03T20:59:58.0340437Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"adminUserEnabled\": true,\r\n \"firewallRulesEnabled\": false,\r\n \"firewallRules\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistryfordel/listCredentials?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5Zm9yZGVsL2xpc3RDcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTEwLTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "cff45eeb-3053-4f38-81eb-38a52517c66e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 05 Oct 2018 23:45:10 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "1da5afe8-4cb9-4758-a736-c6b4f0ce1c10" + ], + "x-ms-correlation-request-id": [ + "1da5afe8-4cb9-4758-a736-c6b4f0ce1c10" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181005T234510Z:1da5afe8-4cb9-4758-a736-c6b4f0ce1c10" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "181" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"username\": \"managedtestregistryfordel\",\r\n \"passwords\": [\r\n {\r\n \"name\": \"password\",\r\n \"value\": \"boKby1jcQ4rDMonnH1D78Fk2BP/CdNZC\"\r\n },\r\n {\r\n \"name\": \"password2\",\r\n \"value\": \"E2RaXDk1TQphHwnGerHMnGagOy=OkyyK\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/acr/v1/test%2Fbash", + "EncodedRequestUri": "L2Fjci92MS90ZXN0JTJGYmFzaA==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "6167220f-3ad9-4492-9b3b-5498cf8d83a9" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Fri, 05 Oct 2018 23:45:14 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Client-Request-Id": [ + "6167220f-3ad9-4492-9b3b-5498cf8d83a9" + ], + "X-Ms-Correlation-Request-Id": [ + "b8b751f5-ac20-4d4e-bafe-7abae4fa5d11" + ], + "X-Ms-Request-Id": [ + "59a6bf2e-1e81-4e6e-95de-d41bab083a83" + ], + "Content-Length": [ + "127" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ] + }, + "ResponseBody": "{\r\n \"manifestsDeleted\": [\r\n \"sha256:eabe547f78d4c18c708dd97ec3166cf7464cc651f1cbb67e70d407405b7ad7b6\"\r\n ],\r\n \"tagsDeleted\": [\r\n \"01\",\r\n \"latest\"\r\n ]\r\n}", + "StatusCode": 202 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "dfb63c8c-7c89-4ef8-af13-75c1d873c895" + } +} \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.RepositoryTests/GetAcrRepositoriesCRThrowException.json b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.RepositoryTests/GetAcrRepositoriesCRThrowException.json new file mode 100644 index 000000000000..a0d3ea1228aa --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.RepositoryTests/GetAcrRepositoriesCRThrowException.json @@ -0,0 +1,186 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9jbGFzc2ljdGVzdHJlZ2lzdHJ5P2FwaS12ZXJzaW9uPTIwMTctMTAtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d2a12135-a955-4b23-a7a6-7a6d255cf6a5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:13:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "3f397fb1-ddf3-44ad-b341-3ae90c3ccf39" + ], + "x-ms-correlation-request-id": [ + "3f397fb1-ddf3-44ad-b341-3ae90c3ccf39" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181301Z:3f397fb1-ddf3-44ad-b341-3ae90c3ccf39" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "685" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Classic\",\r\n \"tier\": \"Classic\"\r\n },\r\n \"type\": \"Microsoft.ContainerRegistry/registries\",\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry\",\r\n \"name\": \"classictestregistry\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"loginServer\": \"classictestregistry.azurecr.io\",\r\n \"creationDate\": \"2018-10-04T17:20:54.3121147Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"adminUserEnabled\": true,\r\n \"storageAccount\": {\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.Storage/storageAccounts/classictestregistr172020\"\r\n },\r\n \"firewallRulesEnabled\": false,\r\n \"firewallRules\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry/listCredentials?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9jbGFzc2ljdGVzdHJlZ2lzdHJ5L2xpc3RDcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTEwLTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "aab6be3e-6de7-40e4-a994-28f7c0f9f607" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:13:00 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "a79c0b1e-5caa-411d-bd03-a446ccdbdbcf" + ], + "x-ms-correlation-request-id": [ + "a79c0b1e-5caa-411d-bd03-a446ccdbdbcf" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181301Z:a79c0b1e-5caa-411d-bd03-a446ccdbdbcf" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "175" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"username\": \"classictestregistry\",\r\n \"passwords\": [\r\n {\r\n \"name\": \"password\",\r\n \"value\": \"YttZqPE=197fuiZ3Cf7YJIW010OxJvoO\"\r\n },\r\n {\r\n \"name\": \"password2\",\r\n \"value\": \"/cTqNKa2Mp3TrZakL2BBYVcOEIS5OG4i\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/acr/v1/_catalog", + "EncodedRequestUri": "L2Fjci92MS9fY2F0YWxvZw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "09d4286d-95c1-4f52-9bb9-4a348c3081dd" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:13:04 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Correlation-Request-Id": [ + "d7bc3078-cc9d-4169-9f7a-3bf3e675a902" + ], + "Content-Length": [ + "19" + ], + "Content-Type": [ + "text/plain; charset=utf-8" + ] + }, + "ResponseBody": "404 page not found\n", + "StatusCode": 404 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "dfb63c8c-7c89-4ef8-af13-75c1d873c895" + } +} \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.RepositoryTests/GetAcrRepositoriesMR.json b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.RepositoryTests/GetAcrRepositoriesMR.json new file mode 100644 index 000000000000..1835a0270d51 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.RepositoryTests/GetAcrRepositoriesMR.json @@ -0,0 +1,186 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5P2FwaS12ZXJzaW9uPTIwMTctMTAtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c5ebbb17-0beb-4532-af38-cbcbf52a047e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "4c16cfb6-458f-4d12-860f-ac9303199a98" + ], + "x-ms-correlation-request-id": [ + "4c16cfb6-458f-4d12-860f-ac9303199a98" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181245Z:4c16cfb6-458f-4d12-860f-ac9303199a98" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "514" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Premium\",\r\n \"tier\": \"Premium\"\r\n },\r\n \"type\": \"Microsoft.ContainerRegistry/registries\",\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry\",\r\n \"name\": \"managedtestregistry\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"loginServer\": \"managedtestregistry.azurecr.io\",\r\n \"creationDate\": \"2018-08-14T20:27:59.2394952Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"adminUserEnabled\": true,\r\n \"firewallRulesEnabled\": false,\r\n \"firewallRules\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry/listCredentials?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5L2xpc3RDcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTEwLTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "84106d9c-35ea-4777-ab63-19016588a0f0" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:45 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "8af19bb5-4506-4142-866e-b19ebc78749f" + ], + "x-ms-correlation-request-id": [ + "8af19bb5-4506-4142-866e-b19ebc78749f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181245Z:8af19bb5-4506-4142-866e-b19ebc78749f" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "175" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"username\": \"managedtestregistry\",\r\n \"passwords\": [\r\n {\r\n \"name\": \"password\",\r\n \"value\": \"2GoQeb3D8vs=2Kn8ijhGJMhkVXDHuHzt\"\r\n },\r\n {\r\n \"name\": \"password2\",\r\n \"value\": \"VBNhobRyJ6EPEKHye+v3Q4e6ujc28kJ/\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/acr/v1/_catalog", + "EncodedRequestUri": "L2Fjci92MS9fY2F0YWxvZw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b9322441-4d03-4d11-bd31-8c99106752c1" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:48 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Correlation-Request-Id": [ + "1bfba2a3-7507-4f94-9fb5-c3bea85856fa" + ], + "Content-Length": [ + "43" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ] + }, + "ResponseBody": "{\r\n \"repositories\": [\r\n \"prod/bash\",\r\n \"test/bash\"\r\n ]\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "dfb63c8c-7c89-4ef8-af13-75c1d873c895" + } +} \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.RepositoryTests/GetAcrRepositoryDetailsCRThrowException.json b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.RepositoryTests/GetAcrRepositoryDetailsCRThrowException.json new file mode 100644 index 000000000000..598b92fa05c2 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.RepositoryTests/GetAcrRepositoryDetailsCRThrowException.json @@ -0,0 +1,186 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9jbGFzc2ljdGVzdHJlZ2lzdHJ5P2FwaS12ZXJzaW9uPTIwMTctMTAtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "1f2b0eab-ed72-487d-a345-58ce07f316dd" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:13:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11972" + ], + "x-ms-request-id": [ + "6954aa54-8e8f-47d2-8a52-58e26ca91b2a" + ], + "x-ms-correlation-request-id": [ + "6954aa54-8e8f-47d2-8a52-58e26ca91b2a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181306Z:6954aa54-8e8f-47d2-8a52-58e26ca91b2a" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "685" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Classic\",\r\n \"tier\": \"Classic\"\r\n },\r\n \"type\": \"Microsoft.ContainerRegistry/registries\",\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry\",\r\n \"name\": \"classictestregistry\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"loginServer\": \"classictestregistry.azurecr.io\",\r\n \"creationDate\": \"2018-10-04T17:20:54.3121147Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"adminUserEnabled\": true,\r\n \"storageAccount\": {\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.Storage/storageAccounts/classictestregistr172020\"\r\n },\r\n \"firewallRulesEnabled\": false,\r\n \"firewallRules\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry/listCredentials?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9jbGFzc2ljdGVzdHJlZ2lzdHJ5L2xpc3RDcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTEwLTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3c90e59e-2757-48dd-8875-71f20d2375c3" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:13:06 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "a9f88aa0-0b85-4b97-b4d3-eae1566cecd1" + ], + "x-ms-correlation-request-id": [ + "a9f88aa0-0b85-4b97-b4d3-eae1566cecd1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181306Z:a9f88aa0-0b85-4b97-b4d3-eae1566cecd1" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "175" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"username\": \"classictestregistry\",\r\n \"passwords\": [\r\n {\r\n \"name\": \"password\",\r\n \"value\": \"YttZqPE=197fuiZ3Cf7YJIW010OxJvoO\"\r\n },\r\n {\r\n \"name\": \"password2\",\r\n \"value\": \"/cTqNKa2Mp3TrZakL2BBYVcOEIS5OG4i\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/acr/v1/prod%2Fbash", + "EncodedRequestUri": "L2Fjci92MS9wcm9kJTJGYmFzaA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b7af4953-cb75-4ee8-9480-ef22761774f2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:13:09 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Correlation-Request-Id": [ + "d4c47ee5-7e9b-4823-9003-64d095ae3a44" + ], + "Content-Length": [ + "90" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ] + }, + "ResponseBody": "{\r\n \"errors\": [\r\n {\r\n \"code\": \"UNSUPPORTED\",\r\n \"message\": \"The operation is unsupported.\",\r\n \"detail\": {}\r\n }\r\n ]\r\n}", + "StatusCode": 405 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "dfb63c8c-7c89-4ef8-af13-75c1d873c895" + } +} \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.RepositoryTests/GetAcrRepositoryDetailsMR.json b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.RepositoryTests/GetAcrRepositoryDetailsMR.json new file mode 100644 index 000000000000..8d316b608b49 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.RepositoryTests/GetAcrRepositoryDetailsMR.json @@ -0,0 +1,186 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5P2FwaS12ZXJzaW9uPTIwMTctMTAtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0032ac9c-8a3c-4e35-832d-b19460e8c3dd" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "3e20ed17-ea82-4d99-bfb8-e02d3ec3493c" + ], + "x-ms-correlation-request-id": [ + "3e20ed17-ea82-4d99-bfb8-e02d3ec3493c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181240Z:3e20ed17-ea82-4d99-bfb8-e02d3ec3493c" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "514" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Premium\",\r\n \"tier\": \"Premium\"\r\n },\r\n \"type\": \"Microsoft.ContainerRegistry/registries\",\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry\",\r\n \"name\": \"managedtestregistry\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"loginServer\": \"managedtestregistry.azurecr.io\",\r\n \"creationDate\": \"2018-08-14T20:27:59.2394952Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"adminUserEnabled\": true,\r\n \"firewallRulesEnabled\": false,\r\n \"firewallRules\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry/listCredentials?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5L2xpc3RDcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTEwLTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b09766c5-a1e4-498a-bccb-73da7985aa23" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:39 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "d4308f6e-5eb4-4314-be2e-9bc163f5c2f7" + ], + "x-ms-correlation-request-id": [ + "d4308f6e-5eb4-4314-be2e-9bc163f5c2f7" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181240Z:d4308f6e-5eb4-4314-be2e-9bc163f5c2f7" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "175" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"username\": \"managedtestregistry\",\r\n \"passwords\": [\r\n {\r\n \"name\": \"password\",\r\n \"value\": \"2GoQeb3D8vs=2Kn8ijhGJMhkVXDHuHzt\"\r\n },\r\n {\r\n \"name\": \"password2\",\r\n \"value\": \"VBNhobRyJ6EPEKHye+v3Q4e6ujc28kJ/\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/acr/v1/prod%2Fbash", + "EncodedRequestUri": "L2Fjci92MS9wcm9kJTJGYmFzaA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "21c80cc1-f16c-46ad-800a-dbe229f37f3c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:43 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Correlation-Request-Id": [ + "50ab96e6-cb2b-4590-b1e4-bf7b0777e6f6" + ], + "Content-Length": [ + "298" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ] + }, + "ResponseBody": "{\r\n \"registry\": \"managedtestregistry.azurecr.io\",\r\n \"imageName\": \"prod/bash\",\r\n \"createdTime\": \"2018-09-28T23:37:51.9668212Z\",\r\n \"lastUpdateTime\": \"2018-09-28T23:37:52.0356217Z\",\r\n \"manifestCount\": 1,\r\n \"tagCount\": 1,\r\n \"changeableAttributes\": {\r\n \"deleteEnabled\": true,\r\n \"writeEnabled\": true,\r\n \"readEnabled\": true,\r\n \"listEnabled\": true\r\n }\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "dfb63c8c-7c89-4ef8-af13-75c1d873c895" + } +} \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.RepositoryTests/ListRepositoryCR.json b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.RepositoryTests/ListRepositoryCR.json new file mode 100644 index 000000000000..718c8b2d5f4b --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.RepositoryTests/ListRepositoryCR.json @@ -0,0 +1,192 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9jbGFzc2ljdGVzdHJlZ2lzdHJ5P2FwaS12ZXJzaW9uPTIwMTctMTAtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "36c7e2ad-d7c0-4182-8f99-2fc47efca16b" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "6d1ae39c-fad7-4ec4-a8a7-664807141e6f" + ], + "x-ms-correlation-request-id": [ + "6d1ae39c-fad7-4ec4-a8a7-664807141e6f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181256Z:6d1ae39c-fad7-4ec4-a8a7-664807141e6f" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "685" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Classic\",\r\n \"tier\": \"Classic\"\r\n },\r\n \"type\": \"Microsoft.ContainerRegistry/registries\",\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry\",\r\n \"name\": \"classictestregistry\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"loginServer\": \"classictestregistry.azurecr.io\",\r\n \"creationDate\": \"2018-10-04T17:20:54.3121147Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"adminUserEnabled\": true,\r\n \"storageAccount\": {\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.Storage/storageAccounts/classictestregistr172020\"\r\n },\r\n \"firewallRulesEnabled\": false,\r\n \"firewallRules\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry/listCredentials?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9jbGFzc2ljdGVzdHJlZ2lzdHJ5L2xpc3RDcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTEwLTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c5ea45b7-e730-4cae-afca-457a5c43a5a8" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:55 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "07de0abf-70b5-484b-9099-b501e59c30a2" + ], + "x-ms-correlation-request-id": [ + "07de0abf-70b5-484b-9099-b501e59c30a2" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181256Z:07de0abf-70b5-484b-9099-b501e59c30a2" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "175" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"username\": \"classictestregistry\",\r\n \"passwords\": [\r\n {\r\n \"name\": \"password\",\r\n \"value\": \"YttZqPE=197fuiZ3Cf7YJIW010OxJvoO\"\r\n },\r\n {\r\n \"name\": \"password2\",\r\n \"value\": \"/cTqNKa2Mp3TrZakL2BBYVcOEIS5OG4i\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/v2/_catalog", + "EncodedRequestUri": "L3YyL19jYXRhbG9n", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "26977c43-fa63-47e7-b42d-a2f938a4f653" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:59 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Client-Request-Id": [ + "26977c43-fa63-47e7-b42d-a2f938a4f653" + ], + "X-Ms-Correlation-Request-Id": [ + "188e3259-3fd2-4931-9b3c-f4d22a1d5758" + ], + "X-Ms-Request-Id": [ + "b561f86c-e2f7-4232-a042-61881885c85a" + ], + "Content-Length": [ + "43" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ] + }, + "ResponseBody": "{\r\n \"repositories\": [\r\n \"prod/bash\",\r\n \"test/bash\"\r\n ]\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "dfb63c8c-7c89-4ef8-af13-75c1d873c895" + } +} \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.RepositoryTests/ListRepositoryMR.json b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.RepositoryTests/ListRepositoryMR.json new file mode 100644 index 000000000000..c0adba1c2de7 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.RepositoryTests/ListRepositoryMR.json @@ -0,0 +1,192 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5P2FwaS12ZXJzaW9uPTIwMTctMTAtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "027d2f9d-b10c-45ca-b211-afedee8dae28" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "e14fc361-5019-4dc1-8c6a-e2176d06c644" + ], + "x-ms-correlation-request-id": [ + "e14fc361-5019-4dc1-8c6a-e2176d06c644" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181235Z:e14fc361-5019-4dc1-8c6a-e2176d06c644" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "514" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Premium\",\r\n \"tier\": \"Premium\"\r\n },\r\n \"type\": \"Microsoft.ContainerRegistry/registries\",\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry\",\r\n \"name\": \"managedtestregistry\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"loginServer\": \"managedtestregistry.azurecr.io\",\r\n \"creationDate\": \"2018-08-14T20:27:59.2394952Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"adminUserEnabled\": true,\r\n \"firewallRulesEnabled\": false,\r\n \"firewallRules\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry/listCredentials?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5L2xpc3RDcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTEwLTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f5b7c54b-6b33-42bc-9d4e-a06e25d94be4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:35 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "7df6c1fd-0c34-435c-aed1-7a242207e122" + ], + "x-ms-correlation-request-id": [ + "7df6c1fd-0c34-435c-aed1-7a242207e122" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181235Z:7df6c1fd-0c34-435c-aed1-7a242207e122" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "175" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"username\": \"managedtestregistry\",\r\n \"passwords\": [\r\n {\r\n \"name\": \"password\",\r\n \"value\": \"2GoQeb3D8vs=2Kn8ijhGJMhkVXDHuHzt\"\r\n },\r\n {\r\n \"name\": \"password2\",\r\n \"value\": \"VBNhobRyJ6EPEKHye+v3Q4e6ujc28kJ/\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/v2/_catalog", + "EncodedRequestUri": "L3YyL19jYXRhbG9n", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "81017490-b5cb-4059-bf90-95dfc51c9189" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:37 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Client-Request-Id": [ + "81017490-b5cb-4059-bf90-95dfc51c9189" + ], + "X-Ms-Correlation-Request-Id": [ + "d23953d2-9cd6-476a-955d-a4074128d4ee" + ], + "X-Ms-Request-Id": [ + "e0f9ebe7-7296-4c7e-8fd2-02e347e52650" + ], + "Content-Length": [ + "43" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ] + }, + "ResponseBody": "{\r\n \"repositories\": [\r\n \"prod/bash\",\r\n \"test/bash\"\r\n ]\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "dfb63c8c-7c89-4ef8-af13-75c1d873c895" + } +} \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.RepositoryTests/UpdateAcrRepositoryAttributesMR.json b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.RepositoryTests/UpdateAcrRepositoryAttributesMR.json new file mode 100644 index 000000000000..243ea21f3945 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.RepositoryTests/UpdateAcrRepositoryAttributesMR.json @@ -0,0 +1,298 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5P2FwaS12ZXJzaW9uPTIwMTctMTAtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "3f479021-1236-4b70-b043-d23ba989b53a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11979" + ], + "x-ms-request-id": [ + "2ca76085-5009-4162-a97d-9b2c48c62d3c" + ], + "x-ms-correlation-request-id": [ + "2ca76085-5009-4162-a97d-9b2c48c62d3c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181251Z:2ca76085-5009-4162-a97d-9b2c48c62d3c" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "514" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Premium\",\r\n \"tier\": \"Premium\"\r\n },\r\n \"type\": \"Microsoft.ContainerRegistry/registries\",\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry\",\r\n \"name\": \"managedtestregistry\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"loginServer\": \"managedtestregistry.azurecr.io\",\r\n \"creationDate\": \"2018-08-14T20:27:59.2394952Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"adminUserEnabled\": true,\r\n \"firewallRulesEnabled\": false,\r\n \"firewallRules\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry/listCredentials?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5L2xpc3RDcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTEwLTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e839d87c-6c02-4324-9b6d-595df8c78257" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "3da19a1b-613b-4a73-ba6d-52bd3c8b05ab" + ], + "x-ms-correlation-request-id": [ + "3da19a1b-613b-4a73-ba6d-52bd3c8b05ab" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181251Z:3da19a1b-613b-4a73-ba6d-52bd3c8b05ab" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "175" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"username\": \"managedtestregistry\",\r\n \"passwords\": [\r\n {\r\n \"name\": \"password\",\r\n \"value\": \"2GoQeb3D8vs=2Kn8ijhGJMhkVXDHuHzt\"\r\n },\r\n {\r\n \"name\": \"password2\",\r\n \"value\": \"VBNhobRyJ6EPEKHye+v3Q4e6ujc28kJ/\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/acr/v1/prod%2Fbash", + "EncodedRequestUri": "L2Fjci92MS9wcm9kJTJGYmFzaA==", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"deleteEnabled\": true,\r\n \"writeEnabled\": false,\r\n \"listEnabled\": true,\r\n \"readEnabled\": true\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "fcce7ab0-2256-45ce-89c4-6772720a0723" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "103" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:53 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Correlation-Request-Id": [ + "a72cf365-d0a0-4a53-9d4b-31ab38368174" + ] + }, + "ResponseBody": "", + "StatusCode": 204 + }, + { + "RequestUri": "/acr/v1/prod%2Fbash", + "EncodedRequestUri": "L2Fjci92MS9wcm9kJTJGYmFzaA==", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"deleteEnabled\": true,\r\n \"writeEnabled\": true,\r\n \"listEnabled\": true,\r\n \"readEnabled\": true\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "7be14968-dd94-45de-b8fa-ff78cb62bb8f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "102" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:53 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Correlation-Request-Id": [ + "616746f2-9462-4f69-9000-50909c086d28" + ] + }, + "ResponseBody": "", + "StatusCode": 204 + }, + { + "RequestUri": "/acr/v1/prod%2Fbash", + "EncodedRequestUri": "L2Fjci92MS9wcm9kJTJGYmFzaA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "89107e84-1a4f-4393-b714-1a10c20ccecd" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:53 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Correlation-Request-Id": [ + "6c4f4107-8ee1-4631-b9db-7bb1664caed8" + ], + "Content-Length": [ + "299" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ] + }, + "ResponseBody": "{\r\n \"registry\": \"managedtestregistry.azurecr.io\",\r\n \"imageName\": \"prod/bash\",\r\n \"createdTime\": \"2018-09-28T23:37:51.9668212Z\",\r\n \"lastUpdateTime\": \"2018-09-28T23:37:52.0356217Z\",\r\n \"manifestCount\": 1,\r\n \"tagCount\": 1,\r\n \"changeableAttributes\": {\r\n \"deleteEnabled\": true,\r\n \"writeEnabled\": false,\r\n \"readEnabled\": true,\r\n \"listEnabled\": true\r\n }\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "dfb63c8c-7c89-4ef8-af13-75c1d873c895" + } +} \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/DeleteAcrTagCRThrowException.json b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/DeleteAcrTagCRThrowException.json new file mode 100644 index 000000000000..8012a47941a4 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/DeleteAcrTagCRThrowException.json @@ -0,0 +1,186 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9jbGFzc2ljdGVzdHJlZ2lzdHJ5P2FwaS12ZXJzaW9uPTIwMTctMTAtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b50651dc-62fe-441d-b3bd-34024d4f6451" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 05 Oct 2018 23:32:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "6a5b7116-1948-447c-854d-feb6104a2577" + ], + "x-ms-correlation-request-id": [ + "6a5b7116-1948-447c-854d-feb6104a2577" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181005T233251Z:6a5b7116-1948-447c-854d-feb6104a2577" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "685" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Classic\",\r\n \"tier\": \"Classic\"\r\n },\r\n \"type\": \"Microsoft.ContainerRegistry/registries\",\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry\",\r\n \"name\": \"classictestregistry\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"loginServer\": \"classictestregistry.azurecr.io\",\r\n \"creationDate\": \"2018-10-04T17:20:54.3121147Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"adminUserEnabled\": true,\r\n \"storageAccount\": {\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.Storage/storageAccounts/classictestregistr172020\"\r\n },\r\n \"firewallRulesEnabled\": false,\r\n \"firewallRules\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry/listCredentials?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9jbGFzc2ljdGVzdHJlZ2lzdHJ5L2xpc3RDcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTEwLTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c6a89c21-9889-4bc0-8d1e-1a420578e332" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 05 Oct 2018 23:32:50 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "8b863481-4407-4407-a96e-d8253d42bccc" + ], + "x-ms-correlation-request-id": [ + "8b863481-4407-4407-a96e-d8253d42bccc" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181005T233251Z:8b863481-4407-4407-a96e-d8253d42bccc" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "175" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"username\": \"classictestregistry\",\r\n \"passwords\": [\r\n {\r\n \"name\": \"password\",\r\n \"value\": \"YttZqPE=197fuiZ3Cf7YJIW010OxJvoO\"\r\n },\r\n {\r\n \"name\": \"password2\",\r\n \"value\": \"/cTqNKa2Mp3TrZakL2BBYVcOEIS5OG4i\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/acr/v1/prod%2Fbash/_tags/latest", + "EncodedRequestUri": "L2Fjci92MS9wcm9kJTJGYmFzaC9fdGFncy9sYXRlc3Q=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "98989289-690e-4768-bb0c-40d1a2d144bf" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Fri, 05 Oct 2018 23:32:54 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Correlation-Request-Id": [ + "1b89cb83-2215-4784-8910-27108236e9b8" + ], + "Content-Length": [ + "90" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ] + }, + "ResponseBody": "{\r\n \"errors\": [\r\n {\r\n \"code\": \"UNSUPPORTED\",\r\n \"message\": \"The operation is unsupported.\",\r\n \"detail\": {}\r\n }\r\n ]\r\n}", + "StatusCode": 405 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "dfb63c8c-7c89-4ef8-af13-75c1d873c895" + } +} \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/DeleteAcrTagMR.json b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/DeleteAcrTagMR.json new file mode 100644 index 000000000000..5a3746e517fe --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/DeleteAcrTagMR.json @@ -0,0 +1,254 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistryfordel?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5Zm9yZGVsP2FwaS12ZXJzaW9uPTIwMTctMTAtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "82f18d6c-54c6-4271-a894-335e8f3613a6" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 05 Oct 2018 23:39:07 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "844543ee-9942-402f-a169-d9e724a7cb9f" + ], + "x-ms-correlation-request-id": [ + "844543ee-9942-402f-a169-d9e724a7cb9f" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181005T233907Z:844543ee-9942-402f-a169-d9e724a7cb9f" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "534" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"type\": \"Microsoft.ContainerRegistry/registries\",\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistryfordel\",\r\n \"name\": \"managedtestregistryfordel\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"loginServer\": \"managedtestregistryfordel.azurecr.io\",\r\n \"creationDate\": \"2018-10-03T20:59:58.0340437Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"adminUserEnabled\": true,\r\n \"firewallRulesEnabled\": false,\r\n \"firewallRules\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistryfordel/listCredentials?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5Zm9yZGVsL2xpc3RDcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTEwLTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "d43d8ede-bca7-4a3f-a07a-67e479533b4f" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 05 Oct 2018 23:39:07 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "14a6c3c2-de35-49b3-9a50-2d5758449f52" + ], + "x-ms-correlation-request-id": [ + "14a6c3c2-de35-49b3-9a50-2d5758449f52" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181005T233908Z:14a6c3c2-de35-49b3-9a50-2d5758449f52" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "181" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"username\": \"managedtestregistryfordel\",\r\n \"passwords\": [\r\n {\r\n \"name\": \"password\",\r\n \"value\": \"boKby1jcQ4rDMonnH1D78Fk2BP/CdNZC\"\r\n },\r\n {\r\n \"name\": \"password2\",\r\n \"value\": \"E2RaXDk1TQphHwnGerHMnGagOy=OkyyK\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/acr/v1/prod%2Fbash/_tags/latest", + "EncodedRequestUri": "L2Fjci92MS9wcm9kJTJGYmFzaC9fdGFncy9sYXRlc3Q=", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b0a29c10-8b71-4e22-bb58-7cb158367a40" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Fri, 05 Oct 2018 23:39:10 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Client-Request-Id": [ + "b0a29c10-8b71-4e22-bb58-7cb158367a40" + ], + "X-Ms-Correlation-Request-Id": [ + "24c7ace0-a088-4b6b-ace8-bff2a9204ea2" + ], + "X-Ms-Request-Id": [ + "24b0f7bf-397d-4fbe-bdc9-ba8aa48a21f6" + ], + "Content-Length": [ + "81" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ] + }, + "ResponseBody": "{\r\n \"errors\": [\r\n {\r\n \"code\": \"TAG_UNKNOWN\",\r\n \"message\": \"the specified tag does not exist\"\r\n }\r\n ]\r\n}", + "StatusCode": 404 + }, + { + "RequestUri": "/v2/prod%2Fbash/tags/list", + "EncodedRequestUri": "L3YyL3Byb2QlMkZiYXNoL3RhZ3MvbGlzdA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "88178484-5cba-455e-8438-745e8ae6abf4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Fri, 05 Oct 2018 23:39:10 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Client-Request-Id": [ + "88178484-5cba-455e-8438-745e8ae6abf4" + ], + "X-Ms-Correlation-Request-Id": [ + "30ad3979-5e9f-424b-a0de-693902ff27a0" + ], + "X-Ms-Request-Id": [ + "147df26f-178e-45dd-84f6-bffb4da2dba8" + ], + "Content-Length": [ + "31" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ] + }, + "ResponseBody": "{\r\n \"name\": \"prod/bash\",\r\n \"tags\": []\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "dfb63c8c-7c89-4ef8-af13-75c1d873c895" + } +} \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/GetAcrTagAttributesCRThrowException.json b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/GetAcrTagAttributesCRThrowException.json new file mode 100644 index 000000000000..92715fe5fdc6 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/GetAcrTagAttributesCRThrowException.json @@ -0,0 +1,186 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9jbGFzc2ljdGVzdHJlZ2lzdHJ5P2FwaS12ZXJzaW9uPTIwMTctMTAtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "2eadc10f-4bb7-4db6-9f7d-248eb933f731" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "f9193050-a33d-4572-9c0a-ca45c7b619c9" + ], + "x-ms-correlation-request-id": [ + "f9193050-a33d-4572-9c0a-ca45c7b619c9" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181224Z:f9193050-a33d-4572-9c0a-ca45c7b619c9" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "685" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Classic\",\r\n \"tier\": \"Classic\"\r\n },\r\n \"type\": \"Microsoft.ContainerRegistry/registries\",\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry\",\r\n \"name\": \"classictestregistry\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"loginServer\": \"classictestregistry.azurecr.io\",\r\n \"creationDate\": \"2018-10-04T17:20:54.3121147Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"adminUserEnabled\": true,\r\n \"storageAccount\": {\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.Storage/storageAccounts/classictestregistr172020\"\r\n },\r\n \"firewallRulesEnabled\": false,\r\n \"firewallRules\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry/listCredentials?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9jbGFzc2ljdGVzdHJlZ2lzdHJ5L2xpc3RDcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTEwLTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "bc61e91b-59bf-4152-b1d7-c7757021c095" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:23 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "a388d012-c735-43e8-aa8c-4614f109ce42" + ], + "x-ms-correlation-request-id": [ + "a388d012-c735-43e8-aa8c-4614f109ce42" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181224Z:a388d012-c735-43e8-aa8c-4614f109ce42" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "175" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"username\": \"classictestregistry\",\r\n \"passwords\": [\r\n {\r\n \"name\": \"password\",\r\n \"value\": \"YttZqPE=197fuiZ3Cf7YJIW010OxJvoO\"\r\n },\r\n {\r\n \"name\": \"password2\",\r\n \"value\": \"/cTqNKa2Mp3TrZakL2BBYVcOEIS5OG4i\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/acr/v1/prod%2Fbash/_tags/latest", + "EncodedRequestUri": "L2Fjci92MS9wcm9kJTJGYmFzaC9fdGFncy9sYXRlc3Q=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "644b7f4c-96b2-44bc-b598-36d325641a97" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:27 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Correlation-Request-Id": [ + "0ac68ad9-f386-4b10-8d39-68e66235c60f" + ], + "Content-Length": [ + "90" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ] + }, + "ResponseBody": "{\r\n \"errors\": [\r\n {\r\n \"code\": \"UNSUPPORTED\",\r\n \"message\": \"The operation is unsupported.\",\r\n \"detail\": {}\r\n }\r\n ]\r\n}", + "StatusCode": 405 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "dfb63c8c-7c89-4ef8-af13-75c1d873c895" + } +} \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/GetAcrTagAttributesMR.json b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/GetAcrTagAttributesMR.json new file mode 100644 index 000000000000..a7b480cb4f5f --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/GetAcrTagAttributesMR.json @@ -0,0 +1,186 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5P2FwaS12ZXJzaW9uPTIwMTctMTAtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "e7b53738-e231-4afd-84a4-fbe3a67dbd4e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11997" + ], + "x-ms-request-id": [ + "ec18b1be-099b-40eb-b334-be62b20abdc6" + ], + "x-ms-correlation-request-id": [ + "ec18b1be-099b-40eb-b334-be62b20abdc6" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181218Z:ec18b1be-099b-40eb-b334-be62b20abdc6" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "514" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Premium\",\r\n \"tier\": \"Premium\"\r\n },\r\n \"type\": \"Microsoft.ContainerRegistry/registries\",\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry\",\r\n \"name\": \"managedtestregistry\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"loginServer\": \"managedtestregistry.azurecr.io\",\r\n \"creationDate\": \"2018-08-14T20:27:59.2394952Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"adminUserEnabled\": true,\r\n \"firewallRulesEnabled\": false,\r\n \"firewallRules\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry/listCredentials?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5L2xpc3RDcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTEwLTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "c864f547-cf6a-49bf-8b45-ccfb75541e6e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:18 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "d49f92e8-7a8a-4eb3-8a06-ff42b969c4af" + ], + "x-ms-correlation-request-id": [ + "d49f92e8-7a8a-4eb3-8a06-ff42b969c4af" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181219Z:d49f92e8-7a8a-4eb3-8a06-ff42b969c4af" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "175" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"username\": \"managedtestregistry\",\r\n \"passwords\": [\r\n {\r\n \"name\": \"password\",\r\n \"value\": \"2GoQeb3D8vs=2Kn8ijhGJMhkVXDHuHzt\"\r\n },\r\n {\r\n \"name\": \"password2\",\r\n \"value\": \"VBNhobRyJ6EPEKHye+v3Q4e6ujc28kJ/\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/acr/v1/prod%2Fbash/_tags/latest", + "EncodedRequestUri": "L2Fjci92MS9wcm9kJTJGYmFzaC9fdGFncy9sYXRlc3Q=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "b2158e2b-47dc-481b-99a6-6eaaae23ca8e" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:21 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Correlation-Request-Id": [ + "be16f87d-40a6-4b4a-8ab3-0597e20778aa" + ], + "Content-Length": [ + "389" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ] + }, + "ResponseBody": "{\r\n \"registry\": \"managedtestregistry.azurecr.io\",\r\n \"imageName\": \"prod/bash\",\r\n \"tag\": {\r\n \"name\": \"latest\",\r\n \"digest\": \"sha256:eabe547f78d4c18c708dd97ec3166cf7464cc651f1cbb67e70d407405b7ad7b6\",\r\n \"createdTime\": \"2018-09-28T23:37:52.0607161Z\",\r\n \"lastUpdateTime\": \"2018-09-28T23:37:52.0607161Z\",\r\n \"signed\": false,\r\n \"changeableAttributes\": {\r\n \"deleteEnabled\": true,\r\n \"writeEnabled\": true,\r\n \"readEnabled\": true,\r\n \"listEnabled\": true\r\n }\r\n }\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "dfb63c8c-7c89-4ef8-af13-75c1d873c895" + } +} \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/GetAcrTagsCRThrowException.json b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/GetAcrTagsCRThrowException.json new file mode 100644 index 000000000000..6e337cc43ad0 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/GetAcrTagsCRThrowException.json @@ -0,0 +1,186 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9jbGFzc2ljdGVzdHJlZ2lzdHJ5P2FwaS12ZXJzaW9uPTIwMTctMTAtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "5d783920-104a-488e-8082-02ac8fc6a251" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:08 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11997" + ], + "x-ms-request-id": [ + "11024daf-221c-413d-83db-75c2429030c1" + ], + "x-ms-correlation-request-id": [ + "11024daf-221c-413d-83db-75c2429030c1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181208Z:11024daf-221c-413d-83db-75c2429030c1" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "685" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Classic\",\r\n \"tier\": \"Classic\"\r\n },\r\n \"type\": \"Microsoft.ContainerRegistry/registries\",\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry\",\r\n \"name\": \"classictestregistry\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"loginServer\": \"classictestregistry.azurecr.io\",\r\n \"creationDate\": \"2018-10-04T17:20:54.3121147Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"adminUserEnabled\": true,\r\n \"storageAccount\": {\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.Storage/storageAccounts/classictestregistr172020\"\r\n },\r\n \"firewallRulesEnabled\": false,\r\n \"firewallRules\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry/listCredentials?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9jbGFzc2ljdGVzdHJlZ2lzdHJ5L2xpc3RDcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTEwLTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "a4647ab8-a4a0-4c94-b308-80087e7262b7" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:08 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1197" + ], + "x-ms-request-id": [ + "90035297-30ee-46df-b1dd-93ae177a45cb" + ], + "x-ms-correlation-request-id": [ + "90035297-30ee-46df-b1dd-93ae177a45cb" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181208Z:90035297-30ee-46df-b1dd-93ae177a45cb" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "175" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"username\": \"classictestregistry\",\r\n \"passwords\": [\r\n {\r\n \"name\": \"password\",\r\n \"value\": \"YttZqPE=197fuiZ3Cf7YJIW010OxJvoO\"\r\n },\r\n {\r\n \"name\": \"password2\",\r\n \"value\": \"/cTqNKa2Mp3TrZakL2BBYVcOEIS5OG4i\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/acr/v1/prod%2Fbash/_tags", + "EncodedRequestUri": "L2Fjci92MS9wcm9kJTJGYmFzaC9fdGFncw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f9020883-832a-4fe4-9189-d69fef61b7b3" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:10 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Correlation-Request-Id": [ + "4f3104aa-a4e1-4419-ab66-7506d2bb338d" + ], + "Content-Length": [ + "90" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ] + }, + "ResponseBody": "{\r\n \"errors\": [\r\n {\r\n \"code\": \"UNSUPPORTED\",\r\n \"message\": \"The operation is unsupported.\",\r\n \"detail\": {}\r\n }\r\n ]\r\n}", + "StatusCode": 405 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "dfb63c8c-7c89-4ef8-af13-75c1d873c895" + } +} \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/GetAcrTagsMR.json b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/GetAcrTagsMR.json new file mode 100644 index 000000000000..1a233a729e1f --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/GetAcrTagsMR.json @@ -0,0 +1,186 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5P2FwaS12ZXJzaW9uPTIwMTctMTAtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "11073bc2-91af-4fb8-9e38-4d1ca7fb4fd5" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "b10ca44d-491a-4134-83a3-03770973ac22" + ], + "x-ms-correlation-request-id": [ + "b10ca44d-491a-4134-83a3-03770973ac22" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181153Z:b10ca44d-491a-4134-83a3-03770973ac22" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "514" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Premium\",\r\n \"tier\": \"Premium\"\r\n },\r\n \"type\": \"Microsoft.ContainerRegistry/registries\",\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry\",\r\n \"name\": \"managedtestregistry\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"loginServer\": \"managedtestregistry.azurecr.io\",\r\n \"creationDate\": \"2018-08-14T20:27:59.2394952Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"adminUserEnabled\": true,\r\n \"firewallRulesEnabled\": false,\r\n \"firewallRules\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry/listCredentials?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5L2xpc3RDcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTEwLTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "86f89a52-e59c-40ee-979f-a49a4590c8ac" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:52 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "b45a8360-8b25-49c4-96b0-c53f3de29dc7" + ], + "x-ms-correlation-request-id": [ + "b45a8360-8b25-49c4-96b0-c53f3de29dc7" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181153Z:b45a8360-8b25-49c4-96b0-c53f3de29dc7" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "175" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"username\": \"managedtestregistry\",\r\n \"passwords\": [\r\n {\r\n \"name\": \"password\",\r\n \"value\": \"2GoQeb3D8vs=2Kn8ijhGJMhkVXDHuHzt\"\r\n },\r\n {\r\n \"name\": \"password2\",\r\n \"value\": \"VBNhobRyJ6EPEKHye+v3Q4e6ujc28kJ/\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/acr/v1/prod%2Fbash/_tags", + "EncodedRequestUri": "L2Fjci92MS9wcm9kJTJGYmFzaC9fdGFncw==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0e84e5ae-9872-47e5-9792-6a7371b33dfb" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:55 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Correlation-Request-Id": [ + "5ceefb13-48ea-4f3d-8c34-bc9d46239442" + ], + "Content-Length": [ + "392" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ] + }, + "ResponseBody": "{\r\n \"registry\": \"managedtestregistry.azurecr.io\",\r\n \"imageName\": \"prod/bash\",\r\n \"tags\": [\r\n {\r\n \"name\": \"latest\",\r\n \"digest\": \"sha256:eabe547f78d4c18c708dd97ec3166cf7464cc651f1cbb67e70d407405b7ad7b6\",\r\n \"createdTime\": \"2018-09-28T23:37:52.0607161Z\",\r\n \"lastUpdateTime\": \"2018-09-28T23:37:52.0607161Z\",\r\n \"signed\": false,\r\n \"changeableAttributes\": {\r\n \"deleteEnabled\": true,\r\n \"writeEnabled\": true,\r\n \"readEnabled\": true,\r\n \"listEnabled\": true\r\n }\r\n }\r\n ]\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "dfb63c8c-7c89-4ef8-af13-75c1d873c895" + } +} \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/GetTagsCR.json b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/GetTagsCR.json new file mode 100644 index 000000000000..d0c1e372dc63 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/GetTagsCR.json @@ -0,0 +1,192 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9jbGFzc2ljdGVzdHJlZ2lzdHJ5P2FwaS12ZXJzaW9uPTIwMTctMTAtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "83eb6d3b-3049-405a-b8dc-a41c3290ab18" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11996" + ], + "x-ms-request-id": [ + "0ae88556-3100-496a-9be8-a5266ed246b3" + ], + "x-ms-correlation-request-id": [ + "0ae88556-3100-496a-9be8-a5266ed246b3" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181203Z:0ae88556-3100-496a-9be8-a5266ed246b3" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "685" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Classic\",\r\n \"tier\": \"Classic\"\r\n },\r\n \"type\": \"Microsoft.ContainerRegistry/registries\",\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry\",\r\n \"name\": \"classictestregistry\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"loginServer\": \"classictestregistry.azurecr.io\",\r\n \"creationDate\": \"2018-10-04T17:20:54.3121147Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"adminUserEnabled\": true,\r\n \"storageAccount\": {\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.Storage/storageAccounts/classictestregistr172020\"\r\n },\r\n \"firewallRulesEnabled\": false,\r\n \"firewallRules\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry/listCredentials?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9jbGFzc2ljdGVzdHJlZ2lzdHJ5L2xpc3RDcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTEwLTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "72804970-f4ba-4ff2-b5ee-e99f6381c62a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:02 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1196" + ], + "x-ms-request-id": [ + "3241835f-10a7-4964-9e82-8311c2c009cd" + ], + "x-ms-correlation-request-id": [ + "3241835f-10a7-4964-9e82-8311c2c009cd" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181203Z:3241835f-10a7-4964-9e82-8311c2c009cd" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "175" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"username\": \"classictestregistry\",\r\n \"passwords\": [\r\n {\r\n \"name\": \"password\",\r\n \"value\": \"YttZqPE=197fuiZ3Cf7YJIW010OxJvoO\"\r\n },\r\n {\r\n \"name\": \"password2\",\r\n \"value\": \"/cTqNKa2Mp3TrZakL2BBYVcOEIS5OG4i\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/v2/prod%2Fbash/tags/list", + "EncodedRequestUri": "L3YyL3Byb2QlMkZiYXNoL3RhZ3MvbGlzdA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "9d77684d-b059-41ee-a5a3-e31df976a106" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:06 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Client-Request-Id": [ + "9d77684d-b059-41ee-a5a3-e31df976a106" + ], + "X-Ms-Correlation-Request-Id": [ + "ad50ef58-2883-4a78-9cea-8070acd91008" + ], + "X-Ms-Request-Id": [ + "3ff7ed2e-41d4-4584-a657-7cf8b52d82fe" + ], + "Content-Length": [ + "39" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ] + }, + "ResponseBody": "{\r\n \"name\": \"prod/bash\",\r\n \"tags\": [\r\n \"latest\"\r\n ]\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "dfb63c8c-7c89-4ef8-af13-75c1d873c895" + } +} \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/GetTagsMR.json b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/GetTagsMR.json new file mode 100644 index 000000000000..cb6bed8cfb65 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/GetTagsMR.json @@ -0,0 +1,192 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5P2FwaS12ZXJzaW9uPTIwMTctMTAtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "daa40ed5-5075-49d1-b738-c02bdd3879a8" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "73f62eda-5cd6-4c86-8d34-306dd84fd75a" + ], + "x-ms-correlation-request-id": [ + "73f62eda-5cd6-4c86-8d34-306dd84fd75a" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181213Z:73f62eda-5cd6-4c86-8d34-306dd84fd75a" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "514" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Premium\",\r\n \"tier\": \"Premium\"\r\n },\r\n \"type\": \"Microsoft.ContainerRegistry/registries\",\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry\",\r\n \"name\": \"managedtestregistry\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"loginServer\": \"managedtestregistry.azurecr.io\",\r\n \"creationDate\": \"2018-08-14T20:27:59.2394952Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"adminUserEnabled\": true,\r\n \"firewallRulesEnabled\": false,\r\n \"firewallRules\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry/listCredentials?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5L2xpc3RDcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTEwLTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f5c32ded-86d5-4bc1-84ca-8a76ca5cfeb2" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:13 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "c3e40336-0533-4e41-b85c-fe85f366a782" + ], + "x-ms-correlation-request-id": [ + "c3e40336-0533-4e41-b85c-fe85f366a782" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181213Z:c3e40336-0533-4e41-b85c-fe85f366a782" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "175" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"username\": \"managedtestregistry\",\r\n \"passwords\": [\r\n {\r\n \"name\": \"password\",\r\n \"value\": \"2GoQeb3D8vs=2Kn8ijhGJMhkVXDHuHzt\"\r\n },\r\n {\r\n \"name\": \"password2\",\r\n \"value\": \"VBNhobRyJ6EPEKHye+v3Q4e6ujc28kJ/\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/v2/prod%2Fbash/tags/list", + "EncodedRequestUri": "L3YyL3Byb2QlMkZiYXNoL3RhZ3MvbGlzdA==", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "813bea7d-e5b8-40ee-b133-79df1131d96c" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:16 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Client-Request-Id": [ + "813bea7d-e5b8-40ee-b133-79df1131d96c" + ], + "X-Ms-Correlation-Request-Id": [ + "bf696090-f09f-43aa-92d9-2f7c875e207e" + ], + "X-Ms-Request-Id": [ + "62f14f2a-b35a-410a-b3f3-a6e1391b976f" + ], + "Content-Length": [ + "39" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ] + }, + "ResponseBody": "{\r\n \"name\": \"prod/bash\",\r\n \"tags\": [\r\n \"latest\"\r\n ]\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "dfb63c8c-7c89-4ef8-af13-75c1d873c895" + } +} \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/UpdateAcrTagAttributesCRThrowException.json b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/UpdateAcrTagAttributesCRThrowException.json new file mode 100644 index 000000000000..1f36772e56cd --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/UpdateAcrTagAttributesCRThrowException.json @@ -0,0 +1,186 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9jbGFzc2ljdGVzdHJlZ2lzdHJ5P2FwaS12ZXJzaW9uPTIwMTctMTAtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "356fa061-8ab0-4b53-b1eb-c2fd949b3dde" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11998" + ], + "x-ms-request-id": [ + "d2354fd0-958d-48bc-892a-4f9dbe8c176c" + ], + "x-ms-correlation-request-id": [ + "d2354fd0-958d-48bc-892a-4f9dbe8c176c" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181230Z:d2354fd0-958d-48bc-892a-4f9dbe8c176c" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "685" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Classic\",\r\n \"tier\": \"Classic\"\r\n },\r\n \"type\": \"Microsoft.ContainerRegistry/registries\",\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry\",\r\n \"name\": \"classictestregistry\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"loginServer\": \"classictestregistry.azurecr.io\",\r\n \"creationDate\": \"2018-10-04T17:20:54.3121147Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"adminUserEnabled\": true,\r\n \"storageAccount\": {\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.Storage/storageAccounts/classictestregistr172020\"\r\n },\r\n \"firewallRulesEnabled\": false,\r\n \"firewallRules\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/classictestregistry/listCredentials?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9jbGFzc2ljdGVzdHJlZ2lzdHJ5L2xpc3RDcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTEwLTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "aad34709-7845-429c-b643-a002da82ffe4" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:29 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1198" + ], + "x-ms-request-id": [ + "89de837b-cbcd-422f-9ba1-5c924e35edc1" + ], + "x-ms-correlation-request-id": [ + "89de837b-cbcd-422f-9ba1-5c924e35edc1" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181230Z:89de837b-cbcd-422f-9ba1-5c924e35edc1" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "175" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"username\": \"classictestregistry\",\r\n \"passwords\": [\r\n {\r\n \"name\": \"password\",\r\n \"value\": \"YttZqPE=197fuiZ3Cf7YJIW010OxJvoO\"\r\n },\r\n {\r\n \"name\": \"password2\",\r\n \"value\": \"/cTqNKa2Mp3TrZakL2BBYVcOEIS5OG4i\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/acr/v1/prod%2Fbash/_tags/latest", + "EncodedRequestUri": "L2Fjci92MS9wcm9kJTJGYmFzaC9fdGFncy9sYXRlc3Q=", + "RequestMethod": "PATCH", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "80dd76aa-b518-461c-9b67-af62a8db6d4a" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:32 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Correlation-Request-Id": [ + "8f566b5b-6257-4db4-b6be-026c1a12ef5a" + ], + "Content-Length": [ + "90" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ] + }, + "ResponseBody": "{\r\n \"errors\": [\r\n {\r\n \"code\": \"UNSUPPORTED\",\r\n \"message\": \"The operation is unsupported.\",\r\n \"detail\": {}\r\n }\r\n ]\r\n}", + "StatusCode": 405 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "dfb63c8c-7c89-4ef8-af13-75c1d873c895" + } +} \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/UpdateAcrTagAttributesMR.json b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/UpdateAcrTagAttributesMR.json new file mode 100644 index 000000000000..5fbd10796dd4 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/SessionRecords/ContainerRegistry.Tests.TagTests/UpdateAcrTagAttributesMR.json @@ -0,0 +1,354 @@ +{ + "Entries": [ + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5P2FwaS12ZXJzaW9uPTIwMTctMTAtMDE=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "89f51cb8-f374-4568-bfb7-a0c495770549" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "11999" + ], + "x-ms-request-id": [ + "487fe01a-ff4f-4d1e-9874-9352e13a5821" + ], + "x-ms-correlation-request-id": [ + "487fe01a-ff4f-4d1e-9874-9352e13a5821" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181158Z:487fe01a-ff4f-4d1e-9874-9352e13a5821" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "514" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"sku\": {\r\n \"name\": \"Premium\",\r\n \"tier\": \"Premium\"\r\n },\r\n \"type\": \"Microsoft.ContainerRegistry/registries\",\r\n \"id\": \"/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry\",\r\n \"name\": \"managedtestregistry\",\r\n \"location\": \"westus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"loginServer\": \"managedtestregistry.azurecr.io\",\r\n \"creationDate\": \"2018-08-14T20:27:59.2394952Z\",\r\n \"provisioningState\": \"Succeeded\",\r\n \"adminUserEnabled\": true,\r\n \"firewallRulesEnabled\": false,\r\n \"firewallRules\": []\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/subscriptions/dfb63c8c-7c89-4ef8-af13-75c1d873c895/resourceGroups/matttest/providers/Microsoft.ContainerRegistry/registries/managedtestregistry/listCredentials?api-version=2017-10-01", + "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvZGZiNjNjOGMtN2M4OS00ZWY4LWFmMTMtNzVjMWQ4NzNjODk1L3Jlc291cmNlR3JvdXBzL21hdHR0ZXN0L3Byb3ZpZGVycy9NaWNyb3NvZnQuQ29udGFpbmVyUmVnaXN0cnkvcmVnaXN0cmllcy9tYW5hZ2VkdGVzdHJlZ2lzdHJ5L2xpc3RDcmVkZW50aWFscz9hcGktdmVyc2lvbj0yMDE3LTEwLTAx", + "RequestMethod": "POST", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "fc21e162-708b-4691-91e6-ec890184b05d" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.Management.ContainerRegistry.ContainerRegistryManagementClient/2.0.0.0" + ] + }, + "ResponseHeaders": { + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Mon, 08 Oct 2018 18:11:58 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "Microsoft-HTTPAPI/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-request-id": [ + "f680e123-79af-46ef-b3f6-a1447067bec4" + ], + "x-ms-correlation-request-id": [ + "f680e123-79af-46ef-b3f6-a1447067bec4" + ], + "x-ms-routing-request-id": [ + "WESTUS2:20181008T181158Z:f680e123-79af-46ef-b3f6-a1447067bec4" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "175" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Expires": [ + "-1" + ] + }, + "ResponseBody": "{\r\n \"username\": \"managedtestregistry\",\r\n \"passwords\": [\r\n {\r\n \"name\": \"password\",\r\n \"value\": \"2GoQeb3D8vs=2Kn8ijhGJMhkVXDHuHzt\"\r\n },\r\n {\r\n \"name\": \"password2\",\r\n \"value\": \"VBNhobRyJ6EPEKHye+v3Q4e6ujc28kJ/\"\r\n }\r\n ]\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/acr/v1/prod%2Fbash/_tags/latest", + "EncodedRequestUri": "L2Fjci92MS9wcm9kJTJGYmFzaC9fdGFncy9sYXRlc3Q=", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"deleteEnabled\": true,\r\n \"writeEnabled\": false,\r\n \"listEnabled\": true,\r\n \"readEnabled\": true\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "67687b59-e1eb-4fac-a6d9-077c9f1da4d8" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "103" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:01 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Correlation-Request-Id": [ + "20f8ef0a-d368-4cb8-8eb8-be0dc7ff0a82" + ] + }, + "ResponseBody": "", + "StatusCode": 204 + }, + { + "RequestUri": "/acr/v1/prod%2Fbash/_tags/latest", + "EncodedRequestUri": "L2Fjci92MS9wcm9kJTJGYmFzaC9fdGFncy9sYXRlc3Q=", + "RequestMethod": "PATCH", + "RequestBody": "{\r\n \"deleteEnabled\": true,\r\n \"writeEnabled\": true,\r\n \"listEnabled\": true,\r\n \"readEnabled\": true\r\n}", + "RequestHeaders": { + "x-ms-client-request-id": [ + "f7af011a-6c42-4ae2-823d-a967950aaee0" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ], + "Content-Length": [ + "102" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:01 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Correlation-Request-Id": [ + "6baf7397-5e00-4e3d-bc2a-9b4ef4a77e18" + ] + }, + "ResponseBody": "", + "StatusCode": 204 + }, + { + "RequestUri": "/acr/v1/prod%2Fbash/_tags/latest", + "EncodedRequestUri": "L2Fjci92MS9wcm9kJTJGYmFzaC9fdGFncy9sYXRlc3Q=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "04d6c417-3dc2-471b-9e87-57d75eaac882" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:01 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Correlation-Request-Id": [ + "a1bc1ef2-02f0-4b57-acf7-8607f6ef7347" + ], + "Content-Length": [ + "390" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ] + }, + "ResponseBody": "{\r\n \"registry\": \"managedtestregistry.azurecr.io\",\r\n \"imageName\": \"prod/bash\",\r\n \"tag\": {\r\n \"name\": \"latest\",\r\n \"digest\": \"sha256:eabe547f78d4c18c708dd97ec3166cf7464cc651f1cbb67e70d407405b7ad7b6\",\r\n \"createdTime\": \"2018-09-28T23:37:52.0607161Z\",\r\n \"lastUpdateTime\": \"2018-09-28T23:37:52.0607161Z\",\r\n \"signed\": false,\r\n \"changeableAttributes\": {\r\n \"deleteEnabled\": true,\r\n \"writeEnabled\": false,\r\n \"readEnabled\": true,\r\n \"listEnabled\": true\r\n }\r\n }\r\n}", + "StatusCode": 200 + }, + { + "RequestUri": "/acr/v1/prod%2Fbash/_tags/latest", + "EncodedRequestUri": "L2Fjci92MS9wcm9kJTJGYmFzaC9fdGFncy9sYXRlc3Q=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "x-ms-client-request-id": [ + "0a5d9ad3-8062-4573-907e-93e8433659ad" + ], + "accept-language": [ + "en-US" + ], + "User-Agent": [ + "FxVersion/4.6.26614.01", + "Microsoft.Azure.ContainerRegistry.AzureContainerRegistryClient/1.0.0-preview" + ] + }, + "ResponseHeaders": { + "Connection": [ + "keep-alive" + ], + "Date": [ + "Mon, 08 Oct 2018 18:12:01 GMT" + ], + "Server": [ + "nginx" + ], + "Access-Control-Expose-Headers": [ + "Docker-Content-Digest", + "WWW-Authenticate", + "Link", + "X-Ms-Correlation-Request-Id" + ], + "Docker-Distribution-Api-Version": [ + "registry/2.0" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains", + "max-age=31536000; includeSubDomains" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "X-Ms-Correlation-Request-Id": [ + "3d01d834-17a4-41e2-86a1-d9658956d947" + ], + "Content-Length": [ + "389" + ], + "Content-Type": [ + "application/json; charset=utf-8" + ] + }, + "ResponseBody": "{\r\n \"registry\": \"managedtestregistry.azurecr.io\",\r\n \"imageName\": \"prod/bash\",\r\n \"tag\": {\r\n \"name\": \"latest\",\r\n \"digest\": \"sha256:eabe547f78d4c18c708dd97ec3166cf7464cc651f1cbb67e70d407405b7ad7b6\",\r\n \"createdTime\": \"2018-09-28T23:37:52.0607161Z\",\r\n \"lastUpdateTime\": \"2018-09-28T23:37:52.0607161Z\",\r\n \"signed\": false,\r\n \"changeableAttributes\": {\r\n \"deleteEnabled\": true,\r\n \"writeEnabled\": true,\r\n \"readEnabled\": true,\r\n \"listEnabled\": true\r\n }\r\n }\r\n}", + "StatusCode": 200 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "dfb63c8c-7c89-4ef8-af13-75c1d873c895" + } +} \ No newline at end of file diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/Tests/ManifestTests.cs b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/Tests/ManifestTests.cs new file mode 100644 index 000000000000..c4aa49cbf127 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/Tests/ManifestTests.cs @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. + +namespace ContainerRegistry.Tests +{ + using Microsoft.Azure.ContainerRegistry; + using Microsoft.Azure.ContainerRegistry.Models; + using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + using System.Collections.Generic; + using System.Threading.Tasks; + using Xunit; + + public class ManifestTests + { + private static readonly AcrManifestAttributes ExpectedAttributesOfProdRepository = new AcrManifestAttributes() + { + ImageName = ACRTestUtil.ProdRepository, + Registry = ACRTestUtil.ManagedTestRegistryFullName, + Manifest = new AcrManifestAttributesBase() + { + Architecture = "amd64", + CreatedTime = "2018-09-28T23:37:51.9987277Z", + LastUpdateTime = "2018-09-28T23:37:51.9987277Z", + Digest = "sha256:eabe547f78d4c18c708dd97ec3166cf7464cc651f1cbb67e70d407405b7ad7b6", + MediaType = "application/vnd.docker.distribution.manifest.v2+json", + Os = "linux", + Tags = new List() { "latest" }, + ChangeableAttributes = new ChangeableAttributes() + { + DeleteEnabled = true, + ListEnabled = true, + ReadEnabled = true, + WriteEnabled = true + } + } + }; + + [Fact] + public async Task GetAcrManifestAttributesMR() + { + using (var context = MockContext.Start(GetType().FullName, nameof(GetAcrManifestAttributesMR))) + { + var client = await ACRTestUtil.GetACRClientAsync(context, ACRTestUtil.ManagedTestRegistry); + var repositoryAttributes = await client.GetAcrManifestAttributesAsync(ACRTestUtil.ProdRepository, + "sha256:eabe547f78d4c18c708dd97ec3166cf7464cc651f1cbb67e70d407405b7ad7b6"); + + Assert.Equal(ExpectedAttributesOfProdRepository.ImageName, repositoryAttributes.ImageName); + Assert.Equal(ExpectedAttributesOfProdRepository.Registry, repositoryAttributes.Registry); + VerifyAcrManifestAttributesBase(ExpectedAttributesOfProdRepository.Manifest, repositoryAttributes.Manifest); + } + } + + [Fact] + public async Task GetAcrManifestAttributesCRReturnsNull() + { + using (var context = MockContext.Start(GetType().FullName, nameof(GetAcrManifestAttributesCRReturnsNull))) + { + var client = await ACRTestUtil.GetACRClientAsync(context, ACRTestUtil.ClassicTestRegistry); + var manifestAttributes = await client.GetAcrManifestAttributesAsync(ACRTestUtil.ProdRepository, + "sha256:eabe547f78d4c18c708dd97ec3166cf7464cc651f1cbb67e70d407405b7ad7b6"); + + Assert.Null(manifestAttributes); + } + } + + [Fact] + public async Task GetAcrManifestsMR() + { + using (var context = MockContext.Start(GetType().FullName, nameof(GetAcrManifestsMR))) + { + var client = await ACRTestUtil.GetACRClientAsync(context, ACRTestUtil.ManagedTestRegistry); + var manifests = await client.GetAcrManifestsAsync(ACRTestUtil.ProdRepository); + + Assert.Equal(ExpectedAttributesOfProdRepository.ImageName, manifests.ImageName); + Assert.Equal(ExpectedAttributesOfProdRepository.Registry, manifests.Registry); + Assert.Equal(1, manifests.Manifests.Count); + VerifyAcrManifestAttributesBase(ExpectedAttributesOfProdRepository.Manifest, manifests.Manifests[0]); + } + } + + [Fact] + public async Task GetAcrManifestsCRThrowException() + { + using (var context = MockContext.Start(GetType().FullName, nameof(GetAcrManifestsCRThrowException))) + { + var client = await ACRTestUtil.GetACRClientAsync(context, ACRTestUtil.ClassicTestRegistry); + await Assert.ThrowsAsync(() => client.GetAcrManifestsAsync(ACRTestUtil.ProdRepository)); + } + } + + [Fact] + public async Task GetManifestMR() + { + using (var context = MockContext.Start(GetType().FullName, nameof(GetManifestMR))) + { + var tag = "latest"; + var client = await ACRTestUtil.GetACRClientAsync(context, ACRTestUtil.ManagedTestRegistry); + var manifest = await client.GetManifestAsync(ACRTestUtil.TestRepository, tag); + + Assert.Equal(1, manifest.SchemaVersion); + Assert.Equal(ACRTestUtil.TestRepository, manifest.Name); + Assert.Equal(tag, manifest.Tag); + Assert.Equal("amd64", manifest.Architecture); + Assert.Equal(10, manifest.FsLayers.Count); + Assert.Equal(10, manifest.ImageHistories.Count); + Assert.Equal(1, manifest.Signatures.Count); + var signature = manifest.Signatures[0]; + Assert.NotEqual(string.Empty, signature.ProtectedHeader); + Assert.NotEqual(string.Empty, signature.Signature); + Assert.Equal("P-256", signature.Header.Jwk.Crv); + Assert.NotEqual(string.Empty, signature.Header.Jwk.Kid); + Assert.Equal("EC", signature.Header.Jwk.Kty); + Assert.NotEqual(string.Empty, signature.Header.Jwk.X); + Assert.NotEqual(string.Empty, signature.Header.Jwk.Y); + } + } + + [Fact] + public async Task GetManifestCR() + { + using (var context = MockContext.Start(GetType().FullName, nameof(GetManifestCR))) + { + var tag = "latest"; + var client = await ACRTestUtil.GetACRClientAsync(context, ACRTestUtil.ClassicTestRegistry); + var manifest = await client.GetManifestAsync(ACRTestUtil.ProdRepository, tag); + + Assert.Equal(1, manifest.SchemaVersion); + Assert.Equal(ACRTestUtil.ProdRepository, manifest.Name); + Assert.Equal(tag, manifest.Tag); + Assert.Equal("amd64", manifest.Architecture); + Assert.Equal(10, manifest.FsLayers.Count); + Assert.Equal(10, manifest.ImageHistories.Count); + Assert.Equal(1, manifest.Signatures.Count); + var signature = manifest.Signatures[0]; + Assert.NotEqual(string.Empty, signature.ProtectedHeader); + Assert.NotEqual(string.Empty, signature.Signature); + Assert.Equal("P-256", signature.Header.Jwk.Crv); + Assert.NotEqual(string.Empty, signature.Header.Jwk.Kid); + Assert.Equal("EC", signature.Header.Jwk.Kty); + Assert.NotEqual(string.Empty, signature.Header.Jwk.X); + Assert.NotEqual(string.Empty, signature.Header.Jwk.Y); + } + } + + [Fact] + public async Task UpdateAcrManifestAttributesMR() + { + using (var context = MockContext.Start(GetType().FullName, nameof(UpdateAcrManifestAttributesMR))) + { + var updateAttributes = new ChangeableAttributes() { DeleteEnabled = true, ListEnabled = true, ReadEnabled = true, WriteEnabled = false }; + var digest = "sha256:eabe547f78d4c18c708dd97ec3166cf7464cc651f1cbb67e70d407405b7ad7b6"; + var client = await ACRTestUtil.GetACRClientAsync(context, ACRTestUtil.ManagedTestRegistry); + await client.UpdateAcrManifestAttributesAsync(ACRTestUtil.ProdRepository, digest, updateAttributes); + var updatedManifest = await client.GetAcrManifestAttributesAsync(ACRTestUtil.ProdRepository, digest); + Assert.False(updatedManifest.Manifest.ChangeableAttributes.WriteEnabled); + + updateAttributes.WriteEnabled = true; + await client.UpdateAcrManifestAttributesAsync(ACRTestUtil.ProdRepository, digest, updateAttributes); + updatedManifest = await client.GetAcrManifestAttributesAsync(ACRTestUtil.ProdRepository, digest); + Assert.Equal(ExpectedAttributesOfProdRepository.ImageName, updatedManifest.ImageName); + Assert.Equal(ExpectedAttributesOfProdRepository.Registry, updatedManifest.Registry); + VerifyAcrManifestAttributesBase(ExpectedAttributesOfProdRepository.Manifest, updatedManifest.Manifest); + } + } + + private void VerifyAcrManifestAttributesBase(AcrManifestAttributesBase expectedManifestBase, AcrManifestAttributesBase actualManifestBase) + { + Assert.Equal(expectedManifestBase.Architecture, actualManifestBase.Architecture); + Assert.Equal(expectedManifestBase.CreatedTime, actualManifestBase.CreatedTime); + Assert.Equal(expectedManifestBase.Digest, actualManifestBase.Digest); + Assert.Equal(expectedManifestBase.LastUpdateTime, actualManifestBase.LastUpdateTime); + Assert.Equal(expectedManifestBase.MediaType, actualManifestBase.MediaType); + Assert.Equal(expectedManifestBase.Os, actualManifestBase.Os); + Assert.Equal(expectedManifestBase.Tags.Count, actualManifestBase.Tags.Count); + Assert.Equal(expectedManifestBase.Tags[0], actualManifestBase.Tags[0]); + Assert.Equal(expectedManifestBase.ChangeableAttributes.DeleteEnabled, actualManifestBase.ChangeableAttributes.DeleteEnabled); + Assert.Equal(expectedManifestBase.ChangeableAttributes.ListEnabled, actualManifestBase.ChangeableAttributes.ListEnabled); + Assert.Equal(expectedManifestBase.ChangeableAttributes.ReadEnabled, actualManifestBase.ChangeableAttributes.ReadEnabled); + Assert.Equal(expectedManifestBase.ChangeableAttributes.WriteEnabled, actualManifestBase.ChangeableAttributes.WriteEnabled); + } + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/Tests/RepositoryTests.cs b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/Tests/RepositoryTests.cs new file mode 100644 index 000000000000..b0d0e9609e60 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/Tests/RepositoryTests.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. + +namespace ContainerRegistry.Tests +{ + using Microsoft.Azure.ContainerRegistry; + using Microsoft.Azure.ContainerRegistry.Models; + using Microsoft.Rest; + using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + using System.Threading.Tasks; + using Xunit; + + public class RepositoryTests + { + [Fact] + public async Task ListRepositoryCR() + { + using (var context = MockContext.Start(GetType().FullName, nameof(ListRepositoryCR))) + { + var client = await ACRTestUtil.GetACRClientAsync(context, ACRTestUtil.ClassicTestRegistry); + var repositories = await client.GetRepositoriesAsync(); + + Assert.Equal(2, repositories.Names.Count); + Assert.Collection(repositories.Names, name => Assert.Equal(ACRTestUtil.ProdRepository, name), + name => Assert.Equal(ACRTestUtil.TestRepository, name)); + } + } + + [Fact] + public async Task ListRepositoryMR() + { + using (var context = MockContext.Start(GetType().FullName, nameof(ListRepositoryMR))) + { + var client = await ACRTestUtil.GetACRClientAsync(context, ACRTestUtil.ManagedTestRegistry); + var repositories = await client.GetRepositoriesAsync(); + + Assert.Equal(2, repositories.Names.Count); + Assert.Collection(repositories.Names, name => Assert.Equal(ACRTestUtil.ProdRepository, name), + name => Assert.Equal(ACRTestUtil.TestRepository, name)); + } + } + + [Fact] + public async Task GetAcrRepositoryDetailsMR() + { + using (var context = MockContext.Start(GetType().FullName, nameof(GetAcrRepositoryDetailsMR))) + { + var client = await ACRTestUtil.GetACRClientAsync(context, ACRTestUtil.ManagedTestRegistry); + var repositoryDetails = await client.GetAcrRepositoryAttributesAsync(ACRTestUtil.ProdRepository); + + Assert.Equal(ACRTestUtil.ManagedTestRegistryFullName, repositoryDetails.Registry); + Assert.Equal(1, repositoryDetails.TagCount); + Assert.Equal(1, repositoryDetails.ManifestCount); + Assert.Equal("2018-09-28T23:37:52.0356217Z", repositoryDetails.LastUpdateTime); + Assert.Equal("2018-09-28T23:37:51.9668212Z", repositoryDetails.CreatedTime); + Assert.Equal(ACRTestUtil.ProdRepository, repositoryDetails.ImageName); + Assert.True(repositoryDetails.ChangeableAttributes.DeleteEnabled); + Assert.True(repositoryDetails.ChangeableAttributes.ListEnabled); + Assert.True(repositoryDetails.ChangeableAttributes.ReadEnabled); + Assert.True(repositoryDetails.ChangeableAttributes.WriteEnabled); + } + } + + [Fact] + public async Task GetAcrRepositoryDetailsCRThrowException() + { + using (var context = MockContext.Start(GetType().FullName, nameof(GetAcrRepositoryDetailsCRThrowException))) + { + var client = await ACRTestUtil.GetACRClientAsync(context, ACRTestUtil.ClassicTestRegistry); + await Assert.ThrowsAsync(() => client.GetAcrRepositoryAttributesAsync(ACRTestUtil.ProdRepository)); + } + } + + [Fact] + public async Task GetAcrRepositoriesMR() + { + using (var context = MockContext.Start(GetType().FullName, nameof(GetAcrRepositoriesMR))) + { + var client = await ACRTestUtil.GetACRClientAsync(context, ACRTestUtil.ManagedTestRegistry); + var repositories = await client.GetAcrRepositoriesAsync(); + + Assert.Equal(2, repositories.Names.Count); + Assert.Collection(repositories.Names, name => Assert.Equal(ACRTestUtil.ProdRepository, name), + name => Assert.Equal(ACRTestUtil.TestRepository, name)); + } + } + + [Fact] + public async Task GetAcrRepositoriesCRThrowException() + { + using (var context = MockContext.Start(GetType().FullName, nameof(GetAcrRepositoriesCRThrowException))) + { + var client = await ACRTestUtil.GetACRClientAsync(context, ACRTestUtil.ClassicTestRegistry); + await Assert.ThrowsAsync(() => client.GetAcrRepositoriesAsync()); + } + } + + [Fact] + public async Task DeleteAcrRepositoryMR() + { + using (var context = MockContext.Start(GetType().FullName, nameof(DeleteAcrRepositoryMR))) + { + var client = await ACRTestUtil.GetACRClientAsync(context, ACRTestUtil.ManagedTestRegistryForDeleting); + var deletedRepo = await client.DeleteAcrRepositoryAsync(ACRTestUtil.TestRepository); + + Assert.Equal(1, deletedRepo.ManifestsDeleted.Count); + Assert.Equal("sha256:eabe547f78d4c18c708dd97ec3166cf7464cc651f1cbb67e70d407405b7ad7b6", deletedRepo.ManifestsDeleted[0]); + Assert.Equal(2, deletedRepo.TagsDeleted.Count); + Assert.Collection(deletedRepo.TagsDeleted, tag => Assert.Equal("01", tag), + tag => Assert.Equal("latest", tag)); + } + } + + [Fact] + public async Task DeleteAcrRepositoryCRThrowException() + { + using (var context = MockContext.Start(GetType().FullName, nameof(DeleteAcrRepositoryCRThrowException))) + { + var client = await ACRTestUtil.GetACRClientAsync(context, ACRTestUtil.ClassicTestRegistryForDeleting); + await Assert.ThrowsAsync(() => client.DeleteAcrRepositoryAsync("prod/bash")); + } + } + + [Fact] + public async Task UpdateAcrRepositoryAttributesMR() + { + using (var context = MockContext.Start(GetType().FullName, nameof(UpdateAcrRepositoryAttributesMR))) + { + var client = await ACRTestUtil.GetACRClientAsync(context, ACRTestUtil.ManagedTestRegistry); + var updateAttributes = new ChangeableAttributes() { DeleteEnabled = true, ListEnabled = true, ReadEnabled = true, WriteEnabled = false }; + await client.UpdateAcrRepositoryAttributesAsync(ACRTestUtil.ProdRepository, updateAttributes); + var repositoryDetails = await client.GetAcrRepositoryAttributesAsync(ACRTestUtil.ProdRepository); + + Assert.Equal(ACRTestUtil.ManagedTestRegistryFullName, repositoryDetails.Registry); + Assert.Equal(1, repositoryDetails.TagCount); + Assert.Equal(1, repositoryDetails.ManifestCount); + Assert.Equal("2018-09-28T23:37:52.0356217Z", repositoryDetails.LastUpdateTime); + Assert.Equal("2018-09-28T23:37:51.9668212Z", repositoryDetails.CreatedTime); + Assert.Equal(ACRTestUtil.ProdRepository, repositoryDetails.ImageName); + Assert.True(repositoryDetails.ChangeableAttributes.DeleteEnabled); + Assert.True(repositoryDetails.ChangeableAttributes.ListEnabled); + Assert.True(repositoryDetails.ChangeableAttributes.ReadEnabled); + Assert.False(repositoryDetails.ChangeableAttributes.WriteEnabled); + + updateAttributes.WriteEnabled = true; + await client.UpdateAcrRepositoryAttributesAsync(ACRTestUtil.ProdRepository, updateAttributes); + } + } + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/Tests/TagTests.cs b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/Tests/TagTests.cs new file mode 100644 index 000000000000..6080e9434a2a --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/ContainerRegistry.Tests/Tests/TagTests.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. + +namespace ContainerRegistry.Tests +{ + using Microsoft.Azure.ContainerRegistry; + using Microsoft.Azure.ContainerRegistry.Models; + using Microsoft.Rest.ClientRuntime.Azure.TestFramework; + using System.Linq; + using System.Threading.Tasks; + using Xunit; + + public class TagTests + { + [Fact] + public async Task GetAcrTagsMR() + { + using (var context = MockContext.Start(GetType().FullName, nameof(GetAcrTagsMR))) + { + var client = await ACRTestUtil.GetACRClientAsync(context, ACRTestUtil.ManagedTestRegistry); + var tags = await client.GetAcrTagsAsync(ACRTestUtil.ProdRepository); + + Assert.Equal(ACRTestUtil.ProdRepository, tags.ImageName); + Assert.Equal(ACRTestUtil.ManagedTestRegistryFullName, tags.Registry); + Assert.Equal(1, tags.TagsAttributes.Count); + var tagAttributes = tags.TagsAttributes[0]; + Assert.Equal("latest", tagAttributes.Name); + Assert.Equal("2018-09-28T23:37:52.0607161Z", tagAttributes.LastUpdateTime); + Assert.Equal("2018-09-28T23:37:52.0607161Z", tagAttributes.CreatedTime); + Assert.Equal("sha256:eabe547f78d4c18c708dd97ec3166cf7464cc651f1cbb67e70d407405b7ad7b6", tagAttributes.Digest); + Assert.True(tagAttributes.ChangeableAttributes.DeleteEnabled); + Assert.True(tagAttributes.ChangeableAttributes.ReadEnabled); + Assert.True(tagAttributes.ChangeableAttributes.ListEnabled); + Assert.True(tagAttributes.ChangeableAttributes.WriteEnabled); + } + } + + [Fact] + public async Task GetAcrTagsCRThrowException() + { + using (var context = MockContext.Start(GetType().FullName, nameof(GetAcrTagsCRThrowException))) + { + var client = await ACRTestUtil.GetACRClientAsync(context, ACRTestUtil.ClassicTestRegistry); + await Assert.ThrowsAsync(() => client.GetAcrTagsAsync(ACRTestUtil.ProdRepository)); + } + } + + [Fact] + public async Task GetTagsMR() + { + using (var context = MockContext.Start(GetType().FullName, nameof(GetTagsMR))) + { + var client = await ACRTestUtil.GetACRClientAsync(context, ACRTestUtil.ManagedTestRegistry); + var tags = await client.GetTagListAsync(ACRTestUtil.ProdRepository); + Assert.Equal(1, tags.Tags.Count); + Assert.Equal("latest", tags.Tags[0]); + Assert.Equal(ACRTestUtil.ProdRepository, tags.Name); + } + } + + [Fact] + public async Task GetTagsCR() + { + using (var context = MockContext.Start(GetType().FullName, nameof(GetTagsCR))) + { + var client = await ACRTestUtil.GetACRClientAsync(context, ACRTestUtil.ClassicTestRegistry); + var tags = await client.GetTagListAsync(ACRTestUtil.ProdRepository); + Assert.Equal(1, tags.Tags.Count); + Assert.Equal("latest", tags.Tags[0]); + Assert.Equal(ACRTestUtil.ProdRepository, tags.Name); + } + } + + [Fact] + public async Task DeleteAcrTagMR() + { + using (var context = MockContext.Start(GetType().FullName, nameof(DeleteAcrTagMR))) + { + var client = await ACRTestUtil.GetACRClientAsync(context, ACRTestUtil.ManagedTestRegistryForDeleting); + await client.DeleteAcrTagAsync(ACRTestUtil.ProdRepository, "latest"); + var tags = await client.GetTagListAsync(ACRTestUtil.ProdRepository); + Assert.Equal(0, tags.Tags.Count); + } + } + + [Fact] + public async Task DeleteAcrTagCRThrowException() + { + using (var context = MockContext.Start(GetType().FullName, nameof(DeleteAcrTagCRThrowException))) + { + var client = await ACRTestUtil.GetACRClientAsync(context, ACRTestUtil.ClassicTestRegistry); + await Assert.ThrowsAsync(() => client.DeleteAcrTagAsync(ACRTestUtil.ProdRepository, "latest")); + } + } + + [Fact] + public async Task UpdateAcrTagAttributesMR() + { + using (var context = MockContext.Start(GetType().FullName, nameof(UpdateAcrTagAttributesMR))) + { + var updateAttributes = new ChangeableAttributes() { DeleteEnabled = true, ListEnabled = true, ReadEnabled = true, WriteEnabled = false }; + var tag = "latest"; + var client = await ACRTestUtil.GetACRClientAsync(context, ACRTestUtil.ManagedTestRegistry); + await client.UpdateAcrTagAttributesAsync(ACRTestUtil.ProdRepository, tag, updateAttributes); + var tagAttributes = await client.GetAcrTagAttributesAsync(ACRTestUtil.ProdRepository, tag); + + Assert.False(tagAttributes.TagAttributes.ChangeableAttributes.WriteEnabled); + + updateAttributes.WriteEnabled = true; + await client.UpdateAcrTagAttributesAsync(ACRTestUtil.ProdRepository, tag, updateAttributes); + tagAttributes = await client.GetAcrTagAttributesAsync(ACRTestUtil.ProdRepository, tag); + + Assert.True(tagAttributes.TagAttributes.ChangeableAttributes.WriteEnabled); + } + } + + [Fact] + public async Task UpdateAcrTagAttributesCRThrowException() + { + using (var context = MockContext.Start(GetType().FullName, nameof(UpdateAcrTagAttributesCRThrowException))) + { + var client = await ACRTestUtil.GetACRClientAsync(context, ACRTestUtil.ClassicTestRegistry); + await Assert.ThrowsAsync(() => client.UpdateAcrTagAttributesAsync(ACRTestUtil.ProdRepository, "latest", default(ChangeableAttributes))); + } + } + + [Fact] + public async Task GetAcrTagAttributesMR() + { + using (var context = MockContext.Start(GetType().FullName, nameof(GetAcrTagAttributesMR))) + { + var tag = "latest"; + var client = await ACRTestUtil.GetACRClientAsync(context, ACRTestUtil.ManagedTestRegistry); + var tagAttributes = await client.GetAcrTagAttributesAsync(ACRTestUtil.ProdRepository, tag); + + Assert.Equal(ACRTestUtil.ManagedTestRegistryFullName, tagAttributes.Registry); + Assert.Equal(ACRTestUtil.ProdRepository, tagAttributes.ImageName); + Assert.Equal("2018-09-28T23:37:52.0607161Z", tagAttributes.TagAttributes.CreatedTime); + Assert.Equal("sha256:eabe547f78d4c18c708dd97ec3166cf7464cc651f1cbb67e70d407405b7ad7b6", tagAttributes.TagAttributes.Digest); + Assert.Equal("2018-09-28T23:37:52.0607161Z", tagAttributes.TagAttributes.LastUpdateTime); + Assert.Equal(tag, tagAttributes.TagAttributes.Name); + Assert.False(tagAttributes.TagAttributes.Signed); + Assert.True(tagAttributes.TagAttributes.ChangeableAttributes.DeleteEnabled); + Assert.True(tagAttributes.TagAttributes.ChangeableAttributes.ReadEnabled); + Assert.True(tagAttributes.TagAttributes.ChangeableAttributes.ListEnabled); + Assert.True(tagAttributes.TagAttributes.ChangeableAttributes.WriteEnabled); + } + } + + [Fact] + public async Task GetAcrTagAttributesCRThrowException() + { + using (var context = MockContext.Start(GetType().FullName, nameof(GetAcrTagAttributesCRThrowException))) + { + var client = await ACRTestUtil.GetACRClientAsync(context, ACRTestUtil.ClassicTestRegistry); + await Assert.ThrowsAsync(() => client.GetAcrTagAttributesAsync(ACRTestUtil.ProdRepository, "latest")); + } + } + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry.sln b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry.sln new file mode 100644 index 000000000000..9b13bbfec716 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.27130.2036 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ContainerRegistry.Tests", "ContainerRegistry.Tests\ContainerRegistry.Tests.csproj", "{5D867A48-4861-43CB-BE00-65F54BE82C4E}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.ContainerRegistry", "Microsoft.Azure.ContainerRegistry\Microsoft.Azure.ContainerRegistry.csproj", "{E704234A-F8FC-4648-8C2D-A1CB1BE6CCE3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5D867A48-4861-43CB-BE00-65F54BE82C4E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5D867A48-4861-43CB-BE00-65F54BE82C4E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5D867A48-4861-43CB-BE00-65F54BE82C4E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5D867A48-4861-43CB-BE00-65F54BE82C4E}.Release|Any CPU.Build.0 = Release|Any CPU + {E704234A-F8FC-4648-8C2D-A1CB1BE6CCE3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E704234A-F8FC-4648-8C2D-A1CB1BE6CCE3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E704234A-F8FC-4648-8C2D-A1CB1BE6CCE3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E704234A-F8FC-4648-8C2D-A1CB1BE6CCE3}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {67040A5E-5444-44DC-A7B9-7E000E6B3D92} + EndGlobalSection +EndGlobal diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/AzureContainerRegistryClient.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/AzureContainerRegistryClient.cs new file mode 100644 index 000000000000..097a4d43c14d --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/AzureContainerRegistryClient.cs @@ -0,0 +1,2902 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Microsoft.Rest.Serialization; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + + /// + /// V2 API definition for the Azure Container Registry runtime + /// + public partial class AzureContainerRegistryClient : ServiceClient, IAzureContainerRegistryClient, IAzureClient + { + /// + /// The base URI of the service. + /// + public System.Uri BaseUri { get; set; } + + /// + /// Gets or sets json serialization settings. + /// + public JsonSerializerSettings SerializationSettings { get; private set; } + + /// + /// Gets or sets json deserialization settings. + /// + public JsonSerializerSettings DeserializationSettings { get; private set; } + + /// + /// Credentials needed for the client to connect to Azure. + /// + public ServiceClientCredentials Credentials { get; private set; } + + /// + /// The preferred language for the response. + /// + public string AcceptLanguage { get; set; } + + /// + /// The retry timeout in seconds for Long Running Operations. Default value is + /// 30. + /// + public int? LongRunningOperationRetryTimeout { get; set; } + + /// + /// Whether a unique x-ms-client-request-id should be generated. When set to + /// true a unique x-ms-client-request-id value is generated and included in + /// each request. Default is true. + /// + public bool? GenerateClientRequestId { get; set; } + + /// + /// Initializes a new instance of the AzureContainerRegistryClient class. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling AzureContainerRegistryClient.Dispose(). False: will not dispose provided httpClient + protected AzureContainerRegistryClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) + { + Initialize(); + } + + /// + /// Initializes a new instance of the AzureContainerRegistryClient class. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + protected AzureContainerRegistryClient(params DelegatingHandler[] handlers) : base(handlers) + { + Initialize(); + } + + /// + /// Initializes a new instance of the AzureContainerRegistryClient class. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + protected AzureContainerRegistryClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) + { + Initialize(); + } + + /// + /// Initializes a new instance of the AzureContainerRegistryClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + protected AzureContainerRegistryClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + BaseUri = baseUri; + } + + /// + /// Initializes a new instance of the AzureContainerRegistryClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + protected AzureContainerRegistryClient(System.Uri baseUri, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + BaseUri = baseUri; + } + + /// + /// Initializes a new instance of the AzureContainerRegistryClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public AzureContainerRegistryClient(ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the AzureContainerRegistryClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// HttpClient to be used + /// + /// + /// True: will dispose the provided httpClient on calling AzureContainerRegistryClient.Dispose(). False: will not dispose provided httpClient + /// + /// Thrown when a required parameter is null + /// + public AzureContainerRegistryClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the AzureContainerRegistryClient class. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public AzureContainerRegistryClient(ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the AzureContainerRegistryClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public AzureContainerRegistryClient(System.Uri baseUri, ServiceClientCredentials credentials, params DelegatingHandler[] handlers) : this(handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + BaseUri = baseUri; + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// Initializes a new instance of the AzureContainerRegistryClient class. + /// + /// + /// Optional. The base URI of the service. + /// + /// + /// Required. Credentials needed for the client to connect to Azure. + /// + /// + /// Optional. The http client handler used to handle http transport. + /// + /// + /// Optional. The delegating handlers to add to the http client pipeline. + /// + /// + /// Thrown when a required parameter is null + /// + public AzureContainerRegistryClient(System.Uri baseUri, ServiceClientCredentials credentials, HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : this(rootHandler, handlers) + { + if (baseUri == null) + { + throw new System.ArgumentNullException("baseUri"); + } + if (credentials == null) + { + throw new System.ArgumentNullException("credentials"); + } + BaseUri = baseUri; + Credentials = credentials; + if (Credentials != null) + { + Credentials.InitializeServiceClient(this); + } + } + + /// + /// An optional partial-method to perform custom initialization. + /// + partial void CustomInitialize(); + /// + /// Initializes client properties. + /// + private void Initialize() + { + BaseUri = new System.Uri("https://acrapi.azurecr-test.io"); + AcceptLanguage = "en-US"; + LongRunningOperationRetryTimeout = 30; + GenerateClientRequestId = true; + SerializationSettings = new JsonSerializerSettings + { + Formatting = Newtonsoft.Json.Formatting.Indented, + DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, + DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, + NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, + ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, + ContractResolver = new ReadOnlyJsonContractResolver(), + Converters = new List + { + new Iso8601TimeSpanConverter() + } + }; + DeserializationSettings = new JsonSerializerSettings + { + DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, + DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, + NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, + ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, + ContractResolver = new ReadOnlyJsonContractResolver(), + Converters = new List + { + new Iso8601TimeSpanConverter() + } + }; + CustomInitialize(); + DeserializationSettings.Converters.Add(new CloudErrorJsonConverter()); + } + /// + /// Tells whether this Docker Registry instance supports Docker Registry HTTP + /// API v2 + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task GetDockerRegistryV2SupportWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetDockerRegistryV2Support", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v2/").ToString(); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new AcrErrorsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + AcrErrors _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Fetch the tags under the repository identified by 'name' + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetTagListWithHttpMessagesAsync(string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetTagList", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v2/{name}/tags/list").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 404) + { + var ex = new AcrErrorsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + AcrErrors _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Pulls the image manifest file associated with the specified name and + /// reference. Reference may be a tag or a digest + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// A tag or a digest, pointing to a specific image + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetManifestWithHttpMessagesAsync(string name, string reference, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (reference == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "reference"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("reference", reference); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetManifest", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v2/{name}/manifests/{reference}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{reference}", System.Uri.EscapeDataString(reference)); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 404) + { + var ex = new AcrErrorsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + AcrErrors _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// List respositories + /// + /// + /// query parameter for the last item in previou query + /// + /// + /// query parameter for max number of items + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetRepositoriesWithHttpMessagesAsync(string last = default(string), string n = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("last", last); + tracingParameters.Add("n", n); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetRepositories", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "v2/_catalog").ToString(); + List _queryParameters = new List(); + if (last != null) + { + _queryParameters.Add(string.Format("last={0}", System.Uri.EscapeDataString(last))); + } + if (n != null) + { + _queryParameters.Add(string.Format("n={0}", System.Uri.EscapeDataString(n))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new AcrErrorsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + AcrErrors _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// List respositories + /// + /// + /// query parameter for the last item in previou query + /// + /// + /// query parameter for max number of items + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAcrRepositoriesWithHttpMessagesAsync(string last = default(string), string n = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("last", last); + tracingParameters.Add("n", n); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAcrRepositories", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "acr/v1/_catalog").ToString(); + List _queryParameters = new List(); + if (last != null) + { + _queryParameters.Add(string.Format("last={0}", System.Uri.EscapeDataString(last))); + } + if (n != null) + { + _queryParameters.Add(string.Format("n={0}", System.Uri.EscapeDataString(n))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200) + { + var ex = new AcrErrorsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + AcrErrors _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get respository attributes + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAcrRepositoryAttributesWithHttpMessagesAsync(string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAcrRepositoryAttributes", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "acr/v1/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 404) + { + var ex = new AcrErrorsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + AcrErrors _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Delete a respository + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> DeleteAcrRepositoryWithHttpMessagesAsync(string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteAcrRepository", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "acr/v1/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 202 && (int)_statusCode != 404) + { + var ex = new AcrErrorsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + AcrErrors _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 202) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Update attributes of a repository + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// Repository attribute value + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task UpdateAcrRepositoryAttributesWithHttpMessagesAsync(string name, ChangeableAttributes value = default(ChangeableAttributes), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("value", value); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "UpdateAcrRepositoryAttributes", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "acr/v1/{name}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(value != null) + { + _requestContent = SafeJsonConvert.SerializeObject(value, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 204 && (int)_statusCode != 404) + { + var ex = new AcrErrorsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + AcrErrors _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// List tags of a repository + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// query parameter for the last item in previou query + /// + /// + /// query parameter for max number of items + /// + /// + /// orderby query parameter + /// + /// + /// filter by digest + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAcrTagsWithHttpMessagesAsync(string name, string last = default(string), string n = default(string), string orderby = default(string), string digest = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("last", last); + tracingParameters.Add("n", n); + tracingParameters.Add("orderby", orderby); + tracingParameters.Add("digest", digest); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAcrTags", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "acr/v1/{name}/_tags").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (last != null) + { + _queryParameters.Add(string.Format("last={0}", System.Uri.EscapeDataString(last))); + } + if (n != null) + { + _queryParameters.Add(string.Format("n={0}", System.Uri.EscapeDataString(n))); + } + if (orderby != null) + { + _queryParameters.Add(string.Format("orderby={0}", System.Uri.EscapeDataString(orderby))); + } + if (digest != null) + { + _queryParameters.Add(string.Format("digest={0}", System.Uri.EscapeDataString(digest))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 404) + { + var ex = new AcrErrorsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + AcrErrors _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get manifest attributes by tag + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// A tag name of the image + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAcrTagAttributesWithHttpMessagesAsync(string name, string reference, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (reference == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "reference"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("reference", reference); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAcrTagAttributes", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "acr/v1/{name}/_tags/{reference}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{reference}", System.Uri.EscapeDataString(reference)); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 404) + { + var ex = new AcrErrorsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + AcrErrors _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Update tag attributes + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// A tag name of the image + /// + /// + /// Changeable attribute value + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task UpdateAcrTagAttributesWithHttpMessagesAsync(string name, string reference, ChangeableAttributes value = default(ChangeableAttributes), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (reference == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "reference"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("reference", reference); + tracingParameters.Add("value", value); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "UpdateAcrTagAttributes", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "acr/v1/{name}/_tags/{reference}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{reference}", System.Uri.EscapeDataString(reference)); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(value != null) + { + _requestContent = SafeJsonConvert.SerializeObject(value, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 204 && (int)_statusCode != 404) + { + var ex = new AcrErrorsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + AcrErrors _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Delete tag + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// A tag name of the image + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task DeleteAcrTagWithHttpMessagesAsync(string name, string reference, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (reference == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "reference"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("reference", reference); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "DeleteAcrTag", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "acr/v1/{name}/_tags/{reference}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{reference}", System.Uri.EscapeDataString(reference)); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 204 && (int)_statusCode != 404) + { + var ex = new AcrErrorsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + AcrErrors _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// List manifests of a repository + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// query parameter for the last item in previou query + /// + /// + /// query parameter for max number of items + /// + /// + /// orderby query parameter + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAcrManifestsWithHttpMessagesAsync(string name, string last = default(string), string n = default(string), string orderby = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("last", last); + tracingParameters.Add("n", n); + tracingParameters.Add("orderby", orderby); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAcrManifests", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "acr/v1/{name}/_manifests").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + List _queryParameters = new List(); + if (last != null) + { + _queryParameters.Add(string.Format("last={0}", System.Uri.EscapeDataString(last))); + } + if (n != null) + { + _queryParameters.Add(string.Format("n={0}", System.Uri.EscapeDataString(n))); + } + if (orderby != null) + { + _queryParameters.Add(string.Format("orderby={0}", System.Uri.EscapeDataString(orderby))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 404) + { + var ex = new AcrErrorsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + AcrErrors _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Get manifest attributes + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// A digest pointing to a specific image + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task> GetAcrManifestAttributesWithHttpMessagesAsync(string name, string reference, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (reference == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "reference"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("reference", reference); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "GetAcrManifestAttributes", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "acr/v1/{name}/_manifests/{reference}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{reference}", System.Uri.EscapeDataString(reference)); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + // Set Credentials + if (Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 200 && (int)_statusCode != 404) + { + var ex = new AcrErrorsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + AcrErrors _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + } + catch (JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + /// + /// Update attributes of a manifest + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// A tag or a digest, pointing to a specific image + /// + /// + /// Changeable attribute value + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async Task UpdateAcrManifestAttributesWithHttpMessagesAsync(string name, string reference, ChangeableAttributes value = default(ChangeableAttributes), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "name"); + } + if (reference == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "reference"); + } + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("name", name); + tracingParameters.Add("reference", reference); + tracingParameters.Add("value", value); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "UpdateAcrManifestAttributes", tracingParameters); + } + // Construct URL + var _baseUrl = BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "acr/v1/{name}/_manifests/{reference}").ToString(); + _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); + _url = _url.Replace("{reference}", System.Uri.EscapeDataString(reference)); + List _queryParameters = new List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new HttpRequestMessage(); + HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (GenerateClientRequestId != null && GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", AcceptLanguage); + } + + + if (customHeaders != null) + { + foreach(var _header in customHeaders) + { + if (_httpRequest.Headers.Contains(_header.Key)) + { + _httpRequest.Headers.Remove(_header.Key); + } + _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); + } + } + + // Serialize Request + string _requestContent = null; + if(value != null) + { + _requestContent = SafeJsonConvert.SerializeObject(value, SerializationSettings); + _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + if ((int)_statusCode != 204 && (int)_statusCode != 404) + { + var ex = new AcrErrorsException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + AcrErrors _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (JsonException) + { + // Ignore the exception + } + ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new AzureOperationResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + } + + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/AzureContainerRegistryClientExtensions.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/AzureContainerRegistryClientExtensions.cs new file mode 100644 index 000000000000..c687818c04d7 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/AzureContainerRegistryClientExtensions.cs @@ -0,0 +1,363 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using System.Threading; + using System.Threading.Tasks; + + /// + /// Extension methods for AzureContainerRegistryClient. + /// + public static partial class AzureContainerRegistryClientExtensions + { + /// + /// Tells whether this Docker Registry instance supports Docker Registry HTTP + /// API v2 + /// + /// + /// The operations group for this extension method. + /// + /// + /// The cancellation token. + /// + public static async Task GetDockerRegistryV2SupportAsync(this IAzureContainerRegistryClient operations, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.GetDockerRegistryV2SupportWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Fetch the tags under the repository identified by 'name' + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// The cancellation token. + /// + public static async Task GetTagListAsync(this IAzureContainerRegistryClient operations, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetTagListWithHttpMessagesAsync(name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Pulls the image manifest file associated with the specified name and + /// reference. Reference may be a tag or a digest + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// A tag or a digest, pointing to a specific image + /// + /// + /// The cancellation token. + /// + public static async Task GetManifestAsync(this IAzureContainerRegistryClient operations, string name, string reference, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetManifestWithHttpMessagesAsync(name, reference, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// List respositories + /// + /// + /// The operations group for this extension method. + /// + /// + /// query parameter for the last item in previou query + /// + /// + /// query parameter for max number of items + /// + /// + /// The cancellation token. + /// + public static async Task GetRepositoriesAsync(this IAzureContainerRegistryClient operations, string last = default(string), string n = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetRepositoriesWithHttpMessagesAsync(last, n, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// List respositories + /// + /// + /// The operations group for this extension method. + /// + /// + /// query parameter for the last item in previou query + /// + /// + /// query parameter for max number of items + /// + /// + /// The cancellation token. + /// + public static async Task GetAcrRepositoriesAsync(this IAzureContainerRegistryClient operations, string last = default(string), string n = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAcrRepositoriesWithHttpMessagesAsync(last, n, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get respository attributes + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// The cancellation token. + /// + public static async Task GetAcrRepositoryAttributesAsync(this IAzureContainerRegistryClient operations, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAcrRepositoryAttributesWithHttpMessagesAsync(name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Delete a respository + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAcrRepositoryAsync(this IAzureContainerRegistryClient operations, string name, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.DeleteAcrRepositoryWithHttpMessagesAsync(name, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Update attributes of a repository + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// Repository attribute value + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAcrRepositoryAttributesAsync(this IAzureContainerRegistryClient operations, string name, ChangeableAttributes value = default(ChangeableAttributes), CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.UpdateAcrRepositoryAttributesWithHttpMessagesAsync(name, value, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// List tags of a repository + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// query parameter for the last item in previou query + /// + /// + /// query parameter for max number of items + /// + /// + /// orderby query parameter + /// + /// + /// filter by digest + /// + /// + /// The cancellation token. + /// + public static async Task GetAcrTagsAsync(this IAzureContainerRegistryClient operations, string name, string last = default(string), string n = default(string), string orderby = default(string), string digest = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAcrTagsWithHttpMessagesAsync(name, last, n, orderby, digest, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get manifest attributes by tag + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// A tag name of the image + /// + /// + /// The cancellation token. + /// + public static async Task GetAcrTagAttributesAsync(this IAzureContainerRegistryClient operations, string name, string reference, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAcrTagAttributesWithHttpMessagesAsync(name, reference, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Update tag attributes + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// A tag name of the image + /// + /// + /// Changeable attribute value + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAcrTagAttributesAsync(this IAzureContainerRegistryClient operations, string name, string reference, ChangeableAttributes value = default(ChangeableAttributes), CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.UpdateAcrTagAttributesWithHttpMessagesAsync(name, reference, value, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// Delete tag + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// A tag name of the image + /// + /// + /// The cancellation token. + /// + public static async Task DeleteAcrTagAsync(this IAzureContainerRegistryClient operations, string name, string reference, CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.DeleteAcrTagWithHttpMessagesAsync(name, reference, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + /// + /// List manifests of a repository + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// query parameter for the last item in previou query + /// + /// + /// query parameter for max number of items + /// + /// + /// orderby query parameter + /// + /// + /// The cancellation token. + /// + public static async Task GetAcrManifestsAsync(this IAzureContainerRegistryClient operations, string name, string last = default(string), string n = default(string), string orderby = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAcrManifestsWithHttpMessagesAsync(name, last, n, orderby, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get manifest attributes + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// A digest pointing to a specific image + /// + /// + /// The cancellation token. + /// + public static async Task GetAcrManifestAttributesAsync(this IAzureContainerRegistryClient operations, string name, string reference, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetAcrManifestAttributesWithHttpMessagesAsync(name, reference, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Update attributes of a manifest + /// + /// + /// The operations group for this extension method. + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// A tag or a digest, pointing to a specific image + /// + /// + /// Changeable attribute value + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAcrManifestAttributesAsync(this IAzureContainerRegistryClient operations, string name, string reference, ChangeableAttributes value = default(ChangeableAttributes), CancellationToken cancellationToken = default(CancellationToken)) + { + (await operations.UpdateAcrManifestAttributesWithHttpMessagesAsync(name, reference, value, null, cancellationToken).ConfigureAwait(false)).Dispose(); + } + + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/IAzureContainerRegistryClient.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/IAzureContainerRegistryClient.cs new file mode 100644 index 000000000000..f3fd4dd8c958 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/IAzureContainerRegistryClient.cs @@ -0,0 +1,330 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry +{ + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + + /// + /// V2 API definition for the Azure Container Registry runtime + /// + public partial interface IAzureContainerRegistryClient : System.IDisposable + { + /// + /// The base URI of the service. + /// + System.Uri BaseUri { get; set; } + + /// + /// Gets or sets json serialization settings. + /// + JsonSerializerSettings SerializationSettings { get; } + + /// + /// Gets or sets json deserialization settings. + /// + JsonSerializerSettings DeserializationSettings { get; } + + /// + /// Credentials needed for the client to connect to Azure. + /// + ServiceClientCredentials Credentials { get; } + + /// + /// The preferred language for the response. + /// + string AcceptLanguage { get; set; } + + /// + /// The retry timeout in seconds for Long Running Operations. Default + /// value is 30. + /// + int? LongRunningOperationRetryTimeout { get; set; } + + /// + /// Whether a unique x-ms-client-request-id should be generated. When + /// set to true a unique x-ms-client-request-id value is generated and + /// included in each request. Default is true. + /// + bool? GenerateClientRequestId { get; set; } + + + /// + /// Tells whether this Docker Registry instance supports Docker + /// Registry HTTP API v2 + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task GetDockerRegistryV2SupportWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Fetch the tags under the repository identified by 'name' + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetTagListWithHttpMessagesAsync(string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Pulls the image manifest file associated with the specified name + /// and reference. Reference may be a tag or a digest + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// A tag or a digest, pointing to a specific image + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetManifestWithHttpMessagesAsync(string name, string reference, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// List respositories + /// + /// + /// query parameter for the last item in previou query + /// + /// + /// query parameter for max number of items + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetRepositoriesWithHttpMessagesAsync(string last = default(string), string n = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// List respositories + /// + /// + /// query parameter for the last item in previou query + /// + /// + /// query parameter for max number of items + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAcrRepositoriesWithHttpMessagesAsync(string last = default(string), string n = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get respository attributes + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAcrRepositoryAttributesWithHttpMessagesAsync(string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Delete a respository + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> DeleteAcrRepositoryWithHttpMessagesAsync(string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Update attributes of a repository + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// Repository attribute value + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task UpdateAcrRepositoryAttributesWithHttpMessagesAsync(string name, ChangeableAttributes value = default(ChangeableAttributes), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// List tags of a repository + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// query parameter for the last item in previou query + /// + /// + /// query parameter for max number of items + /// + /// + /// orderby query parameter + /// + /// + /// filter by digest + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAcrTagsWithHttpMessagesAsync(string name, string last = default(string), string n = default(string), string orderby = default(string), string digest = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get manifest attributes by tag + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// A tag name of the image + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAcrTagAttributesWithHttpMessagesAsync(string name, string reference, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Update tag attributes + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// A tag name of the image + /// + /// + /// Changeable attribute value + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task UpdateAcrTagAttributesWithHttpMessagesAsync(string name, string reference, ChangeableAttributes value = default(ChangeableAttributes), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Delete tag + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// A tag name of the image + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task DeleteAcrTagWithHttpMessagesAsync(string name, string reference, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// List manifests of a repository + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// query parameter for the last item in previou query + /// + /// + /// query parameter for max number of items + /// + /// + /// orderby query parameter + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAcrManifestsWithHttpMessagesAsync(string name, string last = default(string), string n = default(string), string orderby = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Get manifest attributes + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// A digest pointing to a specific image + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task> GetAcrManifestAttributesWithHttpMessagesAsync(string name, string reference, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + /// + /// Update attributes of a manifest + /// + /// + /// Name of the image (including the namespace) + /// + /// + /// A tag or a digest, pointing to a specific image + /// + /// + /// Changeable attribute value + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + Task UpdateAcrManifestAttributesWithHttpMessagesAsync(string name, string reference, ChangeableAttributes value = default(ChangeableAttributes), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/AcrErrorInfo.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/AcrErrorInfo.cs new file mode 100644 index 000000000000..98b99210b016 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/AcrErrorInfo.cs @@ -0,0 +1,67 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Error information + /// + public partial class AcrErrorInfo + { + /// + /// Initializes a new instance of the AcrErrorInfo class. + /// + public AcrErrorInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AcrErrorInfo class. + /// + /// Error code + /// Error message + /// Error details + public AcrErrorInfo(string code = default(string), string message = default(string), string detail = default(string)) + { + Code = code; + Message = message; + Detail = detail; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets error code + /// + [JsonProperty(PropertyName = "code")] + public string Code { get; set; } + + /// + /// Gets or sets error message + /// + [JsonProperty(PropertyName = "message")] + public string Message { get; set; } + + /// + /// Gets or sets error details + /// + [JsonProperty(PropertyName = "detail")] + public string Detail { get; set; } + + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/AcrErrors.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/AcrErrors.cs new file mode 100644 index 000000000000..0c035662f173 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/AcrErrors.cs @@ -0,0 +1,53 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Acr error response describing why the operation failed + /// + public partial class AcrErrors + { + /// + /// Initializes a new instance of the AcrErrors class. + /// + public AcrErrors() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AcrErrors class. + /// + /// Array of detailed error + public AcrErrors(IList errors = default(IList)) + { + Errors = errors; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets array of detailed error + /// + [JsonProperty(PropertyName = "errors")] + public IList Errors { get; set; } + + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/AcrErrorsException.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/AcrErrorsException.cs new file mode 100644 index 000000000000..db218b173193 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/AcrErrorsException.cs @@ -0,0 +1,61 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry.Models +{ + using Microsoft.Rest; + + /// + /// Exception thrown for an invalid response with AcrErrors information. + /// + public partial class AcrErrorsException : RestException + { + /// + /// Gets information about the associated HTTP request. + /// + public HttpRequestMessageWrapper Request { get; set; } + + /// + /// Gets information about the associated HTTP response. + /// + public HttpResponseMessageWrapper Response { get; set; } + + /// + /// Gets or sets the body object. + /// + public AcrErrors Body { get; set; } + + /// + /// Initializes a new instance of the AcrErrorsException class. + /// + public AcrErrorsException() + { + } + + /// + /// Initializes a new instance of the AcrErrorsException class. + /// + /// The exception message. + public AcrErrorsException(string message) + : this(message, null) + { + } + + /// + /// Initializes a new instance of the AcrErrorsException class. + /// + /// The exception message. + /// Inner exception. + public AcrErrorsException(string message, System.Exception innerException) + : base(message, innerException) + { + } + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/AcrManifestAttributes.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/AcrManifestAttributes.cs new file mode 100644 index 000000000000..c1521f98392b --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/AcrManifestAttributes.cs @@ -0,0 +1,67 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Manifest attributes details + /// + public partial class AcrManifestAttributes + { + /// + /// Initializes a new instance of the AcrManifestAttributes class. + /// + public AcrManifestAttributes() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AcrManifestAttributes class. + /// + /// Registry name + /// Image name + /// Manifest attributes + public AcrManifestAttributes(string registry = default(string), string imageName = default(string), AcrManifestAttributesBase manifest = default(AcrManifestAttributesBase)) + { + Registry = registry; + ImageName = imageName; + Manifest = manifest; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets registry name + /// + [JsonProperty(PropertyName = "registry")] + public string Registry { get; set; } + + /// + /// Gets or sets image name + /// + [JsonProperty(PropertyName = "imageName")] + public string ImageName { get; set; } + + /// + /// Gets or sets manifest attributes + /// + [JsonProperty(PropertyName = "manifest")] + public AcrManifestAttributesBase Manifest { get; set; } + + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/AcrManifestAttributesBase.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/AcrManifestAttributesBase.cs new file mode 100644 index 000000000000..cb29a9df0ef0 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/AcrManifestAttributesBase.cs @@ -0,0 +1,109 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Manifest details + /// + public partial class AcrManifestAttributesBase + { + /// + /// Initializes a new instance of the AcrManifestAttributesBase class. + /// + public AcrManifestAttributesBase() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AcrManifestAttributesBase class. + /// + /// Manifest digest + /// Created time + /// Last update time + /// CPU architecture + /// Operating system + /// Media type + /// List of tags + /// Changeable attributes + public AcrManifestAttributesBase(string digest = default(string), string createdTime = default(string), string lastUpdateTime = default(string), string architecture = default(string), string os = default(string), string mediaType = default(string), IList tags = default(IList), ChangeableAttributes changeableAttributes = default(ChangeableAttributes)) + { + Digest = digest; + CreatedTime = createdTime; + LastUpdateTime = lastUpdateTime; + Architecture = architecture; + Os = os; + MediaType = mediaType; + Tags = tags; + ChangeableAttributes = changeableAttributes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets manifest digest + /// + [JsonProperty(PropertyName = "digest")] + public string Digest { get; set; } + + /// + /// Gets or sets created time + /// + [JsonProperty(PropertyName = "createdTime")] + public string CreatedTime { get; set; } + + /// + /// Gets or sets last update time + /// + [JsonProperty(PropertyName = "lastUpdateTime")] + public string LastUpdateTime { get; set; } + + /// + /// Gets or sets CPU architecture + /// + [JsonProperty(PropertyName = "architecture")] + public string Architecture { get; set; } + + /// + /// Gets or sets operating system + /// + [JsonProperty(PropertyName = "os")] + public string Os { get; set; } + + /// + /// Gets or sets media type + /// + [JsonProperty(PropertyName = "mediaType")] + public string MediaType { get; set; } + + /// + /// Gets or sets list of tags + /// + [JsonProperty(PropertyName = "tags")] + public IList Tags { get; set; } + + /// + /// Gets or sets changeable attributes + /// + [JsonProperty(PropertyName = "changeableAttributes")] + public ChangeableAttributes ChangeableAttributes { get; set; } + + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/AcrManifests.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/AcrManifests.cs new file mode 100644 index 000000000000..e3a1d875c019 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/AcrManifests.cs @@ -0,0 +1,69 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Manifest attributes + /// + public partial class AcrManifests + { + /// + /// Initializes a new instance of the AcrManifests class. + /// + public AcrManifests() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AcrManifests class. + /// + /// Registry name + /// Image name + /// List of manifests + public AcrManifests(string registry = default(string), string imageName = default(string), IList manifests = default(IList)) + { + Registry = registry; + ImageName = imageName; + Manifests = manifests; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets registry name + /// + [JsonProperty(PropertyName = "registry")] + public string Registry { get; set; } + + /// + /// Gets or sets image name + /// + [JsonProperty(PropertyName = "imageName")] + public string ImageName { get; set; } + + /// + /// Gets or sets list of manifests + /// + [JsonProperty(PropertyName = "manifests")] + public IList Manifests { get; set; } + + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/AcrRepositoryTags.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/AcrRepositoryTags.cs new file mode 100644 index 000000000000..54b9bfdf3c65 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/AcrRepositoryTags.cs @@ -0,0 +1,69 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// List of tag details + /// + public partial class AcrRepositoryTags + { + /// + /// Initializes a new instance of the AcrRepositoryTags class. + /// + public AcrRepositoryTags() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AcrRepositoryTags class. + /// + /// Registry name + /// Image name + /// List of tag attribute details + public AcrRepositoryTags(string registry = default(string), string imageName = default(string), IList tagsAttributes = default(IList)) + { + Registry = registry; + ImageName = imageName; + TagsAttributes = tagsAttributes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets registry name + /// + [JsonProperty(PropertyName = "registry")] + public string Registry { get; set; } + + /// + /// Gets or sets image name + /// + [JsonProperty(PropertyName = "imageName")] + public string ImageName { get; set; } + + /// + /// Gets or sets list of tag attribute details + /// + [JsonProperty(PropertyName = "tags")] + public IList TagsAttributes { get; set; } + + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/AcrTagAttributes.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/AcrTagAttributes.cs new file mode 100644 index 000000000000..502f9de0fe24 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/AcrTagAttributes.cs @@ -0,0 +1,67 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Tag attributes + /// + public partial class AcrTagAttributes + { + /// + /// Initializes a new instance of the AcrTagAttributes class. + /// + public AcrTagAttributes() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AcrTagAttributes class. + /// + /// Registry name + /// Image name + /// List of tag attribute details + public AcrTagAttributes(string registry = default(string), string imageName = default(string), AcrTagAttributesBase tagAttributes = default(AcrTagAttributesBase)) + { + Registry = registry; + ImageName = imageName; + TagAttributes = tagAttributes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets registry name + /// + [JsonProperty(PropertyName = "registry")] + public string Registry { get; set; } + + /// + /// Gets or sets image name + /// + [JsonProperty(PropertyName = "imageName")] + public string ImageName { get; set; } + + /// + /// Gets or sets list of tag attribute details + /// + [JsonProperty(PropertyName = "tag")] + public AcrTagAttributesBase TagAttributes { get; set; } + + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/AcrTagAttributesBase.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/AcrTagAttributesBase.cs new file mode 100644 index 000000000000..9adf7791608a --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/AcrTagAttributesBase.cs @@ -0,0 +1,91 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Tag attribute details + /// + public partial class AcrTagAttributesBase + { + /// + /// Initializes a new instance of the AcrTagAttributesBase class. + /// + public AcrTagAttributesBase() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AcrTagAttributesBase class. + /// + /// Tag name + /// Tag digest + /// Tag created time + /// Tag last update time + /// Is signed + /// Changeable attributes + public AcrTagAttributesBase(string name = default(string), string digest = default(string), string createdTime = default(string), string lastUpdateTime = default(string), bool? signed = default(bool?), ChangeableAttributes changeableAttributes = default(ChangeableAttributes)) + { + Name = name; + Digest = digest; + CreatedTime = createdTime; + LastUpdateTime = lastUpdateTime; + Signed = signed; + ChangeableAttributes = changeableAttributes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets tag name + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets tag digest + /// + [JsonProperty(PropertyName = "digest")] + public string Digest { get; set; } + + /// + /// Gets or sets tag created time + /// + [JsonProperty(PropertyName = "createdTime")] + public string CreatedTime { get; set; } + + /// + /// Gets or sets tag last update time + /// + [JsonProperty(PropertyName = "lastUpdateTime")] + public string LastUpdateTime { get; set; } + + /// + /// Gets or sets is signed + /// + [JsonProperty(PropertyName = "signed")] + public bool? Signed { get; set; } + + /// + /// Gets or sets changeable attributes + /// + [JsonProperty(PropertyName = "changeableAttributes")] + public ChangeableAttributes ChangeableAttributes { get; set; } + + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/ChangeableAttributes.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/ChangeableAttributes.cs new file mode 100644 index 000000000000..2b8108842111 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/ChangeableAttributes.cs @@ -0,0 +1,72 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry.Models +{ + using Newtonsoft.Json; + using System.Linq; + + public partial class ChangeableAttributes + { + /// + /// Initializes a new instance of the ChangeableAttributes class. + /// + public ChangeableAttributes() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ChangeableAttributes class. + /// + /// Delete enabled + /// Write enabled + /// List enabled + /// Read enabled + public ChangeableAttributes(bool? deleteEnabled = default(bool?), bool? writeEnabled = default(bool?), bool? listEnabled = default(bool?), bool? readEnabled = default(bool?)) + { + DeleteEnabled = deleteEnabled; + WriteEnabled = writeEnabled; + ListEnabled = listEnabled; + ReadEnabled = readEnabled; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets delete enabled + /// + [JsonProperty(PropertyName = "deleteEnabled")] + public bool? DeleteEnabled { get; set; } + + /// + /// Gets or sets write enabled + /// + [JsonProperty(PropertyName = "writeEnabled")] + public bool? WriteEnabled { get; set; } + + /// + /// Gets or sets list enabled + /// + [JsonProperty(PropertyName = "listEnabled")] + public bool? ListEnabled { get; set; } + + /// + /// Gets or sets read enabled + /// + [JsonProperty(PropertyName = "readEnabled")] + public bool? ReadEnabled { get; set; } + + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/DeletedRepository.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/DeletedRepository.cs new file mode 100644 index 000000000000..0da185fa785e --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/DeletedRepository.cs @@ -0,0 +1,61 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Deleted repository + /// + public partial class DeletedRepository + { + /// + /// Initializes a new instance of the DeletedRepository class. + /// + public DeletedRepository() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DeletedRepository class. + /// + /// SHA of the deleted image + /// Tag of the deleted image + public DeletedRepository(IList manifestsDeleted = default(IList), IList tagsDeleted = default(IList)) + { + ManifestsDeleted = manifestsDeleted; + TagsDeleted = tagsDeleted; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SHA of the deleted image + /// + [JsonProperty(PropertyName = "manifestsDeleted")] + public IList ManifestsDeleted { get; set; } + + /// + /// Gets or sets tag of the deleted image + /// + [JsonProperty(PropertyName = "tagsDeleted")] + public IList TagsDeleted { get; set; } + + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/ImageHistory.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/ImageHistory.cs new file mode 100644 index 000000000000..e6d79fc06963 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/ImageHistory.cs @@ -0,0 +1,52 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// A list of unstructured historical data for v1 compatibility + /// + public partial class ImageHistory + { + /// + /// Initializes a new instance of the ImageHistory class. + /// + public ImageHistory() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ImageHistory class. + /// + /// The raw v1 compatibility + /// information + public ImageHistory(string v1Compatibility = default(string)) + { + V1Compatibility = v1Compatibility; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the raw v1 compatibility information + /// + [JsonProperty(PropertyName = "v1Compatibility")] + public string V1Compatibility { get; set; } + + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/ImageLayer.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/ImageLayer.cs new file mode 100644 index 000000000000..b008b54a8eaa --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/ImageLayer.cs @@ -0,0 +1,51 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Image layer information + /// + public partial class ImageLayer + { + /// + /// Initializes a new instance of the ImageLayer class. + /// + public ImageLayer() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ImageLayer class. + /// + /// SHA of an image layer + public ImageLayer(string blobSum = default(string)) + { + BlobSum = blobSum; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets SHA of an image layer + /// + [JsonProperty(PropertyName = "blobSum")] + public string BlobSum { get; set; } + + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/ImageSignature.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/ImageSignature.cs new file mode 100644 index 000000000000..01f6a194cc21 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/ImageSignature.cs @@ -0,0 +1,69 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Signature of a signed manifest + /// + public partial class ImageSignature + { + /// + /// Initializes a new instance of the ImageSignature class. + /// + public ImageSignature() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ImageSignature class. + /// + /// A JSON web signature + /// A signature for the image manifest, signed + /// by a libtrust private key + /// The signed protected header + public ImageSignature(JWK header = default(JWK), string signature = default(string), string protectedHeader = default(string)) + { + Header = header; + Signature = signature; + ProtectedHeader = protectedHeader; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets a JSON web signature + /// + [JsonProperty(PropertyName = "header")] + public JWK Header { get; set; } + + /// + /// Gets or sets a signature for the image manifest, signed by a + /// libtrust private key + /// + [JsonProperty(PropertyName = "signature")] + public string Signature { get; set; } + + /// + /// Gets or sets the signed protected header + /// + [JsonProperty(PropertyName = "protected")] + public string ProtectedHeader { get; set; } + + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/JWK.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/JWK.cs new file mode 100644 index 000000000000..0e326607a1d0 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/JWK.cs @@ -0,0 +1,58 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// A JSON web signature + /// + public partial class JWK + { + /// + /// Initializes a new instance of the JWK class. + /// + public JWK() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JWK class. + /// + /// The algorithm used to sign or encrypt the + /// JWT + public JWK(JWKHeader jwk = default(JWKHeader), string alg = default(string)) + { + Jwk = jwk; + Alg = alg; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// + [JsonProperty(PropertyName = "jwk")] + public JWKHeader Jwk { get; set; } + + /// + /// Gets or sets the algorithm used to sign or encrypt the JWT + /// + [JsonProperty(PropertyName = "alg")] + public string Alg { get; set; } + + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/JWKHeader.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/JWKHeader.cs new file mode 100644 index 000000000000..8f60c98ba077 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/JWKHeader.cs @@ -0,0 +1,83 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// JSON web key parameter + /// + public partial class JWKHeader + { + /// + /// Initializes a new instance of the JWKHeader class. + /// + public JWKHeader() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the JWKHeader class. + /// + /// crv value + /// kid value + /// kty value + /// x value + /// y value + public JWKHeader(string crv = default(string), string kid = default(string), string kty = default(string), string x = default(string), string y = default(string)) + { + Crv = crv; + Kid = kid; + Kty = kty; + X = x; + Y = y; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets crv value + /// + [JsonProperty(PropertyName = "crv")] + public string Crv { get; set; } + + /// + /// Gets or sets kid value + /// + [JsonProperty(PropertyName = "kid")] + public string Kid { get; set; } + + /// + /// Gets or sets kty value + /// + [JsonProperty(PropertyName = "kty")] + public string Kty { get; set; } + + /// + /// Gets or sets x value + /// + [JsonProperty(PropertyName = "x")] + public string X { get; set; } + + /// + /// Gets or sets y value + /// + [JsonProperty(PropertyName = "y")] + public string Y { get; set; } + + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/Manifest.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/Manifest.cs new file mode 100644 index 000000000000..97acc68965a8 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/Manifest.cs @@ -0,0 +1,101 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Returns the requested manifest file + /// + public partial class Manifest + { + /// + /// Initializes a new instance of the Manifest class. + /// + public Manifest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Manifest class. + /// + /// Schema version + /// CPU architecture + /// Image name + /// Image tag + /// List of layer information + /// Image history + /// Image signature + public Manifest(double? schemaVersion = default(double?), string architecture = default(string), string name = default(string), string tag = default(string), IList fsLayers = default(IList), IList imageHistories = default(IList), IList signatures = default(IList)) + { + SchemaVersion = schemaVersion; + Architecture = architecture; + Name = name; + Tag = tag; + FsLayers = fsLayers; + ImageHistories = imageHistories; + Signatures = signatures; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets schema version + /// + [JsonProperty(PropertyName = "schemaVersion")] + public double? SchemaVersion { get; set; } + + /// + /// Gets or sets CPU architecture + /// + [JsonProperty(PropertyName = "architecture")] + public string Architecture { get; set; } + + /// + /// Gets or sets image name + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets image tag + /// + [JsonProperty(PropertyName = "tag")] + public string Tag { get; set; } + + /// + /// Gets or sets list of layer information + /// + [JsonProperty(PropertyName = "fsLayers")] + public IList FsLayers { get; set; } + + /// + /// Gets or sets image history + /// + [JsonProperty(PropertyName = "history")] + public IList ImageHistories { get; set; } + + /// + /// Gets or sets image signature + /// + [JsonProperty(PropertyName = "signatures")] + public IList Signatures { get; set; } + + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/ManifestAttributesManifest.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/ManifestAttributesManifest.cs new file mode 100644 index 000000000000..a2efbf59ca22 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/ManifestAttributesManifest.cs @@ -0,0 +1,62 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// List of manifest attributes + /// + public partial class ManifestAttributesManifest + { + /// + /// Initializes a new instance of the ManifestAttributesManifest class. + /// + public ManifestAttributesManifest() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManifestAttributesManifest class. + /// + /// List of manifest attributes + /// details + /// Quarantine tag name + public ManifestAttributesManifest(IList references = default(IList), string quarantineTag = default(string)) + { + References = references; + QuarantineTag = quarantineTag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets list of manifest attributes details + /// + [JsonProperty(PropertyName = "references")] + public IList References { get; set; } + + /// + /// Gets or sets quarantine tag name + /// + [JsonProperty(PropertyName = "quarantineTag")] + public string QuarantineTag { get; set; } + + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/ManifestAttributesManifestReferences.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/ManifestAttributesManifestReferences.cs new file mode 100644 index 000000000000..cd1e93f9413d --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/ManifestAttributesManifestReferences.cs @@ -0,0 +1,69 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Manifest attributes details + /// + public partial class ManifestAttributesManifestReferences + { + /// + /// Initializes a new instance of the + /// ManifestAttributesManifestReferences class. + /// + public ManifestAttributesManifestReferences() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// ManifestAttributesManifestReferences class. + /// + /// Manifest digest + /// CPU architecture + /// Operating system + public ManifestAttributesManifestReferences(string digest = default(string), string architecture = default(string), string os = default(string)) + { + Digest = digest; + Architecture = architecture; + Os = os; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets manifest digest + /// + [JsonProperty(PropertyName = "digest")] + public string Digest { get; set; } + + /// + /// Gets or sets CPU architecture + /// + [JsonProperty(PropertyName = "architecture")] + public string Architecture { get; set; } + + /// + /// Gets or sets operating system + /// + [JsonProperty(PropertyName = "os")] + public string Os { get; set; } + + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/ManifestChangeableAttributes.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/ManifestChangeableAttributes.cs new file mode 100644 index 000000000000..753156b0a562 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/ManifestChangeableAttributes.cs @@ -0,0 +1,93 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Changeable attributes + /// + public partial class ManifestChangeableAttributes + { + /// + /// Initializes a new instance of the ManifestChangeableAttributes + /// class. + /// + public ManifestChangeableAttributes() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManifestChangeableAttributes + /// class. + /// + /// Delete enabled + /// Write enabled + /// List enabled + /// Read enabled + /// Quarantine state + /// Quarantine details + public ManifestChangeableAttributes(bool? deleteEnabled = default(bool?), bool? writeEnabled = default(bool?), bool? listEnabled = default(bool?), bool? readEnabled = default(bool?), string quarantineState = default(string), string quarantineDetails = default(string)) + { + DeleteEnabled = deleteEnabled; + WriteEnabled = writeEnabled; + ListEnabled = listEnabled; + ReadEnabled = readEnabled; + QuarantineState = quarantineState; + QuarantineDetails = quarantineDetails; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets delete enabled + /// + [JsonProperty(PropertyName = "deleteEnabled")] + public bool? DeleteEnabled { get; set; } + + /// + /// Gets or sets write enabled + /// + [JsonProperty(PropertyName = "writeEnabled")] + public bool? WriteEnabled { get; set; } + + /// + /// Gets or sets list enabled + /// + [JsonProperty(PropertyName = "listEnabled")] + public bool? ListEnabled { get; set; } + + /// + /// Gets or sets read enabled + /// + [JsonProperty(PropertyName = "readEnabled")] + public bool? ReadEnabled { get; set; } + + /// + /// Gets or sets quarantine state + /// + [JsonProperty(PropertyName = "quarantineState")] + public string QuarantineState { get; set; } + + /// + /// Gets or sets quarantine details + /// + [JsonProperty(PropertyName = "quarantineDetails")] + public string QuarantineDetails { get; set; } + + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/Repositories.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/Repositories.cs new file mode 100644 index 000000000000..6cb17968ee55 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/Repositories.cs @@ -0,0 +1,53 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// List of repositories + /// + public partial class Repositories + { + /// + /// Initializes a new instance of the Repositories class. + /// + public Repositories() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the Repositories class. + /// + /// Repository names + public Repositories(IList names = default(IList)) + { + Names = names; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets repository names + /// + [JsonProperty(PropertyName = "repositories")] + public IList Names { get; set; } + + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/RepositoryAttributes.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/RepositoryAttributes.cs new file mode 100644 index 000000000000..c5c57356fac8 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/RepositoryAttributes.cs @@ -0,0 +1,99 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Repository attributes + /// + public partial class RepositoryAttributes + { + /// + /// Initializes a new instance of the RepositoryAttributes class. + /// + public RepositoryAttributes() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RepositoryAttributes class. + /// + /// Registry name + /// Image name + /// Image created time + /// Image last update time + /// Number of the manifests + /// Number of the tags + /// Changeable attributes + public RepositoryAttributes(string registry = default(string), string imageName = default(string), string createdTime = default(string), string lastUpdateTime = default(string), double? manifestCount = default(double?), double? tagCount = default(double?), ChangeableAttributes changeableAttributes = default(ChangeableAttributes)) + { + Registry = registry; + ImageName = imageName; + CreatedTime = createdTime; + LastUpdateTime = lastUpdateTime; + ManifestCount = manifestCount; + TagCount = tagCount; + ChangeableAttributes = changeableAttributes; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets registry name + /// + [JsonProperty(PropertyName = "registry")] + public string Registry { get; set; } + + /// + /// Gets or sets image name + /// + [JsonProperty(PropertyName = "imageName")] + public string ImageName { get; set; } + + /// + /// Gets or sets image created time + /// + [JsonProperty(PropertyName = "createdTime")] + public string CreatedTime { get; set; } + + /// + /// Gets or sets image last update time + /// + [JsonProperty(PropertyName = "lastUpdateTime")] + public string LastUpdateTime { get; set; } + + /// + /// Gets or sets number of the manifests + /// + [JsonProperty(PropertyName = "manifestCount")] + public double? ManifestCount { get; set; } + + /// + /// Gets or sets number of the tags + /// + [JsonProperty(PropertyName = "tagCount")] + public double? TagCount { get; set; } + + /// + /// Gets or sets changeable attributes + /// + [JsonProperty(PropertyName = "changeableAttributes")] + public ChangeableAttributes ChangeableAttributes { get; set; } + + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/RepositoryTags.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/RepositoryTags.cs new file mode 100644 index 000000000000..ed3571c3ec11 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/RepositoryTags.cs @@ -0,0 +1,61 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry.Models +{ + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Result of the request to list tags of the image + /// + public partial class RepositoryTags + { + /// + /// Initializes a new instance of the RepositoryTags class. + /// + public RepositoryTags() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the RepositoryTags class. + /// + /// Name of the image + /// List of tags + public RepositoryTags(string name = default(string), IList tags = default(IList)) + { + Name = name; + Tags = tags; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets name of the image + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets list of tags + /// + [JsonProperty(PropertyName = "tags")] + public IList Tags { get; set; } + + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/TagAttributes.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/TagAttributes.cs new file mode 100644 index 000000000000..ace4c52f9534 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/TagAttributes.cs @@ -0,0 +1,67 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Tag attributes + /// + public partial class TagAttributes + { + /// + /// Initializes a new instance of the TagAttributes class. + /// + public TagAttributes() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TagAttributes class. + /// + /// Registry name + /// Image name + /// Tag attributes + public TagAttributes(string registry = default(string), string imageName = default(string), TagAttributesTag tag = default(TagAttributesTag)) + { + Registry = registry; + ImageName = imageName; + Tag = tag; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets registry name + /// + [JsonProperty(PropertyName = "registry")] + public string Registry { get; set; } + + /// + /// Gets or sets image name + /// + [JsonProperty(PropertyName = "imageName")] + public string ImageName { get; set; } + + /// + /// Gets or sets tag attributes + /// + [JsonProperty(PropertyName = "tag")] + public TagAttributesTag Tag { get; set; } + + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/TagAttributesTag.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/TagAttributesTag.cs new file mode 100644 index 000000000000..8599afbcae01 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/Models/TagAttributesTag.cs @@ -0,0 +1,51 @@ +// +// 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. +// + +namespace Microsoft.Azure.ContainerRegistry.Models +{ + using Newtonsoft.Json; + using System.Linq; + + /// + /// Tag + /// + public partial class TagAttributesTag + { + /// + /// Initializes a new instance of the TagAttributesTag class. + /// + public TagAttributesTag() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TagAttributesTag class. + /// + /// SignatureRecord value + public TagAttributesTag(string signatureRecord = default(string)) + { + SignatureRecord = signatureRecord; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets signatureRecord value + /// + [JsonProperty(PropertyName = "signatureRecord")] + public string SignatureRecord { get; set; } + + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/SdkInfo_AzureContainerRegistry.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/SdkInfo_AzureContainerRegistry.cs new file mode 100644 index 000000000000..6649011f4b68 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Generated/SdkInfo_AzureContainerRegistry.cs @@ -0,0 +1,41 @@ + +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.ContainerRegistry +{ + using System; + using System.Collections.Generic; + using System.Linq; + + internal static partial class SdkInfo + { + public static IEnumerable> ApiInfo_AzureContainerRegistry + { + get + { + return new Tuple[] + { + new Tuple("AzureContainerRegistry", "DeleteAcrRepository", "2018-08-10-preview"), + new Tuple("AzureContainerRegistry", "DeleteAcrTag", "2018-08-10-preview"), + new Tuple("AzureContainerRegistry", "GetAcrManifestAttributes", "2018-08-10-preview"), + new Tuple("AzureContainerRegistry", "GetAcrManifests", "2018-08-10-preview"), + new Tuple("AzureContainerRegistry", "GetAcrRepositories", "2018-08-10-preview"), + new Tuple("AzureContainerRegistry", "GetAcrRepositoryAttributes", "2018-08-10-preview"), + new Tuple("AzureContainerRegistry", "GetAcrTagAttributes", "2018-08-10-preview"), + new Tuple("AzureContainerRegistry", "GetAcrTags", "2018-08-10-preview"), + new Tuple("AzureContainerRegistry", "GetDockerRegistryV2Support", "2018-08-10-preview"), + new Tuple("AzureContainerRegistry", "GetManifest", "2018-08-10-preview"), + new Tuple("AzureContainerRegistry", "GetRepositories", "2018-08-10-preview"), + new Tuple("AzureContainerRegistry", "GetTagList", "2018-08-10-preview"), + new Tuple("AzureContainerRegistry", "UpdateAcrManifestAttributes", "2018-08-10-preview"), + new Tuple("AzureContainerRegistry", "UpdateAcrRepositoryAttributes", "2018-08-10-preview"), + new Tuple("AzureContainerRegistry", "UpdateAcrTagAttributes", "2018-08-10-preview"), + }.AsEnumerable(); + } + } + } +} diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Microsoft.Azure.ContainerRegistry.csproj b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Microsoft.Azure.ContainerRegistry.csproj new file mode 100644 index 000000000000..ee8671712bae --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Microsoft.Azure.ContainerRegistry.csproj @@ -0,0 +1,19 @@ + + + + Microsoft.Azure.ContainerRegistry + Provides management capabilities for Azure Container Registry. + Microsoft Azure Container Registry + 0.9.0-preview + Microsoft.Azure.ContainerRegistry + Microsoft Azure Container Registry;Container Registry; + Added capabilities to manage repository, tag and manifest. + + + net452;netstandard1.4 + + + + + + diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Properties/AssemblyInfo.cs b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..e9b53120c7cc --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/Properties/AssemblyInfo.cs @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +using System.Reflection; +using System.Resources; + +[assembly: AssemblyTitle("Microsoft Azure Container Registry Management Library")] +[assembly: AssemblyDescription("Provides management functionality for Microsoft Azure Container Registry.")] + +[assembly: AssemblyVersion("0.9.0.0")] +[assembly: AssemblyFileVersion("0.9.0.0")] + +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Microsoft Azure .NET SDK")] +[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: NeutralResourcesLanguage("en")] diff --git a/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/generate.ps1 b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/generate.ps1 new file mode 100644 index 000000000000..2b610425bda1 --- /dev/null +++ b/src/SDKs/ContainerRegistry/dataplane/Microsoft.Azure.ContainerRegistry/generate.ps1 @@ -0,0 +1 @@ +Start-AutoRestCodeGeneration -ResourceProvider "containerregistry/data-plane" -AutoRestVersion "latest" \ No newline at end of file diff --git a/src/SDKs/_metadata/containerregistry_data-plane.txt b/src/SDKs/_metadata/containerregistry_data-plane.txt new file mode 100644 index 000000000000..58d694d603e7 --- /dev/null +++ b/src/SDKs/_metadata/containerregistry_data-plane.txt @@ -0,0 +1,20 @@ +Installing AutoRest version: latest +AutoRest installed successfully. +Commencing code generation +Generating CSharp code +Executing AutoRest command +cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/containerregistry/data-plane/readme.md --csharp --version=latest --reflect-api-versions --csharp-sdks-folder=D:\Git\azure-sdk-for-net\src\SDKs +2018-10-11 17:37:24 UTC +1) azure-rest-api-specs repository information +GitHub fork: Azure +Branch: master +Commit: 6d1e1452df5b7a8b09e4ed25eccea8fed8c271ca + +2) AutoRest information +Requested version: latest +Bootstrapper version: autorest@2.0.4283 + + +Latest installed version: + +