Skip to content

Commit b22a7e4

Browse files
committed
Make tenatadmin creds mandatory & update the README
1 parent 33826dc commit b22a7e4

File tree

2 files changed

+45
-50
lines changed

2 files changed

+45
-50
lines changed

CanaryValidator/Canary.Tests.ps1

+9-7
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ param (
1616
[ValidateNotNullOrEmpty()]
1717
[pscredential]$ServiceAdminCredentials,
1818
[parameter(HelpMessage="Tenant ARM endpoint")]
19-
[Parameter(ParameterSetName="default", Mandatory=$false)]
19+
[Parameter(ParameterSetName="default", Mandatory=$true)]
2020
[Parameter(ParameterSetName="tenant", Mandatory=$true)]
2121
[ValidateNotNullOrEmpty()]
2222
[string]$TenantArmEndpoint,
2323
[parameter(HelpMessage="Tenant administrator account credentials from the Azure Stack active directory")]
24-
[Parameter(ParameterSetName="default", Mandatory=$false)]
24+
[Parameter(ParameterSetName="default", Mandatory=$true)]
2525
[Parameter(ParameterSetName="tenant", Mandatory=$true)]
2626
[ValidateNotNullOrEmpty()]
2727
[pscredential]$TenantAdminCredentials,
@@ -200,6 +200,8 @@ while ($runCount -le $NumberOfIterations)
200200
}
201201
}
202202

