Skip to content

Commit ee9abca

Browse files
committed
Merge branch 'release-4.4.1' of https://github.com/Azure/azure-powershell into automapper-fix
# Conflicts: # src/ResourceManager/Compute/Commands.Compute/Generated/Models/ComputeAutoMapperProfile.cs
2 parents 540f142 + 28a470e commit ee9abca

File tree

261 files changed

+841729
-375
lines changed

Some content is hidden

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

261 files changed

+841729
-375
lines changed

TestMappings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@
7070
".\\src\\ResourceManager\\LogicApp\\Commands.LogicApp.Test\\bin\\Debug\\Microsoft.Azure.Commands.LogicApp.Test.dll"
7171
],
7272
"src/ResourceManager/MachineLearning/": [],
73+
"src/ResourceManager/MachineLearningCompute/" : [
74+
".\\src\\ResourceManager\\MachineLearningCompute\\Commands.MachineLearningCompute.Test\\bin\\Debug\\Microsoft.Azure.Commands.MachineLearningCompute.Test.dll"
75+
],
7376
"src/ResourceManager/Media/": [],
7477
"src/ResourceManager/Network/": [
7578
".\\src\\ResourceManager\\Network\\Commands.Network.Test\\bin\\Debug\\Microsoft.Azure.Commands.Network.Test.dll"

documentation/Repo-Tasks-Module.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
3. As long as you have exported all the functions that you need from your ps1 file using export-modulemember -function <name of function>. We deliberately do this to avoid polluting list of commands available (when you use Get-Command)
1111
3. Currently Repo-Tasks module supports following tasks:
1212
1. Set-TestEnvironment
13-
1. Will allow you create a test connection string required to setup test environment in order to run tests. More information about Test environment can be found [here](https://github.com/Azure/azure-powershell/blob/dev/documentation/Using-Azure-TestFramework.md "here")
13+
1. Will allow you create a test connection string required to setup test environment in order to run tests. More information about Test environment can be found [here](https://github.com/Azure/azure-powershell/blob/preview/documentation/Using-Azure-TestFramework.md "here")
1414
2. Start-Build
1515
1. Will allow you to kick off full build
1616
2. Or will allow you build for a particular scope (e.g. Start-Build -BuildScope ResourceManagment\Compute)

setup/azurecmdfiles.wxi

Lines changed: 332 additions & 2 deletions
Large diffs are not rendered by default.

src/Common/Commands.Common.Authentication.Abstractions/Extensions/AzureAccountExtensions.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,28 @@ public static void CopyFrom(this IAzureAccount account, IAzureAccount source)
197197
{
198198
account.TenantMap[item.Key] = item.Value;
199199
}
200+
200201
account.CopyPropertiesFrom(source);
201202
}
202203
}
204+
205+
/// <summary>
206+
/// Update non-null non-identity account properties from the given account
207+
/// </summary>
208+
/// <param name="account">The account to copy to (target)</param>
209+
/// <param name="other">The account to copy from (source)</param>
210+
public static void Update(this IAzureAccount account, IAzureAccount source)
211+
{
212+
if (account != null && source != null)
213+
{
214+
account.Credential = source.Credential ?? account.Credential;
215+
foreach (var item in source.TenantMap)
216+
{
217+
account.TenantMap[item.Key] = item.Value;
218+
}
219+
220+
account.UpdateProperties(source);
221+
}
222+
}
203223
}
204224
}

src/Common/Commands.Common.Authentication.Abstractions/Extensions/AzureContextExtensions.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,5 +128,21 @@ public static IAzureAccount GetAccount(this IAzureContextContainer container, st
128128
{
129129
return container.Accounts.FirstOrDefault((a) => string.Equals(a.Id, account, StringComparison.CurrentCultureIgnoreCase));
130130
}
131+
132+
/// <summary>
133+
/// Update the properties of the context
134+
/// </summary>
135+
/// <param name="context">The context to update</param>
136+
/// <param name="other">The context to update from</param>
137+
public static void Update(this IAzureContext context, IAzureContext other)
138+
{
139+
if (context != null && other != null)
140+
{
141+
context.Account.Update(other.Account);
142+
context.Subscription.Update(other.Subscription);
143+
context.Tenant.Update(other.Tenant);
144+
context.UpdateProperties(other);
145+
}
146+
}
131147
}
132148
}

