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

. #153

Merged
merged 32 commits into from
Oct 10, 2015
Merged

. #153

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
0a53a49
Add back removed resourcemanager startups cript
markcowl Oct 7, 2015
313c26e
Updating scripts for new module split
markcowl Oct 7, 2015
7fb3abc
Merge branch 'release-1.0.0-preview' of github.com:Azure/azure-powers…
markcowl Oct 7, 2015
7b53ee3
Fix badly named cmdlets in Profile and Keyvault
jianghaolu Oct 8, 2015
2cc2548
Merge branch 'release-1.0.0-preview' of github.com:Azure/azure-powers…
jianghaolu Oct 8, 2015
d7ae6f3
Fix remaining issues with storage account and DSC/IAAS extensions
markcowl Oct 8, 2015
0ce925d
Additional usages of raw subscription
markcowl Oct 8, 2015
d1f225b
Merge pull request #1082 from markcowl/resourcescript
markcowl Oct 8, 2015
fc33f7f
Merge pull request #1084 from jianghaolu/rename
devigned Oct 8, 2015
836da7b
Merge pull request #1086 from markcowl/storagedsc
markcowl Oct 8, 2015
834fec3
Increased minor version of all packages to 0.10.0
stankovski Oct 8, 2015
7172ad5
Support SM/RM cmdlets execution with RP registration
Oct 8, 2015
eb56c84
Merge pull request #1088 from stankovski/release-1.0.0-preview
stankovski Oct 8, 2015
d4b8469
Bumped up MSI and AzureRM version to 1.0
stankovski Oct 8, 2015
938d572
Removed verbose setting
stankovski Oct 8, 2015
93b9c68
Merge pull request #1089 from ogail/release-1.0.0-preview
Oct 8, 2015
7c456c5
Merge pull request #1090 from stankovski/release-1.0.0-preview
stankovski Oct 8, 2015
3cd6723
Added tag "Azure" to packages
stankovski Oct 8, 2015
2c6b2be
Merge pull request #1092 from stankovski/release-1.0.0-preview
stankovski Oct 8, 2015
c9b0b24
Add incompatible version check [Fixes #105258902]
markcowl Oct 9, 2015
115ae88
Fix indentation in new script function
markcowl Oct 9, 2015
0e27fbd
Merge pull request #1093 from markcowl/installerupdate
Oct 9, 2015
a661f2b
fixing the script for32-bit machines
markcowl Oct 9, 2015
59f1a01
Fix issue with context changes not copying the token cache
markcowl Oct 9, 2015
b3c26e5
Ensure that TokenCache is transmitted to context when context is set
markcowl Oct 9, 2015
671fcef
Merge pull request #1094 from markcowl/installerupdate
markcowl Oct 9, 2015
c72da97
Update package metadata, license uri, and signing
markcowl Oct 9, 2015
1bd4cbf
Added changes to ARM management cmdlets
ravbhatnagar Oct 9, 2015
1d44122
Merge pull request #1098 from ravbhatnagar/release-1.0.0-preview
Oct 9, 2015
a3e8da7
Merge pull request #1097 from markcowl/signscript
markcowl Oct 9, 2015
09c3909
Merge pull request #1099 from Azure/release-1.0.0-preview
markcowl Oct 10, 2015
38f0e66
Merge pull request #1100 from Azure/master
markcowl Oct 10, 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
22 changes: 21 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
## 2015.09.03 version 0.9.8
## 2015.10.09 version 1.0 preview
* Azure Resource Manager Management Cmdlets
* New-AzureRmResourceGroup - Removed the template deployment parameters from this cmdlet. Template deployment will now be
handled only through the New-AzureRmResourceGroupDeployment
* Get-AzureRmResource - Will query directly against the Resource Provider. Removed parameters for tags from here. New cmdlets added for querying against the cache as listed below.
* Get-AzureRmResourceGroup - Removed parameters for finding resources through tags. New cmdlet added for handling this
functionality as mentioned below.
* Find-AzureRmResource - Query against the cache.
* Find-AzureRmResourceGroup - Tag parameter added for querying resource group containing specific tags.
* Test-AzureResource - Cmdlet removed. Will be adding a better and reliable way to achieve this scenario which will be guaranteed to work against all Resource providers.
* Test-AzureResourceGroup - Cmdlet removed. Will be adding a better and reliable way to achieve this scenario.
* Get-AzureRmResourceProvider - This cmdlet has been renamed. Earlier it was called Get-AzureProvider. We have changed the output to include locations. Now you can use this to find out which providers and types are available for certain location.
* Cmdlets added for policy
* New-AzureRmPolicyDefinition, Get-AzureRmPolicyDefinition, Set-AzureRMPolicyDefinition, Remove-AzureRmPolicyDefinition
* New-AzureRmPolicyAssignment, Get-AzureRmPolicyAssignment, Set-AzureRmPolicyAssignment, Remove-AzureRmPolicyAssignment
* Consolidated Log cmdlets
* Removed Get-AzureResourceLog, Get-AzureResourceGroupLog, Get-AzureProviderLog
* Added new cmdlet Get-AzureLog which you can use to obtain logs at different scopes like resource group, resource, provider.
* Removed Get-AzureLocation - the functionality is now provided through the Get-AzureRmResourceProvider

## 2015.09.03 version 0.9.8
* Azure Redis Cache cmdlets
* New-AzureRMRedisCache - 'RedisVersion' parameter is deprecated.
* Azure Compute (ARM) Cmdlets
Expand Down
1 change: 1 addition & 0 deletions build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@
<DelaySignedAssembliesToSign Include="$(LibrarySourceFolder)\Package\$(Configuration)\**\Microsoft*Azure*Commands*.dll" />
<DelaySignedAssembliesToSign Include="$(LibrarySourceFolder)\Package\$(Configuration)\**\Microsoft.Azure.Common.Extensions.dll" />
<ScriptsToSign Include="$(LibrarySourceFolder)\Package\$(Configuration)\**\*.ps1" />
<ScriptsToSign Include="$(LibrarySourceFolder)\Package\$(Configuration)\**\*.psm1" />
</ItemGroup>

<Message Importance="high" Text="$(LibrarySourceFolder)\Package\$(Configuration) does not contains any files to sign. Code sign will skip."
Expand Down
2 changes: 0 additions & 2 deletions setup-powershellget/Setup/ShortcutStartup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ To use Azure Service Management cmdlets please execute the following cmdlet:
Install-Module Azure
"@
Write-Output $welcomeMessage

$VerbosePreference = "Continue"
}
}
catch
Expand Down
2 changes: 1 addition & 1 deletion setup-powershellget/azurecmd.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<?define sourceDir="$(var.SolutionDir)..\src\Package\$(var.Configuration)" ?>
<?define caSourceDir="$(var.SolutionDir)setup\bin\$(var.Configuration)" ?>

