diff --git a/setup/azurecmdfiles.wxi b/setup/azurecmdfiles.wxi index 65648b9eb13e..7ecdd96e1cf6 100644 --- a/setup/azurecmdfiles.wxi +++ b/setup/azurecmdfiles.wxi @@ -44,15 +44,6 @@ - - - - - - - - - @@ -98,9 +89,6 @@ - - - @@ -159,6 +147,15 @@ + + + + + + + + + @@ -189,6 +186,9 @@ + + + @@ -198,24 +198,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -225,6 +288,219 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -257,15 +533,6 @@ - - - - - - - - - @@ -305,9 +572,6 @@ - - - @@ -418,15 +682,6 @@ - - - - - - - - - @@ -514,9 +769,6 @@ - - - @@ -759,15 +1011,6 @@ - - - - - - - - - @@ -822,9 +1065,6 @@ - - - @@ -857,15 +1097,6 @@ - - - - - - - - - @@ -893,9 +1124,6 @@ - - - @@ -922,15 +1150,6 @@ - - - - - - - - - @@ -952,9 +1171,6 @@ - - - @@ -1023,15 +1239,6 @@ - - - - - - - - - @@ -1074,9 +1281,6 @@ - - - @@ -1426,15 +1630,6 @@ - - - - - - - - - @@ -1489,9 +1684,6 @@ - - - @@ -1521,15 +1713,6 @@ - - - - - - - - - @@ -1566,9 +1749,6 @@ - - - @@ -1586,15 +1766,6 @@ - - - - - - - - - @@ -1658,9 +1829,6 @@ - - - @@ -1797,15 +1965,6 @@ - - - - - - - - - @@ -1851,9 +2010,6 @@ - - - @@ -1880,15 +2036,6 @@ - - - - - - - - - @@ -1940,9 +2087,6 @@ - - - @@ -2215,15 +2359,6 @@ - - - - - - - - - @@ -2365,9 +2500,6 @@ - - - @@ -2453,15 +2585,6 @@ - - - - - - - - - @@ -2525,9 +2648,6 @@ - - - @@ -2581,15 +2701,6 @@ - - - - - - - - - @@ -2701,9 +2812,6 @@ - - - @@ -2730,15 +2838,6 @@ - - - - - - - - - @@ -2862,9 +2961,6 @@ - - - @@ -3165,15 +3261,6 @@ - - - - - - - - - @@ -3228,9 +3315,6 @@ - - - @@ -3278,15 +3362,6 @@ - - - - - - - - - @@ -3407,9 +3482,6 @@ - - - @@ -3670,15 +3742,6 @@ - - - - - - - - - @@ -3820,9 +3883,6 @@ - - - @@ -3840,15 +3900,6 @@ - - - - - - - - - @@ -3912,9 +3963,6 @@ - - - @@ -4000,15 +4048,6 @@ - - - - - - - - - @@ -4054,9 +4093,6 @@ - - - @@ -4077,9 +4113,6 @@ - - - @@ -4095,7 +4128,6 @@ - @@ -4114,6 +4146,9 @@ + + + @@ -4124,18 +4159,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4146,9 +4264,6 @@ - - - @@ -4162,7 +4277,6 @@ - @@ -4199,9 +4313,6 @@ - - - @@ -4231,7 +4342,6 @@ - @@ -4302,9 +4412,6 @@ - - - @@ -4323,7 +4430,6 @@ - @@ -4334,9 +4440,6 @@ - - - @@ -4346,7 +4449,6 @@ - @@ -4355,9 +4457,6 @@ - - - @@ -4365,7 +4464,6 @@ - @@ -4388,9 +4486,6 @@ - - - @@ -4405,7 +4500,6 @@ - @@ -4519,9 +4613,6 @@ - - - @@ -4540,7 +4631,6 @@ - @@ -4550,9 +4640,6 @@ - - - @@ -4565,15 +4652,11 @@ - - - - @@ -4595,7 +4678,6 @@ - @@ -4640,9 +4722,6 @@ - - - @@ -4658,7 +4737,6 @@ - @@ -4667,9 +4745,6 @@ - - - @@ -4687,7 +4762,6 @@ - @@ -4774,9 +4848,6 @@ - - - @@ -4824,7 +4895,6 @@ - @@ -4852,9 +4922,6 @@ - - - @@ -4876,7 +4943,6 @@ - @@ -4894,9 +4960,6 @@ - - - @@ -4934,7 +4997,6 @@ - @@ -4943,9 +5005,6 @@ - - - @@ -4987,7 +5046,6 @@ - @@ -5076,9 +5134,6 @@ - - - @@ -5097,7 +5152,6 @@ - @@ -5113,9 +5167,6 @@ - - - @@ -5156,7 +5207,6 @@ - @@ -5233,9 +5283,6 @@ - - - @@ -5283,15 +5330,11 @@ - - - - @@ -5313,7 +5356,6 @@ - @@ -5341,9 +5383,6 @@ - - - @@ -5359,7 +5398,6 @@ - diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/Commands.AzureBackup.Test.csproj b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/Commands.AzureBackup.Test.csproj index 12977a420ca1..9622179da9e2 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/Commands.AzureBackup.Test.csproj +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/Commands.AzureBackup.Test.csproj @@ -39,9 +39,9 @@ False ..\..\..\packages\Microsoft.Azure.Common.Authentication.1.0.27-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll - + False - ..\..\..\packages\Microsoft.Azure.Management.BackupServices.1.0.0-preview\lib\net40\Microsoft.Azure.Management.BackupServicesManagement.dll + ..\..\..\packages\Microsoft.Azure.Management.BackupServices.1.0.1-preview\lib\net40\Microsoft.Azure.Management.BackupServicesManagement.dll False @@ -124,6 +124,7 @@ + @@ -154,9 +155,15 @@ Designer + + Always + Always + + Always + Always diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupContainerTests.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupContainerTests.cs new file mode 100644 index 000000000000..7c461caf5071 --- /dev/null +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupContainerTests.cs @@ -0,0 +1,34 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.WindowsAzure.Commands.ScenarioTest; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Xunit; + +namespace Microsoft.Azure.Commands.AzureBackup.Test.ScenarioTests +{ + public class AzureBackupContainerTests : AzureBackupTestsBase + { + [Fact] + [Trait(Category.AcceptanceType, Category.CheckIn)] + public void AzureBackupMarsContainerScenarioTests() + { + this.RunPowerShellTest("Test-AzureBackupMarsContainerScenario"); + } + } +} diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupContainerTests.ps1 b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupContainerTests.ps1 new file mode 100644 index 000000000000..466e97accd08 --- /dev/null +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/ScenarioTests/AzureBackupContainerTests.ps1 @@ -0,0 +1,49 @@ +# ---------------------------------------------------------------------------------- +# +# Copyright Microsoft Corporation +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ---------------------------------------------------------------------------------- + +$ResourceGroupName = "backuprg" +$ResourceName = "backuprn1" +$ContainerName = "DPMDRSCALEINT1.DPMDOM02.SELFHOST.CORP.MICROSOFT.COM" +$ContainerType = "Windows" +$ContainerId = "10034" +$ContainerStatus = "Registered" + +function Test-AzureBackupMarsContainerScenario +{ + $vault = Get-AzureBackupVault -ResourceGroupName $ResourceGroupName -Name $ResourceName + + $containers = Get-AzureBackupContainer -vault $vault -type $ContainerType + Assert-AreEqual $containers[0].ContainerType $ContainerType; + Assert-AreEqual $containers[0].Id $ContainerId; + Assert-AreEqual $containers[0].Location $vault.Region; + Assert-AreEqual $containers[0].Name $ContainerName; + Assert-AreEqual $containers[0].ResourceGroupName $vault.ResourceGroupName; + Assert-AreEqual $containers[0].ResourceName $vault.Name; + Assert-AreEqual $containers[0].Status $ContainerStatus; + + $namedContainers = Get-AzureBackupContainer -vault $vault -type $ContainerType -name $ContainerName + $container = $namedContainers[0]; + Assert-AreEqual $container.ContainerType $ContainerType; + Assert-AreEqual $container.Id $ContainerId; + Assert-AreEqual $container.Location $vault.Region; + Assert-AreEqual $container.Name $ContainerName; + Assert-AreEqual $container.ResourceGroupName $vault.ResourceGroupName; + Assert-AreEqual $container.ResourceName $vault.Name; + Assert-AreEqual $container.Status $ContainerStatus; + + Unregister-AzureBackupContainer -Container $container -Force + + $unregContainers = Get-AzureBackupContainer -vault $vault -type $ContainerType -name $ContainerName + Assert-AreEqual $unregContainers.Count 0; +} diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/SessionRecords/Microsoft.Azure.Commands.AzureBackup.Test.ScenarioTests.AzureBackupContainerTests/AzureBackupMarsContainerScenarioTests.json b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/SessionRecords/Microsoft.Azure.Commands.AzureBackup.Test.ScenarioTests.AzureBackupContainerTests/AzureBackupMarsContainerScenarioTests.json new file mode 100644 index 000000000000..503061a5b70f --- /dev/null +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/SessionRecords/Microsoft.Azure.Commands.AzureBackup.Test.ScenarioTests.AzureBackupContainerTests/AzureBackupMarsContainerScenarioTests.json @@ -0,0 +1,358 @@ +{ + "Entries": [ + { + "RequestUri": "/Subscriptions/f5303a0b-fae4-4cdb-b44d-0e4c032dde26/resourceGroups/backuprg/providers/Microsoft.Backup/BackupVault/backuprn1?api-version=2015-03-15", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZjUzMDNhMGItZmFlNC00Y2RiLWI0NGQtMGU0YzAzMmRkZTI2L3Jlc291cmNlR3JvdXBzL2JhY2t1cHJnL3Byb3ZpZGVycy9NaWNyb3NvZnQuQmFja3VwL0JhY2t1cFZhdWx0L2JhY2t1cHJuMT9hcGktdmVyc2lvbj0yMDE1LTAzLTE1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept-Language": [ + "en-us" + ], + "x-ms-client-request-id": [ + "3bde4861-d6c7-4785-b954-c2fb7498260c-2015-07-17 19:46:07Z-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}", + "ResponseHeaders": { + "Content-Length": [ + "339" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "650d6914-a58c-4610-90c4-578f43f4194a" + ], + "x-ms-client-request-id": [ + "3bde4861-d6c7-4785-b954-c2fb7498260c-2015-07-17 19:46:07Z-PS" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14995" + ], + "x-ms-correlation-request-id": [ + "650d6914-a58c-4610-90c4-578f43f4194a" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20150717T194610Z:650d6914-a58c-4610-90c4-578f43f4194a" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Jul 2015 19:46:10 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/f5303a0b-fae4-4cdb-b44d-0e4c032dde26/resourceGroups/backuprg/providers/Microsoft.Backup/BackupVault/backuprn1/storageconfig/vaultstorageconfig?api-version=2015-03-15", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZjUzMDNhMGItZmFlNC00Y2RiLWI0NGQtMGU0YzAzMmRkZTI2L3Jlc291cmNlR3JvdXBzL2JhY2t1cHJnL3Byb3ZpZGVycy9NaWNyb3NvZnQuQmFja3VwL0JhY2t1cFZhdWx0L2JhY2t1cHJuMS9zdG9yYWdlY29uZmlnL3ZhdWx0c3RvcmFnZWNvbmZpZz9hcGktdmVyc2lvbj0yMDE1LTAzLTE1", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept-Language": [ + "en-us" + ], + "x-ms-client-request-id": [ + "3bde4861-d6c7-4785-b954-c2fb7498260c-2015-07-17 19:46:07Z-PS" + ], + "User-Agent": [ + "Microsoft.Azure.Management.BackupServices.BackupVaultServicesManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"resourceId\": 8395314960984740771,\r\n \"properties\": {\r\n \"storageType\": \"GeoRedundant\",\r\n \"storageTypeState\": \"Locked\"\r\n }\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "106" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "f28b0d83-8805-4900-92db-90809a187048" + ], + "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" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14994" + ], + "x-ms-correlation-request-id": [ + "f28b0d83-8805-4900-92db-90809a187048" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20150717T194611Z:f28b0d83-8805-4900-92db-90809a187048" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Jul 2015 19:46:11 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/f5303a0b-fae4-4cdb-b44d-0e4c032dde26/resourceGroups/backuprg/providers/Microsoft.Backup/BackupVault/backuprn1/backupContainers?api-version=2015-03-15&$filter=type%20eq%20'Machine'", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZjUzMDNhMGItZmFlNC00Y2RiLWI0NGQtMGU0YzAzMmRkZTI2L3Jlc291cmNlR3JvdXBzL2JhY2t1cHJnL3Byb3ZpZGVycy9NaWNyb3NvZnQuQmFja3VwL0JhY2t1cFZhdWx0L2JhY2t1cHJuMS9iYWNrdXBDb250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTUtMDMtMTUmJGZpbHRlcj10eXBlJTIwZXElMjAnTWFjaGluZSc=", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept-Language": [ + "en-us" + ], + "User-Agent": [ + "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}", + "ResponseHeaders": { + "Content-Length": [ + "401" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "46a1fbfd-6e8b-4ab0-835b-1dcbe559162f" + ], + "x-ms-client-request-id": [ + "012da3f2-c253-475c-9f1a-516b11d3a906", + "012da3f2-c253-475c-9f1a-516b11d3a906" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14993" + ], + "x-ms-correlation-request-id": [ + "46a1fbfd-6e8b-4ab0-835b-1dcbe559162f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20150717T194612Z:46a1fbfd-6e8b-4ab0-835b-1dcbe559162f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Jul 2015 19:46:11 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/f5303a0b-fae4-4cdb-b44d-0e4c032dde26/resourceGroups/backuprg/providers/Microsoft.Backup/BackupVault/backuprn1/backupContainers?api-version=2015-03-15&$filter=type%20eq%20'Machine'%20and%20friendlyName%20eq%20'DPMDRSCALEINT1.DPMDOM02.SELFHOST.CORP.MICROSOFT.COM'", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZjUzMDNhMGItZmFlNC00Y2RiLWI0NGQtMGU0YzAzMmRkZTI2L3Jlc291cmNlR3JvdXBzL2JhY2t1cHJnL3Byb3ZpZGVycy9NaWNyb3NvZnQuQmFja3VwL0JhY2t1cFZhdWx0L2JhY2t1cHJuMS9iYWNrdXBDb250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTUtMDMtMTUmJGZpbHRlcj10eXBlJTIwZXElMjAnTWFjaGluZSclMjBhbmQlMjBmcmllbmRseU5hbWUlMjBlcSUyMCdEUE1EUlNDQUxFSU5UMS5EUE1ET00wMi5TRUxGSE9TVC5DT1JQLk1JQ1JPU09GVC5DT00n", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept-Language": [ + "en-us" + ], + "User-Agent": [ + "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}", + "ResponseHeaders": { + "Content-Length": [ + "401" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "95e616a7-bb6a-434b-876d-8dc9271a9375" + ], + "x-ms-client-request-id": [ + "add32202-8b85-48cd-bf42-76899a482387", + "add32202-8b85-48cd-bf42-76899a482387" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14992" + ], + "x-ms-correlation-request-id": [ + "95e616a7-bb6a-434b-876d-8dc9271a9375" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20150717T194612Z:95e616a7-bb6a-434b-876d-8dc9271a9375" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Jul 2015 19:46:12 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ] + }, + "StatusCode": 200 + }, + { + "RequestUri": "/Subscriptions/f5303a0b-fae4-4cdb-b44d-0e4c032dde26/resourceGroups/backuprg/providers/Microsoft.Backup/BackupVault/backuprn1/backupContainers?api-version=2015-03-15&$filter=type%20eq%20'Machine'%20and%20friendlyName%20eq%20'DPMDRSCALEINT1.DPMDOM02.SELFHOST.CORP.MICROSOFT.COM'", + "EncodedRequestUri": "L1N1YnNjcmlwdGlvbnMvZjUzMDNhMGItZmFlNC00Y2RiLWI0NGQtMGU0YzAzMmRkZTI2L3Jlc291cmNlR3JvdXBzL2JhY2t1cHJnL3Byb3ZpZGVycy9NaWNyb3NvZnQuQmFja3VwL0JhY2t1cFZhdWx0L2JhY2t1cHJuMS9iYWNrdXBDb250YWluZXJzP2FwaS12ZXJzaW9uPTIwMTUtMDMtMTUmJGZpbHRlcj10eXBlJTIwZXElMjAnTWFjaGluZSclMjBhbmQlMjBmcmllbmRseU5hbWUlMjBlcSUyMCdEUE1EUlNDQUxFSU5UMS5EUE1ET00wMi5TRUxGSE9TVC5DT1JQLk1JQ1JPU09GVC5DT00n", + "RequestMethod": "GET", + "RequestBody": "", + "RequestHeaders": { + "Accept-Language": [ + "en-us" + ], + "User-Agent": [ + "Microsoft.Azure.Management.BackupServices.BackupVaultServicesManagementClient/1.0.0.0" + ] + }, + "ResponseBody": "{\r\n \"value\": [],\r\n \"nextLink\": null\r\n}", + "ResponseHeaders": { + "Content-Length": [ + "28" + ], + "Content-Type": [ + "application/json" + ], + "Expires": [ + "-1" + ], + "Pragma": [ + "no-cache" + ], + "x-ms-request-id": [ + "ad8d0c5f-7388-48d1-8079-8cee7573cf09" + ], + "x-ms-client-request-id": [ + "7af25c88-040a-4ce3-9728-8f94fe64d42f", + "7af25c88-040a-4ce3-9728-8f94fe64d42f" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-reads": [ + "14991" + ], + "x-ms-correlation-request-id": [ + "ad8d0c5f-7388-48d1-8079-8cee7573cf09" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20150717T194618Z:ad8d0c5f-7388-48d1-8079-8cee7573cf09" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Jul 2015 19:46:17 GMT" + ], + "Server": [ + "Microsoft-IIS/8.0" + ] + }, + "StatusCode": 200 + }, + { + "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==", + "RequestMethod": "DELETE", + "RequestBody": "", + "RequestHeaders": { + "Accept-Language": [ + "en-us" + ], + "x-ms-client-request-id": [ + "3a02406f-4fc3-48b6-9621-c05d9d1c3cdb-2015-07-17 19:46:12Z-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": [ + "3577d465-9453-43bc-93ec-93603396aa9f" + ], + "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" + ], + "Strict-Transport-Security": [ + "max-age=31536000; includeSubDomains" + ], + "x-ms-ratelimit-remaining-subscription-writes": [ + "1199" + ], + "x-ms-correlation-request-id": [ + "3577d465-9453-43bc-93ec-93603396aa9f" + ], + "x-ms-routing-request-id": [ + "CENTRALUS:20150717T194617Z:3577d465-9453-43bc-93ec-93603396aa9f" + ], + "Cache-Control": [ + "no-cache" + ], + "Date": [ + "Fri, 17 Jul 2015 19:46:17 GMT" + ] + }, + "StatusCode": 204 + } + ], + "Names": {}, + "Variables": { + "SubscriptionId": "f5303a0b-fae4-4cdb-b44d-0e4c032dde26" + } +} \ No newline at end of file diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/packages.config b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/packages.config index ec8ef520b0bd..644017bb5681 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/packages.config +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup.Test/packages.config @@ -4,7 +4,7 @@ - + diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/ContainerAdapter.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/ContainerAdapter.cs new file mode 100644 index 000000000000..26376ea2dda3 --- /dev/null +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupClientAdapter/ContainerAdapter.cs @@ -0,0 +1,67 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Collections.Generic; +using System.Xml; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.Azure.Common.Authentication; +using Microsoft.Azure.Common.Authentication.Models; +using System.Threading; +using Hyak.Common; +using Microsoft.Azure.Commands.AzureBackup.Properties; +using System.Net; +using System.Linq; +using Microsoft.WindowsAzure.Management.Scheduler; +using Microsoft.Azure.Management.BackupServices; +using Microsoft.Azure.Management.BackupServices.Models; +using Microsoft.Azure.Commands.AzureBackup.Models; + +namespace Microsoft.Azure.Commands.AzureBackup.ClientAdapter +{ + public partial class AzureBackupClientAdapter + { + /// + /// Gets all MARS containers in the vault + /// + /// + public IEnumerable ListMachineContainers() + { + var listResponse = AzureBackupVaultClient.Container.ListMarsContainersByType(MarsContainerType.Machine, GetCustomRequestHeaders()); + return listResponse.ListMarsContainerResponse.Value; + } + + /// + /// Gets all MARS containers in the vault which match the friendly name + /// + /// The friendly name of the container + /// + public IEnumerable ListMachineContainers(string friendlyName) + { + var listResponse = AzureBackupVaultClient.Container.ListMarsContainersByTypeAndFriendlyName(MarsContainerType.Machine, friendlyName, GetCustomRequestHeaders()); + return listResponse.ListMarsContainerResponse.Value; + } + + /// + /// UnRegister container + /// + /// + /// + public void UnregisterMachineContainer(long containerId) + { + AzureBackupVaultClient.Container.UnregisterMarsContainer(containerId.ToString(), GetCustomRequestHeaders()); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupCmdletHelpMessage.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupCmdletHelpMessage.cs index 9d2719413564..7d8dd45e1b4b 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupCmdletHelpMessage.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupCmdletHelpMessage.cs @@ -22,5 +22,10 @@ internal static class AzureBackupCmdletHelpMessage public const string Location = "The resource location."; public const string TargetLocation = "The directory where the credentials file will be saved. This must be an absolute path."; public const string StorageType = "The vault back-end storage type."; + public const string ManagedResourceName = "The resource name of the resource being managed by the Azure Backup service (ex: resource name of the VM)."; + public const string ManagedResourceGroupName = "The resource group name of the resource being managed by the Azure Backup service (ex: resource group name of the VM)."; + public const string ContainerRegistrationStatus = "The container registration status."; + public const string ContainerType = "The container type."; + public const string AzureBackupContainer = "Azure Backup Container for Azure Backup Item."; } } diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupContainerCmdletBase.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupContainerCmdletBase.cs new file mode 100644 index 000000000000..b1b623d832c6 --- /dev/null +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/AzureBackupContainerCmdletBase.cs @@ -0,0 +1,45 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Collections.Generic; +using System.Xml; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.Azure.Common.Authentication; +using Microsoft.Azure.Common.Authentication.Models; +using System.Threading; +using Hyak.Common; +using Microsoft.Azure.Commands.AzureBackup.Properties; +using System.Net; +using Microsoft.Azure.Commands.AzureBackup.Models; + +namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets +{ + public abstract class AzureBackupContainerCmdletBase : AzureBackupCmdletBase + { + [Parameter(Position = 0, Mandatory = true, HelpMessage = AzureBackupCmdletHelpMessage.AzureBackupContainer, ValueFromPipeline = true)] + [ValidateNotNullOrEmpty] + public AzureBackupContainer Container { get; set; } + + public override void ExecuteCmdlet() + { + base.ExecuteCmdlet(); + + WriteDebug(String.Format("Cmdlet called for ResourceGroupName: {0}, ResourceName: {1}, Location: {2}", Container.ResourceGroupName, Container.ResourceName, Container.Location)); + + InitializeAzureBackupCmdlet(Container.ResourceGroupName, Container.ResourceName); + } + } +} \ No newline at end of file diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/GetAzureBackupContainer.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/GetAzureBackupContainer.cs new file mode 100644 index 000000000000..fd5bcb2d6b3c --- /dev/null +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/GetAzureBackupContainer.cs @@ -0,0 +1,82 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.AzureBackup.Helpers; +using Microsoft.Azure.Commands.AzureBackup.Library; +using Microsoft.Azure.Commands.AzureBackup.Models; +using Microsoft.Azure.Management.BackupServices.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using System.Threading.Tasks; + +namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets +{ + /// + /// Get list of containers + /// + [Cmdlet(VerbsCommon.Get, "AzureBackupContainer"), OutputType(typeof(List))] + public class GetAzureBackupContainer : AzureBackupVaultCmdletBase + { + [Parameter(Mandatory = false, HelpMessage = AzureBackupCmdletHelpMessage.ManagedResourceName)] + [ValidateNotNullOrEmpty] + public string Name { get; set; } + + [Parameter(Mandatory = true, HelpMessage = AzureBackupCmdletHelpMessage.ContainerType)] + [ValidateNotNullOrEmpty] + public AzureBackupContainerType Type { get; set; } + + public override void ExecuteCmdlet() + { + ExecutionBlock(() => + { + base.ExecuteCmdlet(); + + List containers = new List(); + + switch (Type) + { + case AzureBackupContainerType.Windows: + case AzureBackupContainerType.SCDPM: + containers.AddRange(GetMachineContainers()); + break; + default: + break; + } + + WriteObject(containers); + }); + } + + private List GetMachineContainers() + { + List marsContainerResponses = new List(); + if (string.IsNullOrEmpty(Name)) + { + marsContainerResponses.AddRange(AzureBackupClient.ListMachineContainers()); + } + else + { + marsContainerResponses.AddRange(AzureBackupClient.ListMachineContainers(Name)); + } + + return marsContainerResponses.ConvertAll(marsContainerResponse => + { + return new AzureBackupContainer(Vault, marsContainerResponse); + }).Where(container => container.ContainerType == Type.ToString()).ToList(); + } + } +} diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/UnregisterAzureBackupContainer.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/UnregisterAzureBackupContainer.cs new file mode 100644 index 000000000000..9b02d0e5530a --- /dev/null +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Cmdlets/Container/UnregisterAzureBackupContainer.cs @@ -0,0 +1,77 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Web; +using System.Collections.Generic; +using System.Collections.Specialized; +using System.Linq; +using System.Management.Automation; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Azure.Management.BackupServices.Models; +using MBS = Microsoft.Azure.Management.BackupServices; +using Microsoft.Azure.Commands.AzureBackup.Models; +using Microsoft.WindowsAzure.Commands.Utilities.Store; +using Microsoft.Azure.Commands.AzureBackup.Properties; + +namespace Microsoft.Azure.Commands.AzureBackup.Cmdlets +{ + /// + /// Get list of containers + /// + [Cmdlet(VerbsLifecycle.Unregister, "AzureBackupContainer")] + public class UnregisterAzureBackupContainer : AzureBackupContainerCmdletBase + { + private PowerShellCustomConfirmation customerConfirmation; + + [Parameter(Position = 1, Mandatory = false, HelpMessage = "Confirm unregistration and deletion of server")] + public SwitchParameter Force { get; set; } + + public override void ExecuteCmdlet() + { + ExecutionBlock(() => + { + base.ExecuteCmdlet(); + + AzureBackupContainerType containerType = (AzureBackupContainerType)Enum.Parse(typeof(AzureBackupContainerType), Container.ContainerType); + switch (containerType) + { + case AzureBackupContainerType.Windows: + case AzureBackupContainerType.SCDPM: + DeleteServer(); + break; + default: + break; + } + }); + } + + private void DeleteServer() + { + bool shouldUnregister = true; + + if (!Force.IsPresent) + { + customerConfirmation = customerConfirmation ?? new PowerShellCustomConfirmation(Host); + shouldUnregister = customerConfirmation.ShouldProcess(Resources.UnregisterServerCaption, Resources.UnregisterServerMessage); + } + + if (shouldUnregister) + { + AzureBackupClient.UnregisterMachineContainer(Container.Id); + } + } + } +} diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Commands.AzureBackup.csproj b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Commands.AzureBackup.csproj index b581a19ef2a3..9e4cbadcc414 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Commands.AzureBackup.csproj +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Commands.AzureBackup.csproj @@ -56,9 +56,9 @@ ..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll - + False - ..\..\..\packages\Microsoft.Azure.Management.BackupServices.1.0.0-preview\lib\net40\Microsoft.Azure.Management.BackupServicesManagement.dll + ..\..\..\packages\Microsoft.Azure.Management.BackupServices.1.0.1-preview\lib\net40\Microsoft.Azure.Management.BackupServicesManagement.dll ..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.14.201151115\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll @@ -116,18 +116,24 @@ + + + + + + @@ -168,6 +174,13 @@ {5ee72c53-1720-4309-b54b-5fb79703195f} Commands.Common + + {4900ec4e-8deb-4412-9108-0bc52f81d457} + Commands.Utilities + + + + diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Helpers/ContainerHelpers.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Helpers/ContainerHelpers.cs new file mode 100644 index 000000000000..65678f8542da --- /dev/null +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Helpers/ContainerHelpers.cs @@ -0,0 +1,71 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System; +using System.Management.Automation; +using System.Collections.Generic; +using System.Xml; +using Microsoft.WindowsAzure.Commands.Utilities.Common; +using Microsoft.Azure.Common.Authentication; +using Microsoft.Azure.Common.Authentication.Models; +using System.Threading; +using Hyak.Common; +using Microsoft.Azure.Commands.AzureBackup.Properties; +using System.Net; +using Microsoft.Azure.Management.BackupServices.Models; +using Microsoft.Azure.Commands.AzureBackup.Cmdlets; +using System.Linq; +using Microsoft.Azure.Commands.AzureBackup.Models; +using CmdletModel = Microsoft.Azure.Commands.AzureBackup.Models; +using System.Collections.Specialized; +using System.Web; +using System.Text.RegularExpressions; + +namespace Microsoft.Azure.Commands.AzureBackup.Helpers +{ + internal class ContainerHelpers + { + internal static AzureBackupContainerType GetContainerType(string customerType) + { + CustomerType type = (CustomerType)Enum.Parse(typeof(CustomerType), customerType); + + AzureBackupContainerType containerType = 0; + + switch (type) + { + case CustomerType.DPM: + containerType = AzureBackupContainerType.SCDPM; + break; + case CustomerType.InMage: + break; + case CustomerType.Invalid: + break; + case CustomerType.ManagedContainer: + break; + case CustomerType.OBS: + containerType = AzureBackupContainerType.Windows; + break; + case CustomerType.SBS: + containerType = AzureBackupContainerType.Windows; + break; + case CustomerType.SqlPaaS: + break; + default: + break; + } + + return containerType; + } + } +} diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Microsoft.Azure.Commands.AzureBackup.dll-help.xml b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Microsoft.Azure.Commands.AzureBackup.dll-help.xml index 732d973175bf..3308e22c0faa 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Microsoft.Azure.Commands.AzureBackup.dll-help.xml +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Microsoft.Azure.Commands.AzureBackup.dll-help.xml @@ -1,5 +1,211 @@  + + + Get-AzureBackupContainer + + Retrieves one or more Azure Backup containers that match the filter criteria specified. + + + + + Get + AzureBackupContainer + + + + An AzureBackupContainer is an object that encapsulates datasources, protected items, and recovery points. An AzureBackupContainer can be one of three: +- a Windows server +- a System Center Data Protection Manager server (SCDPM) +- an Azure IaaS virtual machine + Before a datasource or item can be backed-up, the container holding it must be registered with the Azure Backup service and be authenticated to send backup data to the backup vault. For Windows and SCDPM servers, the registration is held with the FQDN of the server. + + + + Get-AzureBackupContainer + + Name + + The name of the AzureBackupContainer for which an object reference will be returned. + + String + + + Type + + This determines the Type of the container that has been registered. +- For Windows servers using the Azure Backup agent directly, the type will be "Windows" +- For SCDPM servers using the Azure Backup agent in conjunction with SCDPM, the type will be "DPM" + + AzureBackupContainerType + + + Vault + + A filter for the vault object, under which the container needs to be found. + + AzurePSBackupVault + + + Profile + + Non-mandatory AzureProfile input object + + AzureProfile + + + + + + Name + + The name of the AzureBackupContainer for which an object reference will be returned. + + String + + String + + + + + + Type + + This determines the Type of the container that has been registered. +- For Windows servers using the Azure Backup agent directly, the type will be "Windows" +- For SCDPM servers using the Azure Backup agent in conjunction with SCDPM, the type will be "DPM" + + AzureBackupContainerType + + AzureBackupContainerType + + + + + + Vault + + A filter for the vault object, under which the container needs to be found. + + AzurePSBackupVault + + AzurePSBackupVault + + + + + + Profile + + Non-mandatory AzureProfile input object + + AzureProfile + + AzureProfile + + + + + + ManagedResourceName + + The name of the container that is specified as a filter. + + string + + string + + + + + + + + + AzureBackupVault + + + + + +This section details out the type of the objects that you can pipe to the cmdlet. + + + + + + + AzureBackupContainer + + + + + +This section details out the type of the objects that the cmdlet emits. + + + + + + + + + None + + + + + -------------------------- List of all Windows servers registered to the vault -------------------------- + + PS C:\> + + Get-AzureBackupContainer -vault $v -type Windows + + Gets a list of all containers of type "Windows" from the specified vault. + + + Name Type Status +---- ---- ------ +SERVER1.CONTOSO.COM Windows Registered +SERVER2.CONTOSO.COM Windows Registered + + + + + + + + + + + + -------------------------- Retrieve a specific container -------------------------- + + PS C:\> + + Get-AzureBackupContainer -vault $v -type SCDPM -name "DPMSERVER.CONTOSO.COM" + + Gets the container representing a specific DPM server registered to the specified vault. + + + Name Type Status +---- ---- ------ +DPMSERVER.CONTOSO.COM SCDPM Registered + + + + + + + + + + + + + + + Get-AzureBackupVault @@ -88,7 +294,8 @@ - This section details out the type of the objects that you can pipe to the cmdlet. + +This section details out the type of the objects that you can pipe to the cmdlet. @@ -100,7 +307,8 @@ - This section details out the type of the objects that the cmdlet emits. + +This section details out the type of the objects that the cmdlet emits. @@ -312,8 +520,7 @@ Property : - -This section details out the type of the objects that you can pipe to the cmdlet. + This section details out the type of the objects that you can pipe to the cmdlet. @@ -325,8 +532,7 @@ This section details out the type of the objects that you can pipe to the cmdlet - -This section details out the type of the objects that the cmdlet emits. + This section details out the type of the objects that the cmdlet emits. @@ -490,7 +696,8 @@ This section details out the type of the objects that the cmdlet emits. - This section details out the type of the objects that you can pipe to the cmdlet. + +This section details out the type of the objects that you can pipe to the cmdlet. @@ -502,7 +709,8 @@ This section details out the type of the objects that the cmdlet emits. - This section details out the type of the objects that the cmdlet emits. + +This section details out the type of the objects that the cmdlet emits. @@ -656,7 +864,8 @@ Storage : LocallyRedundant - This section details out the type of the objects that you can pipe to the cmdlet. + +This section details out the type of the objects that you can pipe to the cmdlet. @@ -668,7 +877,8 @@ Storage : LocallyRedundant - This section details out the type of the objects that the cmdlet emits. + +This section details out the type of the objects that the cmdlet emits. @@ -814,8 +1024,7 @@ Storage : LocallyRedundant - -This section details out the type of the objects that you can pipe to the cmdlet. + This section details out the type of the objects that you can pipe to the cmdlet. @@ -827,8 +1036,7 @@ This section details out the type of the objects that you can pipe to the cmdlet - -This section details out the type of the objects that the cmdlet emits. + This section details out the type of the objects that the cmdlet emits. @@ -881,4 +1089,170 @@ This section details out the type of the objects that the cmdlet emits. + + + + Unregister-AzureBackupContainer + + Unregisters the specified Windows Server or Azure virtual machine from the Azure Backup vault. + + + + + Unregister + AzureBackupContainer + + + + The Unregister command works on an Container object. It removes references of this container from the Azure Backup vault. Before you can Unregister a Container, any protected data associated with the Container needs to be deleted. + + + + Unregister-AzureBackupContainer + + Force + + When applied to an AzureBackupContainer of type Windows, this will not prompt the user for explicit consent before deleting data from the Azure Backup vault. + + SwitchParameter + + + Container + + The Windows Server or Azure virtual machine that should be unregistered. + + AzureBackupContainer + + + Profile + + Non-mandatory AzureProfile input object + + AzureProfile + + + + + + Force + + When applied to an AzureBackupContainer of type Windows, this will not prompt the user for explicit consent before deleting data from the Azure Backup vault. + + SwitchParameter + + SwitchParameter + + + + + + Container + + The Windows Server or Azure virtual machine that should be unregistered. + + AzureBackupContainer + + AzureBackupContainer + + + + + + Profile + + Non-mandatory AzureProfile input object + + AzureProfile + + AzureProfile + + + + + + + + + Container of type [AzureBackupContainer] + + + + + This section details out the type of the objects that you can pipe to the cmdlet. + + + + + + + AzureBackupJob +- For containers of type Windows, the return value is $null + + + + + This section details out the type of the objects that the cmdlet emits. + + + + + + + + + None + + + + + -------------------------- Unregister a Windows Server with user prompt -------------------------- + + PS C:\> + + $c = Get-AzureBackupContainer -vault $v -type Windows -name "server1.contoso.com" +PS C:\> Unregister-AzureBackupContainer -container $c[0] + + The user first gets the container that needs to be unregistered using the Get-AzureBackupContainer commandlet. This container object is passed to the unregister commandlet. This unregisters the specified Windows Server from the Azure Backup vault. + + + Unregister Server +This operation will delete all data in the backup vault that is associated with the server. Are you sure you want to unregister the server? +[] Yes [] No [?] Help (default is "No"): Yes + + + + + + + + + + + -------------------------- Unregister a Windows Server without confirmation prompt -------------------------- + + PS C:\> + + Unregister-AzureBackupContainer -container $c –force + + The -Force option does not ask the user for confirmation before deleting the data and unregistering the server. + + + None + + + + + + + + + + + + + Get-AzureBackupContainer + + + + \ No newline at end of file diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Microsoft.Azure.Commands.AzureBackup.format.ps1xml b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Microsoft.Azure.Commands.AzureBackup.format.ps1xml index ab415da71864..500adb8d49be 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Microsoft.Azure.Commands.AzureBackup.format.ps1xml +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Microsoft.Azure.Commands.AzureBackup.format.ps1xml @@ -37,6 +37,43 @@ - + + + Microsoft.Azure.Commands.AzureBackup.Models.AzureBackupContainer + + Microsoft.Azure.Commands.AzureBackup.Models.AzureBackupContainer + + + + + + 60 + + + + 18 + + + + 18 + + + + + + + Name + + + ContainerType + + + Status + + + + + + diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupBaseObjects.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupBaseObjects.cs index f427757a46b8..ff6434c7eab8 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupBaseObjects.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupBaseObjects.cs @@ -12,6 +12,10 @@ // limitations under the License. // ---------------------------------------------------------------------------------- +using Microsoft.Azure.Commands.AzureBackup.Helpers; +using Microsoft.Azure.Management.BackupServices.Models; +using System; + namespace Microsoft.Azure.Commands.AzureBackup.Models { public class AzureBackupVaultContextObject @@ -43,4 +47,28 @@ public AzureBackupVaultContextObject(string resourceGroupName, string resourceNa public AzureBackupVaultContextObject(AzurePSBackupVault vault) : this(vault.ResourceGroupName, vault.Name, vault.Region) { } } + + /// + /// This class encapsulates all the properties of the container object + /// that are needed by higher level objects (data source, recovery point etc). + /// + public class AzureBackupContainerContextObject : AzureBackupVaultContextObject + { + /// + /// Type of the Azure Backup container + /// + public string ContainerType { get; set; } + + public AzureBackupContainerContextObject() + : base() + { + } + + public AzureBackupContainerContextObject(AzurePSBackupVault vault, MarsContainerResponse marsContainerResponse) + : base(vault) + { + ContainerType = ContainerHelpers.GetContainerType(marsContainerResponse.Properties.CustomerType).ToString(); + //ContainerUniqueName = marsContainerResponse.UniqueName; + } + } } diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupContainer.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupContainer.cs new file mode 100644 index 000000000000..eba87adff331 --- /dev/null +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupContainer.cs @@ -0,0 +1,55 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using Microsoft.Azure.Commands.AzureBackup.Helpers; +using Microsoft.Azure.Management.BackupServices.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Microsoft.Azure.Commands.AzureBackup.Models +{ + /// + /// Represents Azure Backup Container + /// + public class AzureBackupContainer : AzureBackupContainerContextObject + { + /// + /// Resource name of the resource (ex: resource name of the VM) being managed by the Azure Backup service. + /// + public string Name { get; set; } + + /// + /// Id of the container + /// + public long Id { get; set; } + + /// + /// Status of registration of the container + /// + public string Status { get; set; } + + public AzureBackupContainer() : base() { } + + public AzureBackupContainer(AzurePSBackupVault vault, MarsContainerResponse marsContainerResponse) + : base(vault, marsContainerResponse) + { + Name = marsContainerResponse.Properties.FriendlyName; + Id = marsContainerResponse.Properties.ContainerId; + Status = AzureBackupContainerRegistrationStatus.Registered.ToString(); + } + } +} diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupEnums.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupEnums.cs index 79cc0f9b20c0..332fb487024c 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupEnums.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Models/AzureBackupEnums.cs @@ -19,4 +19,21 @@ public enum AzureBackupVaultStorageType GeoRedundant = 1, LocallyRedundant, } + + public enum AzureBackupContainerType + { + Windows = 1, + SCDPM, + } + + public enum AzureBackupContainerStatusInput + { + Registering = 1, + Registered, + } + + public enum AzureBackupContainerRegistrationStatus + { + Registered = 1, + } } diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Properties/Resources.Designer.cs b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Properties/Resources.Designer.cs index 58372d895579..515623e43787 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Properties/Resources.Designer.cs +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Properties/Resources.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.18449 +// Runtime Version:4.0.30319.34014 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -61,20 +61,29 @@ internal Resources() { } /// - /// Looks up a localized string similar to The specified Azure Virtual Machine Not Found.. + /// Looks up a localized string similar to The specified resource does not exist.. /// - internal static string AzureVMNotFound { + internal static string ResourceNotFoundMessage { get { - return ResourceManager.GetString("AzureVMNotFound", resourceCulture); + return ResourceManager.GetString("ResourceNotFoundMessage", resourceCulture); } } /// - /// Looks up a localized string similar to The specified resource does not exist.. + /// Looks up a localized string similar to Unregister Server. /// - internal static string ResourceNotFoundMessage { + internal static string UnregisterServerCaption { get { - return ResourceManager.GetString("ResourceNotFoundMessage", resourceCulture); + return ResourceManager.GetString("UnregisterServerCaption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This operation will delete all data in the backup vault that is associated with the server. Are you sure you want to unregister the server?. + /// + internal static string UnregisterServerMessage { + get { + return ResourceManager.GetString("UnregisterServerMessage", resourceCulture); } } } diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Properties/Resources.resx b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Properties/Resources.resx index 73ab213136b1..3abfe5b400d9 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/Properties/Resources.resx +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/Properties/Resources.resx @@ -117,10 +117,13 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - The specified Azure Virtual Machine Not Found. - The specified resource does not exist. + + Unregister Server + + + This operation will delete all data in the backup vault that is associated with the server. Are you sure you want to unregister the server? + \ No newline at end of file diff --git a/src/ResourceManager/AzureBackup/Commands.AzureBackup/packages.config b/src/ResourceManager/AzureBackup/Commands.AzureBackup/packages.config index 7cf80c93199a..8123d7359cfb 100644 --- a/src/ResourceManager/AzureBackup/Commands.AzureBackup/packages.config +++ b/src/ResourceManager/AzureBackup/Commands.AzureBackup/packages.config @@ -4,7 +4,7 @@ - + diff --git a/src/ResourceManager/Commerce/Commands.UsageAggregates/Microsoft.Azure.Commands.UsageAggregates.Format.ps1xml b/src/ResourceManager/Commerce/Commands.UsageAggregates/Microsoft.Azure.Commands.UsageAggregates.Format.ps1xml index 835a5678e63f..ccbdb75f33cc 100644 --- a/src/ResourceManager/Commerce/Commands.UsageAggregates/Microsoft.Azure.Commands.UsageAggregates.Format.ps1xml +++ b/src/ResourceManager/Commerce/Commands.UsageAggregates/Microsoft.Azure.Commands.UsageAggregates.Format.ps1xml @@ -27,11 +27,23 @@ - + Left - + + Left + + + + Left + + + + Left + + + Left @@ -42,6 +54,15 @@ + + $_.Properties.UsageStartTime + + + $_.Properties.UsageEndTime + + + $_.Properties.InfoFields.Project + $_.Properties.MeterCategory diff --git a/src/ResourceManager/Commerce/Commands.UsageAggregates/Microsoft.Azure.Commands.UsageAggregates.dll-help.xml b/src/ResourceManager/Commerce/Commands.UsageAggregates/Microsoft.Azure.Commands.UsageAggregates.dll-help.xml index 16236926b65d..e87a1ae94781 100644 --- a/src/ResourceManager/Commerce/Commands.UsageAggregates/Microsoft.Azure.Commands.UsageAggregates.dll-help.xml +++ b/src/ResourceManager/Commerce/Commands.UsageAggregates/Microsoft.Azure.Commands.UsageAggregates.dll-help.xml @@ -1,204 +1,213 @@ - - - - - Get-UsageAggregates - - Enables you to query aggregate Azure subscription consumption data. - - - - - Get - UsageAggregates - - - - -The Get-UsageAggregation cmdlet to query aggregate Azure subscription consumption data by: -• Start and end date/time -• Aggregation granularity (ie: daily, hourly) -• Instance level detail (ie: for multiple instances of the same resource) -For more information, see Azure Billing REST API Reference (https://msdn.microsoft.com/library/azure/1ea5b323-54bb-423d-916f-190de96c6a3c) at the Microsoft Developer Network. - - - - Get-UsageAggregates - - ReportedStartTime - - - - DateTime - - - ReportedEndTime - - - - DateTime - - - AggregationGranularity - - - - AggregationGranularity - - - ShowDetails - - - - Boolean - - - ContinuationToken - - - - String - - - Profile - - - - AzureProfile - - - - - - ReportedStartTime - - - - DateTime - - DateTime - - - - - - ReportedEndTime - - - - DateTime - - DateTime - - - - - - AggregationGranularity - - - - AggregationGranularity - - AggregationGranularity - - - - - - ShowDetails - - - - Boolean - - Boolean - - - - - - ContinuationToken - - - - String - - String - - - - - - Profile - - - - AzureProfile - - AzureProfile - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -------------------------- Example 1: Retrieves data for subscription -------------------------- - - PS C:\> - - PS C:\>Get-UsageAggregates -ReportedStartTime "5/2/2015" -ReportedEndTime "5/5/2015" - - The final command retrieves the usage data for the subscription for the specificed dates of 5/2/2015 and 5/5/2015. - - - - - - - - - - - - - - - - + + + + + + Get-UsageAggregates + + Enables you to query aggregated Azure subscription consumption data based on when the data was reported. + + + + + Get + UsageAggregates + + + + + The Get-UsageAggregation cmdlet queries aggregated Azure subscription consumption data by: + • Start and end date/time of when the usage was reported + • Aggregation granularity (ie: daily, hourly) + • Instance level detail (ie: for multiple instances of the same resource) + + For consistent results, the returned data is based on when it was reported by the Azure resource. + + For more information, see Azure Billing REST API Reference (https://msdn.microsoft.com/library/azure/1ea5b323-54bb-423d-916f-190de96c6a3c) at the Microsoft Developer Network.</Description> + + + + + Get-UsageAggregates + + ReportedStartTime + + Set ReportedStartTime to valid dateTime values. Please note that this datetimeOffset value represents the timestamp at which the resource usage was recorded within the Azure billing system. As Azure is a distributed system, spanning across 19 datacenters around the world, there is bound to be a delay between the resource usage time (when the resource was actually consumed) and the resource usage reported time (when the usage event reached the billing system) and callers need a predictable way to get all usage events for a subscription for a given time period. For that reason, we ask callers to query by Reported Time to ensure that they get all the usage events reported within a specific time period within the billing system. Even though the query is made with the Reported Time, the usage response is aggregated by the resource usage time, which is the useful pivot for callers. + + DateTime + + + ReportedEndTime + + Set ReportedEndTime to valid dateTime value. Please note that this datetimeOffset value represents the timestamp at which the resource usage was recorded within the Azure billing system. As Azure is a distributed system, spanning across 19 datacenters around the world, there is bound to be a delay between the resource usage time (when the resource was actually consumed) and the resource usage reported time (when the usage event reached the billing system) and callers need a predictable way to get all usage events for a subscription for a given time period. For that reason, we ask callers to query by Reported Time to ensure that they get all the usage events reported within a specific time period within the billing system. Even though the query is made with the Reported Time, the usage response is aggregated by the resource usage time, which is the useful pivot for callers. + + DateTime + + + AggregationGranularity + + Set AggregationGranularity to either ‘Daily’ or ‘Hourly’. This is an optional parameter with two discrete potential values: Daily and Hourly. As the values suggest, the former one returns the data in daily granularity whereas the latter one is hourly resolution. Daily is the default. + + AggregationGranularity + + + ShowDetails + + Set ShowDetails to either true or false. This is an optional Boolean flag, which can be configured to specify whether the caller wants instance-level details with the usage data. By default, this is set to true. By setting this flag to false, there will be fewer aggregates returned by the API, as the service will do server-side aggregation. For example, if you are running 3 websites (web1, web2, web3), by default you will get 3 line items for website consumption. If you specify showDetails = false, then we will do further aggregation and provide a single line item for website consumption for that particular time period. Setting this flag to false, collapses all the data for the same subscriptionId, meterId, usageStartTime and usageEndTime to be single data aggregate only. + + Boolean + + + ContinuationToken + + Set ContinuationToken to the continuation token string as retrieved from the response body in the previous call. This is the bookmark for progress when you are working with a large result set. Usage API responses are paged with continuation tokens, and this parameter expects the value of the token retrieved from the last call to Usage API provider. If not present, the data is retrieved from the beginning of the day/hour (based on the granularity) passed in. The recommended way to page through response is to follow the next link in the response. + + String + + + Profile + + + + AzureProfile + + + + + + ReportedStartTime + + Set ReportedStartTime to valid dateTime values. Please note that this datetimeOffset value represents the timestamp at which the resource usage was recorded within the Azure billing system. As Azure is a distributed system, spanning across 19 datacenters around the world, there is bound to be a delay between the resource usage time (when the resource was actually consumed) and the resource usage reported time (when the usage event reached the billing system) and callers need a predictable way to get all usage events for a subscription for a given time period. For that reason, we ask callers to query by Reported Time to ensure that they get all the usage events reported within a specific time period within the billing system. Even though the query is made with the Reported Time, the usage response is aggregated by the resource usage time, which is the useful pivot for callers. + + DateTime + + DateTime + + + + + + ReportedEndTime + + Set ReportedEndTime to valid dateTime value. Please note that this datetimeOffset value represents the timestamp at which the resource usage was recorded within the Azure billing system. As Azure is a distributed system, spanning across 19 datacenters around the world, there is bound to be a delay between the resource usage time (when the resource was actually consumed) and the resource usage reported time (when the usage event reached the billing system) and callers need a predictable way to get all usage events for a subscription for a given time period. For that reason, we ask callers to query by Reported Time to ensure that they get all the usage events reported within a specific time period within the billing system. Even though the query is made with the Reported Time, the usage response is aggregated by the resource usage time, which is the useful pivot for callers. + + DateTime + + DateTime + + + + + + AggregationGranularity + + Set AggregationGranularity to either ‘Daily’ or ‘Hourly’. This is an optional parameter with two discrete potential values: Daily and Hourly. As the values suggest, the former one returns the data in daily granularity whereas the latter one is hourly resolution. Daily is the default. + + AggregationGranularity + + AggregationGranularity + + + + + + ShowDetails + + Set ShowDetails to either true or false. This is an optional Boolean flag, which can be configured to specify whether the caller wants instance-level details with the usage data. By default, this is set to true. By setting this flag to false, there will be fewer aggregates returned by the API, as the service will do server-side aggregation. For example, if you are running 3 websites (web1, web2, web3), by default you will get 3 line items for website consumption. If you specify showDetails = false, then we will do further aggregation and provide a single line item for website consumption for that particular time period. Setting this flag to false, collapses all the data for the same subscriptionId, meterId, usageStartTime and usageEndTime to be single data aggregate only. + + Boolean + + Boolean + + + + + + ContinuationToken + + Set ContinuationToken to the continuation token string as retrieved from the response body in the previous call. This is the bookmark for progress when you are working with a large result set. Usage API responses are paged with continuation tokens, and this parameter expects the value of the token retrieved from the last call to Usage API provider. If not present, the data is retrieved from the beginning of the day/hour (based on the granularity) passed in. The recommended way to page through response is to follow the next link in the response. + + String + + String + + + + + + Profile + + + + AzureProfile + + AzureProfile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -------------------------- Example 1: Retrieves data for subscription -------------------------- + + PS C:\> + + PS C:\>Get-UsageAggregates -ReportedStartTime "5/2/2015" -ReportedEndTime "5/5/2015" + + The final command retrieves the reported usage data for the subscription between the specified dates of 5/2/2015 and 5/5/2015. + + + + + + + + + + + + + + + + Azure Billing REST API Reference + https://msdn.microsoft.com/library/azure/1ea5b323-54bb-423d-916f-190de96c6a3c + + + \ No newline at end of file diff --git a/src/ResourceManager/Resources/Commands.Resources/AzureResourceManager.psd1 b/src/ResourceManager/Resources/Commands.Resources/AzureResourceManager.psd1 index 576bd7e41cab..f953bad7a358 100644 --- a/src/ResourceManager/Resources/Commands.Resources/AzureResourceManager.psd1 +++ b/src/ResourceManager/Resources/Commands.Resources/AzureResourceManager.psd1 @@ -1,137 +1,138 @@ -# -# Module manifest for module 'Microsoft.Azure.Commands.Resources' -# -# Generated by: Microsoft Corporation -# -# Generated on: 4/01/2014 -# - -@{ - -# Version number of this module. -ModuleVersion = '0.9.5' - -# ID used to uniquely identify this module -GUID = '81d522a4-6e5d-4105-8f58-376204c47458' - -# Author of this module -Author = 'Microsoft Corporation' - -# Company or vendor of this module -CompanyName = 'Microsoft Corporation' - -# Copyright statement for this module -Copyright = '© Microsoft Corporation. All rights reserved.' - -# Description of the functionality provided by this module -Description = '' - -# Minimum version of the Windows PowerShell engine required by this module -PowerShellVersion = '3.0' - -# Name of the Windows PowerShell host required by this module -PowerShellHostName = '' - -# Minimum version of the Windows PowerShell host required by this module -PowerShellHostVersion = '' - -# Minimum version of the .NET Framework required by this module -DotNetFrameworkVersion = '4.0' - -# Minimum version of the common language runtime (CLR) required by this module -CLRVersion='4.0' - -# Processor architecture (None, X86, Amd64, IA64) required by this module -ProcessorArchitecture = 'None' - -# Modules that must be imported into the global environment prior to importing this module -RequiredModules = @() - -# Assemblies that must be loaded prior to importing this module -RequiredAssemblies = @() - -# Script files (.ps1) that are run in the caller's environment prior to importing this module -ScriptsToProcess = @() - -# Type files (.ps1xml) to be loaded when importing this module -TypesToProcess = @( - '.\Compute\Microsoft.Azure.Commands.Compute.Types.ps1xml' -) - -# Format files (.ps1xml) to be loaded when importing this module -FormatsToProcess = @( - '.\Resources\Microsoft.Azure.Commands.Resources.format.ps1xml', - '.\Tags\Microsoft.Azure.Commands.Tags.format.ps1xml', - '.\Resources\Microsoft.WindowsAzure.Commands.Profile.format.ps1xml', - '.\DataFactories\Microsoft.Azure.Commands.DataFactories.format.ps1xml', - '.\RedisCache\Microsoft.Azure.Commands.RedisCache.format.ps1xml', - '.\Batch\Microsoft.Azure.Commands.Batch.format.ps1xml', - '.\KeyVault\Microsoft.Azure.Commands.KeyVault.format.ps1xml', - '.\StreamAnalytics\Microsoft.Azure.Commands.StreamAnalytics.format.ps1xml', - '.\Compute\Microsoft.Azure.Commands.Compute.format.ps1xml', - '.\Compute\Microsoft.Azure.Commands.Compute.format.generated.ps1xml', - '.\Network\Microsoft.Azure.Commands.Network.format.ps1xml', - '.\Storage\Microsoft.WindowsAzure.Commands.Storage.format.ps1xml', - '.\StorageManagement\Microsoft.Azure.Commands.Management.Storage.format.ps1xml', - '.\OperationalInsights\Microsoft.Azure.Commands.OperationalInsights.format.ps1xml', - '.\AzureBackup\Microsoft.Azure.Commands.AzureBackup.format.ps1xml' -) - -# Modules to import as nested modules of the module specified in ModuleToProcess -NestedModules = @( - '.\Automation\Microsoft.Azure.Commands.ResourceManager.Automation.dll', - '.\Resources\Microsoft.Azure.Commands.Resources.dll', - '.\Resources\Microsoft.WindowsAzure.Commands.Profile.dll', - '.\Tags\Microsoft.Azure.Commands.Tags.dll', - '.\Sql\Microsoft.Azure.Commands.Sql.dll', - '.\DataFactories\Microsoft.Azure.Commands.DataFactories.dll', - '.\RedisCache\Microsoft.Azure.Commands.RedisCache.dll', - '.\Batch\Microsoft.Azure.Commands.Batch.dll', - '.\Dns\Microsoft.Azure.Commands.Dns.dll', - '.\KeyVault\Microsoft.Azure.Commands.KeyVault.dll', - '.\TrafficManager\Microsoft.Azure.Commands.TrafficManager.dll', - '.\StreamAnalytics\Microsoft.Azure.Commands.StreamAnalytics.dll', - '.\Insights\Microsoft.Azure.Commands.Insights.dll', - '.\Websites\Microsoft.Azure.Commands.Websites.dll', - '.\Compute\Microsoft.Azure.Commands.Compute.dll', - '.\Network\Microsoft.Azure.Commands.Network.dll', - '.\Storage\Microsoft.WindowsAzure.Commands.Storage.dll', - '.\ResourceManager\Microsoft.Azure.Commands.ResourceManager.Cmdlets.dll', - '.\ApiManagement\Microsoft.Azure.Commands.ApiManagement.dll', - '.\StorageManagement\Microsoft.Azure.Commands.Management.Storage.dll', - '.\OperationalInsights\Microsoft.Azure.Commands.OperationalInsights.dll', - '.\UsageAggregates\Microsoft.Azure.Commands.UsageAggregates.dll', - '.\ApiManagement\Microsoft.Azure.Commands.ApiManagement.ServiceManagement.dll', - '.\AzureBackup\Microsoft.Azure.Commands.AzureBackup.dll' -) - -# Functions to export from this module -FunctionsToExport = '*' - -# Cmdlets to export from this module -CmdletsToExport = '*' - -# Variables to export from this module -VariablesToExport = '*' - -# Aliases to export from this module -AliasesToExport = @( - 'Get-AzureSqlDatabaseServerAuditingPolicy', - 'Remove-AzureSqlDatabaseServerAuditing', - 'Set-AzureSqlDatabaseServerAuditingPolicy', - 'Use-AzureSqlDatabaseServerAuditingPolicy', - 'Get-AzureStorageContainerAcl', - 'Start-CopyAzureStorageBlob', - 'Stop-CopyAzureStorageBlob' -) - -# List of all modules packaged with this module -ModuleList = @() - -# List of all files packaged with this module -FileList = @() - -# Private data to pass to the module specified in ModuleToProcess -PrivateData = '' - -} +# +# Module manifest for module 'Microsoft.Azure.Commands.Resources' +# +# Generated by: Microsoft Corporation +# +# Generated on: 4/01/2014 +# + +@{ + +# Version number of this module. +ModuleVersion = '0.9.5' + +# ID used to uniquely identify this module +GUID = '81d522a4-6e5d-4105-8f58-376204c47458' + +# Author of this module +Author = 'Microsoft Corporation' + +# Company or vendor of this module +CompanyName = 'Microsoft Corporation' + +# Copyright statement for this module +Copyright = '© Microsoft Corporation. All rights reserved.' + +# Description of the functionality provided by this module +Description = '' + +# Minimum version of the Windows PowerShell engine required by this module +PowerShellVersion = '3.0' + +# Name of the Windows PowerShell host required by this module +PowerShellHostName = '' + +# Minimum version of the Windows PowerShell host required by this module +PowerShellHostVersion = '' + +# Minimum version of the .NET Framework required by this module +DotNetFrameworkVersion = '4.0' + +# Minimum version of the common language runtime (CLR) required by this module +CLRVersion='4.0' + +# Processor architecture (None, X86, Amd64, IA64) required by this module +ProcessorArchitecture = 'None' + +# Modules that must be imported into the global environment prior to importing this module +RequiredModules = @() + +# Assemblies that must be loaded prior to importing this module +RequiredAssemblies = @() + +# Script files (.ps1) that are run in the caller's environment prior to importing this module +ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +TypesToProcess = @( + '.\Compute\Microsoft.Azure.Commands.Compute.Types.ps1xml' +) + +# Format files (.ps1xml) to be loaded when importing this module +FormatsToProcess = @( + '.\Resources\Microsoft.Azure.Commands.Resources.format.ps1xml', + '.\Tags\Microsoft.Azure.Commands.Tags.format.ps1xml', + '.\Resources\Microsoft.WindowsAzure.Commands.Profile.format.ps1xml', + '.\DataFactories\Microsoft.Azure.Commands.DataFactories.format.ps1xml', + '.\RedisCache\Microsoft.Azure.Commands.RedisCache.format.ps1xml', + '.\Batch\Microsoft.Azure.Commands.Batch.format.ps1xml', + '.\KeyVault\Microsoft.Azure.Commands.KeyVault.format.ps1xml', + '.\StreamAnalytics\Microsoft.Azure.Commands.StreamAnalytics.format.ps1xml', + '.\Compute\Microsoft.Azure.Commands.Compute.format.ps1xml', + '.\Compute\Microsoft.Azure.Commands.Compute.format.generated.ps1xml', + '.\Network\Microsoft.Azure.Commands.Network.format.ps1xml', + '.\Storage\Microsoft.WindowsAzure.Commands.Storage.format.ps1xml', + '.\StorageManagement\Microsoft.Azure.Commands.Management.Storage.format.ps1xml', + '.\OperationalInsights\Microsoft.Azure.Commands.OperationalInsights.format.ps1xml', + '.\AzureBackup\Microsoft.Azure.Commands.AzureBackup.format.ps1xml', + '.\UsageAggregates\Microsoft.Azure.Commands.UsageAggregates.Format.ps1xml' +) + +# Modules to import as nested modules of the module specified in ModuleToProcess +NestedModules = @( + '.\Automation\Microsoft.Azure.Commands.ResourceManager.Automation.dll', + '.\Resources\Microsoft.Azure.Commands.Resources.dll', + '.\Resources\Microsoft.WindowsAzure.Commands.Profile.dll', + '.\Tags\Microsoft.Azure.Commands.Tags.dll', + '.\Sql\Microsoft.Azure.Commands.Sql.dll', + '.\DataFactories\Microsoft.Azure.Commands.DataFactories.dll', + '.\RedisCache\Microsoft.Azure.Commands.RedisCache.dll', + '.\Batch\Microsoft.Azure.Commands.Batch.dll', + '.\Dns\Microsoft.Azure.Commands.Dns.dll', + '.\KeyVault\Microsoft.Azure.Commands.KeyVault.dll', + '.\TrafficManager\Microsoft.Azure.Commands.TrafficManager.dll', + '.\StreamAnalytics\Microsoft.Azure.Commands.StreamAnalytics.dll', + '.\Insights\Microsoft.Azure.Commands.Insights.dll', + '.\Websites\Microsoft.Azure.Commands.Websites.dll', + '.\Compute\Microsoft.Azure.Commands.Compute.dll', + '.\Network\Microsoft.Azure.Commands.Network.dll', + '.\Storage\Microsoft.WindowsAzure.Commands.Storage.dll', + '.\ResourceManager\Microsoft.Azure.Commands.ResourceManager.Cmdlets.dll', + '.\ApiManagement\Microsoft.Azure.Commands.ApiManagement.dll', + '.\StorageManagement\Microsoft.Azure.Commands.Management.Storage.dll', + '.\OperationalInsights\Microsoft.Azure.Commands.OperationalInsights.dll', + '.\UsageAggregates\Microsoft.Azure.Commands.UsageAggregates.dll', + '.\ApiManagement\Microsoft.Azure.Commands.ApiManagement.ServiceManagement.dll', + '.\AzureBackup\Microsoft.Azure.Commands.AzureBackup.dll' +) + +# Functions to export from this module +FunctionsToExport = '*' + +# Cmdlets to export from this module +CmdletsToExport = '*' + +# Variables to export from this module +VariablesToExport = '*' + +# Aliases to export from this module +AliasesToExport = @( + 'Get-AzureSqlDatabaseServerAuditingPolicy', + 'Remove-AzureSqlDatabaseServerAuditing', + 'Set-AzureSqlDatabaseServerAuditingPolicy', + 'Use-AzureSqlDatabaseServerAuditingPolicy', + 'Get-AzureStorageContainerAcl', + 'Start-CopyAzureStorageBlob', + 'Stop-CopyAzureStorageBlob' +) + +# List of all modules packaged with this module +ModuleList = @() + +# List of all files packaged with this module +FileList = @() + +# Private data to pass to the module specified in ModuleToProcess +PrivateData = '' + +} diff --git a/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/App.config b/src/ServiceManagement/StorSimple/Commands.StorSimple.Test/app.config similarity index 100% rename from src/ServiceManagement/StorSimple/Commands.StorSimple.Test/App.config rename to src/ServiceManagement/StorSimple/Commands.StorSimple.Test/app.config