Skip to content

Commit

Permalink
Merge pull request Azure#5 from ogail/dev
Browse files Browse the repository at this point in the history
Merge latest from public dev branch
  • Loading branch information
ogail committed Nov 22, 2014
2 parents 54c622e + 6497655 commit 2a1bd99
Show file tree
Hide file tree
Showing 360 changed files with 67,744 additions and 14,186 deletions.
67 changes: 67 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
2014.11.14 Version 0.8.11
* Profile
* Clear-AzureProfile: remove all subscription and credential data from the user store
* Select-AzureSubscription: fixed output types in default and PassThru mode
* Compute
* Get-AzureVMSqlServerExtension
* New-AzureVMSqlServerExtension
* Set-AzureVMSqlServerExtension
* Remove-AzureVMSqlServerExtension
* HDInsight
* New cmdlets
* Add-AzureHDInisghtScriptAction
* Set-AzureHDInsightClusterSize
* Changed cmdlets
*Added ConfigActions parameter
* Managed Cache
* Get-AzureManagedCacheNamedCache
* New-AzureManagedCacheNamedCache
* Set-AzureManagedCacheNamedCache
* Remove-AzureManagedCacheNamedCache
* Websites
* Fixes for webjobs and site creation
* Additional settings for Publish-AzureWebsiteProject cmdlet
* Enable use of SAS URLs in ApplicationDiagnostics storage
* Sql Database (AzureResourceManager)
* New cmdlets to manage direct access to Sql databases:
* Enable-AzureSqlDatabaseDirectAccess
* Disable-AzureSqlDatabaseDirectAccess
* Enable-AzureSqlDatabaseServerDirectAccess
* Enable-AzureSqlDatabaseServerDirectAccess
* Rename previous cmdlets to use the term audit policy instead of audit setting
* Get-AzureSqlDatabaseAuditingPolicy
* Set-AzureSqlDatabaseAuditingPolicy
* Get-AzureSqlDatabaseServerAuditingPolicy
* Set-AzureSqlDatabaseServerAuditingPolicy
* Remove-AzureSqlDatabaseAuditing
* Remove-AzureSqlDatabaseServerAuditing
* Use-AzureSqlDatabaseServerAuditingPolicy
* Allow users to define which storage account key (Primary or Secondary) to use when defining audit policy, using the “StorageKeyType” parameter.

2014.10.27 Version 0.8.10
* Azure Data Factory cmdlets in AzureResourceManager mode
* New-AzureDataFactory
Expand Down Expand Up @@ -58,6 +98,33 @@
* SlotStickyConnectionStringNames – connection string names not to be moved during swap operation
* SlotStickyAppSettingNames – application settings names not to be moved during swap operation
* AutoSwapSlotName – slot name to swap automatically with after successful deployment
* Recovery Services
* Import & view vault settings
* Import-AzureSiteRecoveryVaultSettingsFile
* Get-AzureSiteRecoveryVaultSettings
* Enumerate Servers, Protection Containers, Protection Entities
* Get-AzureSiteRecoveryServer
* Get-AzureSiteRecoveryProtectionContainer
* Get-AzureSiteRecoveryProtectionEntity
* Get-AzureSiteRecoveryVM
* Manage Azure Site Recovery Operations
* Get-AzureSiteRecoveryJob
* Restart-AzureSiteRecoveryJob
* Resume-AzureSiteRecoveryJob
* Stop-AzureSiteRecoveryJob
* Manage Recovery Plan
* New-AzureSiteRecoveryRecoveryPlan
* Get-AzureSiteRecoveryRecoveryPlanFile
* Get-AzureSiteRecoveryRecoveryPlan
* Remove-AzureSiteRecoveryRecoveryPlan
* Update-AzureSiteRecoveryRecoveryPlan
* Protection and Failover Operations
* Set-AzureSiteRecoveryProtectionEntity
* Start-AzureSiteRecoveryCommitFailoverJob
* Start-AzureSiteRecoveryPlannedFailoverJob
* Start-AzureSiteRecoveryTestFailoverJob
* Start-AzureSiteRecoveryUnplannedFailoverJob
* Update-AzureSiteRecoveryProtectionDirection

