Documentation
¶
Index ¶
- Constants
- type Driver
- func (d *Driver) Create() error
- func (d *Driver) DriverName() string
- func (d *Driver) GetCreateFlags() []mcnflag.Flag
- func (d *Driver) GetIP() (string, error)
- func (d *Driver) GetSSHHostname() (string, error)
- func (d *Driver) GetSSHUsername() string
- func (d *Driver) GetState() (state.State, error)
- func (d *Driver) GetURL() (string, error)
- func (d *Driver) Kill() error
- func (d *Driver) PreCreateCheck() error
- func (d *Driver) Remove() error
- func (d *Driver) Restart() error
- func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) error
- func (d *Driver) Start() error
- func (d *Driver) Stop() error
- func (d *Driver) String() string
- func (d *Driver) UnmarshalJSON(data []byte) error
Constants ¶
const ( WAIT_FOR_STATUS_TIMEOUT time.Duration = 30 * time.Minute WAIT_FOR_STATUS_INSTALL_TIMEOUT time.Duration = 30 * time.Minute WAIT_FOR_STATUS_STEP time.Duration = 5 * time.Second WAIT_FOR_STATUS_STEP_FOR_INSTALLATION time.Duration = 5 * time.Second WAIT_FOR_STATUS_INSTALL_STEP time.Duration = 5 * time.Second WAIT_FOR_STATUS_STOPPED_TIMEOUT time.Duration = 15 * time.Second WAIT_FOR_STATUS_NOT_FOUND_TIMEOUT time.Duration = 15 * time.Second )
const ( BUILDING_BEFORE_QUEUE int = 10 BUILDING int = 11 BOOTING int = 12 ACTIVE_PON int = 13 POWERING_OFF int = 14 ACTIVE_POFF int = 15 UNBUILDING int = 16 UNBUILDED int = 17 OS_INSTALLING int = 18 ERASING int = 19 ADDING_RESOURCE int = 20 DELETING_RESOURCE int = 21 UNBUILDING_WAIT int = 30 ERROR int = 90 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver struct {
*drivers.BaseDriver
SSHPassword string
TenantUuid string
Username string
Password string
ApiUrl string
NtpUrl string
DnsIp string
ComputeConditionsJson string
DevicesSpecJson string
NetworkBaremetalPort int
NetworkBaremetalUUID string
NetworkBaremetalDefaultGW string
NetworkProvisionPort int
NetworkProvisionUUID string
NetworkProvisionDefaultGW string
PrivateIPAddress string
OsImageName string
OsImageSshHostPubKey string
MachineUUID string
UserDataFile string
FabricManager fm.FabricManager `json:"-"`
Keycloak keycloak.Keycloak `json:"-"`
SshManager sshutils.SshManager `json:"-"`
CfgManager cfgutils.CfgManager `json:"-"`
}
Driver is the implementation of BaseDriver interface
func NewDriver ¶
func NewDriver() *Driver
NewDriver creates and returns a new instance of the FSAS CDI driver
func (*Driver) DriverName ¶
DriverName returns the name of the driver
func (*Driver) GetCreateFlags ¶
GetCreateFlags returns the mcnflag.Flag slice representing the flags that can be set, their descriptions and defaults.
func (*Driver) GetSSHHostname ¶
GetSSHHostname returns hostname for use with ssh
func (*Driver) GetSSHUsername ¶
GetSSHUsername Returns username for use with ssh
func (*Driver) GetURL ¶
GetURL returns a Docker compatible host URL for connecting to this host e.g. tcp://1.2.3.4:2376
func (*Driver) PreCreateCheck ¶
PreCreateCheck allows for pre-create operations to make sure a driver is ready for creation
func (*Driver) Restart ¶
Restart a host. This may just call Stop(); Start() if the provider does not have any special restart behaviour.
func (*Driver) SetConfigFromFlags ¶
func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) error
SetConfigFromFlags configures the driver with the object that was returned by RegisterCreateFlags
func (*Driver) UnmarshalJSON ¶
UnmarshalJSON loads driver config from JSON. This function is used by the RPCServerDriver that wraps all drivers as a means of populating an already-initialized driver with new configuration. See `RPCServerDriver.SetConfigRaw`.