<?define version="0.10.0" ?>
<?define version="1.0.0" ?>
<?define versionedStartMenuFolder="Microsoft Azure" ?>
<?define staleStartMenuFolder="Windows Azure" ?>

Expand Down
60 changes: 60 additions & 0 deletions src/Common/Commands.Common/AzureSubscriptionExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Azure.Common.Authentication.Models;

namespace Microsoft.WindowsAzure.Commands.Common
{
public static class AzureSubscriptionExtensions
{

public static string GetStorageAccountName(this AzureSubscription subscription)
{
if (subscription == null || !subscription.IsPropertySet(AzureSubscription.Property.StorageAccount))
{
return null;
}

var result = subscription.GetProperty(AzureSubscription.Property.StorageAccount);
if (!string.IsNullOrWhiteSpace(result))
{
try
{
var pairs = result.Split(new char[]{';'}, StringSplitOptions.RemoveEmptyEntries);
foreach (var pair in pairs)
{
var sides = pair.Split(new char[] {'='}, 2, StringSplitOptions.RemoveEmptyEntries);
if (string.Equals("AccountName", sides[0].Trim(), StringComparison.OrdinalIgnoreCase))
{
result = sides[1].Trim();
break;
}
}
}
catch
{
// if there are any errors, return the unchanged account name
}
}

return result;
}

}
}
1 change: 1 addition & 0 deletions src/Common/Commands.Common/Commands.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
<Compile Include="AzurePowerShell.cs" />
<Compile Include="AzureRmProfileProvider.cs" />
<Compile Include="AzureSMProfileProvder.cs" />
<Compile Include="AzureSubscriptionExtensions.cs" />
<Compile Include="Constants.cs" />
<Compile Include="ContextExtensions.cs" />
<Compile Include="IProfileProvider.cs" />
Expand Down
1 change: 0 additions & 1 deletion src/Common/Commands.Common/GeneralUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,5 @@ public static void ClearCurrentStorageAccount(bool clearSMContext = false)
}
}
}

}
}
6 changes: 3 additions & 3 deletions 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.9.10'
ModuleVersion = '0.10.0'

