Skip to content
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

Fix 4 P1 bugs for Sprint42 #12

Merged
merged 5 commits into from
Dec 1, 2014
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 @@ -13,6 +13,7 @@
// ----------------------------------------------------------------------------------

using System;
using System.Globalization;
using System.Management.Automation;
using System.Security.Permissions;
using Microsoft.WindowsAzure.Commands.Common;
Expand Down Expand Up @@ -346,7 +347,14 @@ internal CloudStorageAccount GetStorageAccountWithAzureEnvironment(StorageCreden
}
else
{
azureEnvironment = DefaultProfileClient.GetEnvironmentOrDefault(azureEnvironmentName);
try
{
azureEnvironment = DefaultProfileClient.GetEnvironmentOrDefault(azureEnvironmentName);
}
catch (ArgumentException e)
{
throw new ArgumentException(e.Message + " " + string.Format(CultureInfo.CurrentCulture, Resources.ValidEnvironmentName, EnvironmentName.AzureCloud, EnvironmentName.AzureChinaCloud));
}
}

Uri blobEndPoint = azureEnvironment.GetStorageBlobEndpoint(storageAccountName, useHttps);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public class NewAzureStorageDirectory : AzureStorageFileCmdletBase
[Parameter(
Position = 1,
Mandatory = true,
ValueFromPipeline = true,
HelpMessage = "Path of the directory to be created.")]
[ValidateNotNullOrEmpty]
public string Path { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class NewAzureStorageShare : AzureStorageFileCmdletBase
[Parameter(
Position = 0,
Mandatory = true,
ValueFromPipeline = true,
HelpMessage = "Name of the file share to be created.")]
[ValidateNotNullOrEmpty]
public string Name { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public class RemoveAzureStorageDirectory : AzureStorageFileCmdletBase
HelpMessage = "Path to the directory to be removed.")]
[Parameter(
Position = 1,
ValueFromPipeline = true,
ParameterSetName = Constants.DirectoryParameterSetName,
HelpMessage = "Path to the directory to be removed.")]
[ValidateNotNullOrEmpty]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class RemoveAzureStorageShare : AzureStorageFileCmdletBase
[Parameter(
Position = 0,
Mandatory = true,
ValueFromPipeline = true,
ParameterSetName = Constants.ShareNameParameterSetName,
HelpMessage = "Name of the file share to be removed.")]
[ValidateNotNullOrEmpty]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,11 @@ public class SetAzureStorageFileContent : StorageFileDataManagementCmdletBase
[ValidateNotNull]
public CloudFileDirectory Directory { get; set; }

