Skip to content

Adding aliases to a few cmdlets and updating help documentation to match #4110

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 3 commits into from
Jun 13, 2017

Conversation

akromm-zz
Copy link
Contributor

@akromm-zz akromm-zz commented Jun 9, 2017

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.

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.

@akromm I believe you will need to add the aliases (and mapping to corresponding cmdlets) in the following files:

@akromm-zz
Copy link
Contributor Author

@cormacpayne I'm only adding aliases to cmdlet parameters and not to any cmdlet name. Is it still required to modify those files (there is no cmdlet mapping)?

@cormacpayne cormacpayne dismissed their stale review June 9, 2017 22:49

I mixed up cmdlet and parameter aliases - ignore my previous comment

cormacpayne
cormacpayne previously approved these changes Jun 9, 2017
@@ -8,7 +8,7 @@ Locale: en-US

# AzureRM.Sql Module
## Description
This topic displays help topics for the [Azure SQL Database](https://docs.microsoft.com/azure/sql-database/) Cmdlets.
Copy link
Member

Choose a reason for hiding this comment

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

@akromm I think this was a change that was recently made. Do we want to revert it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, thank you for catching. Where is the source for this comment? I'd like to change it at the source so that future re-generation of this file doesn't cause this.

Copy link
Member

Choose a reason for hiding this comment

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

@akromm I was under the impression that this was the source. Do you remember the command you used to regenerate the markdown help?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cormacpayne I used platyPS:
$pathToHelpFolder = "E:\git\azure-powershell\src\ResourceManager\Sql\Commands.Sql\help"
Update-MarkdownHelpModule -Path $PathToHelpFolder -RefreshModulePage -AlphabeticParamsOrder

Copy link
Member

Choose a reason for hiding this comment

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

@akromm that's the correct command. I would assume this is an issue with how platyPS parses the markdown (maybe it can't handle links?). I can investigate myself and open an issue in their repository if necessary.

jaredmoo
jaredmoo previously approved these changes Jun 9, 2017
@@ -169,7 +169,7 @@ Specifies the maximum size of the database in bytes.
```yaml
Type: Int64
Parameter Sets: (All)
Aliases:
Aliases:
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: remove?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is auto generated so I'd rather leave it.

100 DTUs
- Premium.
125 DTUs
For the current preview, the edition must be Standard.
Copy link
Contributor

Choose a reason for hiding this comment

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

obsolete comment? we have basic and premium edition pools now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have removed this.

@akromm-zz akromm-zz dismissed stale reviews from jaredmoo and cormacpayne via 7052a61 June 9, 2017 23:47
### CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cormacpayne how do I make the generated markdown include the missing '[' and ']' ?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

@akromm I'd have to look, but I think a previously opened PR made the change to wrap the about_CommonParameters text in the '[' and ']' brackets

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cormacpayne correct, a previous PR added in the enclosed brackets to make the text a link. I would like to keep it that way during future re-generation of the doc files.

What are your thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

@akromm I agree, it would make it much nicer to view in markdown. I can also talk to the platyPS team about how we can prevent this from getting overridden in the future, since it seems to be a hard-coded string that they use for when a cmdlet uses the above set of verbs.

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