Documentation
¶
Index ¶
- func ArrayContainsString(array []string, str string) bool
- func CheckSSHConnection(hostname string) error
- func GenerateSSHAuthorizedKeys(driverKey string, externalKeys []string) string
- 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) GetMachineName() string
- func (d *Driver) GetSSHHostname() (string, error)
- func (d *Driver) GetSSHKeyPath() string
- func (d *Driver) GetSSHPort() (int, 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(opts drivers.DriverOptions) error
- func (d *Driver) Start() error
- func (d *Driver) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrayContainsString ¶
ArrayContainsString check if the given string array contains the given string
func CheckSSHConnection ¶
CheckSSHConnection will try a SSH connection to the given hostname
func GenerateSSHAuthorizedKeys ¶
GenerateSSHAuthorizedKeys generate the SSH AuthorizedKeys composed of the driver and external user defined key(s)
Types ¶
type Driver ¶
type Driver struct { *drivers.BaseDriver // Persistent fields G5kJobID int G5kUsername string G5kPassword string G5kSite string G5kWalltime string G5kImage string G5kResourceProperties string G5kReuseRefEnvironment bool G5kJobQueue string G5kJobStartTime string DriverSSHPublicKey string ExternalSSHPublicKeys []string G5kKeepAllocatedResourceAtDeletion bool G5kNodeHostname string // contains filtered or unexported fields }
Driver parameters
func NewDriver ¶
func NewDriver() *Driver
NewDriver creates and returns a new instance of the driver
func (*Driver) Create ¶
Create wait for the job to be running, deploy the OS image and copy the ssh keys
func (*Driver) DriverName ¶
DriverName returns the name of the driver
func (*Driver) GetCreateFlags ¶
GetCreateFlags add command line flags to configure the driver
func (*Driver) GetMachineName ¶
GetMachineName returns the machine name
func (*Driver) GetSSHHostname ¶
GetSSHHostname returns hostname for use with ssh
func (*Driver) GetSSHKeyPath ¶
GetSSHKeyPath returns key path for use with ssh
func (*Driver) GetSSHPort ¶
GetSSHPort returns port for use with ssh
func (*Driver) GetSSHUsername ¶
GetSSHUsername returns username for use with ssh
func (*Driver) PreCreateCheck ¶
PreCreateCheck check parameters and submit the job to Grid5000
func (*Driver) SetConfigFromFlags ¶
func (d *Driver) SetConfigFromFlags(opts drivers.DriverOptions) error
SetConfigFromFlags configure the driver from the command line arguments