[Alias("FullName")]
[Parameter(
Position = 1,
Mandatory = true,
ValueFromPipelineByPropertyName = true,
HelpMessage = "Path to the local file to be uploaded.")]
[ValidateNotNullOrEmpty]
public string Source { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2643,7 +2643,7 @@ echo &quot;Total $total containers&quot;</dev:code>
<maml:introduction>
<maml:para></maml:para>
</maml:introduction>
<dev:code>PS C:\&gt; Get-AzureStorageFileContent -FileShareName sample -FilePath sampledir/samplefile</dev:code>
<dev:code>PS C:\&gt; Get-AzureStorageFileContent -ShareName sample -FilePath sampledir/samplefile</dev:code>
<dev:remarks>
<maml:para>This example downloads the file whose path is sampledir/samplefile in the sample file share.</maml:para>
</dev:remarks>
Expand Down Expand Up @@ -3039,6 +3039,9 @@ echo &quot;Total $total containers&quot;</dev:code>
</command:example>
</command:examples>
<maml:relatedLinks>
<maml:navigationLink>
<maml:uri>http://msdn.microsoft.com/en-us/library/dn806375.aspx</maml:uri>
</maml:navigationLink>
</maml:relatedLinks>
</command:command>
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
Expand Down Expand Up @@ -3209,6 +3212,9 @@ echo &quot;Total $total containers&quot;</dev:code>
</command:example>
</command:examples>
<maml:relatedLinks>
<maml:navigationLink>
<maml:uri>http://msdn.microsoft.com/en-us/library/dn806390.aspx</maml:uri>
</maml:navigationLink>
</maml:relatedLinks>
</command:command>
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
Expand Down Expand Up @@ -4125,8 +4131,7 @@ New-AzureStorageBlobSASToken -Container cname -Blob bname -Permission rwd -Start
</command:examples>
<maml:relatedLinks>
<maml:navigationLink>
<maml:linkText>http://msdn.microsoft.com/en-us/library/windowsazure/dn140255.aspx</maml:linkText>
<maml:uri></maml:uri>
<maml:uri>http://msdn.microsoft.com/en-us/library/dn806412.aspx</maml:uri>
</maml:navigationLink>
</maml:relatedLinks>
</command:command>
Expand Down Expand Up @@ -4649,8 +4654,7 @@ New-AzureStorageBlobSASToken -Container cname -Blob bname -Permission rwd -Start
</command:examples>
<maml:relatedLinks>
<maml:navigationLink>
<maml:linkText>http://msdn.microsoft.com/en-us/library/windowsazure/dn140255.aspx</maml:linkText>
<maml:uri></maml:uri>
<maml:uri>http://msdn.microsoft.com/en-us/library/dn806416.aspx</maml:uri>
</maml:navigationLink>
</maml:relatedLinks>
</command:command>
Expand Down Expand Up @@ -4956,7 +4960,7 @@ New-AzureStorageBlobSASToken -Container cname -Blob bname -Permission rwd -Start
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
<dev:defaultValue>AzureCloud | AzureChinaCloud</dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="named">
<maml:name>ConnectionString</maml:name>
Expand Down Expand Up @@ -6041,8 +6045,7 @@ $context | Get-AzureStorageBlob -Container abc</dev:code>
</command:examples>
<maml:relatedLinks>
<maml:navigationLink>
<maml:linkText>http://msdn.microsoft.com/en-us/library/windowsazure/dn140255.aspx</maml:linkText>
<maml:uri></maml:uri>
<maml:uri>http://msdn.microsoft.com/en-us/library/dn806410.aspx</maml:uri>
</maml:navigationLink>
</maml:relatedLinks>
</command:command>
Expand Down Expand Up @@ -6893,8 +6896,7 @@ $context | Get-AzureStorageBlob -Container abc</dev:code>
</command:examples>
<maml:relatedLinks>
<maml:navigationLink>
<maml:linkText>http://msdn.microsoft.com/en-us/library/windowsazure/dn140255.aspx</maml:linkText>
<maml:uri></maml:uri>
<maml:uri>http://msdn.microsoft.com/en-us/library/dn806400.aspx</maml:uri>
</maml:navigationLink>
</maml:relatedLinks>
</command:command>
Expand Down Expand Up @@ -9482,7 +9484,7 @@ $context | Get-AzureStorageBlob -Container abc</dev:code>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByValue, ByPropertyName)" position="0">
<maml:name>Name</maml:name>
<maml:description>
<maml:para></maml:para>
<maml:para>The name of the table to be removed.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
Expand Down Expand Up @@ -9527,7 +9529,7 @@ $context | Get-AzureStorageBlob -Container abc</dev:code>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByValue, ByPropertyName)" position="0">
<maml:name>Name</maml:name>
<maml:description>
<maml:para></maml:para>
<maml:para>The name of the table to be removed.</maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
Expand Down Expand Up @@ -11368,6 +11370,9 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
</command:example>
</command:examples>
<maml:relatedLinks>
<maml:navigationLink>
<maml:uri>http://msdn.microsoft.com/en-us/library/dn806397.aspx</maml:uri>
</maml:navigationLink>
</maml:relatedLinks>
</command:command>
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
Expand Down Expand Up @@ -11614,6 +11619,9 @@ Set-AzureStorageBlobContent -File filename -Container containername -Metadata $m
</command:example>
</command:examples>
<maml:relatedLinks>
<maml:navigationLink>
<maml:uri>http://msdn.microsoft.com/en-us/library/dn806391.aspx</maml:uri>
</maml:navigationLink>
</maml:relatedLinks>
</command:command>
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/ServiceManagement/Storage/Commands.Storage/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -661,4 +661,8 @@ Failed: {2}.</value>
<data name="TransmitCancelled" xml:space="preserve">
<value>Transmit cancelled by user.</value>
</data>
<data name="ValidEnvironmentName" xml:space="preserve">
<value>Valid environment names are: '{0}' and '{1}'</value>
<comment>0 and 1 are for the correct Environment names</comment>
</data>
</root>