Documentation ¶
Index ¶
Constants ¶
View Source
const ProvisionerType = "nutanix"
ProvisionerType : Constant string value used to represent the provisioner type nutanix
Variables ¶
View Source
var ProvisionersNewNutanixCmd = &cobra.Command{ Use: "nutanix <OUTPUT_FILE>", Short: "Add a new Nutanix Provisioner.", Args: cobra.ExactArgs(1), Run: func(cmd *cobra.Command, args []string) { f, err := os.OpenFile(args[0], os.O_RDWR|os.O_CREATE, 0644) if err != nil { cli.SetError(err, 1) return } defer f.Close() p, err := NewProvisioner(log, &Config{ Username: provisionerNewNutanixUsername, Password: provisionerNewNutanixPassword, Host: provisionerNewNutanixHost, }) if err != nil { cli.SetError(err, 2) return } data, err := p.Marshal() if err != nil { cli.SetError(err, 3) return } out := provisioners.Encrypt(data, provisionersNewPassphrase) _, err = io.Copy(f, bytes.NewReader(out)) if err != nil { cli.SetError(err, 4) return } }, }
ProvisionersNewNutanixCmd creates a new provisioner for nutanix and saves to a file
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Username string `json:"username"` Password string `json:"password"` Host string `json:"host"` }
Config contains configuration fields required by the Provisioner
type Provisioner ¶
type Provisioner struct {
// contains filtered or unexported fields
}
Provisioner satisfies the provisioners.Provisioner interface
func NewProvisioner ¶
func NewProvisioner(log elog.View, cfg *Config) (*Provisioner, error)
NewProvisioner creates a provisioner object that it returns
func (*Provisioner) DiskFormat ¶
func (p *Provisioner) DiskFormat() vdisk.Format
DiskFormat returns the provisioners required disk format
func (*Provisioner) Marshal ¶
func (p *Provisioner) Marshal() ([]byte, error)
Marshal returns json provisioner as bytes
func (*Provisioner) Provision ¶
func (p *Provisioner) Provision(args *provisioners.ProvisionArgs) error
Provision given a valid ProvisionArgs object will provision the passed vorteil project
to the configured provisioner
func (*Provisioner) SizeAlign ¶
func (p *Provisioner) SizeAlign() vcfg.Bytes
SizeAlign returns VCFG GiB size in bytes
func (*Provisioner) Validate ¶
func (p *Provisioner) Validate() error
Validate arguments for nutanix
Click to show internal directories.
Click to hide internal directories.