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

Unwrap the GetVirtualMachineUserData response #123

Merged
merged 1 commit into from
Nov 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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