# ID used to uniquely identify this module
GUID = '00612bca-fa22-401d-a671-9cc48b010e3b'
Expand All @@ -24,7 +24,7 @@ CompanyName = 'Microsoft Corporation'
Copyright = 'Microsoft Corporation. All rights reserved.'

# Description of the functionality provided by this module
Description = 'Microsoft Azure PowerShell - Storage'
Description = 'Microsoft Azure PowerShell - Storage service cmdlets. Manages blobs, queues, tables and files in Microsoft Azure storage accounts'

# Minimum version of the Windows PowerShell engine required by this module
PowerShellVersion = '3.0'
Expand All @@ -45,7 +45,7 @@ CLRVersion='4.0'
ProcessorArchitecture = 'None'

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '0.9.10' })
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '0.10.0'})

# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = @()
Expand Down
6 changes: 3 additions & 3 deletions src/ResourceManager/ApiManagement/AzureRM.ApiManagement.psd1
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.10.0'

# ID used to uniquely identify this module
GUID = 'f875725d-8ce4-423f-a6af-ea880bc63f13'
Expand All @@ -24,7 +24,7 @@ CompanyName = 'Microsoft Corporation'
Copyright = 'Microsoft Corporation. All rights reserved.'

# Description of the functionality provided by this module
Description = 'Microsoft Azure PowerShell - Api Management'
Description = 'Microsoft Azure PowerShell - Api Management service cmdlets for Azure Resource Manager'

# Minimum version of the Windows PowerShell engine required by this module
PowerShellVersion = '3.0'
Expand All @@ -45,7 +45,7 @@ CLRVersion='4.0'
ProcessorArchitecture = 'None'

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '0.9.10' })
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '0.10.0'})

# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = @()
Expand Down
6 changes: 3 additions & 3 deletions src/ResourceManager/Automation/AzureRM.Automation.psd1
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.10.0'

# ID used to uniquely identify this module
GUID = 'bcea1c70-a32b-48c3-a05c-323e1c02f4d3'
Expand All @@ -24,7 +24,7 @@ CompanyName = 'Microsoft Corporation'
Copyright = 'Microsoft Corporation. All rights reserved.'

# Description of the functionality provided by this module
Description = 'Microsoft Azure PowerShell - Automation'
Description = 'Microsoft Azure PowerShell - Automation service cmdlets for Azure Resource Manager'

# Minimum version of the Windows PowerShell engine required by this module
PowerShellVersion = '3.0'
Expand All @@ -45,7 +45,7 @@ CLRVersion='4.0'
ProcessorArchitecture = 'None'

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '0.9.10' })
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '0.10.0'})

# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = @()
Expand Down
6 changes: 3 additions & 3 deletions src/ResourceManager/AzureBackup/AzureRM.Backup.psd1
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.10.0'

# ID used to uniquely identify this module
GUID = '0b1d76f5-a928-4b8f-9c83-df26947568d4'
Expand All @@ -24,7 +24,7 @@ CompanyName = 'Microsoft Corporation'
Copyright = 'Microsoft Corporation. All rights reserved.'

