-
Notifications
You must be signed in to change notification settings - Fork 4k
Relay PS Draft #3789
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
Relay PS Draft #3789
Conversation
@v-Ajnava, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR. |
@v-Ajnava applying the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comments from the review have only been partially applied. Specific comments inline for the first set of cmdlets - most comments apply to all cmdlets.
# ProcessorArchitecture = '' | ||
|
||
# Modules that must be imported into the global environment prior to importing this module | ||
RequiredModules = @(@{ModuleName = 'AzureRM.Profile'; ModuleVersion = '2.7.0'; }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should match the current version (2.8.0)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved
PSData = @{ | ||
|
||
# Tags applied to this module. These help with module discovery in online galleries. | ||
Tags = 'Azure','ResourceManager','ARM','Relay' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about ServiceBus as a Tag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved
--> | ||
## Current Release | ||
|
||
## Version 0.0.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only heading in the file should be for 'Current Release' - the file will be updated after the release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So please remove the heading for version 0.0.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved
## Version 0.0.1 | ||
* Adds commandlets for the Azure Relay | ||
|
||
- New-AzureRmRelayNamespace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably too much info. Simply adding a list of cdlets and a summary of what, as a group, the cmdlets allow you to do should be sufficient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved
<Prefer32Bit>false</Prefer32Bit> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<SignAssembly>true</SignAssembly> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to sign the test assembly, please don't
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved.
/// 'Remove-AzureRmRelayNamespaceAuthorizationRule' Cmdlet deletes specified Relay Namespace AuthorizationRule | ||
/// </summary> | ||
[Cmdlet(VerbsCommon.Remove, RelayNamespaceAuthorizationRuleVerb, SupportsShouldProcess = true), OutputType(typeof(bool))] | ||
public class RemoveAzureRmRelayNamespaceAuthorizationRule : AzureRelayCmdletBase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment - authorization rule cmdlets should be centralized
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file is excluded. missed to delete the file. deleting this file now.
ValueFromPipelineByPropertyName = true, | ||
HelpMessage = "Relay Namespace object.")] | ||
[ValidateNotNullOrEmpty] | ||
public RelayNamespaceAttirbutesUpdateParameter InputObject { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ValueFromPipeline, as noted previously
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Resolved.
/// 'Set-AzureRmRelayNamespaceAuthorizationRule' Cmdlet updates specified Relay Namespace AuthorizationRule | ||
/// </summary> | ||
[Cmdlet(VerbsCommon.Set, RelayNamespaceAuthorizationRuleVerb, SupportsShouldProcess = true), OutputType(typeof(AuthorizationRuleAttributes))] | ||
public class SetAzureRelayNamespaceAuthorizationRule : AzureRelayCmdletBase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment about authorization rule cmdlets
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I excluded individual authorization rules cmdlets but missed to delete these files. Deleting it now.
/// <para> If AuthorizationRule name provided, a single AuthorizationRule detials will be returned</para> | ||
/// <para> If AuthorizationRule name not provided, list of AuthorizationRules will be returned</para> | ||
/// </summary> | ||
[Cmdlet(VerbsCommon.Get, RelayWcfRelayAuthorizationRuleVerb), OutputType(typeof(List<AuthorizationRuleAttributes>))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comments as for all authorization rule cmdlets. Also, comments from HybridConnection relays apply ato all cmdlets here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I excluded individual authorization rules cmdlets but missed to delete these files. Deleting it now.
Position = 1, | ||
HelpMessage = "Namespace Name.")] | ||
[ValidateNotNullOrEmpty] | ||
public string NamespaceName { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you neglected to apply the review commenbts here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My apologies, I excluded individual authorization rules cmdlets but missed to delete these files. Deleting it now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of nits, which you could clean up in a subsequent PR
{ | ||
if (ShouldProcess(target: RegenerateKey, action: string.Format(Resources.RegenerateKeyHybirdconnection, Name, HybridConnection))) | ||
{ | ||
WriteObject(Client.HybridConnectionsRegenerateKeys(ResourceGroupName, Namespace, HybridConnection, Name, RegenerateKey)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should enumerate the keys if this is a collection (for each of these branches), bu using WriteObject(collection, true)
@@ -0,0 +1,43 @@ | |||
// ---------------------------------------------------------------------------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<nit>
For .Net coding Guildines compatibility, you should change the name fo the file to match the name of the class </nit>
@@ -1453,3 +1453,18 @@ | |||
"Microsoft.Azure.Commands.Network.dll","Microsoft.Azure.Commands.Network.NewAzureRmIpsecPolicyCommand","New-AzureRmIpsecPolicy","1","8410","Parameter SADataSizeKilobytes of cmdlet New-AzureRmIpsecPolicy does not follow the enforced naming convention of using a singular noun for a parameter name.","Consider using a singular noun for the parameter name." | |||
"Microsoft.Azure.Commands.Network.dll","Microsoft.Azure.Commands.Network.NewAzureVirtualNetworkGatewayConnectionCommand","New-AzureRmVirtualNetworkGatewayConnection","1","8410","Parameter UsePolicyBasedTrafficSelectors of cmdlet New-AzureRmVirtualNetworkGatewayConnection does not follow the enforced naming convention of using a singular noun for a parameter name.","Consider using a singular noun for the parameter name." | |||
"Microsoft.Azure.Commands.Network.dll","Microsoft.Azure.Commands.Network.NewAzureVirtualNetworkGatewayConnectionCommand","New-AzureRmVirtualNetworkGatewayConnection","1","8410","Parameter IpsecPolicies of cmdlet New-AzureRmVirtualNetworkGatewayConnection does not follow the enforced naming convention of using a singular noun for a parameter name.","Consider using a singular noun for the parameter name." | |||
"Microsoft.Azure.Commands.AnalysisServices.Dataplane.dll","Microsoft.Azure.Commands.AnalysisServices.Dataplane.RestartAzureAnalysisServer","Restart-AzureAnalysisServicesInstance","2","8210","Restart-AzureAnalysisServicesInstance does not have a Force parameter but the cmdlet verb 'Restart' indicates that it may perform destructive actions under certain circumstances. Consider whether the cmdlet should have a Force parameter anduse ShouldContinue under some circumstances. ","Consider wether the cmdlet should have a Force parameter and use ShouldContinue under some circumstances. " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to set suppressions for severity 2 signature issues - these are just wranings. Sev 0 and Sev 1 need to be suppressed, if valid.
Description
Relay Power Shell First draft.
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
Testing Guidelines
Cmdlet Signature Guidelines
ShouldProcess
and haveSupportShouldProcess=true
specified in the cmdlet attribute. You can find more information onShouldProcess
here.OutputType
attribute if any output is produced - if the cmdlet produces no output, it should implement aPassThru
parameter.Cmdlet Parameter Guidelines