Skip to content

Commit

Permalink
Merge pull request #12 from Azure/dev
Browse files Browse the repository at this point in the history
pull from dev branch of azure/azure-powershell
  • Loading branch information
jtlibing committed Mar 5, 2015
2 parents b347d24 + a2dd76d commit 1b37982
Show file tree
Hide file tree
Showing 172 changed files with 3,249 additions and 1,482 deletions.
8 changes: 4 additions & 4 deletions AzurePowershell.Test.targets
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,12 @@
ContinueOnError="false" />
</Target>

<Target Name="AzureRTFuntional" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
<Message Importance="high" Text="Running AzureRT Funtional tests..." />
<Target Name="AzureRTFunctional" DependsOnTargets="Clean;BuildDebug;BeforeRunTests">
<Message Importance="high" Text="Running AzureRT Functional tests..." />

<Delete Files="$(TestOutputDirectory)\RTFuntionalDebug.trx" />
<Delete Files="$(TestOutputDirectory)\RTFunctionalDebug.trx" />
<Exec
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTTestSettings) /category:Functional /resultsfile:$(TestOutputDirectory)\RTFuntionalDebug.trx"
Command="MSTest.exe /testcontainer:$(AzureRTTestContainer) /testsettings:$(AzureRTTestSettings) /category:Functional /resultsfile:$(TestOutputDirectory)\RTFunctionalDebug.trx"
ContinueOnError="false" />
</Target>

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 - February 2015" ?>
<?define productName="Microsoft Azure PowerShell - March 2015" ?>
<?define sourceDir="$(var.SolutionDir)..\src\Package\$(var.Configuration)" ?>
<?define caSourceDir="$(var.SolutionDir)setup\bin\$(var.Configuration)" ?>

<?define version="0.8.14" ?>
<?define version="0.8.15" ?>
<?define versionedStartMenuFolder="Microsoft Azure" ?>
<?define staleStartMenuFolder="Windows Azure" ?>

Expand Down
214 changes: 214 additions & 0 deletions setup/azurecmdfiles.wxi

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
</Reference>
<Reference Include="Microsoft.Azure.Common.Authentication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.0.13-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.0.14-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Common.NetFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down
2 changes: 1 addition & 1 deletion src/Common/Commands.Common.Storage/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<packages>
<package id="Hyak.Common" version="1.0.2" targetFramework="net45" />
<package id="Microsoft.Azure.Common" version="2.0.2" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Authentication" version="1.0.13-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Authentication" version="1.0.14-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Resources" version="2.12.0-preview" targetFramework="net45" />
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
Expand Down
8 changes: 4 additions & 4 deletions src/Common/Commands.Common.Test/Commands.Common.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@
<HintPath>..\..\packages\Hyak.Common.1.0.2\lib\portable-net403+win+wpa81\Hyak.Common.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Common">
<HintPath>..\..\packages\Microsoft.Azure.Common.2.0.2\lib\net45\Microsoft.Azure.Common.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Azure.Common.2.0.3\lib\net45\Microsoft.Azure.Common.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Common.Authentication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.0.13-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.0.14-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Common.NetFramework">
<HintPath>..\..\packages\Microsoft.Azure.Common.2.0.2\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Azure.Common.2.0.3\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.ResourceManager">
<HintPath>..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll</HintPath>
Expand Down Expand Up @@ -107,7 +107,7 @@
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Compute, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Compute.9.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Compute.9.2.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Storage">
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll</HintPath>
Expand Down
6 changes: 3 additions & 3 deletions src/Common/Commands.Common.Test/packages.config
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Hyak.Common" version="1.0.2" targetFramework="net45" />
<package id="Microsoft.Azure.Common" version="2.0.2" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Authentication" version="1.0.13-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Common" version="2.0.3" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Authentication" version="1.0.14-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Resources" version="2.12.0-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Test.HttpRecorder" version="1.0.5513.27084-prerelease" targetFramework="net45" />
Expand All @@ -16,7 +16,7 @@
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management" version="4.0.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="9.0.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="9.2.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.0.0" targetFramework="net45" />
<package id="Moq" version="4.2.1402.2112" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
Expand Down
14 changes: 14 additions & 0 deletions src/Common/Commands.Common/AzurePSCmdlet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,20 @@ protected static AzureProfile InitializeDefaultProfile()
return new AzureProfile();
}

