Skip to content

. #59

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 47 commits into from
Jul 31, 2015
Merged

. #59

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
f910122
Support for side by side module versioning
eshaparmar Jun 11, 2015
e2e95e4
version conditions got swiped by mistake
eshaparmar Jun 12, 2015
783ab7a
CR comments
eshaparmar Jun 17, 2015
4e319ad
Added format file for dsc get cmdlet in ARM
eshaparmar Jul 9, 2015
af44e43
Merge branch 'dev' of https://github.com/dscsolutions/azure-powershel…
eshaparmar Jul 9, 2015
d36f516
Merge branch 'armcmdlets-2.0' into bugfixes
eshaparmar Jul 9, 2015
3e5d8f3
Fix storage suffix in ASM cmdlets
narrieta Jul 10, 2015
15cfa04
Merge branch 'armcmdlets' of https://github.com/dscsolutions/azure-po…
narrieta Jul 10, 2015
1c018ae
Added storage suffix to ARM cmdlets
narrieta Jul 10, 2015
80f8a1e
Move common code to commons
eshaparmar Jul 10, 2015
817d3e0
Merge branch 'armcmdlets' into dev
eshaparmar Jul 10, 2015
23a7810
more changes
eshaparmar Jul 10, 2015
7c8f76c
Merge branch 'dev' of https://github.com/dscsolutions/azure-powershel…
narrieta Jul 10, 2015
3b5d5f6
Merge pull request #4 from dscsolutions/storage-suffix
narrieta Jul 10, 2015
c9ebb91
more changes
eshaparmar Jul 10, 2015
7ea546d
renamed extensions folder and added vs proj settings
eshaparmar Jul 11, 2015
d6c432b
Correcting paths and vs proj file
eshaparmar Jul 11, 2015
548a2ba
Fixed the build issues
eshaparmar Jul 11, 2015
21930a7
End to end publish ASM workflow
eshaparmar Jul 13, 2015
384850b
Final refactoring for DSC code for ARM and ASM
eshaparmar Jul 13, 2015
c143ebe
Fixed resharper warnings from serialier class
eshaparmar Jul 14, 2015
7c9083b
Merge storage suffix changes from dscsolutions 'dev' to 'refactoring'
eshaparmar Jul 14, 2015
e0e431a
Removed public and private settings from get output format file
eshaparmar Jul 15, 2015
bf25298
Making cmdlet base classes internal
eshaparmar Jul 15, 2015
973db34
Changing methods to internal
eshaparmar Jul 15, 2015
8c4427c
Merge branch 'dev' of https://github.com/Azure/azure-powershell into …
eshaparmar Jul 16, 2015
9fae049
Merge branch 'dev' of https://github.com/dscsolutions/azure-powershel…
eshaparmar Jul 16, 2015
e27e3b8
Fixing merge conflicts
eshaparmar Jul 16, 2015
18b9182
Adding extension name and publisher to get/remove ASM cmdlets that go…
eshaparmar Jul 22, 2015
926e58c
Utilities, Common infra, Object Models required for ARM SiteRecovery
sriramvu Jul 27, 2015
3326e60
ARM SiteRecovery cmdlets (Vault, Server, Protection Container, Protec…
sriramvu Jul 27, 2015
36665a4
csproj & sln changes for ARM SiteRecovery
sriramvu Jul 27, 2015
965764b
tests for ARM SiteRecovery
sriramvu Jul 28, 2015
8223f4f
Adding schema to data masking rule and refactoring
yoavrubin Jul 28, 2015
f252d31
updated to refer public NuGet, added setVaultContext, help file
sriramvu Jul 29, 2015
3a75be9
taken PR comments
sriramvu Jul 29, 2015
593276a
Regenerated wxi file
eshaparmar Jul 29, 2015
2484821
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
eshaparmar Jul 29, 2015
166d48e
Merge branch 'dev' into dsc_release
eshaparmar Jul 29, 2015
5d4f8e9
Regenerated wix file post merge from dev
eshaparmar Jul 29, 2015
50b95fc
Merge remote-tracking branch 'upstream/dev' into dev
sriramvu Jul 29, 2015
23d5c79
Merge pull request #658 from AsrArmOneSdk/dev
Jul 30, 2015
1d10cec
Adding schema to datamasking rules
yoavrubin Jul 30, 2015
e87409b
Updating policy tests
yoavrubin Jul 30, 2015
6689193
Merge branch 'dev' of https://github.com/Azure/azure-powershell into dev
yoavrubin Jul 30, 2015
cd9b53c
Merge pull request #647 from dscsolutions/dsc_release
stankovski Jul 30, 2015
6d8bbb3
Merge pull request #670 from yoavrubin/dev
yugangw-msft Jul 30, 2015
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
4 changes: 3 additions & 1 deletion AzurePowershell.Test.targets
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
<TestSettings_x64>.\src\Local.x64.testsettings</TestSettings_x64>
<ScenarioTestDebug>.\src\Common\Commands.ScenarioTest\bin\Debug\Microsoft.WindowsAzure.Commands.ScenarioTest.dll</ScenarioTestDebug>
<CommonTestDebug>.\src\Common\Commands.Common.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Common.Test.dll</CommonTestDebug>
<BackupTestDebug>.\src\ResourceManager\AzureBackup\Commands.AzureBackup.Test\bin\Debug\Microsoft.Azure.Commands.AzureBackup.Test.dll</BackupTestDebug>
<BackupTestDebug>.\src\ResourceManager\AzureBackup\Commands.AzureBackup.Test\bin\Debug\Microsoft.Azure.Commands.AzureBackup.Test.dll</BackupTestDebug>
<SiteRecoveryTestDebug>.\src\ResourceManager\SiteRecovery\Commands.SiteRecovery.Test\bin\Debug\Microsoft.Azure.Commands.SiteRecovery.Test.dll</SiteRecoveryTestDebug>
<SqlTestDebug>.\src\ResourceManager\Sql\Commands.Sql.Test\bin\Debug\Microsoft.Azure.Commands.Sql.Test.dll</SqlTestDebug>
<ComputeDebug>.\src\ResourceManager\Compute\Commands.Compute.Test\bin\Debug\Microsoft.Azure.Commands.Compute.dll</ComputeDebug>
<ComputeTestDebug>.\src\ResourceManager\Compute\Commands.Compute.Test\bin\Debug\Microsoft.Azure.Commands.Compute.Test.dll</ComputeTestDebug>
Expand Down Expand Up @@ -44,6 +45,7 @@

<ItemGroup>
<XUnitTests Include=".\src\ResourceManager\AzureBackup\Commands.AzureBackup.Test\bin\Debug\Microsoft.Azure.Commands.AzureBackup.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\SiteRecovery\Commands.SiteRecovery.Test\bin\Debug\Microsoft.Azure.Commands.SiteRecovery.Test.dll"/>
<XUnitTests Include=".\src\Common\Commands.Common.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Common.Test.dll"/>
<XUnitTests Include=".\src\ResourceManager\Sql\Commands.Sql.Test\bin\Debug\Microsoft.Azure.Commands.Sql.Test.dll"/>
<XUnitTests Include=".\src\ServiceManagement\Services\Commands.Test\bin\Debug\Microsoft.WindowsAzure.Commands.Test.dll"/>
Expand Down
406 changes: 342 additions & 64 deletions setup/azurecmdfiles.wxi

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions src/AzurePowershell.sln
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.AzureBackup", "Res
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.AzureBackup.Test", "ResourceManager\AzureBackup\Commands.AzureBackup.Test\Commands.AzureBackup.Test.csproj", "{678AE95D-2364-47D7-888C-3FFA6D412CC8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.SiteRecovery", "ResourceManager\SiteRecovery\Commands.SiteRecovery\Commands.SiteRecovery.csproj", "{7C879645-31EE-4A78-AD81-5512300FA104}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commands.SiteRecovery.Test", "ResourceManager\SiteRecovery\Commands.SiteRecovery.Test\Commands.SiteRecovery.Test.csproj", "{6C7D3D81-37AB-445E-8081-78A1FEC0A773}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -573,6 +577,14 @@ Global
{678AE95D-2364-47D7-888C-3FFA6D412CC8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{678AE95D-2364-47D7-888C-3FFA6D412CC8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{678AE95D-2364-47D7-888C-3FFA6D412CC8}.Release|Any CPU.Build.0 = Release|Any CPU
{7C879645-31EE-4A78-AD81-5512300FA104}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7C879645-31EE-4A78-AD81-5512300FA104}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7C879645-31EE-4A78-AD81-5512300FA104}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7C879645-31EE-4A78-AD81-5512300FA104}.Release|Any CPU.Build.0 = Release|Any CPU
{6C7D3D81-37AB-445E-8081-78A1FEC0A773}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6C7D3D81-37AB-445E-8081-78A1FEC0A773}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6C7D3D81-37AB-445E-8081-78A1FEC0A773}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6C7D3D81-37AB-445E-8081-78A1FEC0A773}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -619,5 +631,6 @@ Global
{F220C306-29A3-4511-8518-A58A55C60D07} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
{6448E795-3D02-4BDD-B0C7-AD0A2AFE3C8B} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
{678AE95D-2364-47D7-888C-3FFA6D412CC8} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
{6C7D3D81-37AB-445E-8081-78A1FEC0A773} = {95C16AED-FD57-42A0-86C3-2CF4300A4817}
EndGlobalSection
EndGlobal
14 changes: 14 additions & 0 deletions src/Common/Commands.Common/Commands.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,16 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Storage">
<HintPath>..\..\packages\WindowsAzure.Storage.4.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
<Reference Include="System.Net" />
<Reference Include="System.Net.Http" />
Expand Down Expand Up @@ -145,6 +149,14 @@
<Compile Include="AzurePowerShell.cs" />
<Compile Include="ComputeCloudException.cs" />
<Compile Include="Constants.cs" />
<Compile Include="Extensions\DSC\DscExtensionCmdletConstants.cs" />
<Compile Include="Extensions\DSC\DscExtensionPrivateSettings.cs" />
<Compile Include="Extensions\DSC\DscExtensionPublicSettings.cs" />
<Compile Include="Extensions\DSC\DscExtensionSettingsSerializer.cs" />
<Compile Include="Extensions\DSC\Exceptions\GetDscResourceException.cs" />
<Compile Include="Extensions\DSC\Publish\ConfigurationParseResult.cs" />
<Compile Include="Extensions\DSC\Publish\ConfigurationParsingHelper.cs" />
<Compile Include="Extensions\DSC\Publish\DscExtensionPublishCmdletCommonBase.cs" />
<Compile Include="SecureStringExtensions.cs" />
<Compile Include="ConversionUtilities.cs" />
<Compile Include="DebugStreamTraceListener.cs" />
Expand Down Expand Up @@ -182,13 +194,15 @@
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
<Import Project="..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.14\tools\Microsoft.Bcl.Build.targets')" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;