2014.10.03 Version 0.8.9
* Redis Cache cmdlets in AzureResourceManager mode
Expand Down
25 changes: 13 additions & 12 deletions build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,17 @@
ContinueOnError="false" />
</Target>

<PropertyGroup>
<NuGetCommand>$(MSBuildProjectDirectory)\src\.nuget\NuGet.exe</NuGetCommand>
<NuGetRestoreConfigFile>$(MSBuildProjectDirectory)\restore.config</NuGetRestoreConfigFile>
<NuGetRestoreConfigSwitch>-ConfigFile &quot;$(NuGetRestoreConfigFile)&quot;</NuGetRestoreConfigSwitch>
</PropertyGroup>

<!--
Force nuget package restore so that packages that include .targets files
don't need to be checked into source control.
-->
<Target Name="ForceRestorePackages">
<PropertyGroup>
<NuGetCommand>$(MSBuildProjectDirectory)\src\.nuget\NuGet.exe</NuGetCommand>
<NuGetRestoreConfigFile>$(MSBuildProjectDirectory)\restore.config</NuGetRestoreConfigFile>
<NuGetRestoreConfigSwitch>-ConfigFile &quot;$(NuGetRestoreConfigFile)&quot;</NuGetRestoreConfigSwitch>
</PropertyGroup>

<ItemGroup>
<NuGetCache Include="$(LOCALAPPDATA)\NuGet\Cache\*.nupkg"/>
</ItemGroup>
Expand All @@ -94,12 +94,7 @@
<WriteLinesToFile File="$(NuGetRestoreConfigFile)" Lines="&lt;configuration&gt;&lt;/configuration&gt;" Overwrite="true" Encoding="UTF-8" />
<!-- Create config for user name and password for private feed access -->
<Exec Command="$(NuGetCommand) sources add -Name AzureSdkInternal -Source &quot;https://www.myget.org/F/azure-sdk-internal/&quot; $(NuGetRestoreConfigSwitch)" />
<!-- Private versions of packages are picked up from these feeds, defined with environment variables -->
<Exec Command="$(NuGetCommand) sources add -Name PrimaryFeed -Source &quot;$(PRIVATE_FEED_URL)&quot; $(NuGetRestoreConfigSwitch)" Condition=" '$(PRIVATE_FEED_URL)'!='' "/>
<Exec Command="$(NuGetCommand) sources Update -Name PrimaryFeed -UserName $(PRIVATE_FEED_USER_NAME) -Password &quot;$(PRIVATE_FEED_PASSWORD)&quot; $(NuGetRestoreConfigSwitch)" EchoOff="true" Condition=" '$(PRIVATE_FEED_PASSWORD)'!='' AND '$(PRIVATE_FEED_USER_NAME)'!='' "/>
<Exec Command="$(NuGetCommand) sources add -Name SecondaryFeed -Source &quot;$(SECONDARY_FEED_URL)&quot; $(NuGetRestoreConfigSwitch)" Condition=" '$(SECONDARY_FEED_URL)'!='' "/>
<Exec Command="$(NuGetCommand) sources Update -Name SecondaryFeed -UserName $(SECONDARY_FEED_USER_NAME) -Password &quot;$(SECONDARY_FEED_PASSWORD)&quot; $(NuGetRestoreConfigSwitch)" EchoOff="true" Condition=" '$(SECONDARY_FEED_PASSWORD)'!='' AND '$(SECONDARY_FEED_USER_NAME)'!='' "/>

<CallTarget Targets="ForceRestorePackagesFromPrivateFeed"/>
<!-- Restore packages -->
<Exec Command="$(NuGetCommand) restore $(MSBuildProjectDirectory)\src\AzurePowerShell.sln $(NuGetRestoreConfigSwitch)" ContinueOnError="false" />
<!-- delete config file, don't want to leave passwords hanging around on the build server file system -->
Expand All @@ -108,6 +103,12 @@
<Exec Command="$(NuGetCommand) restore $(MSBuildProjectDirectory)\packages.config -PackagesDirectory $(MSBuildProjectDirectory)\packages" />
</Target>