# Description of the functionality provided by this module
Description = 'Microsoft Azure PowerShell - AzureBackup'
Description = 'Microsoft Azure PowerShell - Azure Backup service cmdlets for Azure Resource Manager'

# Minimum version of the Windows PowerShell engine required by this module
PowerShellVersion = '3.0'
Expand All @@ -45,7 +45,7 @@ CLRVersion='4.0'
ProcessorArchitecture = 'None'

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '0.9.10' })
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '0.10.0'})

# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = @()
Expand Down
6 changes: 3 additions & 3 deletions src/ResourceManager/AzureBatch/AzureRM.Batch.psd1
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.10.0'

# ID used to uniquely identify this module
GUID = 'a8f00f40-1c1a-49b5-9db3-24076b75c3cf'
Expand All @@ -24,7 +24,7 @@ CompanyName = 'Microsoft Corporation'
Copyright = 'Microsoft Corporation. All rights reserved.'

# Description of the functionality provided by this module
Description = 'Microsoft Azure PowerShell - Batch'
Description = 'Microsoft Azure PowerShell - Batch service cmdlets for Azure Resource Manager'

# Minimum version of the Windows PowerShell engine required by this module
PowerShellVersion = '3.0'
Expand All @@ -45,7 +45,7 @@ CLRVersion='4.0'
ProcessorArchitecture = 'None'

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '0.9.10' })
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '0.10.0'})

# Assemblies that must be loaded prior to importing this module
RequiredAssemblies = @()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
using System;
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------------

using System;
using System.Linq;
using Microsoft.Azure.Common.Authentication;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,16 @@ static AzureRMCmdlet()
}
}

/// <summary>
/// Creates new instance from AzureRMCmdlet and add the RPRegistration handler.
/// </summary>
public AzureRMCmdlet()
{
AzureSession.ClientFactory.RemoveHandler(typeof(RPRegistrationDelegatingHandler));
AzureSession.ClientFactory.AddHandler(new RPRegistrationDelegatingHandler(
() => AzureSession.ClientFactory.CreateClient<ResourceManagementClient>(DefaultContext, AzureEnvironment.Endpoint.ResourceManager),
() => new ResourceManagementClient(
AzureSession.AuthenticationFactory.GetSubscriptionCloudCredentials(DefaultContext, AzureEnvironment.Endpoint.ResourceManager),
DefaultContext.Environment.GetEndpointAsUri(AzureEnvironment.Endpoint.ResourceManager)),
s => _debugMessages.Enqueue(s)));
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Azure.Commands.ResourceManager.Common.Properties;
using Microsoft.Azure.Common.Authentication.Models;
using Microsoft.IdentityModel.Clients.ActiveDirectory;

namespace Microsoft.Azure.Commands.ResourceManager.Common
{
public static class AzureRMProfileExtensions
{
/// <summary>
/// Set the context for the current profile, preserving token cache information
/// </summary>
/// <param name="profile">The profile to change the context for</param>
/// <param name="newContext">The new context, with no token cache information.</param>
public static void SetContextWithCache(this AzureRMProfile profile, AzureContext newContext)
{
if (profile == null)
{
throw new ArgumentNullException("profile", Resources.ProfileCannotBeNull);
}

if (newContext == null)
{
throw new ArgumentNullException("newContext", Resources.ContextCannotBeNull);
}

newContext.TokenCache = TokenCache.DefaultShared.Serialize();
profile.Context = newContext;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
<ItemGroup>
<Compile Include="AccessTokenExtensions.cs" />
<Compile Include="AzureRmCmdlet.cs" />
<Compile Include="AzureRMProfileExtensions.cs" />
<Compile Include="Generated\AuthorizationClient.cs" />
<Compile Include="Generated\AuthorizationClientExtensions.cs" />
<Compile Include="Generated\DeploymentOperationOperations.cs" />
Expand Down
Loading