src/Common/Commands.Common.Authentication.Abstractions/Extensions/AzureEnvironmentExtensions.cs

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,96 @@ public static void CopyFrom(this IAzureEnvironment environment, IAzureEnvironmen
451451
}
452452

453453
}
454+
455+
public static void Update(this IAzureEnvironment environment, IAzureEnvironment other)
456+
{
457+
if (environment != null && other != null)
458+
{
459+
environment.OnPremise = other.OnPremise;
460+
if (other.IsEndpointSet(AzureEnvironment.Endpoint.ActiveDirectoryServiceEndpointResourceId))
461+
{
462+
environment.ActiveDirectoryServiceEndpointResourceId = other.ActiveDirectoryServiceEndpointResourceId;
463+
}
464+
if (other.IsEndpointSet(AzureEnvironment.Endpoint.AdTenant))
465+
{
466+
environment.AdTenant = other.AdTenant;
467+
}
468+
if (other.IsEndpointSet(AzureEnvironment.Endpoint.Gallery))
469+
{
470+
environment.GalleryUrl = other.GalleryUrl;
471+
}
472+
if (other.IsEndpointSet(AzureEnvironment.Endpoint.ManagementPortalUrl))
473+
{
474+
environment.ManagementPortalUrl = other.ManagementPortalUrl;
475+
}
476+
if (other.IsEndpointSet(AzureEnvironment.Endpoint.ServiceManagement))
477+
{
478+
environment.ServiceManagementUrl = other.ServiceManagementUrl;
479+
}
480+
if (other.IsEndpointSet(AzureEnvironment.Endpoint.PublishSettingsFileUrl))
481+
{
482+
environment.PublishSettingsFileUrl = other.PublishSettingsFileUrl;
483+
}
484+
if (other.IsEndpointSet(AzureEnvironment.Endpoint.ResourceManager))
485+
{
486+
environment.ResourceManagerUrl = other.ResourceManagerUrl;
487+
}
488+
if (other.IsEndpointSet(AzureEnvironment.Endpoint.SqlDatabaseDnsSuffix))
489+
{
490+
environment.SqlDatabaseDnsSuffix = other.SqlDatabaseDnsSuffix;
491+
}
492+
if (other.IsEndpointSet(AzureEnvironment.Endpoint.StorageEndpointSuffix))
493+
{
494+
environment.StorageEndpointSuffix = other.StorageEndpointSuffix;
495+
}
496+
if (other.IsEndpointSet(AzureEnvironment.Endpoint.ActiveDirectory))
497+
{
498+
environment.ActiveDirectoryAuthority = other.ActiveDirectoryAuthority;
499+
}
500+
if (other.IsEndpointSet(AzureEnvironment.Endpoint.Graph))
501+
{
502+
environment.GraphUrl = other.GraphUrl;
503+
}
504+
if (other.IsEndpointSet(AzureEnvironment.Endpoint.GraphEndpointResourceId))
505+
{
506+
environment.GraphEndpointResourceId = other.GraphEndpointResourceId;
507+
}
508+
if (other.IsEndpointSet(AzureEnvironment.Endpoint.TrafficManagerDnsSuffix))
509+
{
510+
environment.TrafficManagerDnsSuffix = other.TrafficManagerDnsSuffix;
511+
}
512+
if (other.IsEndpointSet(AzureEnvironment.Endpoint.AzureKeyVaultDnsSuffix))
513+
{
514+
environment.AzureKeyVaultDnsSuffix = other.AzureKeyVaultDnsSuffix;
515+
}
516+
if (other.IsEndpointSet(AzureEnvironment.Endpoint.AzureDataLakeStoreFileSystemEndpointSuffix))
517+
{
518+
environment.AzureDataLakeStoreFileSystemEndpointSuffix = other.AzureDataLakeStoreFileSystemEndpointSuffix;
519+
}
520+
if (other.IsEndpointSet(AzureEnvironment.Endpoint.AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix))
521+
{
522+
environment.AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix =
523+
other.AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix;
524+
}
525+
if (other.IsEndpointSet(AzureEnvironment.Endpoint.AzureKeyVaultServiceEndpointResourceId))
526+
{
527+
environment.AzureKeyVaultServiceEndpointResourceId =
528+
other.AzureKeyVaultServiceEndpointResourceId;
529+
}
530+
531+
foreach (var profile in other.VersionProfiles)
532+
{
533+
if (!environment.VersionProfiles.Contains(profile))
534+
{
535+
environment.VersionProfiles.Add(profile);
536+
}
537+
}
538+
539+
environment.UpdateProperties(other);
540+
}
541+
542+
}
543+
454544
}
455545

