cfgresources

package
v0.5.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2022 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bios added in v0.2.3

type Bios struct {
	Dell *Dell `yaml:"dell"`
}

Bios struct holds bios configuration for each vendor.

type BladeBmcAccount added in v0.2.3

type BladeBmcAccount struct {
	Name     string `yaml:"name"`
	Password string `yaml:"password"`
}

BladeBmcAccount declares attributes for a Blade BMC user to be managed through the chassis.

type Dell added in v0.2.2

type Dell struct {
	Idrac9BiosSettings *Idrac9BiosSettings `yaml:"idrac9bios"`
}

Dell holds configuration parameters for Dell assets.

type HPE added in v0.3.5

type HPE struct {
	// static_high
	// static_low
	// dynamic
	// os_control - note this requires the machine to be rebooted
	PowerRegulator string `yaml:"regulator"`
}

HPE struct holds configuration parameters for HPE assets.

type HTTPSCert added in v0.2.4

type HTTPSCert struct {
	// Renew cert if it will expire in this time period.
	RenewBeforeExpiry time.Duration `yaml:"renewBeforeExpiry"`
	// Validate these attributes when renewing certs
	ValidateAttributes []string             `yaml:"validateAttributes"`
	Attributes         *HTTPSCertAttributes `yaml:"attributes"`
}

HTTPSCert struct holds BMC HTTPs cert configuration.

type HTTPSCertAttributes added in v0.2.4

type HTTPSCertAttributes struct {
	CommonName       string `yaml:"commonName"`
	OrganizationName string `yaml:"organizationName"`
	OrganizationUnit string `yaml:"organizationUnit"`
	Locality         string `yaml:"locality"`
	StateName        string `yaml:"stateName"`
	CountryCode      string `yaml:"countryCode"`
	Email            string `yaml:"email"`
	SubjectAltName   string `yaml:"subjectAltName"`
}

HTTPSCertAttributes declares attributes that are part of a cert.

type Idrac9BiosSettings added in v0.2.2

type Idrac9BiosSettings struct {
	PxeDev1EnDis string `json:"PxeDev1EnDis,omitempty" yaml:"PxeDev1EnDis,omitempty" validate:"oneof=Enabled Disabled"`
	PxeDev2EnDis string `json:"PxeDev2EnDis,omitempty" yaml:"PxeDev2EnDis,omitempty" validate:"oneof=Enabled Disabled"`
	PxeDev3EnDis string `json:"PxeDev3EnDis,omitempty" yaml:"PxeDev3EnDis,omitempty" validate:"oneof=Enabled Disabled"`
	PxeDev4EnDis string `json:"PxeDev4EnDis,omitempty" yaml:"PxeDev4EnDis,omitempty" validate:"oneof=Enabled Disabled"`
}

Idrac9BiosSettings holds configuration parameters for Idrac9 bios.

type Ldap

type Ldap struct {
	Server         string `yaml:"server"`
	Port           int    `yaml:"port"`
	Enable         bool   `yaml:"enable"`
	Role           string `yaml:"role"`
	BaseDn         string `yaml:"baseDn"` // BaseDN is the starting point of the LDAP tree search.
	BindDn         string `yaml:"bindDn"` // BindDN is used to gain access to the LDAP tree.
	Group          string `yaml:"group"`
	GroupBaseDn    string `yaml:"groupBaseDn"`
	UserAttribute  string `yaml:"userAttribute"`
	GroupAttribute string `yaml:"groupAttribute"`
	SearchFilter   string `yaml:"searchFilter"`
}

Ldap struct holds BMC LDAP configuration.

type LdapBin added in v0.4.14

type LdapBin struct {
	Executor string `yaml:"executor"`
	Path     string `yaml:"path"`
}

type LdapGroup

type LdapGroup struct {
	Role        string `yaml:"role"`
	Group       string `yaml:"group"`
	GroupBaseDn string `yaml:"groupBaseDn"`
	Enable      bool   `yaml:"enable"`
}

LdapGroup struct holds a single BMC LDAP role group configuration.

type LdapGroups added in v0.4.14

type LdapGroups struct {
	Bin              *LdapBin     `yaml:"bin"`
	Groups           []*LdapGroup `yaml:"groups"`
	ExtraAdminGroups []*LdapGroup `json:"admins"`
	ExtraUserGroups  []*LdapGroup `json:"users"`
}

LdapGroups holds all group-related configuration parameters. ExtraGroups is used in combination with Bin to add more groups at runtime.

func (*LdapGroups) GetExtraGroups added in v0.4.14

