opennebula

package
v0.0.0-...-7668bce Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2019 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Provider

func Provider() terraform.ResourceProvider

Types

type Client

type Client struct {
	Rcp xmlrpc.Client

	Username string
	Password string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(endpoint, username, password string) (*Client, error)

func (*Client) Call

func (c *Client) Call(command string, args ...interface{}) (string, error)

func (*Client) IsSuccess

func (c *Client) IsSuccess(result []interface{}) (res string, err error)

type Config

type Config struct {
	Endpoint string
	User     string
	Password string
}

func (*Config) Client

func (c *Config) Client() (*api.Rpc, error)

Client() returns a new client for accessing OpenNebula.

type Context

type Context struct {
	IP string `xml:"ETH0_IP"`
}

type Disk

type Disk struct {
	Image       string `xml:"IMAGE"`
	Size        int    `xml:"SIZE"`
	ImageDriver string `xml:"DRIVER"`
	ImageUname  string `xml:"IMAGE_UNAME"`
}

type Image

type Image struct {
	Name        string       `xml:"NAME"`
	Id          int          `xml:"ID"`
	Uid         int          `xml:"UID"`
	Gid         int          `xml:"GID"`
	Uname       string       `xml:"UNAME"`
	Gname       string       `xml:"GNAME"`
	Permissions *Permissions `xml:"PERMISSIONS"`
	RegTime     string       `xml:"REG"`
	Size        int          `xml:"SIZE"`
	State       int          `xml:"STATE"`
	Source      string       `xml:"SOURCE"`
	Path        string       `xml:"PATH"`
	Persistent  string       `xml:"PERSISTENT"`
	DatastoreID int          `xml:"DATASTORE_ID"`
	Datastore   string       `xml:"DATASTORE"`
	FsType      string       `xml:"FSTYPE"`
	RunningVMs  int          `xml:"RUNNING_VMS"`
}

type Images

type Images struct {
	Image []*Image `xml:"IMAGE"`
}

type Nic

type Nic struct {
	Network             string `xml:"NETWORK"`
	NetworkUname        string `xml:"NETWORK_UNAME"`
	NetworkSearchDomain string `xml:"SEARCH_DOMAIN"`
	SecurityGroupId     int    `xml:"SECURITY_GROUPS"`
}

type Permissions

type Permissions struct {
	Owner_U int `xml:"OWNER_U"`
	Owner_M int `xml:"OWNER_M"`
	Owner_A int `xml:"OWNER_A"`
	Group_U int `xml:"GROUP_U"`
	Group_M int `xml:"GROUP_M"`
	Group_A int `xml:"GROUP_A"`
	Other_U int `xml:"OTHER_U"`
	Other_M int `xml:"OTHER_M"`
	Other_A int `xml:"OTHER_A"`
}

type UserTemplate

type UserTemplate struct {
	Name        string       `xml:"NAME"`
	Id          int          `xml:"ID"`
	Uid         int          `xml:"UID"`
	Gid         int          `xml:"GID"`
	Uname       string       `xml:"UNAME"`
	Gname       string       `xml:"GNAME"`
	RegTime     int          `xml:"REGTIME"`
	Permissions *Permissions `xml:"PERMISSIONS"`
}

type UserTemplates

type UserTemplates struct {
	UserTemplate []*UserTemplate `xml:"VMTEMPLATE"`
}

type UserVm

type UserVm struct {
	Id          string       `xml:"ID"`
	Name        string       `xml:"NAME"`
	Uid         int          `xml:"UID"`
	Gid         int          `xml:"GID"`
	Uname       string       `xml:"UNAME"`
	Gname       string       `xml:"GNAME"`
	Permissions *Permissions `xml:"PERMISSIONS"`
	State       int          `xml:"STATE"`
	LcmState    int          `xml:"LCM_STATE"`
	VmTemplate  *VmTemplate  `xml:"TEMPLATE"`
}

type UserVms

type UserVms struct {
	UserVm []*UserVm `xml:"VM"`
}

type UserVnet

type UserVnet struct {
	Name        string       `xml:"NAME"`
	Id          int          `xml:"ID"`
	Uid         int          `xml:"UID"`
	Gid         int          `xml:"GID"`
	Uname       string       `xml:"UNAME"`
	Gname       string       `xml:"GNAME"`
	Permissions *Permissions `xml:"PERMISSIONS"`
	Bridge      string       `xml:"BRIDGE"`
}

type UserVnets

type UserVnets struct {
	UserVnet []*UserVnet `xml:"VNET"`
}

type VmTemplate

type VmTemplate struct {
	Context *Context `xml:"CONTEXT"`
	Nic     *Nic     `xml:"NIC"`
	Disk    *Disk    `xml:"DISK"`
	Cpu     int      `xml:"CPU"`
	Vcpu    int      `xml:"VCPU"`
	Memory  int      `xml:"MEMORY"`
}

Jump to

Keyboard shortcuts

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