<Target Name="ForceRestorePackagesFromPrivateFeed" Condition="'$(PRIVATE_FEED_PASSWORD)' != ''">
<Exec Command="$(NuGetCommand) sources add -Name Hydra -Source &quot;$(PRIVATE_FEED_URL)&quot; $(NuGetRestoreConfigSwitch)" />
<Exec Command="$(NuGetCommand) sources Update -Name Hydra -UserName $(PRIVATE_FEED_USER_NAME) -Password &quot;$(PRIVATE_FEED_PASSWORD)&quot; $(NuGetRestoreConfigSwitch)"
EchoOff="true" />
</Target>

<!-- Build all flavors of the Cmdlets -->
<Target Name="BuildCmdlets" DependsOnTargets="ForceRestorePackages">
<Message Importance="high" Text="Building Cmdlets..." />
Expand Down
4 changes: 2 additions & 2 deletions setup/azurecmd.wxs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">

<?define productName="Microsoft Azure PowerShell - October 2014" ?>
<?define productName="Microsoft Azure PowerShell - November 2014" ?>
<?define sourceDir="$(var.SolutionDir)..\src\Package\$(var.Configuration)" ?>
<?define caSourceDir="$(var.SolutionDir)setup\bin\$(var.Configuration)" ?>

<?define version="0.8.10.1" ?>
<?define version="0.8.11" ?>
<?define versionedStartMenuFolder="Microsoft Azure" ?>
<?define staleStartMenuFolder="Windows Azure" ?>

Expand Down
34 changes: 34 additions & 0 deletions src/Common/Commands.Common.Storage/StorageUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
using Microsoft.WindowsAzure.Management.Storage;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Auth;
using Microsoft.WindowsAzure.Storage.Blob;
using Microsoft.WindowsAzure.Storage.Table;

namespace Microsoft.WindowsAzure.Commands.Common.Storage
{
Expand Down Expand Up @@ -41,5 +43,37 @@ public static CloudStorageAccount GenerateCloudStorageAccount(StorageManagementC
tableEndpoint,
fileEndpoint);
}

public static string GenerateTableStorageSasUrl(string connectionString, string tableName, DateTime expiryTime, SharedAccessTablePermissions permissions)
{
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionString);
CloudTableClient tableClient = storageAccount.CreateCloudTableClient();
CloudTable tableReference = tableClient.GetTableReference(tableName);
tableReference.CreateIfNotExists();
var sasToken = tableReference.GetSharedAccessSignature(
new SharedAccessTablePolicy()
{
SharedAccessExpiryTime = expiryTime,
Permissions = permissions
});

return tableReference.Uri + sasToken;
}

public static string GenerateBlobStorageSasUrl(string connectionString, string blobContainerName, DateTime expiryTime, SharedAccessBlobPermissions permissions)
{
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionString);
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
CloudBlobContainer blobContainer = blobClient.GetContainerReference(blobContainerName);
blobContainer.CreateIfNotExists();
var sasToken = blobContainer.GetSharedAccessSignature(
new SharedAccessBlobPolicy()
{
SharedAccessExpiryTime = expiryTime,
Permissions = permissions
});

return blobContainer.Uri + sasToken;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</Reference>
<Reference Include="Microsoft.Azure.Utilities.HttpRecorder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Hydra.HttpRecorder.1.0.5406.28672-prerelease\lib\net45\Microsoft.Azure.Utilities.HttpRecorder.dll</HintPath>
<HintPath>..\..\packages\Hydra.HttpRecorder.1.0.5417.13285-prerelease\lib\net45\Microsoft.Azure.Utilities.HttpRecorder.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Data.Edm, Version=5.6.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Data.Edm.5.6.0\lib\net40\Microsoft.Data.Edm.dll</HintPath>
Expand Down
Loading

0 comments on commit 2a1bd99

Please sign in to comment.