203+
if ($resLocation = (Get-AzsLocation -ErrorAction SilentlyContinue).Name) {if ($resLocation -ne $ResourceLocation) {$ResourceLocation = $resLocation}}
204+
203205
Invoke-Usecase -Name 'ListFabricResourceProviderInfo' -Description "List FabricResourceProvider(FRP) information like storage shares, capacity, logical networks etc." -UsecaseBlock `
204206
{
205207
Invoke-Usecase -Name 'GetAzureStackInfraRole' -Description "List all infrastructure roles" -UsecaseBlock `
@@ -1136,16 +1138,16 @@ while ($runCount -le $NumberOfIterations)
11361138
{
11371139
Invoke-Usecase -Name 'DeleteTenantSubscriptions' -Description "Remove all the tenant related subscriptions" -UsecaseBlock `
11381140
{
1139-
if ($subs = Get-AzureRmTenantSubscription -ErrorAction Stop | Where-Object DisplayName -eq $tenantSubscriptionName)
1141+
if ($subs = Get-AzsSubscription -ErrorAction Stop | Where-Object DisplayName -eq $tenantSubscriptionName)
11401142
{
1141-
Remove-AzureRmTenantSubscription -TargetSubscriptionId $subs.SubscriptionId -ErrorAction Stop
1143+
Remove-AzsSubscription -TargetSubscriptionId $subs.SubscriptionId -ErrorAction Stop
11421144
}
1143-
if ($subs = Get-AzureRmTenantSubscription -ErrorAction Stop | Where-Object DisplayName -eq $canaryDefaultTenantSubscription)
1145+
if ($subs = Get-AzsSubscription -ErrorAction Stop | Where-Object DisplayName -eq $canaryDefaultTenantSubscription)
11441146
{
1145-
Remove-AzureRmTenantSubscription -TargetSubscriptionId $subs.SubscriptionId -ErrorAction Stop
1147+
Remove-AzsSubscription -TargetSubscriptionId $subs.SubscriptionId -ErrorAction Stop
11461148
}
11471149
$sw = [system.diagnostics.stopwatch]::startNew()
1148-
while ((Get-AzureRmTenantSubscription -ErrorAction Stop | Where-Object DisplayName -eq $tenantSubscriptionName) -or (Get-AzureRmTenantSubscription -ErrorAction Stop | Where-Object DisplayName -eq $canaryDefaultTenantSubscription))
1150+
while ((Get-AzsSubscription -ErrorAction Stop | Where-Object DisplayName -eq $tenantSubscriptionName) -or (Get-AzsSubscription -ErrorAction Stop | Where-Object DisplayName -eq $canaryDefaultTenantSubscription))
11491151
{
11501152
if ($sw.Elapsed.Seconds -gt 600) {break}
11511153
Start-Sleep -Seconds 30

CanaryValidator/README.md

+36-43
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,7 @@ $TenantAdminCreds = New-Object System.Management.Automation.PSCredential "<Tena
3434
$ServiceAdminCreds = New-Object System.Management.Automation.PSCredential "<Service Admin username>", (ConvertTo-SecureString "<Service Admin password>" -AsPlainText -Force)
3535
.\Canary.Tests.ps1 -TenantID "<TenantID from Azure Active Directory>" -AdminArmEndpoint "<Administrative ARM endpoint>" -ServiceAdminCredentials $ServiceAdminCreds -TenantArmEndpoint "<Tenant ARM endpoint>" -TenantAdminCredentials $TenantAdminCreds -WindowsISOPath "<path where the WS2016 ISO is present>"
3636
```
37-
38-
## To execute Canary as Service Administrator
39-
40-
```powershell
41-
# Install-Module -Name 'AzureRm.Bootstrapper' -Scope CurrentUser
42-
# Install-AzureRmProfile -profile '2017-03-09-profile' -Force -Scope CurrentUser
43-
# Install-Module -Name AzureStack -RequiredVersion 1.2.10 -Scope CurrentUser
44-
$ServiceAdminCreds = New-Object System.Management.Automation.PSCredential "<Service Admin username>", (ConvertTo-SecureString "<Service Admin password>" -AsPlainText -Force)
45-
.\Canary.Tests.ps1 -TenantID "<TenantID from Azure Active Directory>" -AdminArmEndpoint "<Administrative ARM endpoint>" -ServiceAdminCredentials $ServiceAdminCreds
46-
```
37+
## NOTE: When running Canary against ADFS environment, please make sure to pass in the TenantAdminObjectId parameter
4738

4839
## To list the usecases in Canary
4940

@@ -60,23 +51,24 @@ List of scenarios in Canary:
6051
LoginToAzureStackEnvAsSvcAdmin
6152
SelectDefaultProviderSubscription
6253
ListFabricResourceProviderInfo
63-
|--GetAzureStackInfraRole
64-
|--GetAzureStackInfraRoleInstance
65-
|--GetAzureStackLogicalNetwork
66-
|--GetAzureStackStorageCapacity
67-
|--GetAzureStackStorageShare
68-
|--GetAzureStackScaleUnit
69-
|--GetAzureStackScaleUnitNode
70-
|--GetAzureStackIPPool
71-
|--GetAzureStackMacPool
72-
|--GetAzureStackGatewayPool
73-
|--GetAzureStackSLBMux
74-
|--GetAzureStackGateway
54+
|-- GetAzureStackInfraRole
55+
|-- GetAzureStackInfraRoleInstance
56+
|-- GetAzureStackLogicalNetwork
57+
|-- GetAzureStackStorageCapacity
58+
|-- GetAzureStackInfrastructureShare
59+
|-- GetAzureStackScaleUnit
60+
|-- GetAzureStackScaleUnitNode
61+
|-- GetAzureStackIPPool
62+
|-- GetAzureStackMacPool
63+
|-- GetAzureStackGatewayPool
64+
|-- GetAzureStackSLBMux
65+
|-- GetAzureStackGateway
7566
ListHealthResourceProviderAlerts
76-
|--GetAzureStackAlert
67+
|-- GetAzureStackAlert
7768
ListUpdatesResourceProviderInfo
78-
|--GetAzureStackUpdateSummary
79-
|--GetAzureStackUpdateToApply
69+
|-- GetAzureStackUpdateSummary
70+
|-- GetAzureStackUpdateToApply
71+
UploadLinuxImageToPIR
8072
CreateTenantAzureStackEnv
8173
CreateResourceGroupForTenantSubscription
8274
CreateTenantPlan
@@ -85,15 +77,15 @@ List of scenarios in Canary:
8577
LoginToAzureStackEnvAsTenantAdmin
8678
CreateTenantSubscription
8779
RoleAssignmentAndCustomRoleDefinition
88-
|--ListAssignedRoles
89-
|--ListExistingRoleDefinitions
90-
|--GetProviderOperations
91-
|--AssignReaderRole
92-
|--VerifyReaderRoleAssignment
93-
|--RemoveReaderRoleAssignment
94-
|--CustomRoleDefinition
95-
|--ListRoleDefinitionsAfterCustomRoleCreation
96-
|--RemoveCustomRoleDefinition
80+
|-- ListAssignedRoles
81+
|-- ListExistingRoleDefinitions
82+
|-- GetProviderOperations
83+
|-- AssignReaderRole
84+
|-- VerifyReaderRoleAssignment
85+
|-- RemoveReaderRoleAssignment
86+
|-- CustomRoleDefinition
87+
|-- ListRoleDefinitionsAfterCustomRoleCreation
88+
|-- RemoveCustomRoleDefinition
9789
RegisterResourceProviders
9890
CreateResourceGroupForUtilities
9991
CreateStorageAccountForUtilities
@@ -108,13 +100,14 @@ List of scenarios in Canary:
108100
RetrieveResourceDeploymentTimes
109101
QueryTheVMsDeployed
110102
CheckVMCommunicationPreVMReboot
103+
TransmitMTUSizedPacketsBetweenTenantVMs
111104
AddDatadiskToVMWithPrivateIP
112-
|--StopDeallocateVMWithPrivateIPBeforeAddingDatadisk
113-
|--AddTheDataDiskToVMWithPrivateIP
114-
|--StartVMWithPrivateIPAfterAddingDatadisk
105+
|-- StopDeallocateVMWithPrivateIPBeforeAddingDatadisk
106+
|-- AddTheDataDiskToVMWithPrivateIP
107+
|-- StartVMWithPrivateIPAfterAddingDatadisk
115108
ApplyDataDiskCheckCustomScriptExtensionToVMWithPrivateIP
116-
|--CheckForExistingCustomScriptExtensionOnVMWithPrivateIP
117-
|--ApplyCustomScriptExtensionToVMWithPrivateIP
109+
|-- CheckForExistingCustomScriptExtensionOnVMWithPrivateIP
110+
|-- ApplyCustomScriptExtensionToVMWithPrivateIP
118111
RestartVMWithPublicIP
119112
StopDeallocateVMWithPrivateIP
120113
StartVMWithPrivateIP
@@ -125,10 +118,10 @@ List of scenarios in Canary:
125118
DeleteVMResourceGroup
126119
DeleteUtilitiesResourceGroup
127120
TenantRelatedcleanup
128-
|--DeleteTenantSubscriptions
129-
|--LoginToAzureStackEnvAsSvcAdminForCleanup
130-
|--RemoveLinuxImageFromPIR
131-
|--DeleteSubscriptionResourceGroup
121+
|-- DeleteTenantSubscriptions
122+
|-- LoginToAzureStackEnvAsSvcAdminForCleanup
123+
|-- RemoveLinuxImageFromPIR
124+
|-- DeleteSubscriptionResourceGroup
132125
```
133126

134127
## To exclude certain usecases from getting executed

0 commit comments

Comments
 (0)