Skip to content
Merged

. #55

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</Reference>
<Reference Include="Microsoft.Azure.Management.BackupServicesManagement, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.BackupServices.1.0.1-preview\lib\net40\Microsoft.Azure.Management.BackupServicesManagement.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.BackupServices.1.0.2-preview\lib\net40\Microsoft.Azure.Management.BackupServicesManagement.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ function Test-AzureBackupMarsContainerScenario
Assert-AreEqual $container.ResourceName $vault.Name;
Assert-AreEqual $container.Status $ContainerStatus;

Enable-AzureBackupContainerReregistration -Container $container

Unregister-AzureBackupContainer -Container $container -Force

$unregContainers = Get-AzureBackupContainer -vault $vault -type $ContainerType -name $ContainerName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
"en-us"
],
"x-ms-client-request-id": [
"3bde4861-d6c7-4785-b954-c2fb7498260c-2015-07-17 19:46:07Z-PS"
"c164ee99-024c-490f-909f-46fcbfce27e3-2015-07-22 12:42:18Z-PS"
],
"User-Agent": [
"Microsoft.Azure.Management.BackupServices.BackupVaultServicesManagementClient/1.0.0.0"
]
},
"ResponseBody": "{\r\n \"location\": \"westus\",\r\n \"name\": \"backuprn1\",\r\n \"etag\": \"327fe758-7f7b-4879-b708-4d5366d2c687\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"sku\": {\r\n \"name\": \"standard\"\r\n },\r\n \"ProvisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/f5303a0b-fae4-4cdb-b44d-0e4c032dde26/resourceGroups/backuprg/providers/Microsoft.Backup/BackupVault/backuprn1\",\r\n \"type\": \"Microsoft.Backup/BackupVault\"\r\n}",
"ResponseBody": "{\r\n \"location\": \"westus\",\r\n \"name\": \"backuprn1\",\r\n \"etag\": \"327fe758-7f7b-4879-b708-4d5366d2c687\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \"sku\": {\r\n \"name\": \"standard\"\r\n },\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/f5303a0b-fae4-4cdb-b44d-0e4c032dde26/resourceGroups/backuprg/providers/Microsoft.Backup/BackupVault/backuprn1\",\r\n \"type\": \"Microsoft.Backup/BackupVault\"\r\n}",
"ResponseHeaders": {
"Content-Length": [
"339"
Expand All @@ -31,28 +31,28 @@
"no-cache"
],
"x-ms-request-id": [
"650d6914-a58c-4610-90c4-578f43f4194a"
"499ed874-b244-4ac2-ae34-905b70f28b7a"
],
"x-ms-client-request-id": [
"3bde4861-d6c7-4785-b954-c2fb7498260c-2015-07-17 19:46:07Z-PS"
"c164ee99-024c-490f-909f-46fcbfce27e3-2015-07-22 12:42:18Z-PS"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
],
"x-ms-ratelimit-remaining-subscription-reads": [
"14995"
"14993"
],
"x-ms-correlation-request-id": [
"650d6914-a58c-4610-90c4-578f43f4194a"
"499ed874-b244-4ac2-ae34-905b70f28b7a"
],
"x-ms-routing-request-id": [
"CENTRALUS:20150717T194610Z:650d6914-a58c-4610-90c4-578f43f4194a"
"CENTRALUS:20150722T124220Z:499ed874-b244-4ac2-ae34-905b70f28b7a"
],
"Cache-Control": [
"no-cache"
],
"Date": [
"Fri, 17 Jul 2015 19:46:10 GMT"
"Wed, 22 Jul 2015 12:42:19 GMT"
],
"Server": [
"Microsoft-IIS/8.0"
Expand All @@ -70,7 +70,7 @@
"en-us"
],
"x-ms-client-request-id": [
"3bde4861-d6c7-4785-b954-c2fb7498260c-2015-07-17 19:46:07Z-PS"
"c164ee99-024c-490f-909f-46fcbfce27e3-2015-07-22 12:42:18Z-PS"
],
"User-Agent": [
"Microsoft.Azure.Management.BackupServices.BackupVaultServicesManagementClient/1.0.0.0"
Expand All @@ -91,29 +91,29 @@
"no-cache"
],
"x-ms-request-id": [
"f28b0d83-8805-4900-92db-90809a187048"
"eab30911-4bd3-4732-8ca1-c5010a84dd8b"
],
"x-ms-client-request-id": [
"3bde4861-d6c7-4785-b954-c2fb7498260c-2015-07-17 19:46:07Z-PS",
"3bde4861-d6c7-4785-b954-c2fb7498260c-2015-07-17 19:46:07Z-PS"
"c164ee99-024c-490f-909f-46fcbfce27e3-2015-07-22 12:42:18Z-PS",
"c164ee99-024c-490f-909f-46fcbfce27e3-2015-07-22 12:42:18Z-PS"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
],
"x-ms-ratelimit-remaining-subscription-reads": [
"14994"
"14992"
],
"x-ms-correlation-request-id": [
"f28b0d83-8805-4900-92db-90809a187048"
"eab30911-4bd3-4732-8ca1-c5010a84dd8b"
],
"x-ms-routing-request-id": [
"CENTRALUS:20150717T194611Z:f28b0d83-8805-4900-92db-90809a187048"
"CENTRALUS:20150722T124221Z:eab30911-4bd3-4732-8ca1-c5010a84dd8b"
],
"Cache-Control": [
"no-cache"
],
"Date": [
"Fri, 17 Jul 2015 19:46:11 GMT"
"Wed, 22 Jul 2015 12:42:21 GMT"
],
"Server": [
"Microsoft-IIS/8.0"
Expand All @@ -134,10 +134,10 @@
"Microsoft.Azure.Management.BackupServices.BackupVaultServicesManagementClient/1.0.0.0"
]
},
"ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"uniqueName\": \"dpmdrscaleint1.dpmdom02.selfhost.corp.microsoft.com\",\r\n \"containerType\": \"Machine\",\r\n \"properties\": {\r\n \"containerId\": 10034,\r\n \"friendlyName\": \"DPMDRSCALEINT1.DPMDOM02.SELFHOST.CORP.MICROSOFT.COM\",\r\n \"containerStampId\": \"eaf33dbc-a5b5-411a-a6af-1976a3f94602\",\r\n \"containerStampUri\": \"https://sea-dev01-prot-4bodw.ext.trafficmanager.net\",\r\n \"canReRegister\": false,\r\n \"customerType\": \"OBS\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}",
"ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"uniqueName\": \"dpmdrscaleint1.dpmdom02.selfhost.corp.microsoft.com\",\r\n \"containerType\": \"Machine\",\r\n \"properties\": {\r\n \"containerId\": 10034,\r\n \"friendlyName\": \"DPMDRSCALEINT1.DPMDOM02.SELFHOST.CORP.MICROSOFT.COM\",\r\n \"containerStampId\": \"eaf33dbc-a5b5-411a-a6af-1976a3f94602\",\r\n \"containerStampUri\": \"https://sea-dev01-prot-4bodw.ext.trafficmanager.net\",\r\n \"canReRegister\": true,\r\n \"customerType\": \"OBS\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}",
"ResponseHeaders": {
"Content-Length": [
"401"
"400"
],
"Content-Type": [
"application/json"
Expand All @@ -149,29 +149,29 @@
"no-cache"
],
"x-ms-request-id": [
"46a1fbfd-6e8b-4ab0-835b-1dcbe559162f"
"fa7caa14-ec77-4ba2-8ffd-e847c2666e0f"
],
"x-ms-client-request-id": [
"012da3f2-c253-475c-9f1a-516b11d3a906",
"012da3f2-c253-475c-9f1a-516b11d3a906"
"6ff22313-2e0b-4a95-b237-14f50997f221",
"6ff22313-2e0b-4a95-b237-14f50997f221"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
],
"x-ms-ratelimit-remaining-subscription-reads": [
"14993"
"14991"
],
"x-ms-correlation-request-id": [
"46a1fbfd-6e8b-4ab0-835b-1dcbe559162f"
"fa7caa14-ec77-4ba2-8ffd-e847c2666e0f"
],
"x-ms-routing-request-id": [
"CENTRALUS:20150717T194612Z:46a1fbfd-6e8b-4ab0-835b-1dcbe559162f"
"CENTRALUS:20150722T124222Z:fa7caa14-ec77-4ba2-8ffd-e847c2666e0f"
],
"Cache-Control": [
"no-cache"
],
"Date": [
"Fri, 17 Jul 2015 19:46:11 GMT"
"Wed, 22 Jul 2015 12:42:21 GMT"
],
"Server": [
"Microsoft-IIS/8.0"
Expand All @@ -192,10 +192,10 @@
"Microsoft.Azure.Management.BackupServices.BackupVaultServicesManagementClient/1.0.0.0"
]
},
"ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"uniqueName\": \"dpmdrscaleint1.dpmdom02.selfhost.corp.microsoft.com\",\r\n \"containerType\": \"Machine\",\r\n \"properties\": {\r\n \"containerId\": 10034,\r\n \"friendlyName\": \"DPMDRSCALEINT1.DPMDOM02.SELFHOST.CORP.MICROSOFT.COM\",\r\n \"containerStampId\": \"eaf33dbc-a5b5-411a-a6af-1976a3f94602\",\r\n \"containerStampUri\": \"https://sea-dev01-prot-4bodw.ext.trafficmanager.net\",\r\n \"canReRegister\": false,\r\n \"customerType\": \"OBS\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}",
"ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"uniqueName\": \"dpmdrscaleint1.dpmdom02.selfhost.corp.microsoft.com\",\r\n \"containerType\": \"Machine\",\r\n \"properties\": {\r\n \"containerId\": 10034,\r\n \"friendlyName\": \"DPMDRSCALEINT1.DPMDOM02.SELFHOST.CORP.MICROSOFT.COM\",\r\n \"containerStampId\": \"eaf33dbc-a5b5-411a-a6af-1976a3f94602\",\r\n \"containerStampUri\": \"https://sea-dev01-prot-4bodw.ext.trafficmanager.net\",\r\n \"canReRegister\": true,\r\n \"customerType\": \"OBS\"\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}",
"ResponseHeaders": {
"Content-Length": [
"401"
"400"
],
"Content-Type": [
"application/json"
Expand All @@ -207,29 +207,29 @@
"no-cache"
],
"x-ms-request-id": [
"95e616a7-bb6a-434b-876d-8dc9271a9375"
"5b3c8878-c9cf-46be-bdb3-19802eedb355"
],
"x-ms-client-request-id": [
"add32202-8b85-48cd-bf42-76899a482387",
"add32202-8b85-48cd-bf42-76899a482387"
"27052a7f-7819-4c9f-ba06-70a027ba899f",
"27052a7f-7819-4c9f-ba06-70a027ba899f"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
],
"x-ms-ratelimit-remaining-subscription-reads": [
"14992"
"14990"
],
"x-ms-correlation-request-id": [
"95e616a7-bb6a-434b-876d-8dc9271a9375"
"5b3c8878-c9cf-46be-bdb3-19802eedb355"
],
"x-ms-routing-request-id": [
"CENTRALUS:20150717T194612Z:95e616a7-bb6a-434b-876d-8dc9271a9375"
"CENTRALUS:20150722T124223Z:5b3c8878-c9cf-46be-bdb3-19802eedb355"
],
"Cache-Control": [
"no-cache"
],
"Date": [
"Fri, 17 Jul 2015 19:46:12 GMT"
"Wed, 22 Jul 2015 12:42:22 GMT"
],
"Server": [
"Microsoft-IIS/8.0"
Expand Down Expand Up @@ -265,36 +265,97 @@
"no-cache"
],
"x-ms-request-id": [
"ad8d0c5f-7388-48d1-8079-8cee7573cf09"
"d3d15b49-b29c-44da-9690-6cf8ae84bc26"
],
"x-ms-client-request-id": [
"7af25c88-040a-4ce3-9728-8f94fe64d42f",
"7af25c88-040a-4ce3-9728-8f94fe64d42f"
"fca52e4f-b2fc-4ac5-bfa2-18677f3f7f9c",
"fca52e4f-b2fc-4ac5-bfa2-18677f3f7f9c"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
],
"x-ms-ratelimit-remaining-subscription-reads": [
"14991"
"14989"
],
"x-ms-correlation-request-id": [
"ad8d0c5f-7388-48d1-8079-8cee7573cf09"
"d3d15b49-b29c-44da-9690-6cf8ae84bc26"
],
"x-ms-routing-request-id": [
"CENTRALUS:20150717T194618Z:ad8d0c5f-7388-48d1-8079-8cee7573cf09"
"CENTRALUS:20150722T124231Z:d3d15b49-b29c-44da-9690-6cf8ae84bc26"
],
"Cache-Control": [
"no-cache"
],
"Date": [
"Fri, 17 Jul 2015 19:46:17 GMT"
"Wed, 22 Jul 2015 12:42:30 GMT"
],
"Server": [
"Microsoft-IIS/8.0"
]
},
"StatusCode": 200
},
{
"RequestUri": "/Subscriptions/f5303a0b-fae4-4cdb-b44d-0e4c032dde26/resourceGroups/backuprg/providers/Microsoft.Backup/BackupVault/backuprn1/backupContainers/10034/enableReRegister?api-version=2015-03-15",
"EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZjUzMDNhMGItZmFlNC00Y2RiLWI0NGQtMGU0YzAzMmRkZTI2L3Jlc291cmNlR3JvdXBzL2JhY2t1cHJnL3Byb3ZpZGVycy9NaWNyb3NvZnQuQmFja3VwL0JhY2t1cFZhdWx0L2JhY2t1cHJuMS9iYWNrdXBDb250YWluZXJzLzEwMDM0L2VuYWJsZVJlUmVnaXN0ZXI/YXBpLXZlcnNpb249MjAxNS0wMy0xNQ==",
"RequestMethod": "PATCH",
"RequestBody": "{\r\n \"properties\": {\r\n \"enableReRegister\": true\r\n }\r\n}",
"RequestHeaders": {
"Content-Type": [
"application/json"
],
"Content-Length": [
"58"
],
"Accept-Language": [
"en-us"
],
"x-ms-client-request-id": [
"d4147693-3a31-4b4c-ab4c-4714de4c47fe-2015-07-22 12:42:23Z-PS"
],
"User-Agent": [
"Microsoft.Azure.Management.BackupServices.BackupVaultServicesManagementClient/1.0.0.0"
]
},
"ResponseBody": "",
"ResponseHeaders": {
"Content-Length": [
"0"
],
"Expires": [
"-1"
],
"Pragma": [
"no-cache"
],
"x-ms-request-id": [
"2c43793c-c4d7-4967-b315-b1e036aad163"
],
"x-ms-client-request-id": [
"d4147693-3a31-4b4c-ab4c-4714de4c47fe-2015-07-22 12:42:23Z-PS",
"d4147693-3a31-4b4c-ab4c-4714de4c47fe-2015-07-22 12:42:23Z-PS"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
],
"x-ms-ratelimit-remaining-subscription-writes": [
"1198"
],
"x-ms-correlation-request-id": [
"2c43793c-c4d7-4967-b315-b1e036aad163"
],
"x-ms-routing-request-id": [
"CENTRALUS:20150722T124224Z:2c43793c-c4d7-4967-b315-b1e036aad163"
],
"Cache-Control": [
"no-cache"
],
"Date": [
"Wed, 22 Jul 2015 12:42:24 GMT"
]
},
"StatusCode": 204
},
{
"RequestUri": "/Subscriptions/f5303a0b-fae4-4cdb-b44d-0e4c032dde26/resourceGroups/backuprg/providers/Microsoft.Backup/BackupVault/backuprn1/backupContainers/10034/UnRegisterContainer?api-version=2015-03-15",
"EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZjUzMDNhMGItZmFlNC00Y2RiLWI0NGQtMGU0YzAzMmRkZTI2L3Jlc291cmNlR3JvdXBzL2JhY2t1cHJnL3Byb3ZpZGVycy9NaWNyb3NvZnQuQmFja3VwL0JhY2t1cFZhdWx0L2JhY2t1cHJuMS9iYWNrdXBDb250YWluZXJzLzEwMDM0L1VuUmVnaXN0ZXJDb250YWluZXI/YXBpLXZlcnNpb249MjAxNS0wMy0xNQ==",
Expand All @@ -305,7 +366,7 @@
"en-us"
],
"x-ms-client-request-id": [
"3a02406f-4fc3-48b6-9621-c05d9d1c3cdb-2015-07-17 19:46:12Z-PS"
"a0308b26-2cf6-416c-b73c-3ad6dfcd825e-2015-07-22 12:42:25Z-PS"
],
"User-Agent": [
"Microsoft.Azure.Management.BackupServices.BackupVaultServicesManagementClient/1.0.0.0"
Expand All @@ -323,29 +384,29 @@
"no-cache"
],
"x-ms-request-id": [
"3577d465-9453-43bc-93ec-93603396aa9f"
"029232e7-4fc9-4705-a0ab-d990cff5c3cb"
],
"x-ms-client-request-id": [
"3a02406f-4fc3-48b6-9621-c05d9d1c3cdb-2015-07-17 19:46:12Z-PS",
"3a02406f-4fc3-48b6-9621-c05d9d1c3cdb-2015-07-17 19:46:12Z-PS"
"a0308b26-2cf6-416c-b73c-3ad6dfcd825e-2015-07-22 12:42:25Z-PS",
"a0308b26-2cf6-416c-b73c-3ad6dfcd825e-2015-07-22 12:42:25Z-PS"
],
"Strict-Transport-Security": [
"max-age=31536000; includeSubDomains"
],
"x-ms-ratelimit-remaining-subscription-writes": [
"1199"
"1197"
],
"x-ms-correlation-request-id": [
"3577d465-9453-43bc-93ec-93603396aa9f"
"029232e7-4fc9-4705-a0ab-d990cff5c3cb"
],
"x-ms-routing-request-id": [
"CENTRALUS:20150717T194617Z:3577d465-9453-43bc-93ec-93603396aa9f"
"CENTRALUS:20150722T124230Z:029232e7-4fc9-4705-a0ab-d990cff5c3cb"
],
"Cache-Control": [
"no-cache"
],
"Date": [
"Fri, 17 Jul 2015 19:46:17 GMT"
"Wed, 22 Jul 2015 12:42:30 GMT"
]
},
"StatusCode": 204
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<package id="Microsoft.Azure.Common" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Authentication" version="1.0.27-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.BackupServices" version="1.0.1-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.BackupServices" version="1.0.2-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Resources" version="2.18.0-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Test.Framework" version="1.0.5571.32271-prerelease" targetFramework="net45" />
<package id="Microsoft.Azure.Test.HttpRecorder" version="1.0.5571.32271-prerelease" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,23 @@ public void UnregisterMachineContainer(long containerId)
{
AzureBackupVaultClient.Container.UnregisterMarsContainer(containerId.ToString(), GetCustomRequestHeaders());
}

/// <summary>
/// Enable container reregistration
/// </summary>
/// <param name="containerId"></param>
/// <returns></returns>
public void EnableMachineContainerReregistration(long containerId)
{
EnableReregistrationRequest request = new EnableReregistrationRequest()
{
ContainerReregistrationState = new ContainerReregistrationState()
{
EnableReregistration = true,
},
};

AzureBackupVaultClient.Container.EnableMarsContainerReregistration(containerId.ToString(), request, GetCustomRequestHeaders());
}
}
}
Loading