func (l *LdapGroups) GetExtraGroups(serial, vendor string) (string, error)

If you want to add extra groups at runtime using a script, you have

the option of specifying
* Bin.Executor: Usually /bin/sh or /bin/bash and the like.
* Bin.Path: Path your actual script.

You get the serial of the asset and its vendor as two arguments. If you want more, create a GitHub issue and we will take a look.

type License added in v0.2.2

type License struct {
	Key string `yaml:"key"`
}

License struct holds BMC licensing configuration.

type Network

type Network struct {
	Hostname       string `yaml:"hostname"`
	DNSFromDHCP    bool   `yaml:"dnsFromDhcp"`
	SSHEnable      bool   `yaml:"sshEnable"`
	SSHPort        int    `yaml:"sshPort"`
	SNMPEnable     bool   `yaml:"snmpEnable"`
	SolEnable      bool   `yaml:"solEnable"` // SerialOverLan
	IpmiEnable     bool   `yaml:"ipmiEnable"`
	DhcpEnable     bool   `yaml:"dhcpEnable"`
	IpmiPort       int    `yaml:"ipmiPort"`
	KVMMediaPort   int    `yaml:"kvmMediaPort"`
	KVMConsolePort int    `yaml:"kvmConsolePort"`
	DDNSEnable     bool   `yaml:"ddnsEnable"`
}

Network struct holds BMC network configuration.

type Ntp

type Ntp struct {
	Enable   bool   `yaml:"enable"`
	Server1  string `yaml:"server1"`
	Server2  string `yaml:"server2"`
	Server3  string `yaml:"server3"`
	Timezone string `yaml:"timezone"`
}

Ntp struct holds BMC NTP configuration.

type Power added in v0.3.5

type Power struct {
	HPE *HPE `yaml:"hpe"`
}

Power struct holds Power settings configuration for each vendor.

type ResourcesConfig

type ResourcesConfig struct {
	Ldap         *Ldap         `yaml:"ldap"`
	LdapGroups   *LdapGroups   `yaml:"ldapGroups"`
	License      *License      `yaml:"license"`
	Network      *Network      `yaml:"network"`
	Syslog       *Syslog       `yaml:"syslog"`
	User         []*User       `yaml:"user"`
	HTTPSCert    *HTTPSCert    `yaml:"httpsCert"`
	Ntp          *Ntp          `yaml:"ntp"`
	Bios         *Bios         `yaml:"bios"`
	Power        *Power        `yaml:"power"`
	Supermicro   *Supermicro   `yaml:"supermicro"`
	SetupChassis *SetupChassis `yaml:"setupChassis"`
}

ResourcesConfig struct holds all the configuration to be applied.

type SetupChassis added in v0.2.2

type SetupChassis struct {
	FlexAddress         *flexAddress       `yaml:"flexAddress"`
	IpmiOverLan         *ipmiOverLan       `yaml:"ipmiOverLan"`
	DynamicPower        *dynamicPower      `yaml:"dynamicPower"`
	BladesPower         *bladesPower       `yaml:"bladesPower"`
	AddBladeBmcAdmins   []*BladeBmcAccount `yaml:"addBladeBmcAdmins"`
	RemoveBladeBmcUsers []*BladeBmcAccount `yaml:"removeBladeBmcUsers"`
}

SetupChassis struct holds attributes for one time chassis setup.

type Supermicro

type Supermicro struct {
	NetworkCfg *SupermicroNetworkCfg `yaml:"network"`
}

Supermicro holds configuration for supermicro assets.

type SupermicroNetworkCfg

type SupermicroNetworkCfg struct {
	Web              string `yaml:"web"`
	WebSsl           int    `yaml:"webSsl"`
	IkvmServerPort   int    `yaml:"ikvmServerPort"`
	VirtualMediaPort int    `yaml:"virtualMediaPort"`
	SSHPort          int    `yaml:"sshPort"`
}

SupermicroNetworkCfg holds configuration for supermicro network.

type Syslog

type Syslog struct {
	Server string `yaml:"server"`
	Port   int    `yaml:"port,omitempty"`
	Enable bool   `yaml:"enable,omitempty"`
}

Syslog struct holds BMC syslog configuration.

type User

type User struct {
	Name         string `yaml:"name"`
	Password     string `yaml:"password"`
	Role         string `yaml:"role"`
	Enable       bool   `yaml:"enable,omitempty"`
	SolEnable    bool   `yaml:"solEnable,omitempty"`
	SNMPv3Enable bool   `yaml:"snmpV3Enable,omitempty"`
}

User struct holds a BMC user account configuration.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL