Documentation
¶
Index ¶
- func GetGPU(ctx context.Context, conn *v3.Client, peUUID, gpu string) (*v3.VMGpu, error)
- func GetGPUList(ctx context.Context, conn *v3.Client, gpus []string, peUUID string) ([]*v3.VMGpu, error)
- func GetGPUsForPE(ctx context.Context, conn *v3.Client, peUUID string) ([]*v3.GPU, error)
- type NutanixDriver
- func (d *NutanixDriver) Create() error
- func (d *NutanixDriver) DriverName() string
- func (d *NutanixDriver) GetCreateFlags() []mcnflag.Flag
- func (d *NutanixDriver) GetSSHHostname() (string, error)
- func (d *NutanixDriver) GetState() (state.State, error)
- func (d *NutanixDriver) GetURL() (string, error)
- func (d *NutanixDriver) Kill() error
- func (d *NutanixDriver) Remove() error
- func (d *NutanixDriver) Restart() error
- func (d *NutanixDriver) SetConfigFromFlags(opts drivers.DriverOptions) error
- func (d *NutanixDriver) Start() error
- func (d *NutanixDriver) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetGPU ¶
GetGPU retrieves a specific GPU from the Nutanix Prism Element based on the provided GPU name and PE UUID. It returns a VMGpu pointer or an error if the GPU is not found or if any issues occur during the retrieval.
func GetGPUList ¶
func GetGPUList(ctx context.Context, conn *v3.Client, gpus []string, peUUID string) ([]*v3.VMGpu, error)
GetGPUList retrieves a list of GPUs from the Nutanix Prism Element based on the provided GPU names and PE UUID. It returns a slice of VMGpu pointers or an error if any issues occur during the retrieval
Types ¶
type NutanixDriver ¶
type NutanixDriver struct {
*drivers.BaseDriver
Endpoint string
Username string
Password string
Port string
Insecure bool
Cluster string
VMVCPUs int
VMCores int
VMCPUPassthrough bool
VMMem int
SSHPass string
Subnet []string
Image string
ImageSize int
VMId string
SessionAuth bool
ProxyURL string
Categories []string
StorageContainer string
DiskSize int
CloudInit string
SerialPort bool
Project string
BootType string
Timeout int
GPUs []string
}
NutanixDriver driver structure
func NewDriver ¶
func NewDriver(hostname, storePath string) *NutanixDriver
NewDriver create new instance
func (*NutanixDriver) Create ¶
func (d *NutanixDriver) Create() error
Create a host using the driver's config
func (*NutanixDriver) DriverName ¶
func (d *NutanixDriver) DriverName() string
DriverName returns the name of the driver
func (*NutanixDriver) GetCreateFlags ¶
func (d *NutanixDriver) GetCreateFlags() []mcnflag.Flag
GetCreateFlags returns the mcnflag.Flag slice representing the flags that can be set, their descriptions and defaults.
func (*NutanixDriver) GetSSHHostname ¶
func (d *NutanixDriver) GetSSHHostname() (string, error)
GetSSHHostname returns hostname for use with ssh
func (*NutanixDriver) GetState ¶
func (d *NutanixDriver) GetState() (state.State, error)
GetState returns the state that the host is in (running, stopped, etc)
func (*NutanixDriver) GetURL ¶
func (d *NutanixDriver) GetURL() (string, error)
GetURL returns a Docker compatible host URL for connecting to this host
func (*NutanixDriver) Restart ¶
func (d *NutanixDriver) Restart() error
Restart a host. This may just call Stop(); Start() if the provider does not have any special restart behaviour.
func (*NutanixDriver) SetConfigFromFlags ¶
func (d *NutanixDriver) SetConfigFromFlags(opts drivers.DriverOptions) error
SetConfigFromFlags configures the driver with the object that was returned by RegisterCreateFlags