Documentation
¶
Index ¶
- Variables
- func FailOnError(t *testing.T, err error)
- func Fixture(fn string) ([]byte, error)
- type APIResponsePair
- type AclSetupOptions
- type Architecture
- type BackgroundImportOptions
- type BackgroundPowerSystemOptions
- type BackgroundReposyncOptions
- type BackgroundSyncOptions
- type BackgroundSyncSystemsOptions
- type BootloaderFormatSettings
- type BuildisoOptions
- type Client
- func (c *Client) AutoAddRepos() error
- func (c *Client) BackgroundAclSetup(options AclSetupOptions) (string, error)
- func (c *Client) BackgroundBuildiso(options BuildisoOptions) (string, error)
- func (c *Client) BackgroundHardlink() (string, error)
- func (c *Client) BackgroundImport(options BackgroundImportOptions) (string, error)
- func (c *Client) BackgroundMkLoaders() (string, error)
- func (c *Client) BackgroundPowerSystem(options BackgroundPowerSystemOptions) (string, error)
- func (c *Client) BackgroundReplicate(options ReplicateOptions) (string, error)
- func (c *Client) BackgroundReposync(options BackgroundReposyncOptions) (string, error)
- func (c *Client) BackgroundSignatureUpdate() (string, error)
- func (c *Client) BackgroundSync(options BackgroundSyncOptions) (string, error)
- func (c *Client) BackgroundSyncSystems(options BackgroundSyncSystemsOptions) (string, error)
- func (c *Client) BackgroundValidateAutoinstallFiles() (string, error)
- func (c *Client) Call(method string, args ...interface{}) (interface{}, error)
- func (c *Client) Check() (*[]string, error)
- func (c *Client) CheckAccess(resource, arg1, arg2 string) (int, error)
- func (c *Client) CheckAccessNoFail(resource, arg1, arg2 string) (bool, error)
- func (c *Client) CopyDistro(objectId, newName string) error
- func (c *Client) CopyFile(objectId, newName string) error
- func (c *Client) CopyImage(objectId, newName string) error
- func (c *Client) CopyItem(what, objectId, newName string) error
- func (c *Client) CopyMenu(objectId, newName string) error
- func (c *Client) CopyMgmtClass(objectId, newName string) error
- func (c *Client) CopyPackage(objectId, newName string) error
- func (c *Client) CopyProfile(objectId, newName string) error
- func (c *Client) CopyRepo(objectId, newName string) error
- func (c *Client) CopySystem(objectId, newName string) error
- func (c *Client) CreateDistro(distro Distro) (*Distro, error)
- func (c *Client) CreateFile(file File) (*File, error)
- func (c *Client) CreateImage(image Image) (*Image, error)
- func (c *Client) CreateMenu(menu Menu) (*Menu, error)
- func (c *Client) CreateMgmtClass(mgmtclass MgmtClass) (*MgmtClass, error)
- func (c *Client) CreatePackage(linuxpackage Package) (*Package, error)
- func (c *Client) CreateProfile(profile Profile) (*Profile, error)
- func (c *Client) CreateRepo(repo Repo) (*Repo, error)
- func (c *Client) CreateSnippet(s Snippet) error
- func (c *Client) CreateSystem(system System) (*System, error)
- func (c *Client) CreateTemplateFile(f TemplateFile) error
- func (c *Client) DeleteDistro(name string) error
- func (c *Client) DeleteDistroRecursive(name string, recursive bool) error
- func (c *Client) DeleteFile(name string) error
- func (c *Client) DeleteFileRecursive(name string, recursive bool) error
- func (c *Client) DeleteImage(name string) error
- func (c *Client) DeleteImageRecursive(name string, recursive bool) error
- func (c *Client) DeleteMenu(name string) error
- func (c *Client) DeleteMenuRecursive(name string, recursive bool) error
- func (c *Client) DeleteMgmtClass(name string) error
- func (c *Client) DeleteMgmtClassRecursive(name string, recursive bool) error
- func (c *Client) DeleteNetworkInterface(systemID, name string) error
- func (c *Client) DeletePackage(name string) error
- func (c *Client) DeletePackageRecursive(name string, recursive bool) error
- func (c *Client) DeleteProfile(name string) error
- func (c *Client) DeleteProfileRecursive(name string, recursive bool) error
- func (c *Client) DeleteRepo(name string) error
- func (c *Client) DeleteRepoRecursive(name string, recursive bool) error
- func (c *Client) DeleteSnippet(name string) error
- func (c *Client) DeleteSystem(name string) error
- func (c *Client) DeleteSystemRecursive(name string, recursive bool) error
- func (c *Client) DeleteTemplateFile(name string) error
- func (c *Client) ExtendedVersion() (ExtendedVersion, error)
- func (c *Client) FindDistro(criteria map[string]interface{}) ([]*Distro, error)
- func (c *Client) FindDistroNames(criteria map[string]interface{}) ([]string, error)
- func (c *Client) FindFile(criteria map[string]interface{}) ([]*File, error)
- func (c *Client) FindFileNames(criteria map[string]interface{}) ([]string, error)
- func (c *Client) FindImage(criteria map[string]interface{}) ([]*Image, error)
- func (c *Client) FindImageNames(criteria map[string]interface{}) ([]string, error)
- func (c *Client) FindItemNames(what string, criteria map[string]interface{}, sortField string) ([]string, error)
- func (c *Client) FindItems(what string, criteria map[string]interface{}, sortField string, expand bool) ([]interface{}, error)
- func (c *Client) FindItemsPaged(what string, criteria map[string]interface{}, sortField string, ...) (*PagedSearchResult, error)
- func (c *Client) FindMenu(criteria map[string]interface{}) ([]*Menu, error)
- func (c *Client) FindMenuNames(criteria map[string]interface{}) ([]string, error)
- func (c *Client) FindMgmtClass(criteria map[string]interface{}) ([]*MgmtClass, error)
- func (c *Client) FindMgmtClassNames(criteria map[string]interface{}) ([]string, error)
- func (c *Client) FindPackage(criteria map[string]interface{}) ([]*Package, error)
- func (c *Client) FindPackageNames(criteria map[string]interface{}) ([]string, error)
- func (c *Client) FindProfile(criteria map[string]interface{}) ([]*Profile, error)
- func (c *Client) FindProfileNames(criteria map[string]interface{}) ([]string, error)
- func (c *Client) FindRepo(criteria map[string]interface{}) ([]*Repo, error)
- func (c *Client) FindRepoNames(criteria map[string]interface{}) ([]string, error)
- func (c *Client) FindSystem(criteria map[string]interface{}) ([]*System, error)
- func (c *Client) FindSystemByDnsName(dns_name string) error
- func (c *Client) FindSystemNames(criteria map[string]interface{}) ([]string, error)
- func (c *Client) GenerateAutoinstall(profile string, system string) (string, error)
- func (c *Client) GenerateBootCfg(profile, system string) error
- func (c *Client) GenerateIPxe(profile, image, system string) error
- func (c *Client) GenerateScript(profile, system, name string) error
- func (c *Client) GetAuthnModuleName() (string, error)
- func (c *Client) GetAutoinstallSnippets() error
- func (c *Client) GetAutoinstallTemplates() error
- func (c *Client) GetBlendedData(profile, system string) (map[string]interface{}, error)
- func (c *Client) GetConfigData(hostname string) error
- func (c *Client) GetDistro(name string, flattened, resolved bool) (*Distro, error)
- func (c *Client) GetDistroHandle(name string) (string, error)
- func (c *Client) GetDistros() ([]*Distro, error)
- func (c *Client) GetDistrosSince(mtime time.Time) ([]*Distro, error)
- func (c *Client) GetEventLog(eventId string) (string, error)
- func (c *Client) GetEvents(forUser string) ([]*CobblerEvent, error)
- func (c *Client) GetFile(name string, flattened, resolved bool) (*File, error)
- func (c *Client) GetFileAsRendered(name string) (map[string]interface{}, error)
- func (c *Client) GetFileHandle(name string) (string, error)
- func (c *Client) GetFiles() ([]*File, error)
- func (c *Client) GetFilesSince(mtime time.Time) ([]*File, error)
- func (c *Client) GetImage(name string, flattened, resolved bool) (*Image, error)
- func (c *Client) GetImageAsRendered(name string) (map[string]interface{}, error)
- func (c *Client) GetImageHandle(name string) (string, error)
- func (c *Client) GetImages() ([]*Image, error)
- func (c *Client) GetImagesSince(mtime time.Time) ([]*Image, error)
- func (c *Client) GetItem(what string, name string, flatten, resolved bool) (map[string]interface{}, error)
- func (c *Client) GetItemHandle(what, name string) (string, error)
- func (c *Client) GetItemNames(what string) ([]string, error)
- func (c *Client) GetItemResolvedValue(itemUuid string, attribute string) error
- func (c *Client) GetMenu(name string, flattened, resolved bool) (*Menu, error)
- func (c *Client) GetMenuAsRendered() error
- func (c *Client) GetMenuHandle(name string) (string, error)
- func (c *Client) GetMenus() ([]*Distro, error)
- func (c *Client) GetMenusSince(mtime time.Time) ([]*Menu, error)
- func (c *Client) GetMgmtClass(name string, flattened, resolved bool) (*MgmtClass, error)
- func (c *Client) GetMgmtClassAsRendered(name string) (map[string]interface{}, error)
- func (c *Client) GetMgmtClassHandle(name string) (string, error)
- func (c *Client) GetMgmtClasses() ([]*MgmtClass, error)
- func (c *Client) GetMgmtClassesSince(mtime time.Time) ([]*MgmtClass, error)
- func (c *Client) GetPackage(name string, flattened, resolved bool) (*Package, error)
- func (c *Client) GetPackageAsRendered(name string) (map[string]interface{}, error)
- func (c *Client) GetPackageHandle(name string) (string, error)
- func (c *Client) GetPackages() ([]*Package, error)
- func (c *Client) GetPackagesSince(mtime time.Time) ([]*Package, error)
- func (c *Client) GetProfile(name string, flattened, resolved bool) (*Profile, error)
- func (c *Client) GetProfileHandle(name string) (string, error)
- func (c *Client) GetProfiles() ([]*Profile, error)
- func (c *Client) GetProfilesSince(mtime time.Time) ([]*Profile, error)
- func (c *Client) GetRandomMac() error
- func (c *Client) GetRepo(name string, flattened, resolved bool) (*Repo, error)
- func (c *Client) GetRepoHandle(name string) (string, error)
- func (c *Client) GetRepos() ([]*Repo, error)
- func (c *Client) GetReposCompatibleWithProfile(profile_name string) error
- func (c *Client) GetReposSince(mtime time.Time) ([]*Repo, error)
- func (c *Client) GetSettings() (*Settings, error)
- func (c *Client) GetSignatures() (*DistroSignatures, error)
- func (c *Client) GetSnippet(name string) (*Snippet, error)
- func (c *Client) GetStatus(mode StatusOption) (interface{}, error)
- func (c *Client) GetSystem(name string, flattened, resolved bool) (*System, error)
- func (c *Client) GetSystemHandle(name string) (string, error)
- func (c *Client) GetSystems() ([]*System, error)
- func (c *Client) GetSystemsSince(mtime time.Time) ([]*System, error)
- func (c *Client) GetTaskStatus(eventId string) (CobblerEvent, error)
- func (c *Client) GetTemplateFile(ksName string) (*TemplateFile, error)
- func (c *Client) GetUserFromToken(token string) (string, error)
- func (c *Client) GetValidArchs() ([]string, error)
- func (c *Client) GetValidBreeds() ([]string, error)
- func (c *Client) GetValidImageBootLoaders(imageName string) ([]string, error)
- func (c *Client) GetValidOsVersions() ([]string, error)
- func (c *Client) GetValidOsVersionsForBreed(breed string) ([]string, error)
- func (c *Client) HasItem(what string, name string) (bool, error)
- func (c *Client) IsAutoinstallInUse(name string) error
- func (c *Client) IsValueInherit(value interface{}) bool
- func (c *Client) LastModifiedTime() (float64, error)
- func (c *Client) ListDistroNames() ([]string, error)
- func (c *Client) ListFileNames() ([]string, error)
- func (c *Client) ListImageNames() ([]string, error)
- func (c *Client) ListMenuNames() ([]string, error)
- func (c *Client) ListMgmtClassNames() ([]string, error)
- func (c *Client) ListPackageNames() ([]string, error)
- func (c *Client) ListProfileNames() ([]string, error)
- func (c *Client) ListRepoNames() ([]string, error)
- func (c *Client) ListSystemNames() ([]string, error)
- func (c *Client) Login() (bool, error)
- func (c *Client) Logout() (bool, error)
- func (c *Client) ModifyInterface(systemID string, nic map[string]interface{}) error
- func (c *Client) ModifyItem(what, objectId, attribute string, arg interface{}) error
- func (c *Client) ModifyItemInPlace(what, name, attribute string, value map[string]interface{}) error
- func (c *Client) ModifySetting(name string, value interface{}) (int, error)
- func (c *Client) NewItem(what string, isSubobject bool) error
- func (c *Client) ParseStatus(status interface{}) ([]InstallationStatus, error)
- func (c *Client) Ping() (bool, error)
- func (c *Client) PowerSystem(systemId, power string) (bool, error)
- func (c *Client) RegisterNewSystem(info map[string]interface{}) error
- func (c *Client) RemoveItem(what, name string, recursive bool) error
- func (c *Client) RenameDistro(objectId, newName string) error
- func (c *Client) RenameFile(objectId, newName string) error
- func (c *Client) RenameImage(objectId, newName string) error
- func (c *Client) RenameItem(what, objectId, newName string) error
- func (c *Client) RenameMenu(objectId, newName string) error
- func (c *Client) RenameMgmtClass(objectId, newName string) error
- func (c *Client) RenameNetworkInterface(systemName, oldName, newName string) error
- func (c *Client) RenamePackage(objectId, newName string) error
- func (c *Client) RenameProfile(objectId, newName string) error
- func (c *Client) RenameRepo(objectId, newName string) error
- func (c *Client) RenameSystem(objectId, newName string) error
- func (c *Client) RunInstallTriggers(mode string, objtype string, name string, ip string) error
- func (c *Client) SaveDistro(objectId, editmode string) error
- func (c *Client) SaveFile(objectId, editmode string) error
- func (c *Client) SaveImage(objectId, editmode string) error
- func (c *Client) SaveItem(what, objectId, token, editmode string) error
- func (c *Client) SaveMenu(objectId, editmode string) error
- func (c *Client) SaveMgmtClass(objectId, editmode string) error
- func (c *Client) SavePackage(objectId, editmode string) error
- func (c *Client) SaveProfile(objectId, editmode string) error
- func (c *Client) SaveRepo(objectId, editmode string) error
- func (c *Client) SaveSystem(objectId, editmode string) error
- func (c *Client) Sync() error
- func (c *Client) SyncDhcp() error
- func (c *Client) TokenCheck(token string) (bool, error)
- func (c *Client) UpdateDistro(distro *Distro) error
- func (c *Client) UpdateFile(file *File) error
- func (c *Client) UpdateImage(image *Image) error
- func (c *Client) UpdateMenu(menu *Menu) error
- func (c *Client) UpdateMgmtClass(mgmtclass *MgmtClass) error
- func (c *Client) UpdatePackage(linuxpackage *Package) error
- func (c *Client) UpdateProfile(profile *Profile) error
- func (c *Client) UpdateRepo(repo *Repo) error
- func (c *Client) UpdateSystem(system *System) error
- func (c *Client) Version() (float64, error)
- type ClientConfig
- type CobblerEvent
- type CobblerVersion
- type Distro
- type DistroSignatures
- type ExtendedVersion
- type File
- type HTTPClient
- type Image
- type ImageType
- type InstallationStatus
- type Interface
- type Interfaces
- type Item
- type ItemMeta
- type Menu
- type MgmtClass
- type OsVersion
- type Package
- type PageInfo
- type PagedSearchResult
- type Profile
- type ReplicateOptions
- type Repo
- type Resource
- type ResourceAction
- type Settings
- type Snippet
- type StatusOption
- type StubHTTPClient
- type System
- func (s *System) CreateInterface(name string, iface Interface) error
- func (s *System) DeleteInterface(name string) error
- func (s *System) GetInterface(name string) (Interface, error)
- func (s *System) GetInterfaces() (Interfaces, error)
- func (s *System) ModifyNetworkInterface(name string, iface Interface) error
- func (s *System) RenameInterface(name string, newName string) error
- type TemplateFile
- type Value
- type VirtDiskDriver
- type VirtType
- type XMLRPCArray
- type XMLRPCMethodCall
- type XMLRPCParam
- type XMLRPCStruct
- type XMLRPCStructMember
- type XMLRPCValue
Constants ¶
This section is empty.
Variables ¶
var EMPTYEVENT = CobblerEvent{ ID: "", StateTime: 0.0, Name: "empty", State: "invalid", ReadByWho: nil, }
Functions ¶
Types ¶
type APIResponsePair ¶ added in v0.5.0
type APIResponsePair struct {
Actual []byte // This is the actual response that the client gets from the server side.
Expected []byte // The payload that you expect to receive. This is to verify that your implementation is sending the proper payload to the server.
Response []byte // The response you want to return.
}
type AclSetupOptions ¶ added in v0.5.0
type AclSetupOptions struct {
AddUser string `mapstructure:"adduser"`
AddGroup string `mapstructure:"addgroup"`
RemoveUser string `mapstructure:"removeuser"`
RemoveGroup string `mapstructure:"removegroup"`
}
AclSetupOptions is a struct which describes the options one can set for the actlsetup action of Cobbler.
type Architecture ¶ added in v0.5.0
type Architecture int64
func (Architecture) String ¶ added in v0.5.0
func (a Architecture) String() string
type BackgroundImportOptions ¶ added in v0.5.0
type BackgroundImportOptions struct {
Path string `mapstructure:"path"`
Name string `mapstructure:"name"`
AvailableAs string `mapstructure:"available_as"`
AutoinstallFile string `mapstructure:"autoinstall_file"`
RsyncFlags string `mapstructure:"rsync_flags"`
Arch string `mapstructure:"arch"`
Breed string `mapstructure:"breed"`
OsVersion string `mapstructure:"os_version"`
}
type BackgroundPowerSystemOptions ¶ added in v0.5.0
type BackgroundReposyncOptions ¶ added in v0.5.0
type BackgroundSyncOptions ¶ added in v0.5.0
type BackgroundSyncSystemsOptions ¶ added in v0.5.0
type BootloaderFormatSettings ¶ added in v0.5.0
type BuildisoOptions ¶ added in v0.5.0
type BuildisoOptions struct {
Iso string `mapstructure:"iso"`
Profiles []string `mapstructure:"profiles"`
Systems []string `mapstructure:"systems"`
BuildisoDir string `mapstructure:"buildisodir"`
Distro string `mapstructure:"distro"`
Standalone bool `mapstructure:"standalone"`
Airgapped bool `mapstructure:"airgapped"`
Source string `mapstructure:"source"`
ExcludeDns bool `mapstructure:"exclude_dns"`
XorrisofsOpts string `mapstructure:"xorrisofs_opts"`
}
BuildisoOptions is a struct which describes the options one can set for the buildiso action of Cobbler.
type Client ¶
type Client struct {
// The longevity of this token is defined server side in the setting "auth_token_duration". Per default no token is
// retrieved. A token can be obtained via the [Client.Login] method.
Token string
// To allow for version dependant API calls in the client we cache the major, minor and patch version.
CachedVersion CobblerVersion
// contains filtered or unexported fields
}
Client is the type which all API methods are attached to.
func NewClient ¶
func NewClient(httpClient HTTPClient, c ClientConfig) Client
NewClient creates a Client struct which is ready for usage.
func (*Client) AutoAddRepos ¶ added in v0.5.0
AutoAddRepos automatically imports any repos server side that are known to the daemon. It is the responsitbility of the caller to execute Client.BackgroundReposync.
func (*Client) BackgroundAclSetup ¶ added in v0.5.0
func (c *Client) BackgroundAclSetup(options AclSetupOptions) (string, error)
BackgroundAclSetup applies updated ACLs on the Cobbler system.
func (*Client) BackgroundBuildiso ¶ added in v0.5.0
func (c *Client) BackgroundBuildiso(options BuildisoOptions) (string, error)
BackgroundBuildiso builds an ISO file on the server. The return value is the task ID which is started on the server.
func (*Client) BackgroundHardlink ¶ added in v0.5.0
BackgroundHardlink tries to save space inside the web directory through hardlinking identical files.
func (*Client) BackgroundImport ¶ added in v0.5.0
func (c *Client) BackgroundImport(options BackgroundImportOptions) (string, error)
BackgroundImport runs an import locally on the server with the specified options.
func (*Client) BackgroundMkLoaders ¶ added in v0.5.0
BackgroundMkLoaders runs the mkloaders action on the server in the background.
func (*Client) BackgroundPowerSystem ¶ added in v0.5.0
func (c *Client) BackgroundPowerSystem(options BackgroundPowerSystemOptions) (string, error)
BackgroundPowerSystem executes power operations for a given list of systems.
func (*Client) BackgroundReplicate ¶ added in v0.5.0
func (c *Client) BackgroundReplicate(options ReplicateOptions) (string, error)
BackgroundReplicate replicates the Cobbler server to the target defined in the arguments.
func (*Client) BackgroundReposync ¶ added in v0.5.0
func (c *Client) BackgroundReposync(options BackgroundReposyncOptions) (string, error)
BackgroundReposync runs a reposyonc asynchronous in the background on the server.
func (*Client) BackgroundSignatureUpdate ¶ added in v0.5.0
BackgroundSignatureUpdate runs a signatures update in the background on the server.
func (*Client) BackgroundSync ¶ added in v0.5.0
func (c *Client) BackgroundSync(options BackgroundSyncOptions) (string, error)
BackgroundSync runs a "cobbler sync" in asynchronously in the background. The returned string is the event id which can be used to query the GetEventLog endpoint.
func (*Client) BackgroundSyncSystems ¶ added in v0.5.0
func (c *Client) BackgroundSyncSystems(options BackgroundSyncSystemsOptions) (string, error)
BackgroundSyncSystems runs the "cobbler syncsystems" action which only executes a Cobbler sync for a specific subset of systems.
func (*Client) BackgroundValidateAutoinstallFiles ¶ added in v0.5.0
BackgroundValidateAutoinstallFiles checks if the files generated by Cobbler are valid from a syntax perspective.
func (*Client) Call ¶ added in v0.4.1
Call is the generic method for calling an XML-RPC endpoint in Cobbler that has no dedicated method in the client. Normally there should be no need to use this if you are just using the client. In case there is an error closing the HTTP connection, it hides all errors that occur during the rest of the method.
func (*Client) Check ¶ added in v0.5.0
Check runs the "cobbler check" action and list all possible points for improvements on server side as a return value.
func (*Client) CheckAccess ¶ added in v0.5.0
CheckAccess performs the same check as Client.CheckAccessNoFail but returning the error message with the reason instead of a boolean.
func (*Client) CheckAccessNoFail ¶ added in v0.5.0
CheckAccessNoFail validates if a certain resource can be accessed with the current token. "arg1" and "arg2" have different meanings depending on the authorization provider configured server side.
func (*Client) CopyDistro ¶ added in v0.5.0
CopyDistro duplicates a distro on the server with a new name.
func (*Client) CopyImage ¶ added in v0.5.0
CopyImage duplicates an image on the server with a new name.
func (*Client) CopyItem ¶ added in v0.5.0
CopyItem duplicates an item on the server with a new name.
func (*Client) CopyMgmtClass ¶ added in v0.5.0
CopyMgmtClass copies a given managementclass server side with a new name.
func (*Client) CopyPackage ¶ added in v0.5.0
CopyPackage duplicates a given package on the server with a new name.
func (*Client) CopyProfile ¶ added in v0.5.0
CopyProfile duplicates a given profile on the server with a new name.
func (*Client) CopyRepo ¶ added in v0.5.0
CopyRepo duplicates a given repository on the server with a new name.
func (*Client) CopySystem ¶ added in v0.5.0
CopySystem duplicates a given system on the server with a new name.
func (*Client) CreateDistro ¶ added in v0.4.1
CreateDistro creates a distro.
func (*Client) CreateFile ¶ added in v0.5.0
CreateFile creates a single file.
func (*Client) CreateImage ¶ added in v0.5.0
CreateImage creates an image.
func (*Client) CreateMenu ¶ added in v0.5.0
CreateMenu creates a menu.
func (*Client) CreateMgmtClass ¶ added in v0.5.0
CreateMgmtClass creates a mgmtclass.
func (*Client) CreatePackage ¶ added in v0.5.0
CreatePackage creates a package.
func (*Client) CreateProfile ¶ added in v0.4.1
CreateProfile creates a profile. It ensures that a Distro is set and then sets other default values.
func (*Client) CreateRepo ¶ added in v0.4.1
CreateRepo creates a repo.
func (*Client) CreateSnippet ¶
CreateSnippet creates a snippet in Cobbler. Takes a Snippet struct as input Returns true/false and error if creation failed.
func (*Client) CreateSystem ¶
CreateSystem creates a system. It ensures that either a Profile or Image are set and then sets other default values.
func (*Client) CreateTemplateFile ¶ added in v0.4.1
func (c *Client) CreateTemplateFile(f TemplateFile) error
CreateTemplateFile to create a template file in Cobbler. Takes a TemplateFile struct as input. Requires 3 arguments: file, data and token Returns true/false and error if creation failed.
func (*Client) DeleteDistro ¶ added in v0.4.1
DeleteDistro deletes a single Distro by its name.
func (*Client) DeleteDistroRecursive ¶ added in v0.5.0
DeleteDistroRecursive deletes a single Distro by its name with the option to do so recursively.
func (*Client) DeleteFile ¶ added in v0.5.0
DeleteFile deletes a single File by its name.
func (*Client) DeleteFileRecursive ¶ added in v0.5.0
DeleteFileRecursive deletes a single File by its name with the option to do so recursively.
func (*Client) DeleteImage ¶ added in v0.5.0
DeleteImage deletes a single Image by its name.
func (*Client) DeleteImageRecursive ¶ added in v0.5.0
DeleteImageRecursive deletes a single Image by its name with the option to do so recursively.
func (*Client) DeleteMenu ¶ added in v0.5.0
DeleteMenu deletes a single Menu by its name.
func (*Client) DeleteMenuRecursive ¶ added in v0.5.0
DeleteMenuRecursive deletes a single Menu by its name with the option to do so recursively.
func (*Client) DeleteMgmtClass ¶ added in v0.5.0
DeleteMgmtClass deletes a single MgmtClass by its name.
func (*Client) DeleteMgmtClassRecursive ¶ added in v0.5.0
DeleteMgmtClassRecursive deletes a single MgmtClass by its name with the option to do so recursively.
func (*Client) DeleteNetworkInterface ¶ added in v0.5.2
func (*Client) DeletePackage ¶ added in v0.5.0
DeletePackage deletes a single Package by its name.
func (*Client) DeletePackageRecursive ¶ added in v0.5.0
DeletePackageRecursive deletes a single Package by its name with the option to do so recursively.
func (*Client) DeleteProfile ¶ added in v0.4.1
DeleteProfile deletes a single profile by its name.
func (*Client) DeleteProfileRecursive ¶ added in v0.5.0
DeleteProfileRecursive deletes a single profile by its name.
func (*Client) DeleteRepo ¶ added in v0.4.1
DeleteRepo deletes a single Repo by its name.
func (*Client) DeleteRepoRecursive ¶ added in v0.5.0
DeleteRepoRecursive deletes a single Repo by its name with the option to do so recursively.
func (*Client) DeleteSnippet ¶ added in v0.4.1
DeleteSnippet deletes a snippet file in Cobbler. Takes a snippet file name as input. Returns error if delete failed.
func (*Client) DeleteSystem ¶
DeleteSystem deletes a single System by its name.
func (*Client) DeleteSystemRecursive ¶ added in v0.5.0
DeleteSystemRecursive deletes a single System by its name with the option to do so recursively.
func (*Client) DeleteTemplateFile ¶ added in v0.4.1
DeleteTemplateFile to delete a template file in Cobbler. Takes a template file name as input. Requires 2 arguments: short filename and token Returns error if delete failed.
func (*Client) ExtendedVersion ¶ added in v0.5.0
func (c *Client) ExtendedVersion() (ExtendedVersion, error)
ExtendedVersion returns the version information of the server.
func (*Client) FindDistro ¶ added in v0.5.0
FindDistro searches for one or more distros by any of its attributes.
func (*Client) FindDistroNames ¶ added in v0.5.0
FindDistroNames searches for one or more distros by any of its attributes.
func (*Client) FindFile ¶ added in v0.5.0
FindFile searches for one or more files by any of its attributes.
func (*Client) FindFileNames ¶ added in v0.5.0
FindFileNames searches for one or more files by any of its attributes.
func (*Client) FindImage ¶ added in v0.5.0
FindImage searches for one or more images by any of its attributes.
func (*Client) FindImageNames ¶ added in v0.5.0
FindImageNames searches for one or more distros by any of its attributes.
func (*Client) FindItemNames ¶ added in v0.5.0
func (*Client) FindItems ¶ added in v0.5.0
func (c *Client) FindItems(what string, criteria map[string]interface{}, sortField string, expand bool) ([]interface{}, error)
FindItems searches for one or more items by any of its attributes.
func (*Client) FindItemsPaged ¶ added in v0.5.0
func (c *Client) FindItemsPaged(what string, criteria map[string]interface{}, sortField string, page, itemsPerPage int32) (*PagedSearchResult, error)
FindItemsPaged searches for items with the given criteria and returning
func (*Client) FindMenu ¶ added in v0.5.0
FindMenu searches for one or more menus by any of its attributes.
func (*Client) FindMenuNames ¶ added in v0.5.0
FindMenuNames searches for one or more menus by any of its attributes.
func (*Client) FindMgmtClass ¶ added in v0.5.0
FindMgmtClass searches for one or more managementclasses by any of its attributes.
func (*Client) FindMgmtClassNames ¶ added in v0.5.0
FindMgmtClassNames searches for one or more managementclasses by any of its attributes.
func (*Client) FindPackage ¶ added in v0.5.0
FindPackage is the search method that allows looking for a package by any of its attributes.
func (*Client) FindPackageNames ¶ added in v0.5.0
FindPackageNames is searching for one or more packages by any of its attributes.
func (*Client) FindProfile ¶ added in v0.5.0
FindProfile searches for one or more profiles by any of its attributes.
func (*Client) FindProfileNames ¶ added in v0.5.0
FindProfileNames searches for one or more profiles by any of its attributes.
func (*Client) FindRepo ¶ added in v0.5.0
FindRepo searches for one or more repositories by any of its attributes.
func (*Client) FindRepoNames ¶ added in v0.5.0
FindRepoNames searches for one or more repositories by any of its attributes.
func (*Client) FindSystem ¶ added in v0.5.0
FindSystem searches for one or more systems by any of its attributes.
func (*Client) FindSystemByDnsName ¶ added in v0.5.0
FindSystemByDnsName searches for a system with a given DNS name.
func (*Client) FindSystemNames ¶ added in v0.5.0
FindSystemNames searches for one or more systems by any of its attributes.
func (*Client) GenerateAutoinstall ¶ added in v0.5.0
GenerateAutoinstall generates the autoinstallation file for a given profile or system.
func (*Client) GenerateBootCfg ¶ added in v0.5.0
GenerateBootCfg generates the bootcfg for a given MS Windows profile or system.
func (*Client) GenerateIPxe ¶ added in v0.5.0
GenerateIPxe generates the iPXE (formerly gPXE) configuration data.
func (*Client) GenerateScript ¶ added in v0.5.0
GenerateScript generates for either a profile or sytem the requested script.
func (*Client) GetAuthnModuleName ¶ added in v0.5.0
GetAuthnModuleName retrieves the currently configured authentication module name.
func (*Client) GetAutoinstallSnippets ¶ added in v0.5.0
GetAutoinstallSnippets retrieves a list of all snippets that are in use by Cobbler.
func (*Client) GetAutoinstallTemplates ¶ added in v0.5.0
GetAutoinstallTemplates retrieves a list of all templates that are in use by Cobbler.
func (*Client) GetBlendedData ¶ added in v0.5.0
GetBlendedData passes a profile or system through Cobblers inheritance chain and returns the result.
func (*Client) GetConfigData ¶ added in v0.5.0
GetConfigData retrieves configuration data for a given host.
func (*Client) GetDistroHandle ¶ added in v0.5.0
GetDistroHandle gets the internal ID of a Cobbler item.
func (*Client) GetDistros ¶ added in v0.4.1
GetDistros returns all distros in Cobbler.
func (*Client) GetDistrosSince ¶ added in v0.5.0
GetDistrosSince returns all distros which were created after the specified date.
func (*Client) GetEventLog ¶ added in v0.5.0
GetEventLog retrieves the logged messages for a given event id.
func (*Client) GetEvents ¶ added in v0.5.0
func (c *Client) GetEvents(forUser string) ([]*CobblerEvent, error)
GetEvents retrieves all events from the Cobbler server
func (*Client) GetFileAsRendered ¶ added in v0.5.0
GetFileAsRendered returns the datastructure after it has passed through Cobblers inheritance structure.
func (*Client) GetFileHandle ¶ added in v0.5.0
GetFileHandle gets the internal ID of a Cobbler item.
func (*Client) GetFilesSince ¶ added in v0.5.0
GetFilesSince returns all files which were created after the specified date.
func (*Client) GetImageAsRendered ¶ added in v0.5.0
GetImageAsRendered returns the datastructure after it has passed through Cobblers inheritance structure.
func (*Client) GetImageHandle ¶ added in v0.5.0
GetImageHandle gets the internal ID of a Cobbler item.
func (*Client) GetImagesSince ¶ added in v0.5.0
GetImagesSince returns all images which were created after the specified date.
func (*Client) GetItem ¶ added in v0.5.0
func (c *Client) GetItem(what string, name string, flatten, resolved bool) (map[string]interface{}, error)
GetItem retrieves a single item from the database. An empty map means that the item could not be found.
func (*Client) GetItemHandle ¶ added in v0.4.1
GetItemHandle gets the internal ID of a Cobbler item.
func (*Client) GetItemNames ¶ added in v0.5.0
GetItemNames returns the list of names for a specified object type present inside Cobbler.
func (*Client) GetItemResolvedValue ¶ added in v0.5.0
GetItemResolvedValue retrieves the value of a single attribute of a single item which was passed through the inheritance chain of Cobbler.
func (*Client) GetMenuAsRendered ¶ added in v0.5.0
GetMenuAsRendered returns the datastructure after it has passed through Cobblers inheritance structure.
func (*Client) GetMenuHandle ¶ added in v0.5.0
GetMenuHandle gets the internal ID of a Cobbler item.
func (*Client) GetMenusSince ¶ added in v0.5.0
GetMenusSince returns all menus which were created after the specified date.
func (*Client) GetMgmtClass ¶ added in v0.5.0
GetMgmtClass returns a single mgmtclass obtained by its name.
func (*Client) GetMgmtClassAsRendered ¶ added in v0.5.0
GetMgmtClassAsRendered returns the datastructure after it has passed through Cobblers inheritance structure.
func (*Client) GetMgmtClassHandle ¶ added in v0.5.0
GetMgmtClassHandle gets the internal ID of a Cobbler item.
func (*Client) GetMgmtClasses ¶ added in v0.5.0
GetMgmtClasses returns all mgmtclasses in Cobbler.
func (*Client) GetMgmtClassesSince ¶ added in v0.5.0
GetMgmtClassesSince returns all managementclasses which were created after the specified date.
func (*Client) GetPackage ¶ added in v0.5.0
GetPackage returns a single package obtained by its name.
func (*Client) GetPackageAsRendered ¶ added in v0.5.0
GetPackageAsRendered returns the datastructure after it has passed through Cobblers inheritance structure.
func (*Client) GetPackageHandle ¶ added in v0.5.0
GetPackageHandle gets the internal ID of a Cobbler item.
func (*Client) GetPackages ¶ added in v0.5.0
GetPackages returns all packages in Cobbler.
func (*Client) GetPackagesSince ¶ added in v0.5.0
GetPackagesSince returns all packages that have been edited since a given timestamp.
func (*Client) GetProfile ¶ added in v0.4.1
GetProfile returns a single profile obtained by its name.
func (*Client) GetProfileHandle ¶ added in v0.5.0
GetProfileHandle gets the internal ID of a Cobbler item.
func (*Client) GetProfiles ¶ added in v0.4.1
GetProfiles returns all profiles in Cobbler.
func (*Client) GetProfilesSince ¶ added in v0.5.0
GetProfilesSince returns all profiles which were created after the specified date.
func (*Client) GetRandomMac ¶ added in v0.5.0
GetRandomMac generates a random MAC address for use with a virtualized system.
func (*Client) GetRepoHandle ¶ added in v0.5.0
GetRepoHandle gets the internal ID of a Cobbler item.
func (*Client) GetReposCompatibleWithProfile ¶ added in v0.5.0
GetReposCompatibleWithProfile returns all repositories that can be potentially assigned to a given profile.
func (*Client) GetReposSince ¶ added in v0.5.0
GetReposSince returns all repositories which were created after the specified date.
func (*Client) GetSettings ¶ added in v0.5.0
GetSettings returns the currently active settings.
func (*Client) GetSignatures ¶ added in v0.5.0
func (c *Client) GetSignatures() (*DistroSignatures, error)
GetSignatures retrieves the complete signatures that are loaded by Cobbler.
func (*Client) GetSnippet ¶ added in v0.4.1
GetSnippet gets a snippet file in Cobbler. Takes a snippet file name as input. Returns *Snippet and error if read failed.
func (*Client) GetStatus ¶ added in v0.5.0
func (c *Client) GetStatus(mode StatusOption) (interface{}, error)
GetStatus retrieves the current status of installation progress that has been reported to Cobbler. This can be called with two modes: "normal" or "text. In case this is called in mode "normal" you might want to use ParseStatus to get a parsed version of the data. For mode "text" you can cast the interface to string.
func (*Client) GetSystemHandle ¶ added in v0.5.0
GetSystemHandle gets the internal ID of a Cobbler item.
func (*Client) GetSystems ¶ added in v0.4.1
GetSystems returns all systems in Cobbler.
func (*Client) GetSystemsSince ¶ added in v0.5.0
GetSystemsSince returns all systems which were created after the specified date.
func (*Client) GetTaskStatus ¶ added in v0.5.0
func (c *Client) GetTaskStatus(eventId string) (CobblerEvent, error)
GetTaskStatus takes the event ID from Cobbler and returns its status.
func (*Client) GetTemplateFile ¶ added in v0.4.1
func (c *Client) GetTemplateFile(ksName string) (*TemplateFile, error)
GetTemplateFile to get a template file in Cobbler. Takes a template file name as input. Requires 2 arguments: short filename and token Returns *TemplateFile and error if read failed.
func (*Client) GetUserFromToken ¶ added in v0.5.0
GetUserFromToken checks what user a given token is belonging to.
func (*Client) GetValidArchs ¶ added in v0.5.0
GetValidArchs retrieves all valid architectures that Cobbler is offering.
func (*Client) GetValidBreeds ¶ added in v0.5.0
GetValidBreeds retrieves all valid OS breeds that a distro can have.
func (*Client) GetValidImageBootLoaders ¶ added in v0.5.0
GetValidImageBootLoaders retrieves the list of bootloaders that can be assigned to an image.
func (*Client) GetValidOsVersions ¶ added in v0.5.0
GetValidOsVersions retrieves all valid OS versions that a distro can have.
func (*Client) GetValidOsVersionsForBreed ¶ added in v0.5.0
GetValidOsVersionsForBreed retrieves all valid OS versions for a given breed.
func (*Client) IsAutoinstallInUse ¶ added in v0.5.0
IsAutoinstallInUse checks if a given system has reported that it is currently installing.
func (*Client) IsValueInherit ¶ added in v0.5.0
IsValueInherit safely verifies if a given value is set to the magic "<<inherit>>".
func (*Client) LastModifiedTime ¶ added in v0.5.0
LastModifiedTime retrieves the timestamp when any object in Cobbler was last modified.
func (*Client) ListDistroNames ¶ added in v0.5.0
ListDistroNames returns a list of all distro names currently available in Cobbler.
func (*Client) ListFileNames ¶ added in v0.5.0
ListFileNames returns a list of all files names currently available in Cobbler.
func (*Client) ListImageNames ¶ added in v0.5.0
ListImageNames returns a list of all known image names.
func (*Client) ListMenuNames ¶ added in v0.5.0
ListMenuNames returns a list of all menu names currently available in Cobbler.
func (*Client) ListMgmtClassNames ¶ added in v0.5.0
ListMgmtClassNames returns a list of all managementclass names currently available in Cobbler.
func (*Client) ListPackageNames ¶ added in v0.5.0
ListPackageNames returns a list of all packages names currently available in Cobbler.
func (*Client) ListProfileNames ¶ added in v0.5.0
ListProfileNames returns a list of all profile names currently available in Cobbler.
func (*Client) ListRepoNames ¶ added in v0.5.0
ListRepoNames returns the names of all repositories that exist in Cobbler.
func (*Client) ListSystemNames ¶ added in v0.5.0
ListSystemNames returns a list of all system names currently available in Cobbler.
func (*Client) Login ¶
Login performs a login request to Cobbler using the credentials provided in the configuration in the initializer.
func (*Client) ModifyInterface ¶ added in v0.5.2
func (*Client) ModifyItem ¶ added in v0.5.0
ModifyItem is a generic method to modify items. Changes made with this method are not persisted until a call to SaveItem or one of its other concrete methods.
func (*Client) ModifyItemInPlace ¶ added in v0.5.0
func (c *Client) ModifyItemInPlace(what, name, attribute string, value map[string]interface{}) error
ModifyItemInPlace attempts to recreate the functionality of the "in_place" parameter for the "xapi_object_edit" XML-RPC method.
func (*Client) ModifySetting ¶ added in v0.5.0
ModifySetting modifies a settings if "allow_dynamic_settings" is turned on server side.
func (*Client) NewItem ¶ added in v0.5.0
NewItem creates a new empty item that has to be filled with data. The item does not exist in the database before Client.SaveItem was called.
func (*Client) ParseStatus ¶ added in v0.5.7
func (c *Client) ParseStatus(status interface{}) ([]InstallationStatus, error)
ParseStatus takes the interface returned by GetStatus and converts it into a list of well-defined structs.
func (*Client) Ping ¶ added in v0.5.0
Ping is a simple method to check if the XML-RPC API is available.
func (*Client) PowerSystem ¶ added in v0.5.0
PowerSystem executes a power operation for a single system synchronously.
func (*Client) RegisterNewSystem ¶ added in v0.5.0
RegisterNewSystem registers a new system without a Cobbler token. This is normally called during unattended installation by a script.
func (*Client) RemoveItem ¶ added in v0.5.0
RemoveItem deletes an item from the Cobbler database.
func (*Client) RenameDistro ¶ added in v0.5.0
RenameDistro renames a distro with a given object id.
func (*Client) RenameFile ¶ added in v0.5.0
RenameFile renames a file with a given object id.
func (*Client) RenameImage ¶ added in v0.5.0
RenameImage renames an image with a given object id.
func (*Client) RenameItem ¶ added in v0.5.0
RenameItem renames an item.
func (*Client) RenameMenu ¶ added in v0.5.0
RenameMenu renames a menu with a given object id.
func (*Client) RenameMgmtClass ¶ added in v0.5.0
RenameMgmtClass renames a managementclass with a given object id.
func (*Client) RenameNetworkInterface ¶ added in v0.5.2
func (*Client) RenamePackage ¶ added in v0.5.0
RenamePackage renames a package with a given object id.
func (*Client) RenameProfile ¶ added in v0.5.0
RenameProfile renames a profile with a given object id.
func (*Client) RenameRepo ¶ added in v0.5.0
RenameRepo renames a repository with a given object id.
func (*Client) RenameSystem ¶ added in v0.5.0
RenameSystem renames a System with a given object id.
func (*Client) RunInstallTriggers ¶ added in v0.5.0
RunInstallTriggers runs installation triggers for a given object. This is normally called during unattended installation.
func (*Client) SaveDistro ¶ added in v0.5.0
SaveDistro saves all changes performed via XML-RPC to disk on the server side.
func (*Client) SaveFile ¶ added in v0.5.0
SaveFile saves all changes performed via XML-RPC to disk on the server side.
func (*Client) SaveImage ¶ added in v0.5.0
SaveImage saves all changes performed via XML-RPC to disk on the server side.
func (*Client) SaveMenu ¶ added in v0.5.0
SaveMenu saves all changes performed via XML-RPC to disk on the server side.
func (*Client) SaveMgmtClass ¶ added in v0.5.0
SaveMgmtClass saves all changes performed via XML-RPC to disk on the server side.
func (*Client) SavePackage ¶ added in v0.5.0
SavePackage saves all changes performed via XML-RPC to disk on the server side.
func (*Client) SaveProfile ¶ added in v0.5.0
SaveProfile saves all changes performed via XML-RPC to disk on the server side.
func (*Client) SaveRepo ¶ added in v0.5.0
SaveRepo saves all changes performed via XML-RPC to disk on the server side.
func (*Client) SaveSystem ¶ added in v0.5.0
SaveSystem saves all changes performed via XML-RPC to disk on the server side.
func (*Client) TokenCheck ¶ added in v0.5.0
TokenCheck returns if a given token is still valid or not.
func (*Client) UpdateDistro ¶ added in v0.4.1
UpdateDistro updates a single distro.
func (*Client) UpdateFile ¶ added in v0.5.0
UpdateFile updates a single file.
func (*Client) UpdateImage ¶ added in v0.5.0
UpdateImage updates a single image.
func (*Client) UpdateMenu ¶ added in v0.5.0
UpdateMenu updates a single menu.
func (*Client) UpdateMgmtClass ¶ added in v0.5.0
UpdateMgmtClass updates a single MgmtClass.
func (*Client) UpdatePackage ¶ added in v0.5.0
UpdatePackage updates a single package.
func (*Client) UpdateProfile ¶ added in v0.4.1
UpdateProfile updates a single profile.
func (*Client) UpdateRepo ¶ added in v0.4.1
UpdateRepo updates a single repo.
func (*Client) UpdateSystem ¶ added in v0.4.1
UpdateSystem updates a single system.
type ClientConfig ¶
ClientConfig is the URL of Cobbler plus login credentials.
type CobblerEvent ¶ added in v0.5.0
type CobblerVersion ¶ added in v0.5.0
type CobblerVersion struct {
Major int `json:"major" yaml:"major"`
Minor int `json:"minor" yaml:"minor"`
Patch int `json:"patch" yaml:"patch"`
}
func (*CobblerVersion) Equal ¶ added in v0.5.0
func (cv *CobblerVersion) Equal(otherVersion *CobblerVersion) bool
func (*CobblerVersion) GreaterThan ¶ added in v0.5.0
func (cv *CobblerVersion) GreaterThan(otherVersion *CobblerVersion) bool
func (*CobblerVersion) LessThan ¶ added in v0.5.0
func (cv *CobblerVersion) LessThan(otherVersion *CobblerVersion) bool
func (*CobblerVersion) NotEqual ¶ added in v0.5.0
func (cv *CobblerVersion) NotEqual(otherVersion *CobblerVersion) bool
type Distro ¶ added in v0.4.1
type Distro struct {
Item `mapstructure:",squash" yaml:",inline"`
// These are internal fields and cannot be modified.
SourceRepos []string `mapstructure:"source_repos" cobbler:"noupdate" json:"source_repos" yaml:"source_repos"`
TreeBuildTime string `mapstructure:"tree_build_time" cobbler:"noupdate" json:"tree_build_time" yaml:"tree_build_time"`
Arch string `mapstructure:"arch" json:"arch" yaml:"arch"`
BootLoaders Value[[]string] `mapstructure:"boot_loaders" json:"boot_loaders" yaml:"boot_loaders"`
Breed string `mapstructure:"breed" json:"breed" yaml:"breed"`
Initrd string `mapstructure:"initrd" json:"initrd" yaml:"initrd"`
RemoteBootInitrd string `mapstructure:"remote_boot_initrd" json:"remote_boot_initrd" yaml:"remote_boot_initrd"`
Kernel string `mapstructure:"kernel" json:"kernel" yaml:"kernel"`
RemoteBootKernel string `mapstructure:"remote_boot_kernel" json:"remote_boot_kernel" yaml:"remote_boot_kernel"`
RedhatManagementKey string `mapstructure:"redhat_management_key" json:"redhat_management_key" yaml:"redhat_management_key"`
OSVersion string `mapstructure:"os_version" json:"os_version" yaml:"os_version"`
}
Distro is a created distro. Get the fields from cobbler/items/distro.py
type DistroSignatures ¶ added in v0.5.0
type ExtendedVersion ¶ added in v0.5.0
type File ¶ added in v0.5.0
type File struct {
Resource `mapstructure:",squash"`
// File specific fields
IsDir bool `mapstructure:"is_dir" json:"is_dir" yaml:"is_dir"`
}
File is a created file. Get the fields from cobbler/items/file.py
type HTTPClient ¶
HTTPClient is the interface which defines the API required for the Client to work correctly. Normally this is satisfied by a http.DefaultClient.
type Image ¶ added in v0.5.0
type Image struct {
Item `mapstructure:",squash" yaml:",inline"`
// Image specific fields
// Arch Architecture
// ImageType ImageType `mapstructure:"image_type"`
// VirtDiskDriver VirtDiskDriver `mapstructure:"virt_disk_driver"`
// VirtType VirtType `mapstructure:"virt_type"`
Arch string `mapstructure:"arch" json:"arch" yaml:"arch"`
Autoinstall string `mapstructure:"autoinstall" json:"autoinstall" yaml:"autoinstall"`
Breed string `mapstructure:"breed" json:"breed" yaml:"breed"`
File string `mapstructure:"file" json:"file" yaml:"file"`
ImageType string `mapstructure:"image_type" json:"image_type" yaml:"image_type"`
NetworkCount int `mapstructure:"network_count" json:"network_count" yaml:"network_count"`
OsVersion string `mapstructure:"os_version" json:"os_version" yaml:"os_version"`
BootLoaders []string `mapstructure:"boot_loaders" json:"boot_loaders" yaml:"boot_loaders"`
Menu string `mapstructure:"menu" json:"menu" yaml:"menu"`
VirtAutoBoot bool `mapstructure:"virt_auto_boot" json:"virt_auto_boot" yaml:"virt_auto_boot"`
VirtBridge string `mapstructure:"virt_bridge" json:"virt_bridge" yaml:"virt_bridge"`
VirtCpus int `mapstructure:"virt_cpus" json:"virt_cpus" yaml:"virt_cpus"`
VirtDiskDriver string `mapstructure:"virt_disk_driver" json:"virt_disk_driver" yaml:"virt_disk_driver"`
VirtFileSize Value[float64] `mapstructure:"virt_file_size" json:"virt_file_size" yaml:"virt_file_size"`
VirtPath string `mapstructure:"virt_path" json:"virt_path" yaml:"virt_path"`
VirtRam Value[int] `mapstructure:"virt_ram" json:"virt_ram" yaml:"virt_ram"`
VirtType string `mapstructure:"virt_type" json:"virt_type" yaml:"virt_type"`
SupportedBootLoaders []string `mapstructure:"supported_boot_loaders" cobbler:"noupdate" json:"supported_boot_loaders" yaml:"supported_boot_loaders"`
Client
}
Image is a created image. Get the fields from cobbler/items/image.py
type InstallationStatus ¶ added in v0.5.7
type InstallationStatus struct {
IP string `json:"ip" yaml:"ip"`
MostRecentStart float64 `json:"most_recent_start" yaml:"most_recent_start"`
MostRecentStop float64 `json:"most_recent_stop" yaml:"most_recent_stop"`
MostRecentTarget string `json:"most_recent_target" yaml:"most_recent_target"`
SeenStart int `json:"seen_start" yaml:"seen_start"`
SeenStop int `json:"seen_stop" yaml:"seen_stop"`
State string `json:"state" yaml:"state"`
}
InstallationStatus represents the structured return value of GetStatus.
type Interface ¶ added in v0.4.1
type Interface struct {
BondingOpts string `mapstructure:"bonding_opts" structs:"bonding_opts" json:"bonding_opts" yaml:"bonding_opts"`
BridgeOpts string `mapstructure:"bridge_opts" structs:"bridge_opts" json:"bridge_opts" yaml:"bridge_opts"`
CNAMEs []string `mapstructure:"cnames" structs:"cnames" json:"cnames" yaml:"cnames"`
ConnectedMode bool `mapstructure:"connected_mode" structs:"connected_mode" json:"connected_mode" yaml:"connected_mode"`
DHCPTag string `mapstructure:"dhcp_tag" structs:"dhcp_tag" json:"dhcp_tag" yaml:"dhcp_tag"`
DNSName string `mapstructure:"dns_name" structs:"dns_name" json:"dns_name" yaml:"dns_name"`
Gateway string `mapstructure:"if_gateway" structs:"if_gateway" json:"gateway" yaml:"gateway"`
IPAddress string `mapstructure:"ip_address" structs:"ip_address" json:"ip_address" yaml:"ip_address"`
IPv6Address string `mapstructure:"ipv6_address" structs:"ipv6_address" json:"ipv6_address" yaml:"ipv6_address"`
IPv6DefaultGateway string `mapstructure:"ipv6_default_gateway" structs:"ipv6_default_gateway" json:"ipv6_default_gateway" yaml:"ipv6_default_gateway"`
IPv6MTU string `mapstructure:"ipv6_mtu" structs:"ipv6_mtu" json:"ipv6_mtu" yaml:"ipv6_mtu"`
IPv6Prefix string `mapstructure:"ipv6_prefix" structs:"ipv6_prefix" json:"ipv6_prefix" yaml:"ipv6_prefix"`
IPv6Secondaries []string `mapstructure:"ipv6_secondaries" structs:"ipv6_secondaries" json:"ipv6_secondaries" yaml:"ipv6_secondaries"`
IPv6StaticRoutes []string `mapstructure:"ipv6_static_routes" structs:"ipv6_static_routes" json:"ipv6_static_routes" yaml:"ipv6_static_routes"`
InterfaceMaster string `mapstructure:"interface_master" structs:"interface_master" json:"interface_master" yaml:"interface_master"`
InterfaceType string `mapstructure:"interface_type" structs:"interface_type" json:"interface_type" yaml:"interface_type"`
MACAddress string `mapstructure:"mac_address" structs:"mac_address" json:"mac_address" yaml:"mac_address"`
MTU string `mapstructure:"mtu" structs:"mtu" json:"mtu" yaml:"mtu"`
Management bool `mapstructure:"management" structs:"management" json:"management" yaml:"management"`
Netmask string `mapstructure:"netmask" structs:"netmask" json:"netmask" yaml:"netmask"`
Static bool `mapstructure:"static" structs:"static" json:"static" yaml:"static"`
StaticRoutes []string `mapstructure:"static_routes" structs:"static_routes" json:"static_routes" yaml:"static_routes"`
VirtBridge string `mapstructure:"virt_bridge" structs:"virt_bridge" json:"virt_bridge" yaml:"virt_bridge"`
}
Interface is an interface in a system.
func NewInterface ¶ added in v0.5.0
func NewInterface() Interface
type Interfaces ¶ added in v0.4.1
Interfaces is a collection of interfaces in a system.
type Item ¶ added in v0.5.0
type Item struct {
// Meta information about an item
Meta ItemMeta `cobbler:"noupdate" json:"meta" yaml:"meta"`
// Item fields
Parent string `mapstructure:"parent" json:"parent" yaml:"parent"`
Depth int `mapstructure:"depth" cobbler:"noupdate" json:"depth" yaml:"depth"`
Children []string `mapstructure:"children" cobbler:"noupdate" json:"children" yaml:"children"`
CTime float64 `mapstructure:"ctime" cobbler:"noupdate" json:"ctime" yaml:"ctime"`
MTime float64 `mapstructure:"mtime" cobbler:"noupdate" json:"mtime" yaml:"mtime"`
Uid string `mapstructure:"uid" cobbler:"noupdate" json:"uid" yaml:"uid"`
Name string `mapstructure:"name" json:"name" yaml:"name"`
Comment string `mapstructure:"comment" json:"comment" yaml:"comment"`
KernelOptions Value[map[string]interface{}] `mapstructure:"kernel_options" json:"kernel_options" yaml:"kernel_options"`
KernelOptionsPost Value[map[string]interface{}] `mapstructure:"kernel_options_post" json:"kernel_options_post" yaml:"kernel_options_post"`
AutoinstallMeta Value[map[string]interface{}] `mapstructure:"autoinstall_meta" json:"autoinstall_meta" yaml:"autoinstall_meta"`
FetchableFiles Value[map[string]interface{}] `mapstructure:"fetchable_files" json:"fetchable_files" yaml:"fetchable_files"`
BootFiles Value[map[string]interface{}] `mapstructure:"boot_files" json:"boot_files" yaml:"boot_files"`
TemplateFiles Value[map[string]interface{}] `mapstructure:"template_files" json:"template_files" yaml:"template_files"`
Owners Value[[]string] `mapstructure:"owners" json:"owners" yaml:"owners"`
MgmtClasses Value[[]string] `mapstructure:"mgmt_classes" json:"mgmt_classes" yaml:"mgmt_classes"`
MgmtParameters Value[map[string]interface{}] `mapstructure:"mgmt_parameters" json:"mgmt_parameters" yaml:"mgmt_parameters"`
}
Item general fields
type Menu ¶ added in v0.5.0
type Menu struct {
Item `mapstructure:",squash" yaml:",inline"`
// Menu specific fields
DisplayName string `mapstructure:"display_name" json:"display_name" yaml:"display_name"`
}
Menu is a created menu. Get the fields from cobbler/items/menu.py
type MgmtClass ¶ added in v0.5.0
type MgmtClass struct {
Item `mapstructure:",squash" yaml:",inline"`
// Mgmtclass specific fields
IsDefiniton bool `mapstructure:"is_definition" json:"is_definition" yaml:"is_definition"`
Params map[string]string `mapstructure:"params" json:"params" yaml:"params"`
ClassName string `mapstructure:"class_name" json:"class_name" yaml:"class_name"`
Files []string `mapstructure:"files" json:"files" yaml:"files"`
Packages []string `mapstructure:"packages" json:"packages" yaml:"packages"`
}
func NewMgmtClass ¶ added in v0.5.0
func NewMgmtClass() MgmtClass
type OsVersion ¶ added in v0.5.0
type OsVersion struct {
Signatures []string `mapstructure:"signatures" json:"signatures" yaml:"signatures"`
VersionFile string `mapstructure:"version_file" json:"version_file" yaml:"version_file"`
VersionFileRegex string `mapstructure:"version_file_regex" json:"version_file_regex" yaml:"version_file_regex"`
KernelArch string `mapstructure:"kernel_arch" json:"kernel_arch" yaml:"kernel_arch"`
KernelArchRegex string `mapstructure:"kernel_arch_regex" json:"kernel_arch_regex" yaml:"kernel_arch_regex"`
SupportedArches []string `mapstructure:"supported_arches" json:"supported_arches" yaml:"supported_arches"`
SupportedRepoBreeds []string `mapstructure:"supported_repo_breeds" json:"supported_repo_breeds" yaml:"supported_repo_breeds"`
KernelFile string `mapstructure:"kernel_file" json:"kernel_file" yaml:"kernel_file"`
InitrdFile string `mapstructure:"initrd_file" json:"initrd_file" yaml:"initrd_file"`
IsolinuxOk bool `mapstructure:"isolinux_ok" json:"isolinux_ok" yaml:"isolinux_ok"`
DefaultAutoinstall string `mapstructure:"default_autoinstall" json:"default_autoinstall" yaml:"default_autoinstall"`
KernelOptions string `mapstructure:"kernel_options" json:"kernel_options" yaml:"kernel_options"`
KernelOptionsPost string `mapstructure:"kernel_options_post" json:"kernel_options_post" yaml:"kernel_options_post"`
TemplateFiles string `mapstructure:"template_files" json:"template_files" yaml:"template_files"`
BootFiles []string `mapstructure:"boot_files" json:"boot_files" yaml:"boot_files"`
BootLoaders map[string][]string `mapstructure:"boot_loaders" json:"boot_loaders" yaml:"boot_loaders"`
}
type Package ¶ added in v0.5.0
type Package struct {
Resource `mapstructure:",squash"`
// Package specific attributes
Installer string `mapstructure:"installer" json:"installer" yaml:"installer"`
Version string `mapstructure:"version" json:"version" yaml:"version"`
}
Package is a created package. Get the fields from cobbler/items/package.py
func NewPackage ¶ added in v0.5.0
func NewPackage() Package
type PageInfo ¶ added in v0.5.0
type PageInfo struct {
Page int `mapstructure:"page"`
PrevPage int `mapstructure:"prev_page"`
NextPage int `mapstructure:"next_page"`
Pages []int `mapstructure:"pages"`
NumPages int `mapstructure:"num_pages"`
NumItems int `mapstructure:"num_items"`
StartItem int `mapstructure:"start_item"`
EndItem int `mapstructure:"end_item"`
ItemsPerPage int `mapstructure:"items_per_page"`
ItemsPerPageList []int `mapstructure:"items_per_page_list"`
}
type PagedSearchResult ¶ added in v0.5.0
type PagedSearchResult struct {
FoundItems []interface{} `mapstructure:"items"`
PageInfo PageInfo `mapstructure:"pageinfo"`
}
type Profile ¶ added in v0.4.1
type Profile struct {
Item `mapstructure:",squash" yaml:",inline"`
// These are internal fields and cannot be modified.
ReposEnabled bool `mapstructure:"repos_enabled" cobbler:"noupdate"`
Autoinstall string `mapstructure:"autoinstall" json:"autoinstall" yaml:"autoinstall"`
BootLoaders Value[[]string] `mapstructure:"boot_loaders" json:"boot_loaders" yaml:"boot_loaders"`
DHCPTag string `mapstructure:"dhcp_tag" json:"dhcp_tag" yaml:"dhcp_tag"`
Distro string `mapstructure:"distro" json:"distro" yaml:"distro"`
EnableIPXE Value[bool] `mapstructure:"enable_ipxe" json:"enable_ipxe" yaml:"enable_ipxe"`
EnableMenu Value[bool] `mapstructure:"enable_menu" json:"enable_menu" yaml:"enable_menu"`
Filename string `mapstructure:"filename" json:"filename" yaml:"filename"`
Menu string `mapstructure:"menu" json:"menu" yaml:"menu"`
NameServers Value[[]string] `mapstructure:"name_servers" json:"name_servers" yaml:"name_servers"`
NameServersSearch Value[[]string] `mapstructure:"name_servers_search" json:"name_servers_search" yaml:"name_servers_search"`
NextServerv4 string `mapstructure:"next_server_v4" json:"next_server_v4" yaml:"next_server_v4"`
NextServerv6 string `mapstructure:"next_server_v6" json:"next_server_v6" yaml:"next_server_v6"`
Proxy string `mapstructure:"proxy" json:"proxy" yaml:"proxy"`
RedhatManagementKey string `mapstructure:"redhat_management_key" json:"redhat_management_key" yaml:"redhat_management_key"`
Repos []string `mapstructure:"repos" json:"repos" yaml:"repos"`
Server string `mapstructure:"server" json:"server" yaml:"server"`
VirtAutoBoot Value[bool] `mapstructure:"virt_auto_boot" json:"virt_auto_boot" yaml:"virt_auto_boot"`
VirtBridge string `mapstructure:"virt_bridge" json:"virt_bridge" yaml:"virt_bridge"`
VirtCPUs int `mapstructure:"virt_cpus" json:"virt_cpus" yaml:"virt_cpus"`
VirtDiskDriver string `mapstructure:"virt_disk_driver" json:"virt_disk_driver" yaml:"virt_disk_driver"`
VirtFileSize Value[float64] `mapstructure:"virt_file_size" json:"virt_file_size" yaml:"virt_file_size"`
VirtPath string `mapstructure:"virt_path" json:"virt_path" yaml:"virt_path"`
VirtRAM Value[int] `mapstructure:"virt_ram" json:"virt_ram" yaml:"virt_ram"`
VirtType string `mapstructure:"virt_type" json:"virt_type" yaml:"virt_type"`
Client
}
Profile is a created profile. Get the fields from cobbler/items/profile.py
func NewProfile ¶ added in v0.5.0
func NewProfile() Profile
type ReplicateOptions ¶ added in v0.5.0
type ReplicateOptions struct {
Master string `mapstructure:"master"`
Port string `mapstructure:"port"`
DistroPatterns string `mapstructure:"distro_patterns"`
ProfilePatterns string `mapstructure:"profile_patterns"`
SystemPatterns string `mapstructure:"system_patterns"`
RepoPatterns string `mapstructure:"repo_patterns"`
Imagepatterns string `mapstructure:"image_patterns"`
MgmtclassPatterns string `mapstructure:"mgmtclass_patterns"`
PackagePatterns string `mapstructure:"package_patterns"`
FilePatterns string `mapstructure:"file_patterns"`
Prune bool `mapstructure:"prune"`
OmitData bool `mapstructure:"omit_data"`
SyncAll bool `mapstructure:"sync_all"`
UseSsl bool `mapstructure:"use_ssl"`
}
ReplicateOptions is a struct which descibres the options one can set for the replicate action of Cobbler.
type Repo ¶ added in v0.4.1
type Repo struct {
Item `mapstructure:",squash" yaml:",inline"`
// These are internal fields and cannot be modified.
TreeBuildTime string `mapstructure:"tree_build_time" cobbler:"noupdate"`
AptComponents []string `mapstructure:"apt_components" json:"apt_components" yaml:"apt_components"`
AptDists []string `mapstructure:"apt_dists" json:"apt_dists" yaml:"apt_dists"`
Arch string `mapstructure:"arch" json:"arch" yaml:"arch"`
Breed string `mapstructure:"breed" json:"breed" yaml:"breed"`
CreateRepoFlags Value[string] `mapstructure:"createrepo_flags" json:"createrepo_flags" yaml:"createrepo_flags"`
Environment map[string]string `mapstructure:"environment" json:"environment" yaml:"environment"`
KeepUpdated bool `mapstructure:"keep_updated" json:"keep_updated" yaml:"keep_updated"`
Mirror string `mapstructure:"mirror" json:"mirror" yaml:"mirror"`
MirrorLocally bool `mapstructure:"mirror_locally" json:"mirror_locally" yaml:"mirror_locally"`
MirrorType string `mapstructure:"mirror_type" json:"mirror_type" yaml:"mirror_type"`
Priority int `mapstructure:"priority" json:"priority" yaml:"priority"`
Proxy Value[string] `mapstructure:"proxy" cobbler:"newfield" json:"proxy" yaml:"proxy"`
RsyncOpts map[string]string `mapstructure:"rsyncopts" json:"rsync_opts" yaml:"rsync_opts"`
RpmList []string `mapstructure:"rpm_list" json:"rpm_list" yaml:"rpm_list"`
YumOpts map[string]string `mapstructure:"yumopts" json:"yum_opts" yaml:"yum_opts"`
}
Repo is a created repo. Get the fileds from cobbler/items/repo.py
type Resource ¶ added in v0.5.0
type Resource struct {
Item `mapstructure:",squash" yaml:",inline"`
// Resource specific attributes
// Action ResourceAction `mapstructure:"action"`
Action string `mapstructure:"action" json:"action" yaml:"action"`
Mode string `mapstructure:"mode" json:"mode" yaml:"mode"`
Owner string `mapstructure:"owner" json:"owner" yaml:"owner"`
Group string `mapstructure:"group" json:"group" yaml:"group"`
Path string `mapstructure:"path" json:"path" yaml:"path"`
Template string `mapstructure:"template" json:"template" yaml:"template"`
}
Resource is an abstract item type that cannot be directly instantiated. Get the fields from cobbler/items/resource.py
func NewResource ¶ added in v0.5.0
func NewResource() Resource
type ResourceAction ¶ added in v0.5.0
type ResourceAction int64
func (ResourceAction) String ¶ added in v0.5.0
func (r ResourceAction) String() string
type Settings ¶ added in v0.5.0
type Settings struct {
AllowDuplicateHostnames bool `json:"allow_duplicate_hostnames" mapstructure:"allow_duplicate_hostnames"`
AllowDuplicateIPs bool `json:"allow_duplicate_ips" mapstructure:"allow_duplicate_ips"`
AllowDuplicateMACs bool `json:"allow_duplicate_macs" mapstructure:"allow_duplicate_macs"`
AllowDynamicSettings bool `json:"allow_dynamic_settings" mapstructure:"allow_dynamic_settings"`
AlwaysWriteDhcpEntries bool `json:"always_write_dhcp_entries" mapstructure:"always_write_dhcp_entries"`
AnamonEnabled bool `json:"anamon_enabled" mapstructure:"anamon_enabled"`
AuthTokenExpiration int `json:"auth_token_expiration" mapstructure:"auth_token_expiration"`
AuthnPamService string `json:"authn_pam_service" mapstructure:"authn_pam_service"`
AutoMigrateSettings bool `json:"auto_migrate_settings" mapstructure:"auto_migrate_settings"`
Autoinstall string `json:"autoinstall" mapstructure:"autoinstall"`
AutoinstallSnippetsDirectory string `json:"autoinstall_snippets_dir" mapstructure:"autoinstall_snippets_dir"`
AutoinstallTemplatesDirectory string `json:"autoinstall_templates_dir" mapstructure:"autoinstall_templates_dir"`
BUildReportingIgnorelist []string `json:"build_reporting_ignorelist" mapstructure:"build_reporting_ignorelist"`
BindChrootPath string `json:"bind_chroot_path" mapstructure:"bind_chroot_path"`
BindManageIpmi bool `json:"bind_manage_ipmi" mapstructure:"bind_manage_ipmi"`
BindMaster string `json:"bind_master" mapstructure:"bind_master"`
BindZonefilePath string `json:"bind_zonefile_path" mapstructure:"bind_zonefile_path"`
BootloaderConfTemplateDirectory string `json:"boot_loader_conf_template_dir" mapstructure:"boot_loader_conf_template_dir"`
BootloaderDirectory string `json:"bootloaders_dir" mapstructure:"bootloaders_dir"`
BootloaderFormats map[string][]BootloaderFormatSettings `json:"bootloaders_formats" mapstructure:"bootloaders_formats"`
BootloaderIPXEFolder string `json:"bootloaders_ipxe_folder" mapstructure:"bootloaders_ipxe_folder"`
BootloaderModules []string `json:"bootloaders_modules" mapstructure:"bootloaders_modules"`
BootloaderShimDirectory string `json:"bootloaders_shim_folder" mapstructure:"bootloaders_shim_folder"`
BootloaderShimFile string `json:"bootloaders_shim_file" mapstructure:"bootloaders_shim_file"`
BuildReportingEmail []string `json:"build_reporting_email" mapstructure:"build_reporting_email"`
BuildReportingEnabled bool `json:"build_reporting_enabled" mapstructure:"build_reporting_enabled"`
BuildReportingSender string `json:"build_reporting_sender" mapstructure:"build_reporting_sender"`
BuildReportingSmtpServer string `json:"build_reporting_smtp_server" mapstructure:"build_reporting_smtp_server"`
BuildReportingSubject string `json:"build_reporting_subject" mapstructure:"build_reporting_subject"`
BuildisoDirectory string `json:"buildisodir" mapstructure:"buildisodir"`
CacheEnabled bool `json:"cache_enabled" mapstructure:"cache_enabled"`
CheetahImportWhitelist []string `json:"cheetah_import_whitelist" mapstructure:"cheetah_import_whitelist"`
ClientUseHttps bool `json:"client_use_https" mapstructure:"client_use_https"`
ClientUseLocalhost bool `json:"client_use_localhost" mapstructure:"client_use_localhost"`
CobblerMaster string `json:"cobbler_master" mapstructure:"cobbler_master"`
ConvertServerToIp bool `json:"convert_server_to_ip" mapstructure:"convert_server_to_ip"`
CreaterepoFlags string `json:"createrepo_flags" mapstructure:"createrepo_flags"`
DefaultNameServers []string `json:"default_name_servers" mapstructure:"default_name_servers"`
DefaultNameServersSearch []string `json:"default_name_servers_search" mapstructure:"default_name_servers_search"`
DefaultOwnership []string `json:"default_ownership" mapstructure:"default_ownership"`
DefaultPasswordCrypted string `json:"default_password_crypted" mapstructure:"default_password_crypted"`
DefaultTemplateType string `json:"default_template_type" mapstructure:"default_template_type"`
DefaultVirtBridge string `json:"default_virt_bridge" mapstructure:"default_virt_bridge"`
DefaultVirtDiskDriver string `json:"default_virt_disk_driver" mapstructure:"default_virt_disk_driver"`
DefaultVirtFileSize float64 `json:"default_virt_file_size" mapstructure:"default_virt_file_size"`
DefaultVirtRam int `json:"default_virt_ram" mapstructure:"default_virt_ram"`
DefaultVirtType string `json:"default_virt_type" mapstructure:"default_virt_type"`
EnableIpxe bool `json:"enable_ipxe" mapstructure:"enable_ipxe"`
EnableMenu bool `json:"enable_menu" mapstructure:"enable_menu"`
ExtraSettingsList []string `json:"extra_settings_list" mapstructure:"extra_settings_list"`
Grub2ModDirectory string `json:"grub2_mod_dir" mapstructure:"grub2_mod_dir"`
GrubconfigDirectory string `json:"grubconfig_dir" mapstructure:"grubconfig_dir"`
HttpPort int `json:"http_port" mapstructure:"http_port"`
Include []string `json:"include" mapstructure:"include"`
IsoTemplateDirectory string `json:"iso_template_dir" mapstructure:"iso_template_dir"`
Jinja2IncludeDirectory string `json:"jinja2_includedir" mapstructure:"jinja2_includedir"`
KernelOptions map[string]string `json:"kernel_options" mapstructure:"kernel_options"`
LazyStart bool `json:"lazy_start" mapstructure:"lazy_start"`
LdapAnonymousBind bool `json:"ldap_anonymous_bind" mapstructure:"ldap_anonymous_bind"`
LdapBaseDn string `json:"ldap_base_dn" mapstructure:"ldap_base_dn"`
LdapPort int `json:"ldap_port" mapstructure:"ldap_port"`
LdapSearchBindDn string `json:"ldap_search_bind_dn" mapstructure:"ldap_search_bind_dn"`
LdapSearchPasswd string `json:"ldap_search_passwd" mapstructure:"ldap_search_passwd"`
LdapSearchPrefix string `json:"ldap_search_prefix" mapstructure:"ldap_search_prefix"`
LdapServer string `json:"ldap_server" mapstructure:"ldap_server"`
LdapTls bool `json:"ldap_tls" mapstructure:"ldap_tls"`
LdapTlsCaCertDirectory string `json:"ldap_tls_cacertdir" mapstructure:"ldap_tls_cacertdir"`
LdapTlsCaCertFile string `json:"ldap_tls_cacertfile" mapstructure:"ldap_tls_cacertfile"`
LdapTlsCertFile string `json:"ldap_tls_certfile" mapstructure:"ldap_tls_certfile"`
LdapTlsCipherSuite string `json:"ldap_tls_cipher_suite" mapstructure:"ldap_tls_cipher_suite"`
LdapTlsKeyFile string `json:"ldap_tls_keyfile" mapstructure:"ldap_tls_keyfile"`
LdapTlsReqcert string `json:"ldap_tls_reqcert" mapstructure:"ldap_tls_reqcert"`
ManageDhcp bool `json:"manage_dhcp" mapstructure:"manage_dhcp"`
ManageDhcpV4 bool `json:"manage_dhcp_v4" mapstructure:"manage_dhcp_v4"`
ManageDhcpV6 bool `json:"manage_dhcp_v6" mapstructure:"manage_dhcp_v6"`
ManageDns bool `json:"manage_dns" mapstructure:"manage_dns"`
ManageForwardZones []string `json:"manage_forward_zones" mapstructure:"manage_forward_zones"`
ManageGenders bool `json:"manage_genders" mapstructure:"manage_genders"`
ManageReverseZones []string `json:"manage_reverse_zones" mapstructure:"manage_reverse_zones"`
ManageRsync bool `json:"manage_rsync" mapstructure:"manage_rsync"`
ManageTftpd bool `json:"manage_tftpd" mapstructure:"manage_tftpd"`
MgmtClasses []string `json:"mgmt_classes" mapstructure:"mgmt_classes"`
MgmtParameters map[string]string `json:"mgmt_parameters" mapstructure:"mgmt_parameters"`
NextServerV4 string `json:"next_server_v4" mapstructure:"next_server_v4"`
NextServerV6 string `json:"next_server_v6" mapstructure:"next_server_v6"`
NoPxeWithTriggers bool `json:"nopxe_with_triggers" mapstructure:"nopxe_with_triggers"`
NsupdateEnabled bool `json:"nsupdate_enabled" mapstructure:"nsupdate_enabled"`
NsupdateLog string `json:"nsupdate_log" mapstructure:"nsupdate_log"`
NsupdateTsigAlorithm string `json:"nsupdate_tsig_algorithm" mapstructure:"nsupdate_tsig_algorithm"`
NsupdateTsigKey []string `json:"nsupdate_tsig_key" mapstructure:"nsupdate_tsig_key"`
PowerManagementDefaultType string `json:"power_management_default_type" mapstructure:"power_management_default_type"`
Proxies []string `json:"proxies" mapstructure:"proxies"`
ProxyUrlExternal string `json:"proxy_url_ext" mapstructure:"proxy_url_ext"`
ProxyUrlInternal string `json:"proxy_url_int" mapstructure:"proxy_url_int"`
PuppetAutoSetup bool `json:"puppet_auto_setup" mapstructure:"puppet_auto_setup"`
PuppetCaPath string `json:"puppetca_path" mapstructure:"puppetca_path"`
PuppetParametrizedClasses bool `json:"puppet_parameterized_classes" mapstructure:"puppet_parameterized_classes"`
PuppetServer string `json:"puppet_server" mapstructure:"puppet_server"`
PuppetVersion int `json:"puppet_version" mapstructure:"puppet_version"`
PxeJustOnce bool `json:"pxe_just_once" mapstructure:"pxe_just_once"`
RedhatManagementKey string `json:"redhat_management_key" mapstructure:"redhat_management_key"`
RedhatManagementPermissive bool `json:"redhat_management_permissive" mapstructure:"redhat_management_permissive"`
RedhatManagementServer string `json:"redhat_management_server" mapstructure:"redhat_management_server"`
RegisterNewInstalls bool `json:"register_new_installs" mapstructure:"register_new_installs"`
RemoveOldPuppetCertsAutomatically bool `json:"remove_old_puppet_certs_automatically" mapstructure:"remove_old_puppet_certs_automatically"`
ReplicateRepoRsyncOptions string `json:"replicate_repo_rsync_options" mapstructure:"replicate_repo_rsync_options"`
ReplicateRsyncOptions string `json:"replicate_rsync_options" mapstructure:"replicate_rsync_options"`
ReposyncFlags string `json:"reposync_flags" mapstructure:"reposync_flags"`
ReposyncRsyncFlags string `json:"reposync_rsync_flags" mapstructure:"reposync_rsync_flags"`
RestartDhcp bool `json:"restart_dhcp" mapstructure:"restart_dhcp"`
RestartDns bool `json:"restart_dns" mapstructure:"restart_dns"`
RunInstallTriggers bool `json:"run_install_triggers" mapstructure:"run_install_triggers"`
ScmPushScript string `json:"scm_push_script" mapstructure:"scm_push_script"`
ScmTrackAuthor string `json:"scm_track_author" mapstructure:"scm_track_author"`
ScmTrackEnabled bool `json:"scm_track_enabled" mapstructure:"scm_track_enabled"`
ScmTrackMode string `json:"scm_track_mode" mapstructure:"scm_track_mode"`
SerializerPrettyJson bool `json:"serializer_pretty_json" mapstructure:"serializer_pretty_json"`
Server string `json:"server" mapstructure:"server"`
SignPuppetCertsAutomatically bool `json:"sign_puppet_certs_automatically" mapstructure:"sign_puppet_certs_automatically"`
SignaturePath string `json:"signature_path" mapstructure:"signature_path"`
SignatureUrl string `json:"signature_url" mapstructure:"signature_url"`
SyslinuxDirectory string `json:"syslinux_dir" mapstructure:"syslinux_dir"`
SyslinuxMemdiskDirectory string `json:"syslinux_memdisk_folder" mapstructure:"syslinux_memdisk_folder"`
SyslinuxPxelinuxDirectory string `json:"syslinux_pxelinux_folder" mapstructure:"syslinux_pxelinux_folder"`
TftpbootLocation string `json:"tftpboot_location" mapstructure:"tftpboot_location"`
VirtAutoBoot bool `json:"virt_auto_boot" mapstructure:"virt_auto_boot"`
WebDirectory string `json:"webdir" mapstructure:"webdir"`
WebDirectoryWhitelist []string `json:"webdir_whitelist" mapstructure:"webdir_whitelist"`
WindowsEnabled bool `json:"windows_enabled" mapstructure:"windows_enabled"`
WindowsTemplateDirectory string `json:"windows_template_dir" mapstructure:"windows_template_dir"`
XmlrpcPort int `json:"xmlrpc_port" mapstructure:"xmlrpc_port"`
YumDistroPriority int `json:"yum_distro_priority" mapstructure:"yum_distro_priority"`
YumDownloaderFlags string `json:"yumdownloader_flags" mapstructure:"yumdownloader_flags"`
YumPostInstallMirror bool `json:"yum_post_install_mirror" mapstructure:"yum_post_install_mirror"`
}
type Snippet ¶
type Snippet struct {
// The name the snippet file will be saved in Cobbler
Name string `json:"name" yaml:"name"`
// The contents of the template file
Body string `json:"body" yaml:"body"`
}
Snippet is a snippet file
type StatusOption ¶ added in v0.5.7
type StatusOption string
const StatusNormal StatusOption = "normal"
const StatusText StatusOption = "text"
type StubHTTPClient ¶ added in v0.5.0
type StubHTTPClient struct {
ShouldVerify bool // Make sure that the expected and the actual sent payload match.
// contains filtered or unexported fields
}
func NewStubHTTPClient ¶ added in v0.5.0
func NewStubHTTPClient(t *testing.T) *StubHTTPClient
func (*StubHTTPClient) Verify ¶ added in v0.5.0
func (s *StubHTTPClient) Verify()
type System ¶
type System struct {
Item `mapstructure:",squash" yaml:",inline"`
// These are internal fields and cannot be modified.
IPv6Autoconfiguration bool `mapstructure:"ipv6_autoconfiguration" cobbler:"noupdate" json:"ipv6_autoconfiguration" yaml:"ipv6_autoconfiguration"`
ReposEnabled bool `mapstructure:"repos_enabled" cobbler:"noupdate" json:"repos_enabled" yaml:"repos_enabled"`
Autoinstall string `mapstructure:"autoinstall" json:"autoinstall" yaml:"autoinstall"`
BootLoaders Value[[]string] `mapstructure:"boot_loaders" json:"boot_loaders" yaml:"boot_loaders"`
EnableIPXE Value[bool] `mapstructure:"enable_ipxe" json:"enable_ipxe" yaml:"enable_ipxe"`
Filename string `mapstructure:"filename" json:"filename" yaml:"filename"`
Gateway string `mapstructure:"gateway" json:"gateway" yaml:"gateway"`
Hostname string `mapstructure:"hostname" json:"hostname" yaml:"hostname"`
IPv6DefaultDevice string `mapstructure:"ipv6_default_device" json:"ipv6_default_device" yaml:"ipv6_default_device"`
Image string `mapstructure:"image" json:"image" yaml:"image"`
Interfaces Interfaces `mapstructure:"interfaces" cobbler:"noupdate" json:"interfaces" yaml:"interfaces"`
NameServers []string `mapstructure:"name_servers" json:"name_servers" yaml:"name_servers"`
NameServersSearch []string `mapstructure:"name_servers_search" json:"name_servers_search" yaml:"name_servers_search"`
NetbootEnabled bool `mapstructure:"netboot_enabled" json:"netboot_enabled" yaml:"netboot_enabled"`
NextServerv4 string `mapstructure:"next_server_v4" json:"next_server_v4" yaml:"next_server_v4"`
NextServerv6 string `mapstructure:"next_server_v6" json:"next_server_v6" yaml:"next_server_v6"`
PowerAddress string `mapstructure:"power_address" json:"power_address" yaml:"power_address"`
PowerID string `mapstructure:"power_id" json:"power_id" yaml:"power_id"`
PowerIdentityFile string `mapstructure:"power_identity_file" json:"power_identity_file" yaml:"power_identity_file"`
PowerOptions string `mapstructure:"power_options" json:"power_options" yaml:"power_options"`
PowerPass string `mapstructure:"power_pass" json:"power_pass" yaml:"power_pass"`
PowerType string `mapstructure:"power_type" json:"power_type" yaml:"power_type"`
PowerUser string `mapstructure:"power_user" json:"power_user" yaml:"power_user"`
Profile string `mapstructure:"profile" json:"profile" yaml:"profile"`
Proxy string `mapstructure:"proxy" json:"proxy" yaml:"proxy"`
RedhatManagementKey string `mapstructure:"redhat_management_key" json:"redhat_management_key" yaml:"redhat_management_key"`
SerialBaudRate int `mapstructure:"serial_baud_rate" json:"serial_baud_rate" yaml:"serial_baud_rate"`
SerialDevice int `mapstructure:"serial_device" json:"serial_device" yaml:"serial_device"`
Server string `mapstructure:"server" json:"server" yaml:"server"`
Status string `mapstructure:"status" json:"status" yaml:"status"`
VirtAutoBoot Value[bool] `mapstructure:"virt_auto_boot" json:"virt_auto_boot" yaml:"virt_auto_boot"`
VirtCPUs Value[int] `mapstructure:"virt_cpus" json:"virt_cpus" yaml:"virt_cpus"`
VirtDiskDriver string `mapstructure:"virt_disk_driver" json:"virt_disk_driver" yaml:"virt_disk_driver"`
VirtFileSize Value[float64] `mapstructure:"virt_file_size" json:"virt_file_size" yaml:"virt_file_size"`
VirtPXEBoot bool `mapstructure:"virt_pxe_boot" json:"virt_pxe_boot" yaml:"virt_pxe_boot"`
VirtPath string `mapstructure:"virt_path" json:"virt_path" yaml:"virt_path"`
VirtRAM Value[int] `mapstructure:"virt_ram" json:"virt_ram" yaml:"virt_ram"`
VirtType string `mapstructure:"virt_type" json:"virt_type" yaml:"virt_type"`
Client
}
System is a created system.
func (*System) CreateInterface ¶ added in v0.4.1
CreateInterface creates network interfaces in Cobbler
func (*System) DeleteInterface ¶ added in v0.4.1
DeleteInterface deletes a single interface in a System.
func (*System) GetInterface ¶ added in v0.4.1
GetInterface returns a single interface in a System.
func (*System) GetInterfaces ¶ added in v0.4.1
func (s *System) GetInterfaces() (Interfaces, error)
GetInterfaces returns all interfaces in a System.
func (*System) ModifyNetworkInterface ¶ added in v0.5.2
ModifyNetworkInterface updates the attributes of an existing interface
type TemplateFile ¶ added in v0.4.1
type TemplateFile struct {
// The name the template file will be saved in Cobbler
Name string `json:"name" yaml:"name"`
// The contents of the template file
Body string `json:"body" yaml:"body"`
}
TemplateFile is the former TemplateFile
type Value ¶ added in v0.5.0
type Value[T any] struct { // Data contains the unresolved or resolved data of the attribute. This is not set in case the value is flattened. Data T // FlattenedValue contains the unresolved or resolved flattened data of the Attribute. This is not set in case the // value is not flattened. FlattenedValue string // IsInherited is a flag that signals if the attribute is inherited or not. If this flag is true then both Data and // FlattenedValue are not set. IsInherited bool // RawData contains the data as received by the API. This field is not evaluated when updating an Item via the // API. RawData interface{} }
Value is a helper struct that wraps the multi-typed values being returned from the Cobbler API.
type VirtDiskDriver ¶ added in v0.5.0
type VirtDiskDriver int64
func (VirtDiskDriver) String ¶ added in v0.5.0
func (v VirtDiskDriver) String() string
type XMLRPCArray ¶ added in v0.5.2
type XMLRPCArray struct {
ArrayValues []XMLRPCValue `xml:"data>value"`
}
type XMLRPCMethodCall ¶ added in v0.5.2
type XMLRPCMethodCall struct {
MethodName string `xml:"methodName"`
Params []XMLRPCParam `xml:"params>param"`
}
type XMLRPCParam ¶ added in v0.5.2
type XMLRPCParam struct {
Value XMLRPCValue `xml:"value"`
}
type XMLRPCStruct ¶ added in v0.5.2
type XMLRPCStruct struct {
Members []XMLRPCStructMember `xml:"member"`
}
type XMLRPCStructMember ¶ added in v0.5.2
type XMLRPCStructMember struct {
Name string `xml:"name"`
StructValue XMLRPCValue `xml:"value"`
}
type XMLRPCValue ¶ added in v0.5.2
type XMLRPCValue struct {
XMLType string
Int int `xml:"int"`
String string `xml:"string"`
Boolean bool `xml:"boolean"`
Double float64 `xml:"double"`
Base64 string `xml:"base64"`
Struct XMLRPCStruct `xml:"struct"`
Array XMLRPCArray `xml:"array"`
}
XMLRPCValue is a wrapper struct where only one of the fields will be set for a single instance of this struct.