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

vCD cmdlets need updates for some "switch" type parameters #536

Closed
shamsway opened this issue Dec 19, 2019 · 0 comments · Fixed by #538
Closed

vCD cmdlets need updates for some "switch" type parameters #536

shamsway opened this issue Dec 19, 2019 · 0 comments · Fixed by #538
Assignees
Labels

Comments

@shamsway
Copy link
Contributor

Current Behavior:

The latest release of the Rubrik SDK for Powershell adjusted some parameters to the Switch type. Export-RubrikVApp and Restore-RubrikVApp need minor logic updates so they pass the correct JSON body to the Rubrik API.

Currently the cmdlets will generate an invalid JSON body similar to this with the -PowerOn parameter

{
  "vmsToRestore": [
    {
      "name": "t2a-linux",
      "vcdMoid": "vm-4abf66c5-9ef8-4df2-ba26-2260618e4a80",
      "networkConnections": []
    }
  ],
  "shouldPowerOnVmsAfterRecovery": {
    "IsPresent": true
  }
}

Expected Behavior:
JSON body should look like this ("isPresent" should not be part of the body)

{ 
   "vmsToRestore":[ 
      { 
         "name":"t2a-linux",
         "vcdMoid":"vm-4abf66c5-9ef8-4df2-ba26-2260618e4a80",
         "networkConnections":[ 
          
         ]
      }
   ],
   "shouldPowerOnVmsAfterRecovery":false
}
@shamsway shamsway self-assigned this Dec 19, 2019
mwpreston added a commit that referenced this issue Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant