Skip to content

update New Roleassignment creation calls to have delegation flag #5023

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 11 commits into from
Dec 7, 2017

Conversation

darshanhs90
Copy link
Contributor

@darshanhs90 darshanhs90 commented Nov 23, 2017

Linked to SDK PR
Azure/azure-sdk-for-net#3872

Description


This checklist is used to make sure that common guidelines for a pull request are followed. You can find a more complete discussion of PowerShell cmdlet best practices here.

General Guidelines

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.
  • The pull request does not introduce breaking changes (unless a major version change occurs in the assembly and module).

Testing Guidelines

  • Pull request includes test coverage for the included changes.
  • PowerShell scripts used in tests should do any necessary setup as part of the test or suite setup, and should not use hard-coded values for locations or existing resources.

Cmdlet Signature Guidelines

  • New cmdlets that make changes or have side effects should implement ShouldProcess and have SupportShouldProcess=true specified in the cmdlet attribute. You can find more information on ShouldProcess here.
  • Cmdlet specifies OutputType attribute if any output is produced - if the cmdlet produces no output, it should implement a PassThru parameter.

Cmdlet Parameter Guidelines

  • Parameter types should not expose types from the management library - complex parameter types should be defined in the module.
  • Complex parameter types are discouraged - a parameter type should be simple types as often as possible. If complex types are used, they should be shallow and easily creatable from a constructor or another cmdlet.
  • Cmdlet parameter sets should be mutually exclusive - each parameter set must have at least one mandatory parameter not in other parameter sets.

@darshanhs90 darshanhs90 changed the title update Roleasignment calls to have delegation flag [waiting for SDK PR completion] update Roleasignment calls to have delegation flag Nov 23, 2017
@darshanhs90 darshanhs90 changed the title [waiting for SDK PR completion] update Roleasignment calls to have delegation flag [waiting for SDK PR completion] update Roleassignment calls to have delegation flag Nov 23, 2017
@cormacpayne
Copy link
Member

@darshanhs90 feel free to remove the Do Not Merge label and assign this PR back to me when the SDK was been published and this PR has been updated

@darshanhs90 darshanhs90 changed the title [waiting for SDK PR completion] update Roleassignment calls to have delegation flag update New Roleassignment creation calls to have delegation flag Nov 30, 2017
@darshanhs90 darshanhs90 added this to the December 2017 milestone Nov 30, 2017
@cormacpayne
Copy link
Member

@azuresdkci test this please

@darshanhs90
Copy link
Contributor Author

@cormacpayne Have updated the PR after the publish of the SDK

@shawns1
Copy link

shawns1 commented Dec 1, 2017

@azuresdkci test this please

Copy link
Member

@cormacpayne cormacpayne left a comment

Choose a reason for hiding this comment

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

@darshanhs90 a few comments

@@ -246,10 +249,10 @@
<Project>{d3804b64-c0d3-48f8-82ec-1f632f833c9e}</Project>
<Name>Commands.Common.Authentication</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\Common\Commands.Common.Authorization\Commands.Common.Authorization.csproj">
<!-- <ProjectReference Include="..\..\..\Common\Commands.Common.Authorization\Commands.Common.Authorization.csproj">
Copy link
Member

@cormacpayne cormacpayne Dec 1, 2017

Choose a reason for hiding this comment

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

@darshanhs90 please remove this section if you are going to comment it out #Resolved

@@ -144,10 +147,10 @@
<Project>{70527617-7598-4aef-b5bd-db9186b8184b}</Project>
<Name>Commands.Common.Authentication.Abstractions</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\Common\Commands.Common.Authorization\Commands.Common.Authorization.csproj">
<!-- <ProjectReference Include="..\..\..\Common\Commands.Common.Authorization\Commands.Common.Authorization.csproj">
Copy link
Member

@cormacpayne cormacpayne Dec 1, 2017

Choose a reason for hiding this comment

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

@darshanhs90 same comment about removing this section #Resolved

@@ -2,4 +2,5 @@
<packages>
<package id="Microsoft.Azure.Management.ResourceManager" version="1.6.0-preview" targetFramework="net452" />
<package id="Microsoft.Azure.Management.Resources" version="2.20.0-preview" targetFramework="net45" />
<package id="Microsoft.Azure.Management.Authorization" version="2.6.0-preview" targetFramework="net452" />
Copy link
Member

@cormacpayne cormacpayne Dec 1, 2017

Choose a reason for hiding this comment

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

@darshanhs90 since you are adding a new package to your module, you will need to do two additional things:

(1) Add the new package to the RequiredAssemblies field in AzureRM.Resources

(2) Update the .wxi file #Resolved

Copy link
Contributor Author

@darshanhs90 darshanhs90 Dec 1, 2017

Choose a reason for hiding this comment

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

@cormacpayne Regenerated the wxi file as per the steps mentioned , Let me know if there is anything that needs to be done since this feature was planned to be included for the upcoming 12/8 powersheel release.

[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, ParameterSetName = ParameterSet.ResourceWithSPN,
HelpMessage = "Delegation flag.")]
[ValidateNotNullOrEmpty]
public bool CanDelegate { get; set; }
Copy link
Member

@cormacpayne cormacpayne Dec 1, 2017

Choose a reason for hiding this comment

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

@darshanhs90 two comments about this parameter:

(1) Since it can be found in every parameter set, it would be best if you would put just one Parameter attribute on this, but give it no ParameterSetName property - this will put the parameter into every single parameter set and you won't have to copy-paste the Parameter attribute for every single set it can belong to

(2) Rather than using a bool, this should be a SwitchParameter that a user can set. #Resolved

@darshanhs90
Copy link
Contributor Author

@cormacpayne Have removed the property ValueFromPipelineByPropertyName for the switch parameter

cormacpayne
cormacpayne previously approved these changes Dec 7, 2017
@cormacpayne
Copy link
Member

@darshanhs90
Copy link
Contributor Author

@cormacpayne Should i change the base branch to release-5.1.0 for it to make into the upcoming release?

@cormacpayne cormacpayne changed the base branch from preview to release-5.1.0 December 7, 2017 06:35
@cormacpayne
Copy link
Member

@darshanhs90 good call, forgot to do that. I just changed the base branch and there looks to be some merge conflicts. Would you mind resolving these?

@darshanhs90
Copy link
Contributor Author

Sure will do right away

@darshanhs90
Copy link
Contributor Author

@cormacpayne Fixed the merge conflicts

@cormacpayne
Copy link
Member

@cormacpayne cormacpayne merged commit 394590a into Azure:release-5.1.0 Dec 7, 2017
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