Skip to content

Commit f6b85f2

Browse files
author
Peter Jönsson
committed
Correct name of Cloudstack everywhere
Use the proper name Cloudstack instead of 'CloudStack'.
1 parent 9889c17 commit f6b85f2

12 files changed

Lines changed: 29 additions & 29 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func main() {
3737
os.Exit(1)
3838
}
3939

40-
cs := gopherstack.CloudStackClient{}.New(apiurl, apikey, secret)
40+
cs := gopherstack.CloudstackClient{}.New(apiurl, apikey, secret)
4141

4242
vmid := "19d2acfb-e281-4a13-8d62-e04ab501271d"
4343
response, err := cs.ListVirtualMachines(vmid)

asyncjob.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ type QueryAsyncJobResultResponse struct {
1717
} `json:"queryasyncjobresultresponse"`
1818
}
1919

20-
// Query CloudStack for the state of a scheduled job
21-
func (c CloudStackClient) QueryAsyncJobResult(jobid string) (QueryAsyncJobResultResponse, error) {
20+
// Query Cloudstack for the state of a scheduled job
21+
func (c CloudstackClient) QueryAsyncJobResult(jobid string) (QueryAsyncJobResultResponse, error) {
2222
var resp QueryAsyncJobResultResponse
2323

2424
params := url.Values{}

client.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"strings"
1616
)
1717

18-
type CloudStackClient struct {
18+
type CloudstackClient struct {
1919
// The http client for communicating
2020
client *http.Client
2121

@@ -28,8 +28,8 @@ type CloudStackClient struct {
2828
}
2929

3030
// Creates a new client for communicating with Cloudstack
31-
func (cloudstack CloudStackClient) New(apiurl string, apikey string, secret string, insecureskipverify bool) *CloudStackClient {
32-
c := &CloudStackClient{
31+
func (cloudstack CloudstackClient) New(apiurl string, apikey string, secret string, insecureskipverify bool) *CloudstackClient {
32+
c := &CloudstackClient{
3333
client: &http.Client{
3434
Transport: &http.Transport{
3535
TLSClientConfig: &tls.Config{InsecureSkipVerify: insecureskipverify},
@@ -43,7 +43,7 @@ func (cloudstack CloudStackClient) New(apiurl string, apikey string, secret stri
4343
return c
4444
}
4545

46-
func NewRequest(c CloudStackClient, request string, params url.Values) (interface{}, error) {
46+
func NewRequest(c CloudstackClient, request string, params url.Values) (interface{}, error) {
4747
client := c.client
4848

4949
params.Set("apikey", c.APIKey)
@@ -83,7 +83,7 @@ func NewRequest(c CloudStackClient, request string, params url.Values) (interfac
8383

8484
log.Printf("Response from Cloudstack: %d - %s", resp.StatusCode, body)
8585
if resp.StatusCode != 200 {
86-
err = errors.New(fmt.Sprintf("Received HTTP client/server error from CloudStack: %d", resp.StatusCode))
86+
err = errors.New(fmt.Sprintf("Received HTTP client/server error from Cloudstack: %d", resp.StatusCode))
8787
return nil, err
8888
}
8989

disk.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"net/url"
55
)
66

7-
func (c CloudStackClient) ListDiskOfferings(domainid string, id string, keyword string, name string, page string, pagesize string) (ListDiskOfferingsResponse, error) {
7+
func (c CloudstackClient) ListDiskOfferings(domainid string, id string, keyword string, name string, page string, pagesize string) (ListDiskOfferingsResponse, error) {
88
var resp ListDiskOfferingsResponse
99
params := url.Values{}
1010
//params.Set("domainid", domainid)

iso.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
)
66

77
// Deploys a Virtual Machine and returns it's id
8-
func (c CloudStackClient) AttachIso(isoid string, vmid string) (AttachIsoResponse, error) {
8+
func (c CloudstackClient) AttachIso(isoid string, vmid string) (AttachIsoResponse, error) {
99
var resp AttachIsoResponse
1010
params := url.Values{}
1111
params.Set("id", isoid)
@@ -20,7 +20,7 @@ func (c CloudStackClient) AttachIso(isoid string, vmid string) (AttachIsoRespons
2020
return resp, err
2121
}
2222

23-
func (c CloudStackClient) DetachIso(vmid string) (DetachIsoResponse, error) {
23+
func (c CloudstackClient) DetachIso(vmid string) (DetachIsoResponse, error) {
2424
var resp DetachIsoResponse
2525
params := url.Values{}
2626
params.Set("virtualmachineid", vmid)
@@ -32,7 +32,7 @@ func (c CloudStackClient) DetachIso(vmid string) (DetachIsoResponse, error) {
3232
return resp, err
3333
}
3434

35-
func (c CloudStackClient) ListIsos() (ListIsosResponse, error) {
35+
func (c CloudstackClient) ListIsos() (ListIsosResponse, error) {
3636
var resp ListIsosResponse
3737
response, err := NewRequest(c, "listIsos", nil)
3838
if err != nil {

package.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Gopherstack implements some of the CloudStack 3.0.6 APIs. It has not
1+
// Gopherstack implements some of the Cloudstack 3.0.6 APIs. It has not
22
// been test with any newer versions and the main use case is to be
33
// used with Packer.io
44

project.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"net/url"
55
)
66

7-
// List the available CloudStack projects
8-
func (c CloudStackClient) ListProjects(name string) (ListProjectsResponse, error) {
7+
// List the available Cloudstack projects
8+
func (c CloudstackClient) ListProjects(name string) (ListProjectsResponse, error) {
99
var resp ListProjectsResponse
1010
params := url.Values{}
1111

ssh.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
)
66

77
// Create a SSH key pair
8-
func (c CloudStackClient) CreateSSHKeyPair(name string) (CreateSshKeyPairResponse, error) {
8+
func (c CloudstackClient) CreateSSHKeyPair(name string) (CreateSshKeyPairResponse, error) {
99
var resp CreateSshKeyPairResponse
1010
params := url.Values{}
1111
params.Set("name", name)
@@ -18,7 +18,7 @@ func (c CloudStackClient) CreateSSHKeyPair(name string) (CreateSshKeyPairRespons
1818
}
1919

2020
// Deletes an SSH key pair
21-
func (c CloudStackClient) DeleteSSHKeyPair(name string) (DeleteSshKeyPairResponse, error) {
21+
func (c CloudstackClient) DeleteSSHKeyPair(name string) (DeleteSshKeyPairResponse, error) {
2222
var resp DeleteSshKeyPairResponse
2323
params := url.Values{}
2424
params.Set("name", name)

template.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
)
66

77
// Creates a Template of a Virtual Machine by it's ID
8-
func (c CloudStackClient) CreateTemplate(displaytext string, name string, volumeid string, ostypeid string) (CreateTemplateResponse, error) {
8+
func (c CloudstackClient) CreateTemplate(displaytext string, name string, volumeid string, ostypeid string) (CreateTemplateResponse, error) {
99
var resp CreateTemplateResponse
1010
params := url.Values{}
1111
params.Set("displaytext", displaytext)
@@ -23,7 +23,7 @@ func (c CloudStackClient) CreateTemplate(displaytext string, name string, volume
2323
}
2424

2525
// Returns all available templates
26-
func (c CloudStackClient) ListTemplates(name string, filter string) (ListTemplatesResponse, error) {
26+
func (c CloudstackClient) ListTemplates(name string, filter string) (ListTemplatesResponse, error) {
2727
var resp ListTemplatesResponse
2828
params := url.Values{}
2929
params.Set("name", name)
@@ -38,7 +38,7 @@ func (c CloudStackClient) ListTemplates(name string, filter string) (ListTemplat
3838
}
3939

4040
// Deletes an template by its ID.
41-
func (c CloudStackClient) DeleteTemplate(id string) (DeleteTemplateResponse, error) {
41+
func (c CloudstackClient) DeleteTemplate(id string) (DeleteTemplateResponse, error) {
4242
var resp DeleteTemplateResponse
4343
params := url.Values{}
4444
params.Set("id", id)

virtualmachine.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
)
88

99
// Deploys a Virtual Machine and returns it's id
10-
func (c CloudStackClient) DeployVirtualMachine(serviceofferingid string, templateid string, zoneid string, account string, diskofferingid string, displayname string, networkids []string, keypair string, projectid string, userdata string, hypervisor string) (DeployVirtualMachineResponse, error) {
10+
func (c CloudstackClient) DeployVirtualMachine(serviceofferingid string, templateid string, zoneid string, account string, diskofferingid string, displayname string, networkids []string, keypair string, projectid string, userdata string, hypervisor string) (DeployVirtualMachineResponse, error) {
1111
var resp DeployVirtualMachineResponse
1212

1313
params := url.Values{}
@@ -32,7 +32,7 @@ func (c CloudStackClient) DeployVirtualMachine(serviceofferingid string, templat
3232
return resp, nil
3333
}
3434

35-
func (c CloudStackClient) UpdateVirtualMachine(id string, displayname string, group string, haenable string, ostypeid string, userdata string) (UpdateVirtualMachineResponse, error) {
35+
func (c CloudstackClient) UpdateVirtualMachine(id string, displayname string, group string, haenable string, ostypeid string, userdata string) (UpdateVirtualMachineResponse, error) {
3636
var resp UpdateVirtualMachineResponse
3737

3838
params := url.Values{}
@@ -51,7 +51,7 @@ func (c CloudStackClient) UpdateVirtualMachine(id string, displayname string, gr
5151
}
5252

5353
// Stops a Virtual Machine
54-
func (c CloudStackClient) StopVirtualMachine(id string) (StopVirtualMachineResponse, error) {
54+
func (c CloudstackClient) StopVirtualMachine(id string) (StopVirtualMachineResponse, error) {
5555
var resp StopVirtualMachineResponse
5656
params := url.Values{}
5757
params.Set("id", id)
@@ -64,7 +64,7 @@ func (c CloudStackClient) StopVirtualMachine(id string) (StopVirtualMachineRespo
6464
}
6565

6666
// Destroys a Virtual Machine
67-
func (c CloudStackClient) DestroyVirtualMachine(id string) (DestroyVirtualMachineResponse, error) {
67+
func (c CloudstackClient) DestroyVirtualMachine(id string) (DestroyVirtualMachineResponse, error) {
6868
var resp DestroyVirtualMachineResponse
6969
params := url.Values{}
7070
params.Set("id", id)
@@ -76,8 +76,8 @@ func (c CloudStackClient) DestroyVirtualMachine(id string) (DestroyVirtualMachin
7676
return resp, nil
7777
}
7878

79-
// Returns CloudStack string representation of the Virtual Machine state
80-
func (c CloudStackClient) ListVirtualMachines(id string) (ListVirtualMachinesResponse, error) {
79+
// Returns Cloudstack string representation of the Virtual Machine state
80+
func (c CloudstackClient) ListVirtualMachines(id string) (ListVirtualMachinesResponse, error) {
8181
var resp ListVirtualMachinesResponse
8282
params := url.Values{}
8383
params.Set("id", id)

0 commit comments

Comments
 (0)