/// <summary>
/// Get the context the context for the current profile before BeginProcessing is called
/// </summary>
/// <returns>The context for the current profile</returns>
protected AzureContext GetCurrentContext()
{
if (Profile != null)
{
return Profile.Context;
}

return CurrentProfile.Context;
}

protected static void InitializeTokenCaches()
{
DefaultMemoryTokenCache = new TokenCache();
Expand Down
4 changes: 2 additions & 2 deletions src/Common/Commands.Common/AzurePowerShell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ public class AzurePowerShell

public const string AssemblyCopyright = "Copyright © Microsoft";

public const string AssemblyVersion = "0.8.14";
public const string AssemblyVersion = "0.8.15";

public const string AssemblyFileVersion = "0.8.14";
public const string AssemblyFileVersion = "0.8.15";

public const string ProfileFile = "AzureProfile.json";

Expand Down
2 changes: 1 addition & 1 deletion src/Common/Commands.Common/Commands.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
</Reference>
<Reference Include="Microsoft.Azure.Common.Authentication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.0.13-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.0.14-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Common.NetFramework, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down
72 changes: 72 additions & 0 deletions src/Common/Commands.Common/ServiceManagementTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1615,6 +1615,51 @@ public string IOType
this.SetValue("IOType", value);
}
}

[DataMember(Name = "ResizedSizeInGB", EmitDefaultValue = false, Order = 6)]
public int? ResizedSizeInGB
{
get
{
return this.GetValue<int?>("ResizedSizeInGB");
}
set
{
this.SetValue("ResizedSizeInGB", value);
}
}
}
#endregion

#region VMImageInput
[DataContract(Namespace = Constants.ServiceManagementNS)]
public class VMImageInput : Mergable<VMImageInput>
{
[DataMember(Name = "OSDiskConfiguration", EmitDefaultValue = false, Order = 1)]
public OSDiskConfiguration OSDiskConfiguration
{
get
{
return this.GetValue<OSDiskConfiguration>("OSDiskConfiguration");
}
set
{
this.SetValue("OSDiskConfiguration", value);
}
}

[DataMember(Name = "DataDiskConfigurations", EmitDefaultValue = false, Order = 2)]
public DataDiskConfigurationList DataDiskConfigurations
{
get
{
return this.GetValue<DataDiskConfigurationList>("DataDiskConfigurations");
}
set
{
this.SetValue("DataDiskConfigurations", value);
}
}
}
#endregion

Expand Down Expand Up @@ -1959,6 +2004,19 @@ public string State
base.SetValue("State", value);
}
}

[DataMember(Name = "ForceUpdate", EmitDefaultValue = false, Order = 7)]
public bool? ForceUpdate
{
get
{
return base.GetValue<bool?>("ForceUpdate");
}
set
{
base.SetValue("ForceUpdate", value);
}
}
}

[CollectionDataContract(Name = "ResourceExtensionReferences", Namespace = Constants.ServiceManagementNS)]
Expand Down Expand Up @@ -2610,6 +2668,13 @@ public string IOType
set;
}

[DataMember(EmitDefaultValue = false, Order = 7)]
public int ResizedSizeInGB
{
get;
set;
}

public ExtensionDataObject ExtensionData { get; set; }
}

Expand Down Expand Up @@ -2658,6 +2723,13 @@ public string IOType
set;
}

[DataMember(EmitDefaultValue = false, Order = 6)]
public int ResizedSizeInGB
{
get;
set;
}

public ExtensionDataObject ExtensionData { get; set; }
}

