Skip to content

Commit caaf87c

Browse files
authored
Merge branch 'release-5.0.0' into shiv-test-switch
2 parents 6724c4a + baab3b7 commit caaf87c

File tree

1,130 files changed

+93260
-207708
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,130 files changed

+93260
-207708
lines changed

setup/azurecmd.wxs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
33

4-
<?define productName="Microsoft Azure PowerShell - October 2017" ?>
4+
<?define productName="Microsoft Azure PowerShell - November 2017" ?>
55
<?define sourceDir="$(var.SolutionDir)..\src\Package\$(var.Configuration)" ?>
66
<?define caSourceDir="$(var.SolutionDir)setup\bin\$(var.Configuration)" ?>
77

8-
<?define version="4.4.1" ?>
8+
<?define version="5.0.0" ?>
99

1010
<Product Id="*"
1111
Name="$(var.productName)"

src/Common/Commands.Common/AzurePowerShell.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ public class AzurePowerShell
2626

2727
public const string AssemblyCopyright = "Copyright © Microsoft";
2828

29-
public const string AssemblyVersion = "4.4.1";
29+
public const string AssemblyVersion = "5.0.0";
3030

31-
public const string AssemblyFileVersion = "4.4.1";
31+
public const string AssemblyFileVersion = "5.0.0";
3232

3333
public const string ProfileFile = "AzureProfile.json";
3434

src/ResourceManager/AnalysisServices/AzureRM.AnalysisServices.psd1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#
1+
#
22
# Module manifest for module 'PSGet_AzureRM.AnalysisServices'
33
#
44
# Generated by: Microsoft Corporation
@@ -12,7 +12,7 @@
1212
# RootModule = ''
1313

1414
# Version number of this module.
15-
ModuleVersion = '0.4.7'
15+
ModuleVersion = '0.5.0'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()
@@ -27,7 +27,7 @@ Author = 'Microsoft Corporation'
2727
CompanyName = 'Microsoft Corporation'
2828

2929
# Copyright statement for this module
30-
Copyright = '© Microsoft Corporation. All rights reserved.'
30+
Copyright = '© Microsoft Corporation. All rights reserved.'
3131

3232
# Description of the functionality provided by this module
3333
Description = 'Microsoft Azure PowerShell - Analysis Services'
@@ -51,7 +51,7 @@ CLRVersion = '4.0'
5151
# ProcessorArchitecture = ''
5252

5353
# Modules that must be imported into the global environment prior to importing this module
54-
RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; ModuleVersion = '3.4.1'; })
54+
RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; ModuleVersion = '4.0.0'; })
5555

5656
# Assemblies that must be loaded prior to importing this module
5757
# RequiredAssemblies = @()

src/ResourceManager/AnalysisServices/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
* Fixed Synchronize-AzureAsInstance command to work with new AsAzure REST API for sync
2122

2223
## Version 0.4.7
2324

