Skip to content

Commit d35ff05

Browse files
authored
Merge pull request #3 from sbrueseke/fix_websocket_object
fix websocket generation
2 parents 290c626 + 0c00638 commit d35ff05

File tree

80 files changed

+89
-85
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+89
-85
lines changed

cloudstack/ConsoleEndpointService.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@ func (s *ConsoleEndpointService) CreateConsoleEndpoint(p *CreateConsoleEndpointP
103103
}
104104

105105
type CreateConsoleEndpointResponse struct {
106-
Details string `json:"details"`
107-
JobID string `json:"jobid"`
108-
Jobstatus int `json:"jobstatus"`
109-
Success bool `json:"success"`
110-
Url string `json:"url"`
111-
Websocket string `json:"websocket"`
106+
Details string `json:"details"`
107+
JobID string `json:"jobid"`
108+
Jobstatus int `json:"jobstatus"`
109+
Success bool `json:"success"`
110+
Url string `json:"url"`
111+
Websocket map[string]interface{} `json:"websocket"`
112112
}
113113

114114
func (r *CreateConsoleEndpointResponse) UnmarshalJSON(b []byte) error {

cloudstack/NetworkService.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ func (s *NetworkService) NewAddOpenDaylightControllerParams(password string, phy
351351
return p
352352
}
353353

354-
// Adds an OpenDaylight controller
354+
// Adds an OpenDyalight controler
355355
func (s *NetworkService) AddOpenDaylightController(p *AddOpenDaylightControllerParams) (*AddOpenDaylightControllerResponse, error) {
356356
resp, err := s.cs.newRequest("addOpenDaylightController", p.toURLValues())
357357
if err != nil {
@@ -2229,7 +2229,7 @@ func (s *NetworkService) NewDeleteOpenDaylightControllerParams(id string) *Delet
22292229
return p
22302230
}
22312231

2232-
// Removes an OpenDaylight controller
2232+
// Removes an OpenDyalight controler
22332233
func (s *NetworkService) DeleteOpenDaylightController(p *DeleteOpenDaylightControllerParams) (*DeleteOpenDaylightControllerResponse, error) {
22342234
resp, err := s.cs.newRequest("deleteOpenDaylightController", p.toURLValues())
22352235
if err != nil {
@@ -4075,7 +4075,7 @@ func (s *NetworkService) GetOpenDaylightControllerByID(id string, opts ...Option
40754075
return nil, l.Count, fmt.Errorf("There is more then one result for OpenDaylightController UUID: %s!", id)
40764076
}
40774077

4078-
// Lists OpenDaylight controllers
4078+
// Lists OpenDyalight controllers
40794079
func (s *NetworkService) ListOpenDaylightControllers(p *ListOpenDaylightControllersParams) (*ListOpenDaylightControllersResponse, error) {
40804080
resp, err := s.cs.newRequest("listOpenDaylightControllers", p.toURLValues())
40814081
if err != nil {

examples/AddHost.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"fmt"
2525
"log"
2626

27-
"github.com/apache/cloudstack-go/v2/cloudstack"
27+
"github.com/sbrueseke/cloudstack-go/v2/cloudstack"
2828
)
2929

3030
func AddHost() {

examples/CreateDeleteDomain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"fmt"
2525
"log"
2626

27-
"github.com/apache/cloudstack-go/v2/cloudstack"
27+
"github.com/sbrueseke/cloudstack-go/v2/cloudstack"
2828
)
2929

3030
func CreateDomain() {

examples/HostOperations.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"encoding/json"
2424
"log"
2525

26-
"github.com/apache/cloudstack-go/v2/cloudstack"
26+
"github.com/sbrueseke/cloudstack-go/v2/cloudstack"
2727
)
2828

2929
func PerformHostOperations() {

examples/mock_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ package main
2222
import (
2323
"testing"
2424

25-
"github.com/apache/cloudstack-go/v2/cloudstack"
2625
"github.com/golang/mock/gomock"
26+
"github.com/sbrueseke/cloudstack-go/v2/cloudstack"
2727
)
2828

2929
func Test_Mock(t *testing.T) {

generate/generate.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2166,6 +2166,8 @@ func mapType(aName string, pName string, pType string) string {
21662166
return "OutOfBandManagementResponse"
21672167
case "hostharesponse":
21682168
return "HAForHostResponse"
2169+
case "consoleendpointwebsocketresponse":
2170+
return "map[string]interface{}"
21692171
default:
21702172
return "string"
21712173
}

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
github.com/apache/cloudstack-go/v2 v2.15.0 h1:oojn1qx0+wBwrFSSmA2rL8XjWd4BXqwYo0RVCrAXoHk=
2+
github.com/apache/cloudstack-go/v2 v2.15.0/go.mod h1:Mc+tXpujtslBuZFk5atoGT2LanVxOrXS2GGgidAoz1A=
13
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
24
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
35
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=

test/APIDiscoveryService_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ package test
2222
import (
2323
"testing"
2424

25-
"github.com/apache/cloudstack-go/v2/cloudstack"
25+
"github.com/sbrueseke/cloudstack-go/v2/cloudstack"
2626
)
2727

2828
func TestAPIDiscoveryService(t *testing.T) {

test/AccountService_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ package test
2222
import (
2323
"testing"
2424

25-
"github.com/apache/cloudstack-go/v2/cloudstack"
25+
"github.com/sbrueseke/cloudstack-go/v2/cloudstack"
2626
)
2727

2828
func TestAccountService(t *testing.T) {

0 commit comments

Comments
 (0)