namespace Microsoft.WindowsAzure.Commands.Common.Extensions.DSC
{
public static class DscExtensionCmdletConstants
{
//common extension constants
internal static readonly string ExtensionPublishedNamespace = "Microsoft.Powershell";
internal static readonly string ExtensionPublishedName = "DSC";
internal const string DefaultContainerName = "windows-powershell-dsc";

internal const int MinMajorPowerShellVersion = 4;
internal const string ZipFileExtension = ".zip";
internal const string Ps1FileExtension = ".ps1";
internal const string Psm1FileExtension = ".psm1";


internal static readonly HashSet<String> UploadArchiveAllowedFileExtensions =
new HashSet<String>(StringComparer.OrdinalIgnoreCase) { Ps1FileExtension, Psm1FileExtension, ZipFileExtension };
internal static readonly HashSet<String> CreateArchiveAllowedFileExtensions =
new HashSet<String>(StringComparer.OrdinalIgnoreCase) { Ps1FileExtension, Psm1FileExtension };
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
// limitations under the License.
// ----------------------------------------------------------------------------------

namespace Microsoft.Azure.Commands.Compute.Extension.DSC
namespace Microsoft.WindowsAzure.Commands.Common.Extensions.DSC
{

using System.Collections;

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
using System.Collections;
using System.Collections.Generic;

namespace Microsoft.Azure.Commands.Compute.Extension.DSC
namespace Microsoft.WindowsAzure.Commands.Common.Extensions.DSC
{
/// <summary>
/// Represents public settings. Serialized representation of this object stored as a plain text string on the VM.
Expand All @@ -40,21 +40,21 @@ internal class Version1
/// <returns></returns>
public DscExtensionPublicSettings ToCurrentVersion()
{
List<Property> properties = new List<Property>();
foreach (DictionaryEntry p in this.Properties)
var properties = new List<Property>();
foreach (DictionaryEntry p in Properties)
{
properties.Add(new Property()
properties.Add(new Property
{
Name = p.Key.ToString(),
TypeName = p.Value.GetType().ToString(),
Value = p.Value
});
}
return new DscExtensionPublicSettings()
return new DscExtensionPublicSettings
{
SasToken = this.SasToken,
ModulesUrl = this.ModulesUrl,
ConfigurationFunction = this.ConfigurationFunction,
SasToken = SasToken,
ModulesUrl = ModulesUrl,
ConfigurationFunction = ConfigurationFunction,
Properties = properties.ToArray(),
ProtocolVersion = new Version(1, 0, 0, 0)
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,27 @@
// limitations under the License.
// ----------------------------------------------------------------------------------


using Newtonsoft.Json;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Management.Automation;
using System.Runtime.InteropServices;
using System.Security;
using Newtonsoft.Json;

namespace Microsoft.Azure.Commands.Compute.Extension.DSC
namespace Microsoft.WindowsAzure.Commands.Common.Extensions.DSC
{
public class DscSettingsSerializer
public class DscExtensionSettingsSerializer
{
/// <summary>
/// Serialize DscPublicSettings to string.
/// Serialize DscExtensionPublicSettings to string.
/// </summary>
/// <param name="publicSettings"></param>
/// <param name="extensionPublicSettings"></param>
/// <returns></returns>
public static string SerializePublicSettings(DscExtensionPublicSettings publicSettings)
public static string SerializePublicSettings(DscExtensionPublicSettings extensionPublicSettings)
{
return JsonConvert.SerializeObject(publicSettings);
return JsonConvert.SerializeObject(extensionPublicSettings);
}

/// <summary>
Expand All @@ -48,10 +47,10 @@ public static string SerializePrivateSettings(DscExtensionPrivateSettings privat

public static DscExtensionPublicSettings DeserializePublicSettings(string publicSettingsString)
{
DscExtensionPublicSettings publicSettings;
DscExtensionPublicSettings extensionPublicSettings;
try
{
publicSettings = string.IsNullOrEmpty(publicSettingsString)
extensionPublicSettings = string.IsNullOrEmpty(publicSettingsString)
? null
: JsonConvert.DeserializeObject<DscExtensionPublicSettings>(publicSettingsString);
}
Expand All @@ -62,14 +61,14 @@ public static DscExtensionPublicSettings DeserializePublicSettings(string public
{
DscExtensionPublicSettings.Version1 publicSettingsV1 =
JsonConvert.DeserializeObject<DscExtensionPublicSettings.Version1>(publicSettingsString);
publicSettings = publicSettingsV1.ToCurrentVersion();
extensionPublicSettings = publicSettingsV1.ToCurrentVersion();
}
catch (JsonException)
{
throw;
}
}
return publicSettings;
return extensionPublicSettings;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
using System;
using System.Globalization;

namespace Microsoft.Azure.Commands.Compute.Extension.DSC

namespace Microsoft.WindowsAzure.Commands.Common.Extensions.DSC.Exceptions
{
[Serializable]
public class GetDscResourceException : UnauthorizedAccessException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,16 @@
// limitations under the License.
// ----------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Management.Automation.Language;

namespace Microsoft.Azure.Commands.Compute.Extension.DSC
namespace Microsoft.WindowsAzure.Commands.Common.Extensions.DSC.Publish
{
public class ConfigurationParseResult
{
public string Path { get; set; }
public ParseError[] Errors { get; set; }
public List<String> RequiredModules { get; set; }
public Dictionary<string,string> RequiredModules { get; set; }

}
}
Loading