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

ADE OnePass changes #14

Open
wants to merge 3 commits into
base: Az.RecoveryServices_preview
Choose a base branch
from

Conversation

sriramvu
Copy link
Member

Azure\azure-rest-api-specs PR: Azure/azure-rest-api-specs#6742

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.

@sriramvu sriramvu requested review from viverm and ayfathim July 26, 2019 14:54
@viverm
Copy link

viverm commented Aug 6, 2019

md file changes ?

/// Gets or sets the only constant ID throught out the enable disable cycle.
/// (with multiple switch protections in the middle) - Recovery Plans refer this ID.
/// </summary>
public string LifecycleId { get; set; }
Copy link

Choose a reason for hiding this comment

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

Do we want to expose it ?
what is need of this field ?

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, this is required for any pre/post scripts on the ReplicationProtectedItem.

/// <summary>
/// Gets or sets DiskEncryptionVaultId.
/// </summary>
public string DiskEncryptionVaultId { get; set; }
Copy link

Choose a reason for hiding this comment

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

keep name aligned with ASRAzureToAzureProtectedDiskDetails

@sriramvu
Copy link
Member Author

@ayfathim - please take care of the PR.

Thank you.

@sriramvu sriramvu requested a review from viverm August 30, 2019 00:39
viverm pushed a commit that referenced this pull request Oct 21, 2019
Regenerate help with latest and cleanup .psd1 file
punit-bhatt pushed a commit that referenced this pull request May 9, 2020
…01 (Azure#11790)

* [HPC-Cache] On-boarding of PowerShell Cmdlets for HPC Cache service. (Azure#527)

* Add initial structure for AZ HPC Cache PowerShell Cmdlets. (#1)

* Add initial structure for AZ HPC Cache PowerShell Cmdlets.

* Adding empty folder layout.

* Update project reference for Test project of HPC Cache (#2)

* Initial commit of clients / first mock cmdlet (#3)

* Initial commit of clients / first mock cmdlet

* Initial commit of clients / first mock cmdlet

* Rename Client, Remove unnecessary files, return skulist in azure cmdlet

* Remove utilities

* Add classes to wrap .NET SDK type object. (#4)

* Create wrapper for SDK management client (#5)

* Fix GetAzSku wrt client changes.

* Restructure base cmdlet and mangement client class.

* Test Framework, Additional Cmdlets, Sku Object, Formatting Fixes (#6)

* More commands and start of test framework

Move all logic out of hpc cache client to the commandlets

More commands and start of test framework

Updated commands using new client

fix rebase

fix spacing

fix comments

remove vars

* Test Framework working, add comments to code

* Help text files

* Updates to cmdlet New-AzHpcCache

* Update cmdlet Get-AzHpcCache

* Update cmdlet Get-AzHpcCacheUsageModels

* Update cmdlet Get-AzHpcCacheSku

* Update cmdlet Remove-AzHpcCache

* Cmdlet Update-AzHpcCache and help file

* Changes made for code review

* Start-AzHpcCache Cmdlet (#8)

* Add support for Start-AzHpcCache.

* Adds resource designer for the project.

* Adds assembly info for the project.

* Remove unused imports

* Remove .keep files as they are no longer required.

* Use resource designer to handle strings in remove hpc cache cmdlet.

* Fix namespace and add project reference to test project.

* Prefix with this for local references for better code readability.

* Fix argument validation.

* Add synopsis for start hpc cache cmdlet help file.

* Update Sku Test

* Fix formatting based on StyleCop

* Change output type of start cmdlet (#12)

* Flush-AzHpcCache cmdlet (#11)

Add FlushAzHpcCache.cs and Flush-AzHpcCache.md
Update Resources files.
Update AzHpcCache.md to include flush markdown file.
Update psd1 file to include new command.

* Add support for stop HPC cache cmdlet. (#13)

* Add support for stop HPC cache cmdlet.

* Fix typos

* Cmdlet: Remove Storage Target

* Cmdlet: Upgrade-AzHpcCache

* Add AsJob parameter option for action commands (#14)

* UpgradeCache and RemoveStorageTarget edits

* Add support for storage target create. (#17)

* Add PS wrapper classes required for storage targets.

* Add help for create storage target.

* Add new storage target cmdlet.

* Update resource designer for storage target.

* Get-AzHpcCacheStorageTarget cmdlet

* Fix help.md files to have correct messages

* PSHpcCache (#16)

* Update how cache is returned

* Update what is sent into PSHpcCache.cs

* Add enumberate Collection

* Update help text and comments (#19)

* Adds support for Set-AzHpcStorageTarget. (#20)

* Add support for storage target update.

* Add help for Set-AzHpcStorageTarget.

* Add hook for update storage target in PSD file.

* Fix typos in help and comments.

* Change UpdateHpcCache to SetHpcCache. (#21)

* Fix UpdateHpcCache to SetHpcCache

* update help

* Use Patch for Update, not Post - createOrUpdate

* Change getST cmdlet to also get individual ST

* Update test framework to use custom context and fixtures. (#24)

* Modify HpcCacheController to use RMTestBase base class and use HpcCacheTestContext.

* Update test class to use HpcCacheCollection and HpcCacheTestFixture.

* Update PS file to test Get-AzHpcCache by resource group and name.

* Add HpcCacheTestContext.

* Add HpcCacheCollection.

* Add HpcCacheTestFixture.

* Add cache helper.

* Add constants.

* Add support to handle ENV vars from constants.

* Add utilities required for fixture and custom context.

* Adds storage account and storage target fixture. (#25)

* Add CLFS storage target and get storage target support.

* Add StorageTargetName constant.

* Add StorageTargetName ENV var.

* Add Retry method and Aggregate exception handler.

* Add storage account fixture.

* Add storage account helper.

* Add example storage target cmdlet test.

* Update help text in SetAzHpcStorageTarget.cs (#26)

Update help text for cmdlet SetAzHpcCacheStorageTarget.

* Fix help.md files and help messages

* Fix for storage target update cmdlet. (#28)

* Add Cache, StorageTarget, and Operations tests

* If incorrect value is entered, return inner exception body message

* For Get and Remove - return inner exception body message

* Fix formatting / Fix Descriptions / Fix Typos  (#32)

* Fix formatting using stylecon

* Flush cmdlet updates

* Get-AzHpcCache cmdlet updates

* Get-AzHpcCacheSku cmdlet updates

* Get-AzHpcCacheStorageTarget cmdlet updates

* Get-AzHpcCacheUsageModels cmdlet updates

* New-AzHpcCache cmdlet updates

* Remove-AzHpcCache cmdlet updates

* Remove-AzHpcCacheStorageCache cmdlet updates

* Set-AzHpcCache cmdlet updates

* Start-AzHpcCache cmdlet updates

* Stop-AzHpcCache cmdlet updates

* Upgrade-AzHpcCache cmdlet updates

* New-AzHpcCacheStorageTarget and Set-AzHpcCacheStorageTarget cmdlet updates

* Fix mockContext for fixtures. (#34)

* Add required packages to test project.

* Add assembly info for test project.

* Fix references for resource manager.

* Remove constructor overloading & fix mockContext, also fix references for resource manager

* Dispose the context in StorageAccountFixture and fix the mockContext.

* Add storage account name constant (#35)

* Add StorageAccountName constant.

* Fix Context calling

* Add recorded tests (#33)

* Add recorded tests

* Rename folder

* Revert "Add storage account name constant (#35)" (#36)

This reverts commit 2ac58a8.

* Revert "Fix mockContext for fixtures. (#34)" (#37)

This reverts commit 768ba77.

* Fix Context (#38)

* Add assebly for tests project. (Azure#39)

* Remove completed TODO check. (Azure#40)

* Add fake help urls to make CI task pass (Azure#41)

* Remove completed TODO check.

* Add fake online documentation URL to make CI task pass.

* Update help files to fix fake URLS. it does not like fake servie & cmdlet name. (Azure#42)

* Fix CI task related issues (Azure#43)

* Remove unused imports

* Fix package references

* Update session records to use correct API versions.

* Package Changes / Resource Name Completer / Change Log and Solution (Azure#44)

* Update ChangeLog

* move packages to test

* Fix solution file, add ResourceGroupCompleter to cmdlets

* move all packages

* Update changelog to preview

* Add inputobj and resourceId params to Start/Stop/Flush/Upgrade. Update CacheName to name (Azure#45)

* Update Flush cmdlet to have InputObj and ResourceId, Update cacheName to Name, update test

* fix flush comments

* Fix StartAzHpcCache to include input obj and resourceId

* Fix StopAzHpcCache to include input obj and resourceId

* Fix UpgradeAzHpcCache to include input obj and resourceId

* test changes

* fix help message for cmdlets

* Add Alias and resource name completer for get cache & get storage target. (Azure#46)

* Add CacheName as an alias & use ResourceNameCompleter.

* Add StorageTargetName as an alias and use ResourceNameCompleter.

* Alias initialization

* Get storage target support pipeline cache input.

* New and Set cmdlets (Azure#47)

* update tests

* update NewAzHpcCache to have should process

* update Set cmdlet to use obj/resource Id and shouldProcess

* remove resourceId from Set

* update resouce designer

* Update help files (Azure#48)

* Fix reference

* Update help files

* Use CheckIn type for tests. (Azure#49)

* Add CacheName and StorageTargetName alias. (Azure#50)

* Update Alias in help

* Add CacheName alias and help text for parameters.

* Add StorageTargetName alias.

* Formatting changes.

* Add description to psd

* Remove whitespaces.

* rename files for linux (Azure#51)

* Add shouldProcess to required cmdlets and update junction parameter. (Azure#52)

* Add shouldProcess parameter

* Modify tests to honor force parameter

* Update help text

* Update usage model cmdlet name.

* Update help for all cmdlets to include whatIf

Co-authored-by: Rebecca Makar <[email protected]>
Co-authored-by: Rebecca Makar <[email protected]>

* Change StorageCache folder name to HPCCache and modify Upgrade cache cmdlet … (Azure#539)

* Change StorageCache folder name to HPCCache and modify Upgrade cache cmdlet.

* Update Az.HPCCache.psd1

Co-authored-by: Yunchi Wang <[email protected]>

* Release-2020-04-28-HPCCache

* Add mapping rule for HPCCache

* Remove Flush-AzHpcCache as Flush is not approved PS verb.

* Add default parameter set for storage target cmdlets and output type for get usage model cmdlet.

* Use parameter sets for Update-AzHpcCache

* Remove prerelease string from .psd file.

Co-authored-by: Rebecca Makar <[email protected]>
Co-authored-by: Rebecca Makar <[email protected]>
Co-authored-by: Yunchi Wang <[email protected]>
Co-authored-by: msJinLei <[email protected]>
singhabh27 pushed a commit that referenced this pull request Aug 23, 2024
* init add powershell cmdlet

* add customization for filedetails

* correct readme to include file workspace create

* add custom cmdlet for creating and uploading the file

* chunking logic for larger files

* add error for custom cmdlet when file too big

* combined cmdlets

* edit custom file upload command to not use default subscriptionid

* no default value for subid in custom file upload

* separate subscription and no subscription commands

* remove comments from combined cmd for file

* fix cmd

* custom no subscription file upload commands

* autogen docs for no sub file upload

* hide individual file commands

* add back workspace commands

* add name as alias for fileworkspacename fileworkspacesnosubscription

* remove update files and add alias for nosubscription file commands

* tests for get service

* tests for problem classification

* try adding erroractionpreference = stop

* tests for new file workspace

* tests for get file workspace

* more tests

* add tests for new file and upload, removefile name as a parameter

* remove new files no subscription

* tests for get file

* erroraction stop

* remove unnecessary comments and print statements

* docs for get support service

* problem classification docs

* add titles

* documentation for file workspace commands

* documentation for file/file workspace cmdlets

* documentation for checkNameAvailability

* added tests and documentation for operations, support ticket, communication and chat transcript cmdlets

* added examples for operations, support ticket, communication and chat transcript cmdlets

* resolve merge conflicts

* resolved PR comments

* get conflict file changes from grhuang/azsupport-autorest

* resolved merge conflict

* removed update communication sub and no sub scenarios

* Revert "removed update communication sub and no sub scenarios"

This reverts commit ccbfdee.

* removed update communication sub and no sub scenarios , updated readme

* make communiation and support ticket properties required in readme, edit get operation file name, edit calling internal cmdlets for file upload

* fix documentation

* fix top query

* add custom error handler

* consolidate list and get communicationsnosubscription and chattranscriptsnosubscription

* init changes to allow no subscription recording tests-need to use csp partner account in tenant 2e6a0c9f-986d-480e-ad4b-bdfddc047aba

* changes to not create new resources in playback

* remove custom error handler csharp

* init add changes to split subscription and no subscription tests

* update skip

* Update recordings

* update recordings

* add more examples to new-azsupportticket documentation

* update documentation and readme

* add directive back in

* make advanced diagnostic consent required

* Add custom error handling for New- and Update- cmdlets to print full details of error (#9)

* Add custom error handler

* Add default filter to retrieve tickets from the past week for Get-AzSupportTickets and Get-AzSupportTicketsNoSubscription (#10)

* add custom filtering for list support ticket if no filter is applied

* make transformations in swagger in readme to make enrollment id not readonly and show isTempTicket (#11)

* Add argument completer (#12)

* add argument completers

* add quotes to argument completers

* remove repeated time zone

* Regenerate powershell module with GA swagger (#13)

* Rerecord tests using GA version (#14)

* add tests for file size (will add recordings once Ga swagger available)

* Regenerate powershell module with GA swagger

* Rerecord tests with GA version

* Fix documentation

* fix url for file upload

---------

Co-authored-by: Grace Huang (from Dev Box) <[email protected]>
Co-authored-by: grhuangmsft <[email protected]>
Co-authored-by: Shreya Kumar <[email protected]>
Co-authored-by: Yunchi Wang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants