Skip to content

Change Tags parameter name to Tag, and modify some help text #2480

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -696,16 +696,17 @@
<maml:name>Kind</maml:name>
<maml:description>
<maml:para>Kind of Storage Account. Valid values are:
• Storage (Supports Blob, Table, Queue, and File data)
• BlobStorage (Supports Blob data only)
• Storage (General-purpose storage account which supports storing Blobs, Tables, Queues, Files and Disks)
• BlobStorage (Blob storage account which supports storing Blobs only)
Default is Storage.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="4">
<maml:name>AccessTier</maml:name>
<maml:description>
<maml:para>Access Tier of the Storage Account. This is mandatory when Kind is equal to BlobStorage. Setting this will fail if Kind is equal to Storage.
<maml:para>Access Tier for Blob Storage Accounts. This is mandatory when Storage Account Kind is equal to BlobStorage. Setting this will fail if Storage Account Kind is equal to Storage.

Valid values are:
• Hot
• Cool</maml:para>
Expand Down Expand Up @@ -741,7 +742,7 @@ Valid values are:
<command:parameterValue required="true" variableLength="true">[EncryptionSupportServiceEnum?]</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="true (ByPropertyName)" position="9">
<maml:name>Tags</maml:name>
<maml:name>Tag</maml:name>
<maml:description>
<maml:para>Tags to set on the storage account.</maml:para>
</maml:description>
Expand Down Expand Up @@ -809,8 +810,8 @@ Valid values are:
<maml:name>Kind</maml:name>
<maml:description>
<maml:para>Kind of Storage Account. Valid values are:
• Storage (Supports Blob, Table, Queue, and File data)
• BlobStorage (Supports Blob data only)
• Storage (General-purpose storage account which supports storing Blobs, Tables, Queues, Files and Disks)
• BlobStorage (Blob storage account which supports storing Blobs only)
Default is Storage.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
Expand All @@ -823,7 +824,7 @@ Default is Storage.</maml:para>
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="4">
<maml:name>AccessTier</maml:name>
<maml:description>
<maml:para>Access Tier of the Storage Account. This is mandatory when Kind is equal to BlobStorage. Setting this will fail if Kind is equal to Storage.
<maml:para>Access Tier for Blob Storage Accounts. This is mandatory when Storage Account Kind is equal to BlobStorage. Setting this will fail if Storage Account Kind is equal to Storage.
Valid values are:
• Hot
• Cool</maml:para>
Expand Down Expand Up @@ -884,7 +885,7 @@ Valid values are:
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="true (ByPropertyName)" position="9">
<maml:name>Tags</maml:name>
<maml:name>Tag</maml:name>
<maml:description>
<maml:para>Tags to set on the storage account.</maml:para>
</maml:description>
Expand Down Expand Up @@ -1567,7 +1568,7 @@ Note that Standard_ZRS, Premium_LRS accounts cannot be changed to other account
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="3">
<maml:name>AccessTier</maml:name>
<maml:description>
<maml:para>Access Tier of the Storage Account. This is mandatory when Kind is equal to BlobStorage. Setting this will fail if Kind is equal to Storage.
<maml:para>Access Tier for Blob Storage Accounts. Changing the access tier may result in additional charges. See (http://go.microsoft.com/fwlink/?LinkId=786482) to learn more. Setting this will fail if Storage Account Kind is equal to Storage.
Valid values are:
• Hot
• Cool</maml:para>
Expand Down Expand Up @@ -1603,7 +1604,7 @@ Valid values are:
<command:parameterValue required="true" variableLength="true">[EncryptionSupportServiceEnum?]</command:parameterValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="true (ByPropertyName)" position="8">
<maml:name>Tags</maml:name>
<maml:name>Tag</maml:name>
<maml:description>
<maml:para>Tags to set on the storage account.</maml:para>
</maml:description>
Expand Down Expand Up @@ -1672,7 +1673,7 @@ Note that Standard_ZRS, Premium_LRS accounts cannot be changed to other account
<command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="3">
<maml:name>AccessTier</maml:name>
<maml:description>
<maml:para>Access Tier of the Storage Account. This is mandatory when Kind is equal to BlobStorage. Setting this will fail if Kind is equal to Storage.
<maml:para>Access Tier for Blob Storage Accounts. Changing the access tier may result in additional charges. See (http://go.microsoft.com/fwlink/?LinkId=786482) to learn more. Setting this will fail if Storage Account Kind is equal to Storage.
Valid values are:
• Hot
• Cool</maml:para>
Expand Down Expand Up @@ -1733,7 +1734,7 @@ Valid values are:
<dev:defaultValue></dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="true (ByPropertyName)" position="8">
<maml:name>Tags</maml:name>
<maml:name>Tag</maml:name>
<maml:description>
<maml:para>Tags to set on the storage account.</maml:para>
</maml:description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ public class NewAzureStorageAccountCommand : StorageAccountBaseCmdlet
Mandatory = false,
HelpMessage = "Storage Account Tags.")]
[ValidateNotNull]
public Hashtable[] Tags { get; set; }
[Alias(TagsAlias)]
public Hashtable[] Tag { get; set; }

public override void ExecuteCmdlet()
{
Expand All @@ -119,7 +120,7 @@ public override void ExecuteCmdlet()
Location = this.Location,
Kind = ParseAccountKind(Kind),
Sku = new Sku(ParseSkuName(this.SkuName)),
Tags = TagsConversionHelper.CreateTagDictionary(Tags, validate: true),
Tags = TagsConversionHelper.CreateTagDictionary(Tag, validate: true),
};

if (this.CustomDomainName != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ public class SetAzureStorageAccountCommand : StorageAccountBaseCmdlet
HelpMessage = "Storage Account Tags.")]
[AllowEmptyCollection]
[ValidateNotNull]
public Hashtable[] Tags { get; set; }
[Alias(TagsAlias)]
public Hashtable[] Tag { get; set; }

public override void ExecuteCmdlet()
{
Expand All @@ -108,9 +109,9 @@ public override void ExecuteCmdlet()
updateParameters.Sku = new Sku(ParseSkuName(this.SkuName));
}

if (this.Tags != null)
if (this.Tag != null)
{
Dictionary<string, string> tagDictionary = TagsConversionHelper.CreateTagDictionary(Tags, validate: true);
Dictionary<string, string> tagDictionary = TagsConversionHelper.CreateTagDictionary(Tag, validate: true);
updateParameters.Tags = tagDictionary ?? new Dictionary<string, string>();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public abstract class StorageAccountBaseCmdlet : AzureRMCmdlet
protected const string AccountTypeAlias = "AccountType";
protected const string Account_TypeAlias = "Type";

protected const string TagsAlias = "Tags";

protected const string StorageAccountNameAvailabilityStr = "AzureRmStorageAccountNameAvailability";

protected const string StorageUsageNounStr = "AzureRmStorageUsage";
Expand Down