Skip to content
Permalink
Browse files
Merge pull request #123 from xanzy/svh/b-user-data
Unwrap the GetVirtualMachineUserData response
  • Loading branch information
svanharmelen committed Nov 9, 2019
2 parents ea9e2fe + a8c6d12 commit 923541ccf253567a56d29fcc3b79f69624ba7e98
Showing 2 changed files with 15 additions and 1 deletion.
@@ -553,6 +553,10 @@ func (s *UserService) GetVirtualMachineUserData(p *GetVirtualMachineUserDataPara
return nil, err
}

if resp, err = getRawValue(resp); err != nil {
return nil, err
}

var r GetVirtualMachineUserDataResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
@@ -1220,7 +1220,17 @@ func (s *service) generateNewAPICallFunc(a *API) {
pn(" }")
pn("")
switch n {
case "CreateAccount", "CreateUser", "RegisterUserKeys", "CreateNetwork", "CreateNetworkOffering", "CreateSecurityGroup", "CreateServiceOffering", "CreateSSHKeyPair", "RegisterSSHKeyPair":
case
"CreateAccount",
"CreateNetwork",
"CreateNetworkOffering",
"CreateSSHKeyPair",
"CreateSecurityGroup",
"CreateServiceOffering",
"CreateUser",
"GetVirtualMachineUserData",
"RegisterSSHKeyPair",
"RegisterUserKeys":
pn(" if resp, err = getRawValue(resp); err != nil {")
pn(" return nil, err")
pn(" }")

0 comments on commit 923541c

Please sign in to comment.