Index: nova/nova.go |
=== modified file 'nova/nova.go' |
--- nova/nova.go 2012-12-03 23:51:42 +0000 |
+++ nova/nova.go 2012-12-04 01:13:46 +0000 |
@@ -63,7 +63,7 @@ |
} |
// ListFlavorsDetail lists all details for available flavors. |
-func (c *Client) ListFlavorsDetail() (*[]FlavorDetail, error) { |
+func (c *Client) ListFlavorsDetail() ([]FlavorDetail, error) { |
var resp struct { |
Flavors []FlavorDetail |
} |
@@ -73,11 +73,11 @@ |
if err != nil { |
return nil, err |
} |
- return &resp.Flavors, nil |
+ return resp.Flavors, nil |
} |
// ListServers lists IDs, names, and links for all servers. |
-func (c *Client) ListServers() (*[]Entity, error) { |
+func (c *Client) ListServers() ([]Entity, error) { |
var resp struct { |
Servers []Entity |
} |
@@ -87,7 +87,7 @@ |
if err != nil { |
return nil, err |
} |
- return &resp.Servers, nil |
+ return resp.Servers, nil |
} |
type ServerDetail struct { |
@@ -108,7 +108,7 @@ |
} |
// ListServersDetail lists all details for available servers. |
-func (c *Client) ListServersDetail() (*[]ServerDetail, error) { |
+func (c *Client) ListServersDetail() ([]ServerDetail, error) { |
var resp struct { |
Servers []ServerDetail |
} |
@@ -118,7 +118,7 @@ |
if err != nil { |
return nil, err |
} |
- return &resp.Servers, nil |
+ return resp.Servers, nil |
} |
// GetServer lists details for the specified server. |
@@ -200,7 +200,7 @@ |
} |
// ListSecurityGroups lists IDs, names, and other details for all security groups. |
-func (c *Client) ListSecurityGroups() (*[]SecurityGroup, error) { |
+func (c *Client) ListSecurityGroups() ([]SecurityGroup, error) { |
var resp struct { |
Groups []SecurityGroup `json:"security_groups"` |
} |
@@ -210,11 +210,11 @@ |
if err != nil { |
return nil, err |
} |
- return &resp.Groups, nil |
+ return resp.Groups, nil |
} |
// GetServerSecurityGroups list security groups for a specific server. |
-func (c *Client) GetServerSecurityGroups(serverId string) (*[]SecurityGroup, error) { |
+func (c *Client) GetServerSecurityGroups(serverId string) ([]SecurityGroup, error) { |
var resp struct { |
Groups []SecurityGroup `json:"security_groups"` |
@@ -226,7 +226,7 @@ |
if err != nil { |
return nil, err |
} |
- return &resp.Groups, nil |
+ return resp.Groups, nil |
} |
// CreateSecurityGroup creates a new security group. |
@@ -340,7 +340,7 @@ |
} |
// ListFloatingIPs lists floating IP addresses associated with the tenant or account. |
-func (c *Client) ListFloatingIPs() (*[]FloatingIP, error) { |
+func (c *Client) ListFloatingIPs() ([]FloatingIP, error) { |
var resp struct { |
FloatingIPs []FloatingIP `json:"floating_ips"` |
} |
@@ -351,7 +351,7 @@ |
if err != nil { |
return nil, err |
} |
- return &resp.FloatingIPs, nil |
+ return resp.FloatingIPs, nil |
} |
// GetFloatingIP lists details of the floating IP address associated with specified id. |