uyuni: small fixes for comments (#9538)
* uyuni: small fixes for comments Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
This commit is contained in:
parent
df1bae0514
commit
68bc92b520
|
@ -71,7 +71,6 @@ type SDConfig struct {
|
|||
RefreshInterval model.Duration `yaml:"refresh_interval,omitempty"`
|
||||
}
|
||||
|
||||
// Uyuni API Response structures
|
||||
type systemGroupID struct {
|
||||
GroupID int `xmlrpc:"id"`
|
||||
GroupName string `xmlrpc:"name"`
|
||||
|
@ -142,19 +141,16 @@ func (c *SDConfig) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Attempt to login in Uyuni Server and get an auth token
|
||||
func login(rpcclient *xmlrpc.Client, user string, pass string) (string, error) {
|
||||
var result string
|
||||
err := rpcclient.Call("auth.login", []interface{}{user, pass}, &result)
|
||||
return result, err
|
||||
}
|
||||
|
||||
// Logout from Uyuni API
|
||||
func logout(rpcclient *xmlrpc.Client, token string) error {
|
||||
return rpcclient.Call("auth.logout", token, nil)
|
||||
}
|
||||
|
||||
// Get the system groups information of monitored clients
|
||||
func getSystemGroupsInfoOfMonitoredClients(rpcclient *xmlrpc.Client, token string, entitlement string) (map[int][]systemGroupID, error) {
|
||||
var systemGroupsInfos []struct {
|
||||
SystemID int `xmlrpc:"id"`
|
||||
|
@ -173,7 +169,6 @@ func getSystemGroupsInfoOfMonitoredClients(rpcclient *xmlrpc.Client, token strin
|
|||
return result, nil
|
||||
}
|
||||
|
||||
// GetSystemNetworkInfo lists client FQDNs.
|
||||
func getNetworkInformationForSystems(rpcclient *xmlrpc.Client, token string, systemIDs []int) (map[int]networkInfo, error) {
|
||||
var networkInfos []networkInfo
|
||||
err := rpcclient.Call("system.getNetworkForSystems", []interface{}{token, systemIDs}, &networkInfos)
|
||||
|
@ -188,7 +183,6 @@ func getNetworkInformationForSystems(rpcclient *xmlrpc.Client, token string, sys
|
|||
return result, nil
|
||||
}
|
||||
|
||||
// Get endpoints information for given systems
|
||||
func getEndpointInfoForSystems(
|
||||
rpcclient *xmlrpc.Client,
|
||||
token string,
|
||||
|
|
Loading…
Reference in New Issue