shell

package
v2.0.7+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2018 License: Apache-2.0 Imports: 11 Imported by: 27

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CommandTable []CMD = make([]CMD, 0)

Functions

func FetchPagingParams

func FetchPagingParams(options BaseListOptions) *jsonutils.JSONDict

func InvalidUpdateError

func InvalidUpdateError() error

func R

func R(options interface{}, command string, desc string, callback interface{})

Types

type ActionListOptions

type ActionListOptions struct {
	BaseActionListOptions
	Id   string   `help:"" metavar:"OBJ_ID"`
	Type []string `help:"Type of relevant object" metavar:"OBJ_TYPE"`
}

type BaseActionListOptions

type BaseActionListOptions struct {
	Since      string   `help:"Show logs since specific date" metavar:"DATETIME"`
	Until      string   `help:"Show logs until specific date" metavar:"DATETIME"`
	Limit      int64    `help:"Limit number of logs" default:"20"`
	Offset     int64    `help:"Offset"`
	Ascending  bool     `help:"Ascending order"`
	Descending bool     `help:"Descending order"`
	Action     []string `help:"Log action"`
	Search     string   `help:"Filter action logs by obj_name, using 'like' syntax."`
}

type BaseEventListOptions

type BaseEventListOptions struct {
	Since      string   `help:"Show logs since specific date" metavar:"DATETIME"`
	Until      string   `help:"Show logs until specific date" metavar:"DATETIME"`
	Limit      int64    `help:"Limit number of logs" default:"20"`
	Offset     int64    `help:"Offset"`
	Ascending  bool     `help:"Ascending order"`
	Descending bool     `help:"Descending order"`
	Action     []string `help:"Log action"`
}

type BaseListOptions

type BaseListOptions struct {
	Limit         int      `default:"20" help:"Page limit"`
	Offset        int      `default:"0" help:"Page offset"`
	OrderBy       string   `help:"Name of the field to be ordered by"`
	Order         string   `help:"List order" choices:"desc|asc"`
	Details       bool     `help:"Show more details"`
	Search        string   `help:"Filter results by a simple keyword search"`
	Meta          bool     `help:"Piggyback metadata information"`
	Filter        []string `help:"Filters"`
	FilterAny     bool     `help:"If true, match if any of the filters matches; otherwise, match if all of the filters match"`
	Admin         bool     `help:"Is an admin call?"`
	Tenant        string   `help:"Tenant ID or Name"`
	User          string   `help:"User ID or Name"`
	System        bool     `help:"Show system resource"`
	PendingDelete bool     `help:"Show pending deleted resource"`
	Field         []string `help:"Show only specified fields"`
	ShowEmulated  bool     `help:"Show all resources including the emulated resources"`
}

type CMD

type CMD struct {
	Options  interface{}
	Command  string
	Desc     string
	Callback interface{}
}

type DNSRecordOptions

type DNSRecordOptions struct {
	A       []string `help:"DNS A record" metavar:"A_RECORD" optional:"true"`
	AAAA    []string `help:"DNS AAAA record" metavar:"AAAA_RECORD" optional:"true"`
	CNAME   string   `help:"DNS CNAME record" metavar:"CNAME_RECORD" optional:"true"`
	SRVHost string   `help:"DNS SRV record, server of service" metavar:"SRV_RECORD_HOST" optional:"true"`
	SRVPort int64    `help:"DNS SRV record, port of service" metavar:"SRV_RECORD_PORT" optional:"true"`
	PTR     string   `help:"DNS PTR record" metavar:"PTR_RECORD" optional:"true"`
}

type EventListOptions

type EventListOptions struct {
	BaseEventListOptions
	Id   string   `help:"" metavar:"OBJ_ID"`
	Type []string `help:"Type of relevant object" metavar:"OBJ_TYPE"`
}

type GeneralUsageOptions

type GeneralUsageOptions struct {
	HostType []string `help:"Host types" choices:"hypervisor|baremetal|esxi|xen|kubelet|hyperv"`
}

type ImageOptionalOptions

type ImageOptionalOptions struct {
	Public             bool     `help:"Make image public"`
	Private            bool     `help:"Make image private"`
	Format             string   `help:"Image format" choices:"raw|qcow2|iso|vmdk|docker|vhd"`
	Protected          bool     `help:"Prevent image from being deleted"`
	Unprotected        bool     `help:"Allow image to be deleted"`
	MinDisk            int64    `help:"Disk size after expanded, in MB" metavar:"MIN_DISK_SIZE_MB"`
	MinRam             int64    `help:"Minimal memory size required" metavar:"MIN_RAM_MB"`
	VirtualSize        int64    `help:"Disk size after expanded, in MB"`
	Size               int64    `help:"Disk size, in MB"`
	Location           string   `help:"Image location"`
	Status             string   `help:"Image status" choices:"killed|active|queued"`
	OwnerProject       string   `help:"Owner project Id or Name"`
	OwnerProjectDomain string   `help:"Owner project Domain"`
	OsType             string   `help:"Type of OS" choices:"Windows|Linux|Freebsd|Android|macOS|VMWare"`
	OsDist             string   `help:"Distribution name of OS" metavar:"OS_DISTRIBUTION"`
	OsVersion          string   `help:"Version of OS"`
	OsCodename         string   `help:"Codename of OS"`
	OsArch             string   `help:"Os hardware architecture" choices:"x86|x86_64"`
	OsLang             string   `help:"OS Language" choices:"zh_CN|en_US"`
	Preference         int64    `help:"Disk preferences"`
	Notes              string   `help:"Notes about the image"`
	Hypervisor         []string `help:"Prefer hypervisor type" choices:"kvm|esxi|baremetal|container"`
	DiskDriver         string   `help:"Perfer disk driver" choices:"virtio|scsi|pvscsi|ide|sata"`
	NetDriver          string   `help:"Preferred network driver" choices:"virtio|e1000|vmxnet3"`
}

type QuotaBaseOptions

type QuotaBaseOptions struct {
	Cpu            int64 `help:"CPU count"`
	Memory         int64 `help:"Memory size in MB"`
	Storage        int64 `help:"Storage size in MB"`
	Port           int64 `help:"Internal NIC count"`
	Eport          int64 `help:"External NIC count"`
	Bw             int64 `help:"Internal bandwidth in Mbps"`
	Ebw            int64 `help:"External bandwidth in Mbps"`
	Image          int64 `help:"Template count"`
	IsolatedDevice int64 `help:"Isolated device count"`
}

type ServerDeployInfo

type ServerDeployInfo struct {
	Action  string
	Path    string
	Content string
}

type TypeActionListOptions

type TypeActionListOptions struct {
	BaseActionListOptions
	ID string `help:"" metavar:"OBJ_ID"`
}

type TypeEventListOptions

type TypeEventListOptions struct {
	BaseEventListOptions
	ID string `help:"" metavar:"OBJ_ID"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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