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

Prevent Get-RubrikVM $SLAID parameter value overwrite when it has a value #165

Closed
tlindsay42 opened this issue Mar 7, 2018 · 3 comments
Closed
Assignees
Labels

Comments

@tlindsay42
Copy link
Contributor

Expected Behavior

Get-RubrikVM -SLAID <slaId> should map to a query key to filter at the server-side to the VMs assigned to that SLA policy

Current Behavior

The parameter is not mapped to a query key, so all VMs are retrieved.

Failure Information (for bugs)

Get-RubrikVM -SLAID ( Get-RubrikSLA -Name $slaPolicyName ).id -Verbose
VERBOSE: Validate the Rubrik token exists
VERBOSE: Found a Rubrik token for authentication
VERBOSE: Gather API Data for Get-RubrikVM
VERBOSE: Load API data for 
VERBOSE: Description: Get summary of all the VMs
VERBOSE: Determining the SLA Domain id
VERBOSE: Build the URI
VERBOSE: URI = https://rubrik01.domain.tld/api/v1/vmware/vm
VERBOSE: Build the query parameters for sla_assignment,is_relic,name,primary_cluster_id,effective_sla_domain_id
VERBOSE: Query = Found limit flag
VERBOSE: URI = https://rubrik01.domain.tld/api/v1/vmware/vm?limit=9999
VERBOSE: Performing the operation "Get summary of all the VMs" on target "".
VERBOSE: Submitting the request
VERBOSE: GET https://rubrik01.domain.tld/api/v1/vmware/vm?limit=9999 with 0-byte payload
VERBOSE: received 19209795-byte response of content type application/json; charset=UTF-8
...

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. Connect-Rubrik
  2. $slaPolicyName = '<slaPolicyName>'
  3. Get-RubrikVM -SLAID ( Get-RubrikSLA -Name $slaPolicyName ).id -Verbose

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

  • Rubrik PowerShell Module Version: Use Get-Module -ListAvailable Rubrik
( Get-Module -Name Rubrik ).Version.ToString()
4.0.0.117
  • PowerShell Version: Use Get-PSVersion
( Get-PSVersion ).ToString()
5.1.14409.1012
  • Operating System: Windows Server

Failure Logs

N/A

@chriswahl chriswahl added this to the v4.0.0 milestone Mar 7, 2018
@tlindsay42 tlindsay42 changed the title Get-RubrikVM -SLAID <slaId> does not map to query key Prevent Get-RubrikVM $SLAID parameter value overwrite when it has a value Mar 8, 2018
@chriswahl
Copy link
Contributor

@jaapbrasser can you test this one out and see if any other changes are needed?

@MikeFal
Copy link
Contributor

MikeFal commented Aug 7, 2018

Resolved in current module version (4.0.0.159).

@MikeFal MikeFal closed this as completed Aug 7, 2018
@tlindsay42
Copy link
Contributor Author

@MikeFal That's the opposite of what I said.

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

No branches or pull requests

4 participants