456546
}

src/Common/Commands.Common.Authentication.Abstractions/Extensions/AzureSubscriptionExtensions.cs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public static void SetTenant(this IAzureSubscription subscription, string tenant
142142
}
143143

144144
/// <summary>
145-
///
145+
/// Copy the properties from the given subscription
146146
/// </summary>
147147
/// <param name="subscription"></param>
148148
/// <param name="other"></param>
@@ -156,5 +156,20 @@ public static void CopyFrom(this IAzureSubscription subscription, IAzureSubscrip
156156
subscription.CopyPropertiesFrom(other);
157157
}
158158
}
159+
160+
/// <summary>
161+
/// Update the non-identity properties from the given subscription
162+
/// </summary>
163+
/// <param name="subscription"></param>
164+
/// <param name="other"></param>
165+
public static void Update(this IAzureSubscription subscription, IAzureSubscription other)
166+
{
167+
if (subscription != null && other != null)
168+
{
169+
subscription.Name = other.Name?? subscription.Name;
170+
subscription.State = other.State?? subscription.State;
171+
subscription.UpdateProperties(other);
172+
}
173+
}
159174
}
160175
}

src/Common/Commands.Common.Authentication.Abstractions/Extensions/AzureTenantExtensions.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,19 @@ public static void CopyFrom(this IAzureTenant tenant, IAzureTenant other)
4242
tenant.CopyPropertiesFrom(other);
4343
}
4444
}
45+
46+
/// <summary>
47+
/// Update the non-identity properties of this tenant, using another tenant
48+
/// </summary>
49+
/// <param name="tenant"></param>
50+
/// <param name="other"></param>
51+
public static void Update(this IAzureTenant tenant, IAzureTenant other)
52+
{
53+
if (tenant != null && other != null)
54+
{
55+
tenant.Directory = other.Directory?? tenant.Directory;
56+
tenant.UpdateProperties(other);
57+
}
58+
}
4559
}
4660
}

src/Common/Commands.Common.Authentication.Abstractions/Extensions/ModelExtensions.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,5 +115,21 @@ public static void CopyPropertiesFrom(this IExtensibleModel model, IExtensibleMo
115115
}
116116
}
117117
}
118+
119+
/// <summary>
120+
/// Copy Unset propeties from another extensible model to this one
121+
/// </summary>
122+
/// <param name="model"></param>
123+
/// <param name="newModel"></param>
124+
public static void UpdateProperties(this IExtensibleModel model, IExtensibleModel newModel)
125+
{
126+
if (model != null && newModel != null)
127+
{
128+
foreach (var item in newModel.ExtendedProperties)
129+
{
130+
model.SetProperty(item.Key, item.Value);
131+
}
132+
}
133+
}
118134
}
119135
}

