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

Integrating from master to dev as a part of release-1.0.0-preview2 #1108

Merged
merged 5 commits into from
Oct 12, 2015
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
1 change: 1 addition & 0 deletions build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@
<DelaySignedAssembliesToSign Include="$(LibrarySourceFolder)\Package\$(Configuration)\**\Microsoft.Azure.Common.Extensions.dll" />
<ScriptsToSign Include="$(LibrarySourceFolder)\Package\$(Configuration)\**\*.ps1" />
<ScriptsToSign Include="$(LibrarySourceFolder)\Package\$(Configuration)\**\*.psm1" />
<ScriptsToSign Include="$(LibrarySourceFolder)\Package\$(Configuration)\**\*.ps1xml" />
</ItemGroup>

<Message Importance="high" Text="$(LibrarySourceFolder)\Package\$(Configuration) does not contains any files to sign. Code sign will skip."
Expand Down
2 changes: 1 addition & 1 deletion src/Common/Storage/Azure.Storage.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@{

# Version number of this module.
ModuleVersion = '0.10.0'
ModuleVersion = '0.10.1'

# ID used to uniquely identify this module
GUID = '00612bca-fa22-401d-a671-9cc48b010e3b'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ public class GetAzureStorageContainerCommand : StorageCloudBlobCmdletBase

[Alias("N", "Container")]
[Parameter(Position = 0, HelpMessage = "Container Name",
ValueFromPipelineByPropertyName = true,
ParameterSetName = NameParameterSet)]
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true,
ParameterSetName = NameParameterSet)]
public string Name { get; set; }