src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/Azure.AnalysisServices.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
@{
1010

1111
# Version number of this module.
12-
ModuleVersion = '0.4.7'
12+
ModuleVersion = '0.5.0'
1313

1414
# ID used to uniquely identify this module
1515
GUID = 'c717b5a4-1f1b-4a2f-8aa1-bfd09934626e'

src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/Commands/Synchronize-AzureASInstance.cs

Lines changed: 62 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ public override void ExecuteCmdlet()
142142
AsAzureClientSession.Instance.Login(context);
143143
WriteProgress(new ProgressRecord(0, "Sync-AzureAnalysisServicesInstance.", string.Format("Authenticating user for '{0}' environment.", context.Environment.Name)));
144144
var clusterResolveResult = ClusterResolve(context, serverName);
145-
if (!clusterResolveResult.CoreServerName.Equals(serverName) || !clusterResolveResult.CoreServerName.EndsWith(":rw"))
145+
var virtualServerName = clusterResolveResult.CoreServerName.Split(":".ToCharArray())[0];
146+
if (!serverName.Equals(virtualServerName) && !clusterResolveResult.CoreServerName.EndsWith(":rw"))
146147
{
147148
throw new SynchronizationFailedException("Sync request can only be sent to the management endpoint");
148149
}
@@ -245,6 +246,7 @@ protected override void InitializeQosEvent()
245246
{
246247
// No data collection for this commandlet
247248
}
249+
248250
protected override string DataCollectionWarning
249251
{
250252
get
@@ -275,8 +277,7 @@ private async Task<ScaleOutServerDatabaseSyncDetails> SynchronizeDatabaseAsync(
275277
{
276278
try
277279
{
278-
// pollingUrlAndRetryAfter = await PostSyncRequestAsync(context, syncBaseUri, databaseName, accessToken);
279-
var synchronize = string.Format((string)context.Environment.Endpoints[AsAzureEnvironment.AsRolloutEndpoints.SyncEndpoint], this.clusterResolveResult.CoreServerName, databaseName);
280+
var synchronize = string.Format((string)context.Environment.Endpoints[AsAzureEnvironment.AsRolloutEndpoints.SyncEndpoint], this.serverName, databaseName);
280281
this.AsAzureHttpClient.resetHttpClient();
281282
using (var message = await AsAzureHttpClient.CallPostAsync(
282283
syncBaseUri,
@@ -381,70 +382,81 @@ private async Task<ScaleOutServerDatabaseSyncResult> PollSyncStatusWithRetryAsyn
381382
{
382383
ScaleOutServerDatabaseSyncResult response = null;
383384
var syncCompleted = false;
384-
do
385+
var retryCount = 0;
386+
387+
while (!syncCompleted && retryCount < maxNumberOfAttempts)
385388
{
386-
var retryCount = 0;
387-
while (retryCount < maxNumberOfAttempts)
389+
// Wait for specified polling interval other than retries.
390+
if (retryCount == 0)
388391
{
389-
// Wait for specified polling interval other than retries.
390-
if (retryCount == 0)
391-
{
392-
// WriteInformation(new InformationRecord(string.Format("Synchronize database {0}. Attempt #{1}. Waiting for {2} seconds to get sync results...", databaseName, retryCount, pollingInterval.TotalSeconds), string.Empty));
393-
await Task.Delay(pollingInterval);
394-
}
395-
else
396-
{
397-
await Task.Delay(DefaultRetryIntervalForPolling);
398-
}
392+
await Task.Delay(pollingInterval);
393+
}
394+
else
395+
{
396+
await Task.Delay(DefaultRetryIntervalForPolling);
397+
}
399398

400-
this.AsAzureHttpClient.resetHttpClient();
401-
using (HttpResponseMessage message = await AsAzureHttpClient.CallGetAsync(
402-
pollingUrl,
403-
string.Empty,
404-
accessToken,
405-
correlationId))
399+
this.AsAzureHttpClient.resetHttpClient();
400+
using (HttpResponseMessage message = await AsAzureHttpClient.CallGetAsync(
401+
pollingUrl,
402+
string.Empty,
403+
accessToken,
404+
correlationId))
405+
{
406+
bool shouldRetry = false;
407+
if (message.IsSuccessStatusCode && message.Content != null)
406408
{
407-
syncCompleted = !message.StatusCode.Equals(HttpStatusCode.SeeOther);
408-
if (syncCompleted)
409+
var responseString = await message.Content.ReadAsStringAsync();
410+
response = JsonConvert.DeserializeObject<ScaleOutServerDatabaseSyncResult>(responseString);
411+
412+
if (response != null)
409413
{
410-
if (message.IsSuccessStatusCode)
414+
var state = response.SyncState;
415+
if (state == DatabaseSyncState.Completed || state == DatabaseSyncState.Failed)
411416
{
412-
var responseString = await message.Content.ReadAsStringAsync();
413-
response = JsonConvert.DeserializeObject<ScaleOutServerDatabaseSyncResult>(responseString);
414-
break;
417+
syncCompleted = true;
415418
}
416419
else
417420
{
418-
retryCount++;
419-
if (response == null)
420-
{
421-
response = new ScaleOutServerDatabaseSyncResult()
422-
{
423-
Database = databaseName,
424-
SyncState = DatabaseSyncState.Invalid
425-
};
426-
427-
response.Details = string.Format(
428-
"Http Error code: {0}. {1}",
429-
message.StatusCode.ToString(),
430-
message.Content != null ? await message.Content.ReadAsStringAsync() : string.Empty);
431-
}
432-
433-
if (message.StatusCode >= (HttpStatusCode)400 && message.StatusCode <= (HttpStatusCode)499)
434-
{
435-
break;
436-
}
421+
pollingUrl = message.Headers.Location ?? pollingUrl;
422+
pollingInterval = message.Headers.RetryAfter.Delta ?? pollingInterval;
437423
}
438424
}
439425
else
440426
{
441-
pollingUrl = message.Headers.Location;
442-
pollingInterval = message.Headers.RetryAfter.Delta ?? pollingInterval;
427+
shouldRetry = true;
443428
}
444429
}
430+
else
431+
{
432+
shouldRetry = true;
433+
}
434+
435+
if(shouldRetry)
436+
{
437+
retryCount++;
438+
response = new ScaleOutServerDatabaseSyncResult()
439+
{
440+
Database = databaseName,
441+
SyncState = DatabaseSyncState.Invalid
442+
};
443+
444+
response.Details = string.Format(
445+
"Http Error code: {0}. Message: {1}",
446+
message.StatusCode.ToString(),
447+
message.Content != null ? await message.Content.ReadAsStringAsync() : string.Empty);
448+
449+
if (message.StatusCode >= (HttpStatusCode)400 && message.StatusCode <= (HttpStatusCode)499)
450+
{
451+
break;
452+
}
453+
}
454+
else
455+
{
456+
retryCount = 0;
457+
}
445458
}
446459
}
447-
while (!syncCompleted);
448460

449461
return response;
450462
});

src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/Models/AsAzureClientSession.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class AsAzureClientSession
2929
{
3030
public const string RestartEndpointPathFormat = "/webapi/servers/{0}/restart?api-version=2016-10-01";
3131
public const string LogfileEndpointPathFormat = "/webapi/servers/{0}/logfileHere";
32-
public const string SynchronizeEndpointPathFormat = "/webapi/servers/{0}/databases/{1}/sync";
32+
public const string SynchronizeEndpointPathFormat = "/servers/{0}/models/{1}/sync";
3333
public const string AsAzureClientId = "cf710c6e-dfcc-4fa8-a093-d47294e44c66";
3434
public static readonly Uri RedirectUri = new Uri("urn:ietf:wg:oauth:2.0:oob");
3535
public static string DefaultRolloutEnvironmentKey = "asazure.windows.net";

src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Dataplane/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@
3535
// by using the '*' as shown below:
3636

3737

38-
[assembly: AssemblyVersion("0.4.7")]
39-
[assembly: AssemblyFileVersion("0.4.7")]
38+
[assembly: AssemblyVersion("0.5.0")]
39+
[assembly: AssemblyFileVersion("0.5.0")]

src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Test/InMemoryTests/DataPlaneCommandTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ public void SynchronizeAzureASInstance_SingleDB_Succeeds()
390390

391391
// set up sync respnose
392392
var postResponse = new HttpResponseMessage(HttpStatusCode.Accepted);
393-
postResponse.Headers.Location = new Uri("https://1");
393+
postResponse.Headers.Location = new Uri("https://done");
394394
postResponse.Headers.RetryAfter = new RetryConditionHeaderValue(TimeSpan.FromMilliseconds(500));
395395
postResponse.Headers.Add("x-ms-root-activity-id", Guid.NewGuid().ToString());
396396
postResponse.Headers.Add("x-ms-current-utc-date", Guid.NewGuid().ToString());

src/ResourceManager/AnalysisServices/Commands.AnalysisServices.Test/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@
3232

3333
[assembly: Guid("37af97fd-d603-4d52-a7a6-0885004a57fe")]
3434

35-
[assembly: AssemblyVersion("0.4.7")]
36-
[assembly: AssemblyFileVersion("0.4.7")]
35+
[assembly: AssemblyVersion("0.5.0")]
36+
[assembly: AssemblyFileVersion("0.5.0")]
3737
[assembly: CollectionBehavior(DisableTestParallelization = true)]

src/ResourceManager/AnalysisServices/Commands.AnalysisServices/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@
3434
// You can specify all the values or you can default the Build and Revision Numbers
3535
// by using the '*' as shown below:
3636

37-
[assembly: AssemblyVersion("0.4.7")]
38-
[assembly: AssemblyFileVersion("0.4.7")]
37+
[assembly: AssemblyVersion("0.5.0")]
38+
[assembly: AssemblyFileVersion("0.5.0")]

src/ResourceManager/ApiManagement/AzureRM.ApiManagement.psd1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#
1+
#
22
# Module manifest for module 'PSGet_AzureRM.ApiManagement'
33
#
44
# Generated by: Microsoft Corporation
@@ -12,7 +12,7 @@
1212
# RootModule = ''
1313

1414
# Version number of this module.
15-
ModuleVersion = '4.4.1'
15+
ModuleVersion = '5.0.0'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()
@@ -51,7 +51,7 @@ CLRVersion = '4.0'
5151
# ProcessorArchitecture = ''
5252

5353
# Modules that must be imported into the global environment prior to importing this module
54-
RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; ModuleVersion = '3.4.1'; })
54+
RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; ModuleVersion = '4.0.0'; })
5555

5656
# Assemblies that must be loaded prior to importing this module
5757
# RequiredAssemblies = @()

src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,5 @@
4242
// You can specify all the values or you can default the Build and Revision Numbers
4343
// by using the '*' as shown below:
4444

45-
[assembly: AssemblyVersion("4.4.1")]
46-
[assembly: AssemblyFileVersion("4.4.1")]
45+
[assembly: AssemblyVersion("5.0.0")]
46+
[assembly: AssemblyFileVersion("5.0.0")]

src/ResourceManager/ApiManagement/Commands.ApiManagement.Test/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@
4141
// You can specify all the values or you can default the Build and Revision Numbers
4242
// by using the '*' as shown below:
4343

44-
[assembly: AssemblyVersion("4.4.1")]
45-
[assembly: AssemblyFileVersion("4.4.1")]
44+
[assembly: AssemblyVersion("5.0.0")]
45+
[assembly: AssemblyFileVersion("5.0.0")]

src/ResourceManager/ApiManagement/Commands.ApiManagement/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@
4141
// You can specify all the values or you can default the Build and Revision Numbers
4242
// by using the '*' as shown below:
4343

44-
[assembly: AssemblyVersion("4.4.1")]
45-
[assembly: AssemblyFileVersion("4.4.1")]
44+
[assembly: AssemblyVersion("5.0.0")]
45+
[assembly: AssemblyFileVersion("5.0.0")]

src/ResourceManager/ApiManagement/Commands.SMAPI.Test/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@
4242
// You can specify all the values or you can default the Build and Revision Numbers
4343
// by using the '*' as shown below:
4444

45-
[assembly: AssemblyVersion("4.4.1")]
46-
[assembly: AssemblyFileVersion("4.4.1")]
45+
[assembly: AssemblyVersion("5.0.0")]
46+
[assembly: AssemblyFileVersion("5.0.0")]
4747
[assembly: CollectionBehavior(DisableTestParallelization = true)]

src/ResourceManager/ApplicationInsights/AzureRM.ApplicationInsights.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#
1+
#
22
# Module manifest for module 'PSGet_AzureRM.ApplicationInsights'
33
#
44
# Generated by: Microsoft Corporation
@@ -51,7 +51,7 @@ CLRVersion = '4.0'
5151
# ProcessorArchitecture = ''
5252

5353
# Modules that must be imported into the global environment prior to importing this module
54-
RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; ModuleVersion = '3.4.1'; })
54+
RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; ModuleVersion = '4.0.0'; })
5555

