-
Notifications
You must be signed in to change notification settings - Fork 4k
Added ReachabilityProviderList and ReachabilityReport cmdlets + tests #4880
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
Conversation
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.
@irrogozh a couple of minor comments. In addition:
-
Please update the Network change log to reflect the changes that are being made in this cmdlet.
-
Please generate and commit the markdown files associated with the new cmdlets you are adding so there is help content available for users.
Mandatory = false, | ||
HelpMessage = "Optional Azure regions to scope the query to.", | ||
ValueFromPipelineByPropertyName = true)] | ||
public List<string> AzureLocations { 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.
@irrogozh please rename this parameter to AzureLocation
to avoid using a plural noun. I would go ahead and just rename this parameter to Location
to be consistent with all other cmdlets that have a parameter that accepts Azure locations.
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.
Done
Mandatory = true, | ||
HelpMessage = "The name of the network watcher resource group.", | ||
ParameterSetName = "SetByName", | ||
ValueFromPipelineByPropertyName = true)] |
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.
@irrogozh please remove the ValueFromPipelineByPropertyName
attribute from this parameter- ResourceId
should be the only parameter that has this attribute
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.
done
HelpMessage = "The name of network watcher.", | ||
ParameterSetName = "SetByName", | ||
ValueFromPipeline = true, | ||
ValueFromPipelineByPropertyName = true)] |
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.
@irrogozh please remove both the ValueFromPipeline
and ValueFromPipelineByPropertyName
attributes from this parameter - ResourceId
should be the only parameter that has the ValueFromPipelineByPropertyName
attribute
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.
done
|
||
namespace Microsoft.Azure.Commands.Network.Automation | ||
{ | ||
[Cmdlet(VerbsCommon.Get, "AzureRmNetworkWatcherReachabilityProvidersList", DefaultParameterSetName = "SetByResource"), OutputType(typeof(PSAvailableProvidersList))] |
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.
@irrogozh I think the default parameter set should be SetByName
, so we prompt the user to provide a NetworkWatcherName
and ResourceGroupName
rather than the NetworkWatcher
object
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.
Fixed
|
||
namespace Microsoft.Azure.Commands.Network.Automation | ||
{ | ||
[Cmdlet(VerbsCommon.Get, "AzureRMNetworkWatcherReachabilityReport", DefaultParameterSetName = "SetByResource"), OutputType(typeof(PSAzureReachabilityReport))] |
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.
@irrogozh same comment about using the SetByName
parameter set as the default parameter set for this cmdlet
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.
Fixed
HelpMessage = "The name of network watcher.", | ||
ParameterSetName = "SetByName", | ||
ValueFromPipeline = true, | ||
ValueFromPipelineByPropertyName = true)] |
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.
@irrogozh same comment about removing ValueFromPipeline
and ValueFromPipelineByPropertyName
attributes from this parameter
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.
Done
Mandatory = true, | ||
HelpMessage = "The name of the network watcher resource group.", | ||
ParameterSetName = "SetByName", | ||
ValueFromPipelineByPropertyName = true)] |
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.
@irrogozh same comment about removing the ValueFromPipelineByPropertyName
attribute from this parameter
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.
done
Mandatory = false, | ||
HelpMessage = "List of Internet service providers.", | ||
ValueFromPipelineByPropertyName = true)] | ||
public List<string> Providers { 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.
@irrogozh please rename this parameter to Provider
to avoid using a plural noun
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.
Done
Mandatory = false, | ||
HelpMessage = "Optional Azure regions to scope the query to.", | ||
ValueFromPipelineByPropertyName = true)] | ||
public List<string> AzureLocations { 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.
@irrogozh same comment about renaming this parameter to Location
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.
Done
@irrogozh please make sure to pull in the latest changes from 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.
@irrogozh a few minor comments, otherwise LGTM
@@ -20,6 +20,10 @@ | |||
## Current Release | |||
|
|||
## Version 4.4.1 | |||
* Added cmdlet to list available internet service providers for a specified Azure region |
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.
@irrogozh please move this snippet you added to be under the ## Current Release
header
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.
Done
[Parameter( | ||
Mandatory = false, | ||
HelpMessage = "The name of the state.", | ||
ValueFromPipelineByPropertyName = true)] |
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.
@irrogozh please remove ValueFromPipelineByPropertyName
from this parameter for consistency with other parameters.
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.
Done
# Get-AzureRMNetworkWatcherReachabilityReport | ||
|
||
## SYNOPSIS | ||
{{Fill in the Synopsis}} |
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.
@irrogozh please fill in any templates in the markdown files you've added
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.
Done
] | ||
} | ||
] | ||
|
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.
@irrogozh it looks like you're missing ending ```
in this example
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.
Fixed
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
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