mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
B #2658: GOCA - fix missing error check in Info methods
This commit is contained in:
parent
3a9034a010
commit
ed612dd37a
@ -126,6 +126,9 @@ func (cluster *Cluster) Rename(newName string) error {
|
||||
// Info retrieves information for the cluster.
|
||||
func (cluster *Cluster) Info() error {
|
||||
response, err := client.Call("one.cluster.info", cluster.ID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
cluster.body = response.Body()
|
||||
return err
|
||||
return nil
|
||||
}
|
||||
|
@ -113,6 +113,9 @@ func (datastore *Datastore) Enable(enable bool) error {
|
||||
// Info retrieves information for the datastore.
|
||||
func (datastore *Datastore) Info() error {
|
||||
response, err := client.Call("one.datastore.info", datastore.ID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
datastore.body = response.Body()
|
||||
return err
|
||||
return nil
|
||||
}
|
||||
|
@ -66,8 +66,11 @@ func (group *Group) Delete() error {
|
||||
// Info retrieves information for the group.
|
||||
func (group *Group) Info() error {
|
||||
response, err := client.Call("one.group.info", group.ID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
group.body = response.Body()
|
||||
return err
|
||||
return nil
|
||||
}
|
||||
|
||||
// Update replaces the group template contents.
|
||||
|
@ -138,8 +138,11 @@ func (host *Host) Rename(newName string) error {
|
||||
// Info retrieves information for the host.
|
||||
func (host *Host) Info() error {
|
||||
response, err := client.Call("one.host.info", host.ID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
host.body = response.Body()
|
||||
return err
|
||||
return nil
|
||||
}
|
||||
|
||||
// Monitoring returns the host monitoring records.
|
||||
|
@ -130,6 +130,9 @@ func (user *User) DelGroup(groupID uint) error {
|
||||
// Info retrieves information for the user.
|
||||
func (user *User) Info() error {
|
||||
response, err := client.Call("one.user.info", user.ID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
user.body = response.Body()
|
||||
return err
|
||||
return nil
|
||||
}
|
||||
|
@ -85,8 +85,11 @@ func (vdc *Vdc) Rename(newName string) error {
|
||||
// Info retrieves information for the VDC.
|
||||
func (vdc *Vdc) Info() error {
|
||||
response, err := client.Call("one.vdc.info", vdc.ID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
vdc.body = response.Body()
|
||||
return err
|
||||
return nil
|
||||
}
|
||||
|
||||
// AddGroup adds a group to the VDC
|
||||
|
@ -176,6 +176,9 @@ func (vn *VirtualNetwork) Rename(newName string) error {
|
||||
// Info retrieves information for the virtual network.
|
||||
func (vn *VirtualNetwork) Info() error {
|
||||
response, err := client.Call("one.vn.info", vn.ID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
vn.body = response.Body()
|
||||
return err
|
||||
return nil
|
||||
}
|
||||
|
@ -84,6 +84,9 @@ func (zone *Zone) Rename(newName string) error {
|
||||
// Info retrieves information for the zone.
|
||||
func (zone *Zone) Info() error {
|
||||
response, err := client.Call("one.zone.info", zone.ID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
zone.body = response.Body()
|
||||
return err
|
||||
return nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user