@@ -180,33 +180,33 @@ public static void SetTestSettings()
180
180
CredentialHelper . GetTestSettings ( Resource . TestSettings ) ;
181
181
182
182
vmPowershellCmdlets . RemoveAzureSubscriptions ( ) ;
183
- if ( vmPowershellCmdlets . GetAzureEnvironment ( "ussouth" ) . Count > 0 )
183
+ var ussouthEnv = vmPowershellCmdlets . GetAzureEnvironment ( "ussouth" ) ;
184
+ if ( ussouthEnv != null && ussouthEnv . Count > 0 )
184
185
{
185
186
Console . WriteLine ( "Removing ussouth environment..." ) ;
186
187
vmPowershellCmdlets . RunPSScript ( "Remove-AzureEnvironment -Name ussouth -Force" ) ;
187
188
}
188
189
189
- List < AzureEnvironment > environments = vmPowershellCmdlets . GetAzureEnvironment ( ) ;
190
+ List < PSAzureEnvironment > environments = vmPowershellCmdlets . GetAzureEnvironment ( ) ;
190
191
var serviceManagementUrl = GetServiceManagementUrl ( CredentialHelper . PublishSettingsFile ) ;
191
192
192
193
foreach ( var env in environments )
193
194
{
194
- var envServiceManagementUrl = ( string ) env . Endpoints [ AzureEnvironment . Endpoint . ServiceManagement ] ;
195
- if ( ! string . IsNullOrEmpty ( envServiceManagementUrl ) )
195
+ if ( ! string . IsNullOrEmpty ( env . ServiceManagementUrl ) )
196
196
{
197
- if ( envServiceManagementUrl . Equals ( serviceManagementUrl ) )
197
+ if ( env . ServiceManagementUrl . Equals ( serviceManagementUrl ) )
198
198
{
199
199
currentEnvName = env . Name ;
200
200
var curEnv = vmPowershellCmdlets . GetAzureEnvironment ( currentEnvName ) [ 0 ] ;
201
201
Console . WriteLine ( "Using the existing environment: {0}" , currentEnvName ) ;
202
- Console . WriteLine ( "PublichSettingsFileUrl: {0}" , curEnv . GetEndpoint ( AzureEnvironment . Endpoint . PublishSettingsFileUrl ) ) ;
203
- Console . WriteLine ( "ServiceManagement: {0}" , curEnv . GetEndpoint ( AzureEnvironment . Endpoint . ServiceManagement ) ) ;
204
- Console . WriteLine ( "ManagementPortalUrl: {0}" , curEnv . GetEndpoint ( AzureEnvironment . Endpoint . ManagementPortalUrl ) ) ;
205
- Console . WriteLine ( "ActiveDirectory: {0}" , curEnv . GetEndpoint ( AzureEnvironment . Endpoint . ActiveDirectory ) ) ;
206
- Console . WriteLine ( "ActiveDirectoryServiceEndpointResourceId: {0}" , curEnv . GetEndpoint ( AzureEnvironment . Endpoint . ActiveDirectoryServiceEndpointResourceId ) ) ;
207
- Console . WriteLine ( "ResourceManager: {0}" , curEnv . GetEndpoint ( AzureEnvironment . Endpoint . ResourceManager ) ) ;
208
- Console . WriteLine ( "Gallery: {0}" , curEnv . GetEndpoint ( AzureEnvironment . Endpoint . Gallery ) ) ;
209
- Console . WriteLine ( "Graph: {0}" , curEnv . GetEndpoint ( AzureEnvironment . Endpoint . Graph ) ) ;
202
+ Console . WriteLine ( "PublichSettingsFileUrl: {0}" , curEnv . PublishSettingsFileUrl ) ;
203
+ Console . WriteLine ( "ServiceManagement: {0}" , curEnv . ServiceManagementUrl ) ;
204
+ Console . WriteLine ( "ManagementPortalUrl: {0}" , curEnv . ManagementPortalUrl ) ;
205
+ Console . WriteLine ( "ActiveDirectory: {0}" , curEnv . ActiveDirectoryAuthority ) ;
206
+ Console . WriteLine ( "ActiveDirectoryServiceEndpointResourceId: {0}" , curEnv . ActiveDirectoryServiceEndpointResourceId ) ;
207
+ Console . WriteLine ( "ResourceManager: {0}" , curEnv . ResourceManagerUrl ) ;
208
+ Console . WriteLine ( "Gallery: {0}" , curEnv . GalleryUrl ) ;
209
+ Console . WriteLine ( "Graph: {0}" , curEnv . GalleryUrl ) ;
210
210
break ;
211
211
}
212
212
}
@@ -227,14 +227,14 @@ public static void SetTestSettings()
227
227
-GalleryEndpoint {7} `
228
228
-GraphEndpoint {8}" ,
229
229
TempEnvName ,
230
- prodEnv . GetEndpoint ( AzureEnvironment . Endpoint . PublishSettingsFileUrl ) ,
230
+ prodEnv . PublishSettingsFileUrl ,
231
231
serviceManagementUrl ,
232
- prodEnv . GetEndpoint ( AzureEnvironment . Endpoint . ManagementPortalUrl ) ,
233
- prodEnv . GetEndpoint ( AzureEnvironment . Endpoint . ActiveDirectory ) ,
234
- prodEnv . GetEndpoint ( AzureEnvironment . Endpoint . ActiveDirectoryServiceEndpointResourceId ) ,
235
- prodEnv . GetEndpoint ( AzureEnvironment . Endpoint . ResourceManager ) ,
236
- prodEnv . GetEndpoint ( AzureEnvironment . Endpoint . Gallery ) ,
237
- prodEnv . GetEndpoint ( AzureEnvironment . Endpoint . Graph ) ) ) ;
232
+ prodEnv . ManagementPortalUrl ,
233
+ prodEnv . ActiveDirectoryAuthority ,
234
+ prodEnv . ActiveDirectoryServiceEndpointResourceId ,
235
+ prodEnv . ResourceManagerUrl ,
236
+ prodEnv . GalleryUrl ,
237
+ prodEnv . GalleryUrl ) ) ;
238
238
239
239
vmPowershellCmdlets . ImportAzurePublishSettingsFile ( CredentialHelper . PublishSettingsFile , TempEnvName ) ;
240
240
}
0 commit comments