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

Create dynamic ValidateSet parameters for values that are Rubrik CDM version specific #640

Open
jaapbrasser opened this issue May 28, 2020 · 1 comment

Comments

@jaapbrasser
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Older versions of Rubrik CDM might throw errors when a validateset properties of a newer CDM version is used. As reported in #628

Describe the solution you'd like

When using the Rubrik SDK for PowerShell against older versions of Rubrik CDM some of the ValidateSet properties might not apply to the older version of Rubrik CDM. To remediate this issue we could change the ValidateSet to be dynamic, displaying values based on the api version stored in
$rubrikconnection.api global var and retrieved through Get-RubrikAPIData

Describe alternatives you've considered

Allow the cmdlets to throw against older functions

Additional context

For more information about how to potentially solve this take a look at the documentation here:
About Functions Advanced Parameters

The following cmdlets are using valideset in one or more parameters:

  • \Rubrik\Public\Export-RubrikVApp.ps1
  • \Rubrik\Public\Get-RubrikArchive.ps1
  • \Rubrik\Public\Get-RubrikEvent.ps1
  • \Rubrik\Public\Get-RubrikEventSeries.ps1
  • \Rubrik\Public\Get-RubrikFilesetTemplate.ps1
  • \Rubrik\Public\Get-RubrikHost.ps1
  • \Rubrik\Public\Get-RubrikHyperVVM.ps1
  • \Rubrik\Public\Get-RubrikLogShipping.ps1
  • \Rubrik\Public\Get-RubrikNASShare.ps1
  • \Rubrik\Public\Get-RubrikNetworkThrottle.ps1
  • \Rubrik\Public\Get-RubrikNutanixVM.ps1
  • \Rubrik\Public\Get-RubrikObject.ps1
  • \Rubrik\Public\Get-RubrikOracleDB.ps1
  • \Rubrik\Public\Get-RubrikReport.ps1
  • \Rubrik\Public\Get-RubrikReportData.ps1
  • \Rubrik\Public\Get-RubrikRequest.ps1
  • \Rubrik\Public\Get-RubrikScvmm.ps1
  • \Rubrik\Public\Get-RubrikUnmanagedObject.ps1
  • \Rubrik\Public\Get-RubrikVApp.ps1
  • \Rubrik\Public\Get-RubrikVAppExportOption.ps1
  • \Rubrik\Public\Get-RubrikVCD.ps1
  • \Rubrik\Public\Get-RubrikVM.ps1
  • \Rubrik\Public\Get-RubrikVMwareDatastore.ps1
  • \Rubrik\Public\Invoke-RubrikRESTCall.ps1
  • \Rubrik\Public\New-RubrikFilesetTemplate.ps1
  • \Rubrik\Public\New-RubrikLogShipping.ps1
  • \Rubrik\Public\New-RubrikManagedVolume.ps1
  • \Rubrik\Public\New-RubrikNASShare.ps1
  • \Rubrik\Public\New-RubrikReport.ps1
  • \Rubrik\Public\New-RubrikSLA.ps1
  • \Rubrik\Public\Remove-RubrikFilesetSnapshot.ps1
  • \Rubrik\Public\Remove-RubrikHyperVSnapshot.ps1
  • \Rubrik\Public\Remove-RubriKManagedVolumeSnapshot.ps1
  • \Rubrik\Public\Remove-RubrikNutanixVMSnapshot.ps1
  • \Rubrik\Public\Remove-RubrikVolumeGroupSnapshot.ps1
  • \Rubrik\Public\Reset-RubrikLogShipping.ps1
  • \Rubrik\Public\Set-RubrikDatabase.ps1
  • \Rubrik\Public\Set-RubrikLogShipping.ps1
  • \Rubrik\Public\Set-RubrikNutanixVM.ps1
  • \Rubrik\Public\Set-RubrikProxySetting.ps1
  • \Rubrik\Public\Set-RubrikSetting.ps1
  • \Rubrik\Public\Set-RubrikSLA.ps1
  • \Rubrik\Public\Set-RubrikVM.ps1
@jaapbrasser
Copy link
Contributor Author

You can use the following command to generate an overview of where it is used:

gci .\Rubrik\ -recurse | sls 'validateset'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant