azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

Set-AzureRmRecoveryServicesVaultContext is inconsistent with how other services are managed and is also missing a "Get-" partner

Open MattAllison opened this issue 9 years ago • 7 comments

Cmdlet(s)

Set-AzureRmRecoveryServicesVaultContext

PowerShell Version

5.1.14409.1005

Module Version

AzureRM.RecoveryServices 2.6.0

OS Version

10.0.14409.1005

Description

The Set-AzureRMRecoveryServicesVaultContext command is inconsistent with other "Context" commands such as Azure Storage. This pattern doesn't seem to be consistent with most other Azure commands as well.

Also, there doesn't seem to be a corresponding "Get-" command to show what the current Context is.

Debug Output

N/A

Script/Steps for Reproduction

MattAllison avatar Mar 13 '17 15:03 MattAllison

@pragrawa would you mind taking a look at this issue?

cormacpayne avatar Mar 13 '17 18:03 cormacpayne

@MattAllison would you mind providing more details about the pattern you mentioned previously?

cormacpayne avatar Apr 20 '17 23:04 cormacpayne

Sorry for the delay.

As I'm sure you know, current Azure Backup cmdlets work using a model similar to Set-AzureRMContext.

Backup is the only service that uses this model - all other Azure services work by passing a variable to set their scope. For example, Add-AzureRMNetworkInterface has a -VM parameter for the VM to interact with and Azure Storage commands use a Context object passed as a parameter.

IMO, having Backup not follow a similar model creates unnecessary challenges in learning and operations.

Also, in its current state, there isn't a "Get-AzureRMREcoveryServicesVaultContext" command so, even with the current model, there isn't a proper way to check what the current context is.

Does that help?

MattAllison avatar Apr 24 '17 17:04 MattAllison

@dragonfly91 @viverm would you mind taking a look at this issue?

cormacpayne avatar Jul 03 '18 21:07 cormacpayne

@dragonfly91 do you know why we have cmdlet SetAzureRmRecoveryServicesVaultContext and SetAzureRmRecoveryServicesBackupProperties in recoveryservices module.

In ASR we are not using them , if it is not needed in backup we can clean them up in upcoming breaking release.

viverm avatar Sep 11 '18 14:09 viverm

We are planning to deprecate this command. We now have an option to provide vaultID as a parameter for any command. This lets you know for which vault this command is executed.

pvrk avatar May 28 '19 09:05 pvrk

#please-close

pvrk avatar May 28 '19 09:05 pvrk