Skip to content
This repository has been archived by the owner on Jul 26, 2021. It is now read-only.

Commit

Permalink
Unwrap the GetVirtualMachineUserData response
Browse files Browse the repository at this point in the history
  • Loading branch information
svanharmelen committed Nov 6, 2019
1 parent ea9e2fe commit a8c6d12
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cloudstack/UserService.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 11 additions & 1 deletion generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(" }")
Expand Down

0 comments on commit a8c6d12

Please sign in to comment.