Expand Down
2 changes: 1 addition & 1 deletion src/Common/Commands.Common/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package id="Hyak.Common" version="1.0.2" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.2" targetFramework="net45" />
<package id="Microsoft.Azure.Common" version="2.0.2" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Authentication" version="1.0.13-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Authentication" version="1.0.14-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Resources" version="2.12.0-preview" targetFramework="net45" />
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
Expand Down
2 changes: 1 addition & 1 deletion src/Common/Commands.Profile/Commands.Profile.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</Reference>
<Reference Include="Microsoft.Azure.Common.Authentication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.0.13-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.0.14-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Common.NetFramework">
<HintPath>..\..\packages\Microsoft.Azure.Common.2.0.2\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
Expand Down
10 changes: 9 additions & 1 deletion src/Common/Commands.Profile/Environment/AddAzureEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,20 @@ public class AddAzureEnvironmentCommand : SubscriptionCmdletBase
HelpMessage = "Resource identifier of Azure Key Vault data service that is the recipient of the requested token.")]
public string AzureKeyVaultServiceEndpointResourceId { get; set; }

[Parameter(Position = 12, Mandatory = false, ValueFromPipelineByPropertyName = true,
HelpMessage = "Enable ADFS authentication by disabling the authority validation")]
public SwitchParameter EnableADFSAuthentication { get; set; }

public AddAzureEnvironmentCommand() : base(true) { }

[PermissionSet(SecurityAction.Demand, Name = "FullTrust")]
public override void ExecuteCmdlet()
{
var newEnvironment = new AzureEnvironment {Name = Name};
var newEnvironment = new AzureEnvironment
{
Name = Name,
OnPremise = EnableADFSAuthentication
};
newEnvironment.Endpoints[AzureEnvironment.Endpoint.PublishSettingsFileUrl] = PublishSettingsFileUrl;
newEnvironment.Endpoints[AzureEnvironment.Endpoint.ServiceManagement] = ServiceEndpoint;
newEnvironment.Endpoints[AzureEnvironment.Endpoint.ResourceManager] = ResourceManagerEndpoint;
Expand Down
2 changes: 1 addition & 1 deletion src/Common/Commands.Profile/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<packages>
<package id="Hyak.Common" version="1.0.2" targetFramework="net45" />
<package id="Microsoft.Azure.Common" version="2.0.2" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Authentication" version="1.0.13-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Authentication" version="1.0.14-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Resources" version="2.12.0-preview" targetFramework="net45" />
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
Expand Down
11 changes: 5 additions & 6 deletions src/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@
<HintPath>..\..\packages\Hyak.Common.1.0.2\lib\portable-net403+win+wpa81\Hyak.Common.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Common">
<HintPath>..\..\packages\Microsoft.Azure.Common.2.0.2\lib\net45\Microsoft.Azure.Common.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Azure.Common.2.0.3\lib\net45\Microsoft.Azure.Common.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Common.Authentication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.0.13-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.0.14-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Common.NetFramework">
<HintPath>..\..\packages\Microsoft.Azure.Common.2.0.2\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Azure.Common.2.0.3\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.ResourceManager">
<HintPath>..\..\packages\Microsoft.Azure.Management.Resources.2.12.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll</HintPath>
Expand Down Expand Up @@ -101,9 +101,8 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.4.0.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Compute, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Compute.9.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
<Reference Include="Microsoft.WindowsAzure.Management.Compute">
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Compute.9.2.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Storage">
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.0.0\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll</HintPath>
Expand Down
6 changes: 3 additions & 3 deletions src/Common/Commands.ScenarioTest/packages.config
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Hyak.Common" version="1.0.2" targetFramework="net45" />
<package id="Microsoft.Azure.Common" version="2.0.2" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Authentication" version="1.0.13-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Common" version="2.0.3" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Authentication" version="1.0.14-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Resources" version="2.12.0-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Test.Framework" version="1.0.5513.27084-prerelease" targetFramework="net45" />
Expand All @@ -17,7 +17,7 @@
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management" version="4.0.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="9.0.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="9.2.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.0.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.WebSites" version="4.4.0-prerelease" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
</Reference>
<Reference Include="Microsoft.Azure.Common.Authentication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.0.13-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
<HintPath>..\..\packages\Microsoft.Azure.Common.Authentication.1.0.14-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Azure.Common.NetFramework">
<HintPath>..\..\packages\Microsoft.Azure.Common.2.0.2\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
Expand Down
Loading

0 comments on commit 1b37982

Please sign in to comment.