5656
# Assemblies that must be loaded prior to importing this module
5757
# RequiredAssemblies = @()

src/ResourceManager/ApplicationInsights/Commands.ApplicationInsights/Microsoft.Azure.Commands.ApplicationInsights.dll-Help.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#
1+
#
22
# Module manifest for module 'Microsoft.Azure.Commands.ApplicationInsights'
33
#
44
# Generated by: Microsoft Corporation

src/ResourceManager/ApplicationInsights/Commands.ApplicationInsights/Microsoft.Azure.Commands.ApplicationInsights.format.ps1xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,4 +176,4 @@
176176
</TableControl>
177177
</View>
178178
</ViewDefinitions>
179-
</Configuration>
179+
</Configuration>

src/ResourceManager/Automation/AzureRM.Automation.psd1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#
1+
#
22
# Module manifest for module 'PSGet_AzureRM.Automation'
33
#
44
# Generated by: Microsoft Corporation
@@ -12,7 +12,7 @@
1212
# RootModule = ''
1313

1414
# Version number of this module.
15-
ModuleVersion = '3.4.1'
15+
ModuleVersion = '4.0.0'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()
@@ -51,7 +51,7 @@ CLRVersion = '4.0'
5151
# ProcessorArchitecture = ''
5252

5353
# Modules that must be imported into the global environment prior to importing this module
54-
RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; ModuleVersion = '3.4.1'; })
54+
RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; ModuleVersion = '4.0.0'; })
5555

5656
# Assemblies that must be loaded prior to importing this module
5757
# RequiredAssemblies = @()

src/ResourceManager/Automation/Commands.Automation.Test/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
// You can specify all the values or you can default the Build and Revision Numbers
4444
// by using the '*' as shown below:
4545

46-
[assembly: AssemblyVersion("3.4.1")]
47-
[assembly: AssemblyFileVersion("3.4.1")]
46+
[assembly: AssemblyVersion("4.0.0")]
47+
[assembly: AssemblyFileVersion("4.0.0")]
4848
[assembly: CLSCompliant(false)]
4949
[assembly: CollectionBehavior(DisableTestParallelization = true)]

0 commit comments

Comments
 (0)