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

[Subscription RP] New-AzureRmSubscription #5803

Merged
merged 19 commits into from
Apr 11, 2018

Conversation

wilcobmsft
Copy link
Member

@wilcobmsft wilcobmsft commented Mar 24, 2018

Description

Adding a cmdlet New-AzureRmSubscription which will allow EA customers to automate subscription creation.

Checklist

@wilcobmsft
Copy link
Member Author

.NET SDK merged.

<ProjectReference Include="..\..\..\Common\Commands.Common\Common.Netcore.csproj" />
<ProjectReference Include="..\..\Common\Commands.Common.Authentication.ResourceManager\Common.ResourceManager.Authentication.Netcore.csproj" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, you cannot take a reference to this project, as it contains dependencies that are controlled by Profile, and may change. I assume that this is to get the PSAzureSubscription model?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it is for this, we can move this type into another assembly (for example, the common resource manager assembly).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is just for PSAzureSubscription. I'll just create a new IAzureSubscription implementation instead for now and remove the dependency.

<ProjectReference Include="..\..\..\Common\Commands.Common\Commands.Common.csproj">
<Project>{5ee72c53-1720-4309-b54b-5fb79703195f}</Project>
<Name>Commands.Common</Name>
</ProjectReference>
<ProjectReference Include="..\..\Common\Commands.Common.Authentication.ResourceManager\Commands.Common.Authentication.ResourceManager.csproj">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHould not take a reference to this (see above)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

namespace Microsoft.Azure.Commands.Subscription.Cmdlets
{
[Cmdlet(VerbsCommon.Get, "AzureRmSubscriptionDefinition", DefaultParameterSetName = ParameterSetNames.Default), OutputType(typeof(List<PSSubscriptionDefinition>))]
public class GetAzureRmSubscriptionDefinition : AzureSubscriptionDefinitionCmdletBase
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that there is no 'Get' cmdlet, how do I get the subscriptions? Will Get-AzureRmSubscription work?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the existing Get-AzureRmSubscription cmdlet will work.

@markcowl
Copy link
Member

markcowl commented Apr 5, 2018

markcowl
markcowl previously approved these changes Apr 5, 2018
@markcowl
Copy link
Member

@maddieclayton maddieclayton merged commit fb55055 into Azure:preview Apr 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants