Documentation ¶
Index ¶
- func NewSystemId(c *Client) (string, error)
- type Client
- func (c *Client) CreateKickstartFile(f *KickstartFile) (bool, error)
- func (c *Client) CreateSnippet(s *Snippet) (bool, error)
- func (c *Client) CreateSystem(config SystemConfig) (*System, error)
- func (c *Client) DeleteSystem(name string) (bool, error)
- func (c *Client) Login() (bool, error)
- func (c *Client) Sync() (bool, error)
- type ClientConfig
- type HTTPClient
- type KickstartFile
- type NetworkConfig
- type Snippet
- type System
- func (s *System) Save() (bool, error)
- func (s *System) SetHostname(hostname string) (bool, error)
- func (s *System) SetId() error
- func (s *System) SetName(name string) (bool, error)
- func (s *System) SetNameservers(nameservers string) (bool, error)
- func (s *System) SetNetwork(config NetworkConfig) (bool, error)
- func (s *System) SetProfile(profile string) (bool, error)
- type SystemConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSystemId ¶
Requests Cobbler to create a new system. Returns the newly created system if it was successfully created. Returns an error otherwise.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(httpClient HTTPClient, c ClientConfig) Client
func (*Client) CreateKickstartFile ¶
func (c *Client) CreateKickstartFile(f *KickstartFile) (bool, error)
Creates a kickstart file in Cobbler. Returns true/false and returns an optional error in case that anything goes wrong.
func (*Client) CreateSnippet ¶
Creates a snippet in Cobbler. Returns true/false and returns an optional error in case that anything goes wrong.
func (*Client) CreateSystem ¶
func (c *Client) CreateSystem(config SystemConfig) (*System, error)
type ClientConfig ¶
type HTTPClient ¶
type KickstartFile ¶
type NetworkConfig ¶
type System ¶
type System struct { Id string SystemConfig // contains filtered or unexported fields }
func (*System) Save ¶
Saves the current state of the system. Returns true if the save was successful, or false if it was not. Returns an error if anything went wrong
func (*System) SetId ¶
Requests Cobbler to create a new system and sets the newly created system's id into the `system` instace. Returns an error in case anything goes wrong.
func (*System) SetNetwork ¶
func (s *System) SetNetwork(config NetworkConfig) (bool, error)
type SystemConfig ¶
type SystemConfig struct { Name string Profile string Hostname string Nameservers string Network NetworkConfig }