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

Commit

Permalink
Merge pull request #123 from xanzy/svh/b-user-data
Browse files Browse the repository at this point in the history
Unwrap the GetVirtualMachineUserData response
  • Loading branch information
svanharmelen authored Nov 9, 2019
2 parents ea9e2fe + a8c6d12 commit 923541c
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 923541c

Please sign in to comment.