src/ResourceManager/AnalysisServices/AzureRM.AnalysisServices.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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'
@@ -105,7 +105,7 @@ PrivateData = @{
105105
Tags = 'Azure','ResourceManager','ARM','AzureAS','AS'
106106

107107
# A URL to the license for this module.
108-
LicenseUri = 'https://raw.githubusercontent.com/Azure/azure-powershell/preview/LICENSE.txt'
108+
LicenseUri = 'https://aka.ms/azps-license'
109109

110110
# A URL to the main website for this project.
111111
ProjectUri = 'https://github.com/Azure/azure-powershell'

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ PrivateData = @{
9191
Tags = @("Azure", "AzureAS", "AS")
9292

9393
# A URL to the license for this module.
94-
LicenseUri = 'https://raw.githubusercontent.com/Azure/azure-powershell/preview/LICENSE.txt'
94+
LicenseUri = 'https://aka.ms/azps-license'
9595

9696
# A URL to the main website for this project.
9797
ProjectUri = 'https://github.com/Azure/azure-powershell'

src/ResourceManager/ApiManagement/AzureRM.ApiManagement.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ PrivateData = @{
176176
Tags = 'Azure','ResourceManager','ARM','ApiManagement'
177177

178178
# A URL to the license for this module.
179-
LicenseUri = 'https://raw.githubusercontent.com/Azure/azure-powershell/preview/LICENSE.txt'
179+
LicenseUri = 'https://aka.ms/azps-license'
180180

181181
# A URL to the main website for this project.
182182
ProjectUri = 'https://github.com/Azure/azure-powershell'

src/ResourceManager/ApiManagement/Commands.ApiManagement.ServiceManagement/Microsoft.Azure.Commands.ApiManagement.ServiceManagement.dll-help.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ PrivateData = @{
8989
# Tags = @()
9090

9191
# A URL to the license for this module.
92-
LicenseUri = 'https://raw.githubusercontent.com/Azure/azure-powershell/dev/LICENSE.txt'
92+
LicenseUri = 'https://aka.ms/azps-license'
9393

9494
# A URL to the main website for this project.
9595
ProjectUri = 'https://github.com/Azure/azure-powershell'

src/ResourceManager/ApiManagement/Commands.ApiManagement/Microsoft.Azure.Commands.ApiManagement.dll-help.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ PrivateData = @{
8989
# Tags = @()
9090

9191
# A URL to the license for this module.
92-
LicenseUri = 'https://raw.githubusercontent.com/Azure/azure-powershell/dev/LICENSE.txt'
92+
LicenseUri = 'https://aka.ms/azps-license'
9393

9494
# A URL to the main website for this project.
9595
ProjectUri = 'https://github.com/Azure/azure-powershell'

src/ResourceManager/Automation/AzureRM.Automation.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ PrivateData = @{
155155
Tags = 'Azure','ResourceManager','ARM','Automation'
156156

157157
# A URL to the license for this module.
158-
LicenseUri = 'https://raw.githubusercontent.com/Azure/azure-powershell/preview/LICENSE.txt'
158+
LicenseUri = 'https://aka.ms/azps-license'
159159

160160
# A URL to the main website for this project.
161161
ProjectUri = 'https://github.com/Azure/azure-powershell'

src/ResourceManager/Automation/Commands.Automation/Cmdlet/GetAzureAutomationDscCompilationJob.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class GetAzureAutomationDscCompilationJob : AzureAutomationBaseCmdlet
4747
/// </summary>
4848
[Parameter(ParameterSetName = AutomationCmdletParameterSets.ByConfigurationName, Mandatory = false, HelpMessage = "Filter jobs based on their status.")]
4949
[Parameter(ParameterSetName = AutomationCmdletParameterSets.ByAll, Mandatory = false, HelpMessage = "Filter jobs based on their status.")]
50-
[ValidateSet("Completed", "Failed", "Queued", "Starting", "Resuming", "Running", "Stopped", "Stopping", "Suspended", "Suspending", "Activating")]
50+
[ValidateSet("Completed", "Failed", "Queued", "Starting", "Resuming", "Running", "Stopped", "Stopping", "Suspended", "Suspending", "Activating", "New")]
5151
public string Status { get; set; }
5252

5353
/// <summary>

src/ResourceManager/Automation/Commands.Automation/Microsoft.Azure.Commands.ResourceManager.Automation.dll-help.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ PrivateData = @{
8989
# Tags = @()
9090

9191
# A URL to the license for this module.
92-
LicenseUri = 'https://raw.githubusercontent.com/Azure/azure-powershell/dev/LICENSE.txt'
92+
LicenseUri = 'https://aka.ms/azps-license'
9393

9494
# A URL to the main website for this project.
9595
ProjectUri = 'https://github.com/Azure/azure-powershell'

src/ResourceManager/Automation/Commands.Automation/help/Get-AzureRmAutomationDscCompilationJob.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ Valid values are:
167167
- Suspended
168168
- Suspending
169169
- Activating
170+
- New
170171
171172
```yaml
172173
Type: String

src/ResourceManager/AzureBackup/AzureRM.Backup.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ PrivateData = @{
113113
Tags = 'Azure','ResourceManager','ARM','Backup'
114114

115115
# A URL to the license for this module.
116-
LicenseUri = 'https://raw.githubusercontent.com/Azure/azure-powershell/preview/LICENSE.txt'
116+
LicenseUri = 'https://aka.ms/azps-license'
117117

118118
# A URL to the main website for this project.
119119
ProjectUri = 'https://github.com/Azure/azure-powershell'

src/ResourceManager/AzureBackup/Commands.AzureBackup/Microsoft.Azure.Commands.AzureBackup.dll-help.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ PrivateData = @{
9191
# Tags = @()
9292

9393
# A URL to the license for this module.
94-
LicenseUri = 'https://raw.githubusercontent.com/Azure/azure-powershell/dev/LICENSE.txt'
94+
LicenseUri = 'https://aka.ms/azps-license'
9595

9696
# A URL to the main website for this project.
9797
ProjectUri = 'https://github.com/Azure/azure-powershell'

src/ResourceManager/AzureBatch/AzureRM.Batch.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ PrivateData = @{
132132
Tags = 'Azure','ResourceManager','ARM','Batch'
133133

134134
# A URL to the license for this module.
135-
LicenseUri = 'https://raw.githubusercontent.com/Azure/azure-powershell/preview/LICENSE.txt'
135+
LicenseUri = 'https://aka.ms/azps-license'
136136

137137
# A URL to the main website for this project.
138138
ProjectUri = 'https://github.com/Azure/azure-powershell'

src/ResourceManager/AzureBatch/ChangeLog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21+
- Marked cmdlet parameters and type properties obsolete in
22+
preparation for upcoming breaking change release (Version 4.0.0)
2123

2224
## Version 3.4.0
2325

src/ResourceManager/AzureBatch/Commands.Batch/Commands.Batch.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@
197197
<Compile Include="Models\NodeFileOperationParameters.cs" />
198198
<Compile Include="Models\PoolOperationParameters.cs" />
199199
<Compile Include="Models\PSBatchLocationQuotas.cs" />
200+
<Compile Include="Models\PSCloudPool.cs" />
200201
<Compile Include="Models\PSPagedEnumerable.cs" />
201202
<Compile Include="Models.Generated\PSAutoPoolSpecification.cs" />
202203
<Compile Include="Models.Generated\PSAutoScaleRun.cs" />

src/ResourceManager/AzureBatch/Commands.Batch/Microsoft.Azure.Commands.Batch.dll-Help.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ PrivateData = @{
9393
# Tags = @()
9494

9595
# A URL to the license for this module.
96-
LicenseUri = 'https://raw.githubusercontent.com/Azure/azure-powershell/dev/LICENSE.txt'
96+
LicenseUri = 'https://aka.ms/azps-license'
9797

9898
# A URL to the main website for this project.
9999
ProjectUri = 'https://github.com/Azure/azure-powershell'

src/ResourceManager/AzureBatch/Commands.Batch/Models.Generated/PSCloudPool.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,8 @@ public PSNetworkConfiguration NetworkConfiguration
364364
this.networkConfiguration = value;
365365
}
366366
}
367-
367+
368+
[Obsolete("The ResizeError property will be removed in an upcoming breaking change release. Please use the ResizeErrors property instead.")]
368369
public PSResizeError ResizeError
369370
{
370371
get

0 commit comments

Comments
 (0)