[Parameter(HelpMessage = "Container Prefix",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class GetAzureStorageContainerStoredAccessPolicyCommand : StorageCloudBlo
[Alias("N", "Name")]
[Parameter(Position = 0, Mandatory = true,
HelpMessage = "Container name",
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true)]
[ValidateNotNullOrEmpty]
public string Container { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class NewAzureStorageContainerCommand : StorageCloudBlobCmdletBase
{
[Alias("N", "Container")]
[Parameter(Position = 0, Mandatory = true, HelpMessage = "Container name",
ValueFromPipelineByPropertyName = true)]
ValueFromPipeline = true, ValueFromPipelineByPropertyName = true)]
[ValidateNotNullOrEmpty]
public string Name { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class NewAzureStorageContainerSasTokenCommand : StorageCloudBlobCmdletBas
[Alias("N", "Container")]
[Parameter(Position = 0, Mandatory = true,
HelpMessage = "Container Name",
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true)]
[ValidateNotNullOrEmpty]
public string Name { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class NewAzureStorageContainerStoredAccessPolicyCommand : StorageCloudBlo
[Alias("N", "Name")]
[Parameter(Position = 0, Mandatory = true,
HelpMessage = "Container name",
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true)]
[ValidateNotNullOrEmpty]
public string Container { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public class RemoveAzureStorageContainerCommand : StorageCloudBlobCmdletBase
[Alias("N", "Container")]
[Parameter(Position = 0, Mandatory = true,
HelpMessage = "Container Name",
ValueFromPipelineByPropertyName = true)]
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true)]
[ValidateNotNullOrEmpty]
public string Name { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public class SetAzureStorageContainerAclCommand : StorageCloudBlobCmdletBase
{
[Alias("N", "Container")]
[Parameter(Position = 0, Mandatory = true, HelpMessage = "Container Name",
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true)]
public string Name { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class SetAzureStorageContainerStoredAccessPolicyCommand : StorageCloudBlo
[Alias("N", "Name")]
[Parameter(Position = 0, Mandatory = true,
HelpMessage = "Container name",
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true)]
[ValidateNotNullOrEmpty]
public string Container { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class StorageCloudCmdletBase<T> : AzureDataCmdlet
where T : class
{
[Parameter(HelpMessage = "Azure Storage Context Object",
ValueFromPipelineByPropertyName = true)]
ValueFromPipeline = true, ValueFromPipelineByPropertyName = true)]
public virtual AzureStorageContext Context { get; set; }

[Parameter(HelpMessage = "The server time out for each request in seconds.")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,17 @@ namespace Microsoft.WindowsAzure.Commands.Storage.File
public abstract class AzureStorageFileCmdletBase : StorageCloudCmdletBase<IStorageFileManagement>
{
[Parameter(
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true,
ParameterSetName = Constants.ShareNameParameterSetName,
HelpMessage = "Azure Storage Context Object")]
[Parameter(
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true,
ParameterSetName = Constants.MatchingPrefixParameterSetName,
HelpMessage = "Azure Storage Context Object")]
[Parameter(
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true,
ParameterSetName = Constants.SpecificParameterSetName,
HelpMessage = "Azure Storage Context Object")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public class GetAzureStorageShareStoredAccessPolicy : AzureStorageFileCmdletBase
[Parameter(Position = 0, Mandatory = true,
ParameterSetName = Constants.ShareNameParameterSetName,
HelpMessage = "Share name",
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true)]
[ValidateNotNullOrEmpty]
public string ShareName { get; set; }
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,
ValueFromPipelineByPropertyName = true,
HelpMessage = "Path of the directory to be created.")]
[ValidateNotNullOrEmpty]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,21 +52,25 @@ public class NewAzureStorageFileSasToken : AzureStorageFileCmdletBase

[Parameter(Position = 0, Mandatory = true,
HelpMessage = "Share Name",
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true,
ParameterSetName = NameSasPermissionParameterSet)]
[Parameter(Position = 0, Mandatory = true,
HelpMessage = "Share Name",
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true,
ParameterSetName = NameSasPolicyParmeterSet)]
[ValidateNotNullOrEmpty]
public string ShareName { get; set; }

[Parameter(Position = 1, Mandatory = true,
HelpMessage = "Path to the cloud file to generate sas token against.",
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true,
ParameterSetName = NameSasPermissionParameterSet)]
[Parameter(Position = 1, Mandatory = true,
HelpMessage = "Path to the cloud file to generate sas token against.",
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true,
ParameterSetName = NameSasPolicyParmeterSet)]
[ValidateNotNullOrEmpty]
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,
ValueFromPipelineByPropertyName = true,
HelpMessage = "Name of the file share to be created.")]
[ValidateNotNullOrEmpty]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class NewAzureStorageShareSasToken : AzureStorageFileCmdletBase
[Alias("N", "Name")]
[Parameter(Position = 0, Mandatory = true,
HelpMessage = "Share Name",
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true)]
[ValidateNotNullOrEmpty]
public string ShareName { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class NewAzureStorageShareStoredAccessPolicy : AzureStorageFileCmdletBase
[Parameter(Position = 0, Mandatory = true,
ParameterSetName = Constants.ShareNameParameterSetName,
HelpMessage = "Share name",
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true)]
[ValidateNotNullOrEmpty]
public string ShareName { 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,
ValueFromPipelineByPropertyName = true,
ParameterSetName = Constants.DirectoryParameterSetName,
HelpMessage = "Path to the directory to be removed.")]
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,
ValueFromPipelineByPropertyName = true,
ParameterSetName = Constants.ShareNameParameterSetName,
HelpMessage = "Name of the file share to be removed.")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class SetAzureStorageShareQuota : AzureStorageFileCmdletBase
[Parameter(Position = 0, Mandatory = true,
HelpMessage = "Share name",
ParameterSetName = Constants.ShareNameParameterSetName,
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true)]
[ValidateNotNullOrEmpty]
public string ShareName { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class SetAzureStorageShareStoredAccessPolicy : AzureStorageFileCmdletBase
[Parameter(Position = 0, Mandatory = true,
ParameterSetName = Constants.ShareNameParameterSetName,
HelpMessage = "Share name",
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true)]
[ValidateNotNullOrEmpty]
public string ShareName { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public class GetAzureStorageQueueCommand : StorageQueueBaseCmdlet

[Alias("N", "Queue")]
[Parameter(Position = 0, HelpMessage = "Queue name",
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true,
ParameterSetName = NameParameterSet)]
public string Name { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class GetAzureStorageQueueStoredAccessPolicyCommand : StorageQueueBaseCmd
[Alias("N", "Name")]
[Parameter(Position = 0, Mandatory = true,
HelpMessage = "Queue Name",
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true)]
[ValidateNotNullOrEmpty]
public string Queue { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public class NewAzureStorageQueueCommand : StorageQueueBaseCmdlet
{
[Alias("N", "Queue")]
[Parameter(Position = 0, Mandatory = true, HelpMessage = "Queue name",
ValueFromPipelineByPropertyName = true)]
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true)]
public string Name { get; set; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class NewAzureStorageQueueSasTokenCommand : StorageQueueBaseCmdlet
[Alias("N", "Queue")]
[Parameter(Position = 0, Mandatory = true,
HelpMessage = "Table Name",
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true)]
[ValidateNotNullOrEmpty]
public string Name { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class NewAzureStorageQueueStoredAccessPolicyCommand : StorageQueueBaseCmd
[Alias("N", "Name")]
[Parameter(Position = 0, Mandatory = true,
HelpMessage = "Queue Name",
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true)]
[ValidateNotNullOrEmpty]
public string Queue { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class RemoveAzureStorageQueueCommand : StorageQueueBaseCmdlet
[Alias("N", "Queue")]
[Parameter(Position = 0, HelpMessage = "Queue name",
Mandatory = true,
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true)]
public string Name { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class SetAzureStorageQueueStoredAccessPolicyCommand : StorageQueueBaseCmd
[Alias("N", "Name")]
[Parameter(Position = 0, Mandatory = true,
HelpMessage = "Queue Name",
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true)]
[ValidateNotNullOrEmpty]
public string Queue { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class GetAzureStorageTableStoredAccessPolicyCommand : StorageCloudTableCm
[Alias("N", "Name")]
[Parameter(Position = 0, Mandatory = true,
HelpMessage = "Table Name",
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true)]
[ValidateNotNullOrEmpty]
public string Table { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public class GetAzureStorageTableCommand : StorageCloudTableCmdletBase

[Alias("N", "Table")]
[Parameter(Position = 0, HelpMessage = "Table name",
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true,
ParameterSetName = NameParameterSet)]
public string Name { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public class NewAzureStorageTableSasTokenCommand : StorageCloudTableCmdletBase
[Alias("N", "Table")]
[Parameter(Position = 0, Mandatory = true,
HelpMessage = "Table Name",
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true)]
[ValidateNotNullOrEmpty]
public string Name { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class NewAzureStorageTableStoredAccessPolicyCommand : StorageCloudTableCm
[Alias("N", "Name")]
[Parameter(Position = 0, Mandatory = true,
HelpMessage = "Table Name",
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true)]
[ValidateNotNullOrEmpty]
public string Table { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public class NewAzureStorageTableCommand : StorageCloudTableCmdletBase
{
[Alias("N", "Table")]
[Parameter(Position = 0, Mandatory = true, HelpMessage = "Table name",
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true)]
public string Name { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public class RemoveAzureStorageTableCommand : StorageCloudTableCmdletBase
{
[Alias("N", "Table")]
[Parameter(Position = 0, Mandatory = true, HelpMessage = "Table name",
ValueFromPipelineByPropertyName = true)]
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true)]
public string Name { get; set; }

[Parameter(HelpMessage = "Force to remove the table without confirmation")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class SetAzureStorageTableStoredAccessPolicyCommand : StorageCloudTableCm
[Alias("N", "Name")]
[Parameter(Position = 0, Mandatory = true,
HelpMessage = "Table Name",
ValueFromPipeline = true,
ValueFromPipelineByPropertyName = true)]
[ValidateNotNullOrEmpty]
public string Table { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions src/ResourceManager/Storage/AzureRM.Storage.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@{

# Version number of this module.
ModuleVersion = '0.10.0'
ModuleVersion = '0.10.1'

# ID used to uniquely identify this module
GUID = 'da67eaa7-4cb1-4bfa-a194-8bf3faae8ac5'
Expand Down Expand Up @@ -47,7 +47,7 @@ ProcessorArchitecture = 'None'
# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @(
@{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '0.10.0'},
@{ ModuleName = 'Azure.Storage'; ModuleVersion = '0.10.0'}
@{ ModuleName = 'Azure.Storage'; ModuleVersion = '0.10.1'}
)

# Assemblies that must be loaded prior to importing this module
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace Microsoft.Azure.Commands.Management.Storage.Models
{
class PSStorageAccount : IStorageContextProvider
public class PSStorageAccount : IStorageContextProvider
{
public PSStorageAccount(StorageAccount storageAccount)
{
Expand Down Expand Up @@ -98,5 +98,15 @@ private static string ParseResourceGroupFromId(string idFromServer)
}

public AzureStorageContext Context { get; private set; }

/// <summary>
/// Return a string representation of this storage account
/// </summary>
/// <returns>null</returns>
public override string ToString()
{
// Allow listing storage contents through piping
return null;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ public static PSStorageService Create(StorageManagementClient client,
var cloudStorageAccount = StorageUtilities.GenerateCloudStorageAccount(client, account.StorageAccountName);
return new PSStorageService(account, new AzureStorageContext(cloudStorageAccount));
}

/// <summary>
/// String representation of this account
/// </summary>
/// <returns>null</returns>
public override string ToString()
{
// Allow sceanrios that list storage account contents through piping
return null;
}
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@{

# Version number of this module.
ModuleVersion = '0.9.10'
ModuleVersion = '0.9.11'

# ID used to uniquely identify this module
GUID = 'D48CF693-4125-4D2D-8790-1514F44CE325'
Expand Down
Binary file modified tools/AzureRM/AzureRM.psd1
Binary file not shown.
Loading