models

package
v2.3.11+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2018 License: Apache-2.0 Imports: 59 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BAREMETAL_AGENT_ENABLED  = "enabled"
	BAREMETAL_AGENT_DISABLED = "disabled"
	BAREMETAL_AGENT_OFFLINE  = "offline"
)
View Source
const (
	BILLING_TYPE_POSTPAID = "postpaid"
	BILLING_TYPE_PREPAID  = "prepaid"
)
View Source
const (
	CACHED_IMAGE_REFRESH_SECONDS                  = 900   // 15 minutes
	CACHED_IMAGE_REFERENCE_SESSION_EXPIRE_SECONDS = 86400 // 1 day
)
View Source
const (
	CLOUD_PROVIDER_INIT         = "init"
	CLOUD_PROVIDER_CONNECTED    = "connected"
	CLOUD_PROVIDER_DISCONNECTED = "disconnected"
	CLOUD_PROVIDER_START_SYNC   = "start_sync"
	CLOUD_PROVIDER_SYNCING      = "syncing"

	CLOUD_PROVIDER_VMWARE = "VMware"
	CLOUD_PROVIDER_ALIYUN = "Aliyun"
	CLOUD_PROVIDER_QCLOUD = "Qcloud"
	CLOUD_PROVIDER_AZURE  = "Azure"
	CLOUD_PROVIDER_AWS    = "Aws"
)
View Source
const (
	CLOUD_REGION_STATUS_INSERVER     = "inservice"
	CLOUD_REGION_STATUS_OUTOFSERVICE = "outofservice"
)
View Source
const (
	DISK_INIT           = "init"
	DISK_REBUILD        = "rebuild"
	DISK_ALLOC_FAILED   = "alloc_failed"
	DISK_STARTALLOC     = "start_alloc"
	DISK_ALLOCATING     = "allocating"
	DISK_READY          = "ready"
	DISK_RESET          = "reset"
	DISK_DEALLOC        = "deallocating"
	DISK_DEALLOC_FAILED = "dealloc_failed"
	DISK_UNKNOWN        = "unknown"
	DISK_DETACHING      = "detaching"
	DISK_ATTACHING      = "attaching"

	DISK_START_SAVE = "start_save"
	DISK_SAVING     = "saving"

	DISK_START_RESIZE = "start_resize"
	DISK_RESIZING     = "resizing"

	DISK_START_MIGRATE = "start_migrate"
	DISK_POST_MIGRATE  = "post_migrate"
	DISK_MIGRATING     = "migrating"

	DISK_START_SNAPSHOT = "start_snapshot"
	DISK_SNAPSHOTING    = "snapshoting"

	DISK_TYPE_SYS  = "sys"
	DISK_TYPE_SWAP = "swap"
	DISK_TYPE_DATA = "data"

	DISK_BACKING_IMAGE = "image"
)
View Source
const (
	EIP_MODE_INSTANCE_PUBLICIP = "public_ip"
	EIP_MODE_STANDALONE_EIP    = "elastic_ip"

	EIP_ASSOCIATE_TYPE_SERVER = "server"

	EIP_STATUS_READY           = "ready"
	EIP_STATUS_UNKNOWN         = "unknown"
	EIP_STATUS_ALLOCATE        = "allocate"
	EIP_STATUS_ALLOCATE_FAIL   = "allocate_fail"
	EIP_STATUS_DEALLOCATE      = "deallocate"
	EIP_STATUS_DEALLOCATE_FAIL = "deallocate_fail"
	EIP_STATUS_ASSOCIATE       = "associate"
	EIP_STATUS_ASSOCIATE_FAIL  = "associate_fail"
	EIP_STATUS_DISSOCIATE      = "dissociate"
	EIP_STATUS_DISSOCIATE_FAIL = "dissociate_fail"

	EIP_STATUS_CHANGE_BANDWIDTH = "change_bandwidth"

	EIP_CHARGE_TYPE_BY_TRAFFIC   = "traffic"
	EIP_CHARGE_TYPE_BY_BANDWIDTH = "bandwidth"
	EIP_CHARGE_TYPE_DEFAULT      = EIP_CHARGE_TYPE_BY_TRAFFIC
)
View Source
const (
	REDIS_TYPE = "REDIS"
	RDS_TYPE   = "RDS"
)
View Source
const (
	VM_INIT            = "init"
	VM_UNKNOWN         = "unknown"
	VM_SCHEDULE        = "schedule"
	VM_SCHEDULE_FAILED = "sched_fail"
	VM_CREATE_NETWORK  = "network"
	VM_NETWORK_FAILED  = "net_fail"
	VM_DEVICE_FAILED   = "dev_fail"
	VM_CREATE_FAILED   = "create_fail"
	VM_CREATE_DISK     = "disk"
	VM_DISK_FAILED     = "disk_fail"
	VM_START_DEPLOY    = "start_deploy"
	VM_DEPLOYING       = "deploying"
	VM_DEPLOY_FAILED   = "deploy_fail"
	VM_READY           = "ready"
	VM_START_START     = "start_start"
	VM_STARTING        = "starting"
	VM_START_FAILED    = "start_fail" // # = ready
	VM_RUNNING         = "running"
	VM_START_STOP      = "start_stop"
	VM_STOPPING        = "stopping"
	VM_STOP_FAILED     = "stop_fail" // # = running

	VM_ATTACH_DISK_FAILED = "attach_disk_fail"
	VM_DETACH_DISK_FAILED = "detach_disk_fail"

	VM_START_SUSPEND  = "start_suspend"
	VM_SUSPENDING     = "suspending"
	VM_SUSPEND        = "suspend"
	VM_SUSPEND_FAILED = "suspend_failed"

	VM_START_DELETE = "start_delete"
	VM_DELETE_FAIL  = "delete_fail"
	VM_DELETING     = "deleting"

	VM_DEALLOCATED = "deallocated"

	VM_START_MIGRATE  = "start_migrate"
	VM_MIGRATING      = "migrating"
	VM_MIGRATE_FAILED = "migrate_failed"

	VM_CHANGE_FLAVOR      = "change_flavor"
	VM_CHANGE_FLAVOR_FAIL = "change_flavor_fail"
	VM_REBUILD_ROOT       = "rebuild_root"
	VM_REBUILD_ROOT_FAIL  = "rebuild_root_fail"

	VM_START_SNAPSHOT  = "snapshot_start"
	VM_SNAPSHOT        = "snapshot"
	VM_SNAPSHOT_DELETE = "snapshot_delete"
	VM_SNAPSHOT_STREAM = "block_stream"
	VM_SNAPSHOT_SUCC   = "snapshot_succ"
	VM_SNAPSHOT_FAILED = "snapshot_failed"

	VM_SYNCING_STATUS = "syncing"
	VM_SYNC_CONFIG    = "sync_config"
	VM_SYNC_FAIL      = "sync_fail"

	VM_RESIZE_DISK      = "resize_disk"
	VM_START_SAVE_DISK  = "start_save_disk"
	VM_SAVE_DISK        = "save_disk"
	VM_SAVE_DISK_FAILED = "save_disk_failed"

	VM_RESTORING_SNAPSHOT = "restoring_snapshot"
	VM_RESTORE_DISK       = "restore_disk"
	VM_RESTORE_STATE      = "restore_state"
	VM_RESTORE_FAILED     = "restore_failed"

	VM_ASSOCIATE_EIP  = "associate_eip"
	VM_DISSOCIATE_EIP = "dissociate_eip"

	VM_REMOVE_STATEFILE = "remove_state"

	VM_ADMIN = "admin"

	SHUTDOWN_STOP      = "stop"
	SHUTDOWN_TERMINATE = "terminate"

	HYPERVISOR_KVM       = "kvm"
	HYPERVISOR_CONTAINER = "container"
	HYPERVISOR_BAREMETAL = "baremetal"
	HYPERVISOR_ESXI      = "esxi"
	HYPERVISOR_HYPERV    = "hyperv"
	HYPERVISOR_ALIYUN    = "aliyun"
	HYPERVISOR_QCLOUD    = "qcloud"
	HYPERVISOR_AZURE     = "azure"
	HYPERVISOR_AWS       = "aws"

	//	HYPERVISOR_DEFAULT = HYPERVISOR_KVM
	HYPERVISOR_DEFAULT = HYPERVISOR_ALIYUN
)
View Source
const (
	HOST_TYPE_BAREMETAL  = "baremetal"
	HOST_TYPE_HYPERVISOR = "hypervisor" // KVM
	HOST_TYPE_ESXI       = "esxi"       // # VMWare vSphere ESXi
	HOST_TYPE_KUBELET    = "kubelet"    // # Kubernetes Kubelet
	HOST_TYPE_HYPERV     = "hyperv"     // # Microsoft Hyper-V
	HOST_TYPE_XEN        = "xen"        // # XenServer
	HOST_TYPE_ALIYUN     = "aliyun"
	HOST_TYPE_AWS        = "aws"
	HOST_TYPE_QCLOUD     = "qcloud"
	HOST_TYPE_AZURE      = "azure"

	HOST_TYPE_DEFAULT = HOST_TYPE_HYPERVISOR

	// # possible status
	HOST_ONLINE   = "online"
	HOST_ENABLED  = "online"
	HOST_OFFLINE  = "offline"
	HOST_DISABLED = "offline"

	NIC_TYPE_IPMI  = "ipmi"
	NIC_TYPE_ADMIN = "admin"

	BAREMETAL_INIT           = "init"
	BAREMETAL_PREPARE        = "prepare"
	BAREMETAL_PREPARE_FAIL   = "prepare_fail"
	BAREMETAL_READY          = "ready"
	BAREMETAL_RUNNING        = "running"
	BAREMETAL_MAINTAINING    = "maintaining"
	BAREMETAL_START_MAINTAIN = "start_maintain"
	BAREMETAL_DELETING       = "deleting"
	BAREMETAL_DELETE         = "delete"
	BAREMETAL_DELETE_FAIL    = "delete_fail"
	BAREMETAL_UNKNOWN        = "unknown"
	BAREMETAL_SYNCING_STATUS = "syncing_status"
	BAREMETAL_SYNC           = "sync"
	BAREMETAL_SYNC_FAIL      = "sync_fail"
	BAREMETAL_START_CONVERT  = "start_convert"
	BAREMETAL_CONVERTING     = "converting"
	BAREMETAL_START_FAIL     = "start_fail"
	BAREMETAL_STOP_FAIL      = "stop_fail"

	HOST_STATUS_RUNNING = BAREMETAL_RUNNING
	HOST_STATUS_READY   = BAREMETAL_READY
	HOST_STATUS_UNKNOWN = BAREMETAL_UNKNOWN
)
View Source
const (
	IMAGE_STATUS_ACTIVE  = "active"
	IMAGE_STATUS_QUEUED  = "queued"
	IMAGE_STATUS_KILLED  = "killed"
	IMAGE_STATUS_DELETED = "deleted"
)
View Source
const (
	DIRECT_PCI_TYPE = "PCI"
	GPU_HPC_TYPE    = "GPU-HPC" // # for compute
	GPU_VGA_TYPE    = "GPU-VGA" // # for display
	USB_TYPE        = "USB"
	NIC_TYPE        = "NIC"

	NVIDIA_VENDOR_ID = "10de"
	AMD_VENDOR_ID    = "1002"
)
View Source
const (
	LB_STATUS_ENABLED  = "enabled"
	LB_STATUS_DISABLED = "disabled"

	LB_STATUS_INIT           = "init"
	LB_STATUS_RUNNING        = "running"
	LB_STATUS_STOPPED        = "stopped"
	LB_STATUS_CONFIGURING    = "configuring" // config changes pending
	LB_STATUS_STOPPING       = "stopping"
	LB_STATUS_DELETE_PENDING = "delete_pending"
	LB_STATUS_ERROR          = "error" // bad things happen
)

Load balancer status transition (for spec status)

                create          start           stop            delete
init            running         -               -               -
running		-		-		stopped		stopped
stopped		-		running		-		-

Each entity will have spec and runtime version. Spec version will increment on entity attribute update. Runtime version will be filled by the scheduler to the newest spec it has seen and committed

When spec and runtime version differ, scheduler will set runtime version to "configuring", "stopping" and will finally transition to a terminal state.

In the case of instance has PendingDeleted marked, it is also the scheduler's duty to make the runtime status to stopped and finally the entity in question

View Source
const (
	LB_ADDR_TYPE_INTRANET = "intranet"
	LB_ADDR_TYPE_INTERNET = "internet"
)

Load Balancer network type (vpc or classic) determines viable backend servers (they should be from the same network type as the load balancer).

Load Balancer address type (intranet or internet) determins the scope the service provided by load balancer can be accessed. If it's intranet, then it will only be accessible from the specified network. If it's internet, then it's public and can be accessed from outside the cloud region

View Source
const (
	LB_NETWORK_TYPE_CLASSIC = "classic"
	LB_NETWORK_TYPE_VPC     = "vpc"
)
View Source
const (
	LB_LISTENER_TYPE_TCP   = "tcp"
	LB_LISTENER_TYPE_UDP   = "udp"
	LB_LISTENER_TYPE_HTTP  = "http"
	LB_LISTENER_TYPE_HTTPS = "https"
)

TODO https_direct sni

View Source
const (
	LB_ACL_TYPE_BLACK = "black"
	LB_ACL_TYPE_WHITE = "white"
)
View Source
const (
	LB_TLS_CERT_PUBKEY_ALGO_RSA   = "RSA"
	LB_TLS_CERT_PUBKEY_ALGO_ECDSA = "ECDSA"
)
View Source
const (
	LB_TLS_CIPHER_POLICY_1_0        = "tls_cipher_policy_1_0"
	LB_TLS_CIPHER_POLICY_1_1        = "tls_cipher_policy_1_1"
	LB_TLS_CIPHER_POLICY_1_2        = "tls_cipher_policy_1_2"
	LB_TLS_CIPHER_POLICY_1_2_strict = "tls_cipher_policy_1_2_strict"
)

TODO may want extra for legacy apps

View Source
const (
	LB_STICKY_SESSION_TYPE_INSERT = "insert"
	LB_STICKY_SESSION_TYPE_SERVER = "server"
)
View Source
const (
	LB_HEALTH_CHECK_TCP  = "tcp"
	LB_HEALTH_CHECK_UDP  = "udp"
	LB_HEALTH_CHECK_HTTP = "http"
)

TODO maybe https check when field need comes ;)

View Source
const (
	LB_HEALTH_CHECK_HTTP_CODE_2xx     = "http_2xx"
	LB_HEALTH_CHECK_HTTP_CODE_3xx     = "http_3xx"
	LB_HEALTH_CHECK_HTTP_CODE_4xx     = "http_4xx"
	LB_HEALTH_CHECK_HTTP_CODE_5xx     = "http_5xx"
	LB_HEALTH_CHECK_HTTP_CODE_DEFAULT = "http_2xx,http_3xx"
)
View Source
const (
	LB_BOOL_ON  = "on"
	LB_BOOL_OFF = "off"
)
View Source
const (
	LB_SCHEDULER_RR  = "rr"  // round robin
	LB_SCHEDULER_WRR = "wrr" // weighted round robin
	LB_SCHEDULER_WLC = "wlc" // weighted least connection
	LB_SCHEDULER_SCH = "sch" // source-ip-based consistent hash
	LB_SCHEDULER_TCH = "tch" // 4-tuple-based consistent hash
)

TODO

- qch, quic connection id - mh, maglev consistent hash

View Source
const (
	LB_BACKEND_GUEST = "guest"
	LB_BACKEND_HOST  = "host"
)

TODO raw type

View Source
const (
	// # DEFAULT_BANDWIDTH = options.default_bandwidth
	MAX_BANDWIDTH = 100000

	SERVER_TYPE_GUEST     = "guest"
	SERVER_TYPE_BAREMETAL = "baremetal"
	SERVER_TYPE_CONTAINER = "container"

	STATIC_ALLOC = "static"

	MAX_NETWORK_NAME_LEN = 11

	EXTRA_DNS_UPDATE_TARGETS = "__extra_dns_update_targets"

	NETWORK_STATUS_INIT          = "init"
	NETWORK_STATUS_PENDING       = "pending"
	NETWORK_STATUS_AVAILABLE     = "available"
	NETWORK_STATUS_FAILED        = "failed"
	NETWORK_STATUS_UNKNOWN       = "unknown"
	NETWORK_STATUS_START_DELETE  = "start_delete"
	NETWORK_STATUS_DELETING      = "deleting"
	NETWORK_STATUS_DELETED       = "deleted"
	NETWORK_STATUS_DELETE_FAILED = "delete_failed"
)
View Source
const (
	STRATEGY_REQUIRE = "require"
	STRATEGY_EXCLUDE = "exclude"
	STRATEGY_PREFER  = "prefer"
	STRATEGY_AVOID   = "avoid"

	// # container used aggregate
	CONTAINER_AGGREGATE = "container"
)
View Source
const (
	// create by
	MANUAL = "manual"
	AUTO   = "auto"

	SNAPSHOT_CREATING    = "creating"
	SNAPSHOT_ROLLBACKING = "rollbacking"
	SNAPSHOT_FAILED      = "create_failed"
	SNAPSHOT_READY       = "ready"
	SNAPSHOT_DELETING    = "deleting"
	SNAPSHOT_UNKNOWN     = "unknown"
)
View Source
const (
	CACHED_IMAGE_STATUS_INIT         = "init"
	CACHED_IMAGE_STATUS_SAVING       = "saving"
	CACHED_IMAGE_STATUS_CACHING      = "caching"
	CACHED_IMAGE_STATUS_READY        = "ready"
	CACHED_IMAGE_STATUS_DELETING     = "deleting"
	CACHED_IMAGE_STATUS_CACHE_FAILED = "cache_fail"

	DOWNLOAD_SESSION_LENGTH = 3600 * 3 // 3 hour
)
View Source
const (
	STORAGE_LOCAL            = "local"
	STORAGE_BAREMETAL        = "baremetal"
	STORAGE_SHEEPDOG         = "sheepdog"
	STORAGE_RBD              = "rbd"
	STORAGE_DOCKER           = "docker"
	STORAGE_NAS              = "nas"
	STORAGE_VSAN             = "vsan"
	STORAGE_PUBLIC_CLOUD     = "cloud"
	STORAGE_CLOUD_EFFICIENCY = "cloud_efficiency"
	STORAGE_CLOUD_SSD        = "cloud_ssd"
	STORAGE_EPHEMERAL_SSD    = "ephemeral_ssd"
	STORAGE_GP2_SSD          = "gp2"      // aws general purpose ssd
	STORAGE_IO1_SSD          = "io1"      // aws Provisioned IOPS SSD
	STORAGE_ST1_HDD          = "st1"      // aws Throughput Optimized HDD
	STORAGE_SC1_SSD          = "sc1"      // aws Cold HDD
	STORAGE_STANDARD_SSD     = "standard" // aws Magnetic volumes

	STORAGE_ENABLED  = "enabled"
	STORAGE_DISABLED = "disabled"
	STORAGE_OFFLINE  = "offline"
	STORAGE_ONLINE   = "online"

	DISK_TYPE_ROTATE = "rotate"
	DISK_TYPE_SSD    = "ssd"
	DISK_TYPE_HYBRID = "hybrid"
)
View Source
const (
	VPC_STATUS_PENDING       = "pending"
	VPC_STATUS_AVAILABLE     = "available"
	VPC_STATUS_FAILED        = "failed"
	VPC_STATUS_START_DELETE  = "start_delete"
	VPC_STATUS_DELETING      = "deleting"
	VPC_STATUS_DELETE_FAILED = "delete_failed"
	VPC_STATUS_DELETED       = "deleted"
	VPC_STATUS_UNKNOWN       = "unknown"

	MAX_VPC_PER_REGION = 3
)
View Source
const (
	ZONE_ENABLE  = "enable"
	ZONE_DISABLE = "disable"
	ZONE_SOLDOUT = "soldout"
	ZONE_LACK    = "lack"
)
View Source
const DNS_RECORDS_SEPARATOR = ","
View Source
const (
	MAX_IFNAME_SIZE = 13
)
View Source
const MAX_TRIES = 10
View Source
const (
	SECURITY_GROUP_SEPARATOR = ";"
)

Variables

View Source
var (
	ErrOutOfCPU            = errors.New("out of CPU quota")
	ErrOutOfMemory         = errors.New("out of memory quota")
	ErrOutOfStorage        = errors.New("out of storage quota")
	ErrOutOfPort           = errors.New("out of internal port quota")
	ErrOutOfEip            = errors.New("out of eip quota")
	ErrOutOfEport          = errors.New("out of external port quota")
	ErrOutOfBw             = errors.New("out of internal bandwidth quota")
	ErrOutOfEbw            = errors.New("out of external bandwidth quota")
	ErrOutOfKeypair        = errors.New("out of keypair quota")
	ErrOutOfImage          = errors.New("out of image quota")
	ErrOutOfGroup          = errors.New("out of group quota")
	ErrOutOfSecgroup       = errors.New("out of secgroup quota")
	ErrOutOfIsolatedDevice = errors.New("out of isolated device quota")
	ErrOutOfSnapshot       = errors.New("out of snapshot quota")
)
View Source
var HOSTTYPE_HYPERVISOR = map[string]string{
	HOST_TYPE_HYPERVISOR: HYPERVISOR_KVM,
	HOST_TYPE_BAREMETAL:  HYPERVISOR_BAREMETAL,
	HOST_TYPE_ESXI:       HYPERVISOR_ESXI,
	HOST_TYPE_KUBELET:    HYPERVISOR_CONTAINER,
	HOST_TYPE_ALIYUN:     HYPERVISOR_ALIYUN,
	HOST_TYPE_AZURE:      HYPERVISOR_AZURE,
	HOST_TYPE_AWS:        HYPERVISOR_AWS,
	HOST_TYPE_QCLOUD:     HYPERVISOR_QCLOUD,
}
View Source
var ID_VENDOR_MAP = map[string]string{
	NVIDIA_VENDOR_ID: "NVIDIA",
	AMD_VENDOR_ID:    "AMD",
}
View Source
var LB_HEALTH_CHECK_TYPES_UDP = validators.NewChoices(
	LB_HEALTH_CHECK_UDP,
)
View Source
var QuotaManager *quotas.SQuotaManager
View Source
var VALID_GPU_TYPES = []string{GPU_HPC_TYPE, GPU_VGA_TYPE}
View Source
var VENDOR_ID_MAP = map[string]string{
	"NVIDIA": NVIDIA_VENDOR_ID,
	"AMD":    AMD_VENDOR_ID,
}

Functions

func ApplySchedPolicies

func ApplySchedPolicies(params *jsonutils.JSONDict) *jsonutils.JSONDict

func AttachUsageQuery

func AttachUsageQuery(
	q *sqlchemy.SQuery,
	hosts *sqlchemy.SSubQuery,
	hostIdField sqlchemy.IQueryField,
	hostTypes []string,
	rangeObj db.IStandaloneModel,
) *sqlchemy.SQuery

func ConvertStorageInfo2BaremetalStorages

func ConvertStorageInfo2BaremetalStorages(storageInfo jsonutils.JSONObject) []*baremetal.BaremetalStorage

func GetAllModelSpecs

func GetAllModelSpecs(ctx context.Context, userCred mcclient.TokenCredential, query *jsonutils.JSONDict) (jsonutils.JSONObject, error)

func GetDiskSpecV2

func GetDiskSpecV2(storageInfo jsonutils.JSONObject) jsonutils.JSONObject

func GetIPTenantIdPairs

func GetIPTenantIdPairs()

func GetIsolatedDeviceSpecs

func GetIsolatedDeviceSpecs(ctx context.Context, userCred mcclient.TokenCredential, query *jsonutils.JSONDict) (jsonutils.JSONObject, error)

func GetModelsSpecs

func GetModelsSpecs(ctx context.Context, userCred mcclient.TokenCredential, query *jsonutils.JSONDict, managers ...ISpecModelManager) (jsonutils.JSONObject, error)

func GetServerSpecs

func GetServerSpecs(ctx context.Context, userCred mcclient.TokenCredential, query *jsonutils.JSONDict) (jsonutils.JSONObject, error)

func InitDB

func InitDB() error

func RegisterGuestDriver

func RegisterGuestDriver(driver IGuestDriver)

func RegisterHostDriver

func RegisterHostDriver(driver IHostDriver)

func RunBatchCreateTask

func RunBatchCreateTask(
	ctx context.Context,
	items []db.IModel,
	userCred mcclient.TokenCredential,
	data jsonutils.JSONObject,
	pendingUsage SQuota,
	taskName string,
)

func ValidateScheduleCreateData

func ValidateScheduleCreateData(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, hypervisor string) (*jsonutils.JSONDict, error)

func ValidateSnapshotName

func ValidateSnapshotName(hypervisor, name, owner string) error

Types

type DNSUpdateKeySecret

type DNSUpdateKeySecret struct {
	Key    string
	Secret string
}

type DiskInfo

type DiskInfo struct {
	ImageId    string
	Fs         string
	MountPoint string
	Format     string
	Size       int64
	Storage    string
	Backend    string
	MediumType string
	Driver     string
	Cache      string
}

type DnsIp

type DnsIp struct {
	Addr string
	Ttl  int
}

type EipUsage

type EipUsage struct {
	PublicIPCount int
	EIPCount      int
	EIPUsedCount  int
}

func (EipUsage) Total

func (u EipUsage) Total() int

type GuestnicsCount

type GuestnicsCount struct {
	InternalNicCount        int
	InternalVirtualNicCount int
	ExternalNicCount        int
	ExternalVirtualNicCount int
	InternalBandwidth       int
	ExternalBandwidth       int
}

type HostStat

type HostStat struct {
	MemSize     int
	MemReserved int
	MemCmtbound float32
	CpuCount    int8
	CpuReserved int8
	CpuCmtbound float32
	StorageSize int
}

type HostsCountStat

type HostsCountStat struct {
	StorageSize   int64
	Count         int64
	Memory        int64
	MemoryVirtual float64
	CPU           int64
	CPUVirtual    float64
}

type IGuestDriver

type IGuestDriver interface {
	GetHypervisor() string

	GetMaxVCpuCount() int
	GetMaxVMemSizeGB() int

	GetJsonDescAtHost(ctx context.Context, guest *SGuest, host *SHost) jsonutils.JSONObject

	ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

	ValidateCreateHostData(ctx context.Context, userCred mcclient.TokenCredential, bmName string, host *SHost, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

	PrepareDiskRaidConfig(host *SHost, params *jsonutils.JSONDict) error

	GetNamedNetworkConfiguration(guest *SGuest, userCred mcclient.TokenCredential, host *SHost, netConfig *SNetworkConfig) (*SNetwork, string, int8, IPAddlocationDirection)

	Attach2RandomNetwork(guest *SGuest, ctx context.Context, userCred mcclient.TokenCredential, host *SHost, netConfig *SNetworkConfig, pendingUsage quotas.IQuota) error
	GetRandomNetworkTypes() []string

	ChooseHostStorage(host *SHost, backend string) *SStorage

	StartGuestCreateTask(guest *SGuest, ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, pendingUsage quotas.IQuota, parentTaskId string) error

	RequestGuestCreateAllDisks(ctx context.Context, guest *SGuest, task taskman.ITask) error

	OnGuestCreateTaskComplete(ctx context.Context, guest *SGuest, task taskman.ITask) error

	RequestGuestCreateInsertIso(ctx context.Context, imageId string, guest *SGuest, task taskman.ITask) error

	StartGuestStopTask(guest *SGuest, ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, parentTaskId string) error
	StartGuestResetTask(guest *SGuest, ctx context.Context, userCred mcclient.TokenCredential, isHard bool, parentTaskId string) error
	StartGuestRestartTask(guest *SGuest, ctx context.Context, userCred mcclient.TokenCredential, isForce bool, parentTaskId string) error

	RequestSoftReset(ctx context.Context, guest *SGuest, task taskman.ITask) error

	RequestDeployGuestOnHost(ctx context.Context, guest *SGuest, host *SHost, task taskman.ITask) error

	OnGuestDeployTaskDataReceived(ctx context.Context, guest *SGuest, task taskman.ITask, data jsonutils.JSONObject) error

	OnGuestDeployTaskComplete(ctx context.Context, guest *SGuest, task taskman.ITask) error

	StartGuestSyncstatusTask(guest *SGuest, ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

	RequestSyncConfigOnHost(ctx context.Context, guest *SGuest, host *SHost, task taskman.ITask) error

	RequestSyncstatusOnHost(ctx context.Context, guest *SGuest, host *SHost, userCred mcclient.TokenCredential) (jsonutils.JSONObject, error)

	RequestStartOnHost(ctx context.Context, guest *SGuest, host *SHost, userCred mcclient.TokenCredential, task taskman.ITask) (jsonutils.JSONObject, error)

	RequestStopOnHost(ctx context.Context, guest *SGuest, host *SHost, task taskman.ITask) error

	StartDeleteGuestTask(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, params *jsonutils.JSONDict, parentTaskId string) error

	StartGuestSaveImage(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, params *jsonutils.JSONDict, parentTaskId string) error

	RequestStopGuestForDelete(ctx context.Context, guest *SGuest, task taskman.ITask) error

	RequestDetachDisksFromGuestForDelete(ctx context.Context, guest *SGuest, task taskman.ITask) error

	RequestUndeployGuestOnHost(ctx context.Context, guest *SGuest, host *SHost, task taskman.ITask) error

	OnDeleteGuestFinalCleanup(ctx context.Context, guest *SGuest, userCred mcclient.TokenCredential) error

	PerformStart(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, data *jsonutils.JSONDict) error

	CheckDiskTemplateOnStorage(ctx context.Context, userCred mcclient.TokenCredential, imageId string, storageId string, task taskman.ITask) error

	GetGuestVncInfo(userCred mcclient.TokenCredential, guest *SGuest, host *SHost) (*jsonutils.JSONDict, error)

	RequestAttachDisk(ctx context.Context, guest *SGuest, task taskman.ITask) error
	RequestDetachDisk(ctx context.Context, guest *SGuest, task taskman.ITask) error
	GetDetachDiskStatus() ([]string, error)
	GetAttachDiskStatus() ([]string, error)
	GetRebuildRootStatus() ([]string, error)
	GetChangeConfigStatus() ([]string, error)
	GetDeployStatus() ([]string, error)
	ValidateResizeDisk(guest *SGuest, disk *SDisk, storage *SStorage) error
	CanKeepDetachDisk() bool

	RequestDeleteDetachedDisk(ctx context.Context, disk *SDisk, task taskman.ITask, isPurge bool) error
	StartGuestDetachdiskTask(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, params *jsonutils.JSONDict, parentTaskId string) error
	StartGuestAttachDiskTask(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, params *jsonutils.JSONDict, parentTaskId string) error

	StartSuspendTask(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, params *jsonutils.JSONDict, parentTaskId string) error
	RqeuestSuspendOnHost(ctx context.Context, guest *SGuest, task taskman.ITask) error

	AllowReconfigGuest() bool
	DoGuestCreateDisksTask(ctx context.Context, guest *SGuest, task taskman.ITask) error
	RequestChangeVmConfig(ctx context.Context, guest *SGuest, task taskman.ITask, vcpuCount, vmemSize int64) error

	RequestGuestHotAddIso(ctx context.Context, guest *SGuest, path string, task taskman.ITask) error
	RequestRebuildRootDisk(ctx context.Context, guest *SGuest, task taskman.ITask) error

	StartGuestDiskSnapshotTask(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest, params *jsonutils.JSONDict) error
	RequestDiskSnapshot(ctx context.Context, guest *SGuest, task taskman.ITask, snapshotId, diskId string) error
	RequestDeleteSnapshot(ctx context.Context, guest *SGuest, task taskman.ITask, params *jsonutils.JSONDict) error
	RequestReloadDiskSnapshot(ctx context.Context, guest *SGuest, task taskman.ITask, params *jsonutils.JSONDict) error
}

func GetDriver

func GetDriver(hypervisor string) IGuestDriver

type IHostDriver

type IHostDriver interface {
	GetHostType() string
	CheckAndSetCacheImage(ctx context.Context, host *SHost, storagecache *SStoragecache, task taskman.ITask) error
	RequestPrepareSaveDiskOnHost(ctx context.Context, host *SHost, disk *SDisk, imageId string, task taskman.ITask) error
	RequestSaveUploadImageOnHost(ctx context.Context, host *SHost, disk *SDisk, imageId string, task taskman.ITask, data jsonutils.JSONObject) error
	RequestAllocateDiskOnStorage(ctx context.Context, host *SHost, storage *SStorage, disk *SDisk, task taskman.ITask, content *jsonutils.JSONDict) error
	RequestDeallocateDiskOnHost(host *SHost, storage *SStorage, disk *SDisk, task taskman.ITask) error
	RequestResizeDiskOnHostOnline(host *SHost, storage *SStorage, disk *SDisk, size int64, task taskman.ITask) error
	RequestResizeDiskOnHost(host *SHost, storage *SStorage, disk *SDisk, size int64, task taskman.ITask) error
	RequestDeleteSnapshotsWithStorage(ctx context.Context, host *SHost, snapshot *SSnapshot, task taskman.ITask) error
	RequestResetDisk(ctx context.Context, host *SHost, disk *SDisk, params *jsonutils.JSONDict, task taskman.ITask) error
	RequestCleanUpDiskSnapshots(ctx context.Context, host *SHost, disk *SDisk, params *jsonutils.JSONDict, task taskman.ITask) error
	PrepareConvert(host *SHost, image, raid string, data jsonutils.JSONObject) (*jsonutils.JSONDict, error)
	PrepareUnconvert(host *SHost) error
	FinishUnconvert(ctx context.Context, userCred mcclient.TokenCredential, host *SHost) error
	FinishConvert(userCred mcclient.TokenCredential, host *SHost, guest *SGuest, hostType string) error
	ConvertFailed(host *SHost) error
	GetRaidScheme(host *SHost, raid string) (string, error)
}

func GetHostDriver

func GetHostDriver(hostType string) IHostDriver

type ILoadbalancerSubResourceManager

type ILoadbalancerSubResourceManager interface {
	db.IModelManager

	// PreDeleteSubs is to be called by upper manager to PreDelete models managed by this one
	PreDeleteSubs(ctx context.Context, userCred mcclient.TokenCredential, q *sqlchemy.SQuery)
}

type IPAddlocationDirection

type IPAddlocationDirection string
const (
	IPAllocationStepdown IPAddlocationDirection = "stepdown"
	IPAllocationStepup   IPAddlocationDirection = "stepup"
	IPAllocationRadnom   IPAddlocationDirection = "random"
	IPAllocationNone     IPAddlocationDirection = "none"
	IPAllocationDefault                         = ""
)

type ISpecModel

type ISpecModel interface {
	db.IStandaloneModel
	GetSpec(statusCheck bool) *jsonutils.JSONDict
}

func ListItems

func ListItems(manager db.IModelManager, ctx context.Context, userCred mcclient.TokenCredential, queryDict *jsonutils.JSONDict) ([]ISpecModel, error)

type ISpecModelManager

type ISpecModelManager interface {
	db.IStandaloneModelManager
	GetSpecIdent(spec *jsonutils.JSONDict) []string
}

type IsolatedDeviceCountStat

type IsolatedDeviceCountStat struct {
	Devices int
	Gpus    int
}

type NetworkPortStat

type NetworkPortStat struct {
	Count    int
	CountExt int
}

type SAccount

type SAccount struct {
	AccessUrl string
	Account   string
	Secret    string
}

type SBaremetalagent

type SBaremetalagent struct {
	db.SStandaloneResourceBase
	SInfrastructure

	Status     string `width:"36" charset:"ascii" nullable:"false" default:"disable" list:"user" create:"optional"`
	AccessIp   string `width:"16" charset:"ascii" nullable:"false" list:"admin" update:"admin" create:"admin_required"`
	ManagerUri string `width:"256" charset:"ascii" nullable:"true" list:"admin" update:"admin" create:"admin_required"`
	ZoneId     string `width:"128" charset:"ascii" nullable:"false" list:"admin" update:"admin" create:"admin_required"`
}

func (*SBaremetalagent) AllowPerformDisable

func (self *SBaremetalagent) AllowPerformDisable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SBaremetalagent) AllowPerformEnable

func (self *SBaremetalagent) AllowPerformEnable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SBaremetalagent) AllowPerformOffline

func (self *SBaremetalagent) AllowPerformOffline(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SBaremetalagent) AllowPerformOnline

func (self *SBaremetalagent) AllowPerformOnline(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SBaremetalagent) GetExtraDetails

func (self *SBaremetalagent) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SBaremetalagent) GetZone

func (self *SBaremetalagent) GetZone() *SZone

func (*SBaremetalagent) PerformDisable

func (*SBaremetalagent) PerformEnable

func (*SBaremetalagent) PerformOffline

func (*SBaremetalagent) PerformOnline

func (*SBaremetalagent) ValidateDeleteCondition

func (self *SBaremetalagent) ValidateDeleteCondition(ctx context.Context) error

func (*SBaremetalagent) ValidateUpdateData

func (self *SBaremetalagent) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SBaremetalagentManager

type SBaremetalagentManager struct {
	db.SStandaloneResourceBaseManager
	SInfrastructureManager
}
var BaremetalagentManager *SBaremetalagentManager

func (*SBaremetalagentManager) ValidateCreateData

func (manager *SBaremetalagentManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SBillingResourceBase

type SBillingResourceBase struct {
	BillingType string    `width:"36" charset:"ascii" nullable:"true" default:"postpaid" list:"user" create:"optional"`
	ExpiredAt   time.Time `nullable:"true" list:"user" create:"optional"`
}

func (*SBillingResourceBase) GetChargeType

func (self *SBillingResourceBase) GetChargeType() string

type SCachedimage

type SCachedimage struct {
	db.SStandaloneResourceBase
	SInfrastructure

	Size int64 `nullable:"false" list:"admin" update:"admin" create:"admin_required"` // = Column(BigInteger, nullable=False) # in Byte
	// virtual_size = Column(BigInteger, nullable=False) # in Byte
	Info     jsonutils.JSONObject `nullable:"true" get:"admin" update:"admin" create:"admin_required"` // Column(JSONEncodedDict, nullable=True)
	LastSync time.Time            `list:"admin"`                                                       // = Column(DateTime)
	LastRef  time.Time            `list:"admin"`                                                       // = Column(DateTime)
	RefCount int                  `default:"0" list:"admin"`                                           // = Column(Integer, default=0, server_default='0')
}

func (*SCachedimage) AllowPerformRefresh

func (self *SCachedimage) AllowPerformRefresh(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SCachedimage) ChooseSourceStoragecacheInRange

func (self *SCachedimage) ChooseSourceStoragecacheInRange(hostType string, excludes []string, rangeObjs interface{}) (*SStoragecachedimage, error)

func (*SCachedimage) GetCustomizeColumns

func (self *SCachedimage) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SCachedimage) PerformRefresh

func (*SCachedimage) ValidateDeleteCondition

func (self *SCachedimage) ValidateDeleteCondition(ctx context.Context) error

type SCachedimageManager

type SCachedimageManager struct {
	db.SStandaloneResourceBaseManager
	SInfrastructureManager
}
var CachedimageManager *SCachedimageManager

func (*SCachedimageManager) GetImageById

func (manager *SCachedimageManager) GetImageById(ctx context.Context, userCred mcclient.TokenCredential, imageId string, refresh bool) (*SImage, error)

func (*SCachedimageManager) ImageAddRefCount

func (manager *SCachedimageManager) ImageAddRefCount(imageId string)

type SCapabilities

type SCapabilities struct {
	Hypervisors        []string
	StorageTypes       []string
	GPUModels          []string
	MinNicCount        int
	MaxNicCount        int
	MinDataDiskCount   int
	MaxDataDiskCount   int
	SchedPolicySupport bool
	Usable             bool
	Specs              jsonutils.JSONObject
}

func GetCapabilities

func GetCapabilities(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, zone *SZone) (SCapabilities, error)

type SCloudaccount

type SCloudaccount struct {
	db.SEnabledStatusStandaloneResourceBase
	SInfrastructure

	AccessUrl string `width:"64" charset:"ascii" nullable:"true" list:"admin" update:"admin" create:"admin_optional"`

	Account string `width:"128" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"` // Column(VARCHAR(64, charset='ascii'), nullable=False)
	Secret  string `width:"256" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"` // Column(VARCHAR(256, charset='ascii'), nullable=False)

	BalanceKey string    `width:"256" charset:"ascii" nullable:"true" list:"admin" update:"admin" create:"admin_optional"`
	LastSync   time.Time `get:"admin" list:"admin"` // = Column(DateTime, nullable=True)

	Version string `width:"32" charset:"ascii" nullable:"true" list:"admin"` // Column(VARCHAR(32, charset='ascii'), nullable=True)

	Sysinfo jsonutils.JSONObject `get:"admin"` // Column(JSONEncodedDict, nullable=True)

	Provider string `width:"64" charset:"ascii" list:"admin" create:"admin_required"`
}

func (*SCloudaccount) AllowGetDetailsBalance

func (self *SCloudaccount) AllowGetDetailsBalance(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SCloudaccount) AllowPerformImport

func (self *SCloudaccount) AllowPerformImport(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SCloudaccount) AllowPerformSync

func (self *SCloudaccount) AllowPerformSync(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SCloudaccount) AllowPerformUpdateCredential

func (self *SCloudaccount) AllowPerformUpdateCredential(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SCloudaccount) CanSync

func (self *SCloudaccount) CanSync() bool

func (*SCloudaccount) GetBalance

func (self *SCloudaccount) GetBalance() (float64, error)

func (*SCloudaccount) GetCloudproviders

func (self *SCloudaccount) GetCloudproviders() []SCloudprovider

func (*SCloudaccount) GetCustomizeColumns

func (self *SCloudaccount) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SCloudaccount) GetDetailsBalance

func (self *SCloudaccount) GetDetailsBalance(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SCloudaccount) GetDriver

func (self *SCloudaccount) GetDriver() (cloudprovider.ICloudProvider, error)

func (*SCloudaccount) GetExtraDetails

func (self *SCloudaccount) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SCloudaccount) GetSubAccounts

func (self *SCloudaccount) GetSubAccounts() ([]cloudprovider.SSubAccount, error)

func (*SCloudaccount) ImportSubAccount

func (self *SCloudaccount) ImportSubAccount(ctx context.Context, userCred mcclient.TokenCredential, subAccount cloudprovider.SSubAccount, autoCreateProject bool) (*SCloudprovider, bool, error)

func (*SCloudaccount) MarkStartSync

func (self *SCloudaccount) MarkStartSync(userCred mcclient.TokenCredential)

func (*SCloudaccount) PerformImport

func (*SCloudaccount) PerformSync

func (*SCloudaccount) PerformUpdateCredential

func (self *SCloudaccount) PerformUpdateCredential(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SCloudaccount) PostCreate

func (self *SCloudaccount) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SCloudaccount) SaveSysInfo

func (self *SCloudaccount) SaveSysInfo(info jsonutils.JSONObject)

func (*SCloudaccount) StartSyncCloudProviderInfoTask

func (self *SCloudaccount) StartSyncCloudProviderInfoTask(ctx context.Context, userCred mcclient.TokenCredential, cloudProviders []SCloudprovider, syncRange *SSyncRange, parentTaskId string) error

func (*SCloudaccount) ValidateDeleteCondition

func (self *SCloudaccount) ValidateDeleteCondition(ctx context.Context) error

func (*SCloudaccount) ValidateUpdateData

func (self *SCloudaccount) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SCloudaccountManager

var CloudaccountManager *SCloudaccountManager

func (*SCloudaccountManager) FetchCloudaccountById

func (manager *SCloudaccountManager) FetchCloudaccountById(accountId string) *SCloudaccount

func (*SCloudaccountManager) FetchCloudaccountByIdOrName

func (manager *SCloudaccountManager) FetchCloudaccountByIdOrName(accountId string) *SCloudaccount

func (*SCloudaccountManager) InitializeData

func (manager *SCloudaccountManager) InitializeData() error

func (*SCloudaccountManager) ValidateCreateData

func (manager *SCloudaccountManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SCloudprovider

type SCloudprovider struct {
	db.SEnabledStatusStandaloneResourceBase
	SInfrastructure

	AccessUrl string `width:"64" charset:"ascii" nullable:"true" list:"admin" update:"admin" create:"admin_optional"`
	// Hostname string `width:"64" charset:"ascii" nullable:"true"` // Column(VARCHAR(64, charset='ascii'), nullable=False)
	// port = Column(Integer, nullable=False)
	Account string `width:"128" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"` // Column(VARCHAR(64, charset='ascii'), nullable=False)
	Secret  string `width:"256" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"` // Column(VARCHAR(256, charset='ascii'), nullable=False)

	CloudaccountId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" key_index:"true"`

	ProjectId string `name:"tenant_id" width:"128" charset:"ascii" nullable:"true" list:"admin"`

	LastSync time.Time `get:"admin" list:"admin"` // = Column(DateTime, nullable=True)

	Version string `width:"32" charset:"ascii" nullable:"true" list:"admin"` // Column(VARCHAR(32, charset='ascii'), nullable=True)

	Sysinfo jsonutils.JSONObject `get:"admin"` // Column(JSONEncodedDict, nullable=True)

	Provider string `width:"64" charset:"ascii" list:"admin" create:"admin_required"`
}

func (*SCloudprovider) AllowGetDetailsBalance

func (self *SCloudprovider) AllowGetDetailsBalance(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SCloudprovider) AllowPerformChangeProject

func (self *SCloudprovider) AllowPerformChangeProject(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SCloudprovider) AllowPerformSync

func (self *SCloudprovider) AllowPerformSync(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SCloudprovider) CanSync

func (self *SCloudprovider) CanSync() bool

func (*SCloudprovider) GetBalance

func (self *SCloudprovider) GetBalance() (float64, error)

func (*SCloudprovider) GetCloudaccount

func (self *SCloudprovider) GetCloudaccount() *SCloudaccount

func (*SCloudprovider) GetCustomizeColumns

func (self *SCloudprovider) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SCloudprovider) GetDetailsBalance

func (self *SCloudprovider) GetDetailsBalance(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SCloudprovider) GetDriver

func (self *SCloudprovider) GetDriver() (cloudprovider.ICloudProvider, error)

func (*SCloudprovider) GetExtraDetails

func (self *SCloudprovider) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SCloudprovider) GetGuestCount

func (self *SCloudprovider) GetGuestCount() int

func (*SCloudprovider) GetHostCount

func (self *SCloudprovider) GetHostCount() int

func (*SCloudprovider) GetOwnerProjectId

func (self *SCloudprovider) GetOwnerProjectId() string

func (*SCloudprovider) MarkStartSync

func (self *SCloudprovider) MarkStartSync(userCred mcclient.TokenCredential)

func (*SCloudprovider) PerformChangeProject

func (self *SCloudprovider) PerformChangeProject(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SCloudprovider) PerformSync

func (*SCloudprovider) SaveSysInfo

func (self *SCloudprovider) SaveSysInfo(info jsonutils.JSONObject)

func (*SCloudprovider) StartSyncCloudProviderInfoTask

func (self *SCloudprovider) StartSyncCloudProviderInfoTask(ctx context.Context, userCred mcclient.TokenCredential, syncRange *SSyncRange, parentTaskId string) error

func (*SCloudprovider) ValidateDeleteCondition

func (self *SCloudprovider) ValidateDeleteCondition(ctx context.Context) error

func (*SCloudprovider) ValidateUpdateData

func (self *SCloudprovider) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SCloudproviderManager

var CloudproviderManager *SCloudproviderManager

func (*SCloudproviderManager) FetchCloudproviderById

func (manager *SCloudproviderManager) FetchCloudproviderById(providerId string) *SCloudprovider

func (*SCloudproviderManager) FetchCloudproviderByIdOrName

func (manager *SCloudproviderManager) FetchCloudproviderByIdOrName(providerId string) *SCloudprovider

func (*SCloudproviderManager) GetOwnerId

func (manager *SCloudproviderManager) GetOwnerId(userCred mcclient.IIdentityProvider) string

func (*SCloudproviderManager) InitializeData

func (manager *SCloudproviderManager) InitializeData() error

func (*SCloudproviderManager) ValidateCreateData

func (self *SCloudproviderManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SCloudproviderUsage

type SCloudproviderUsage struct {
	GuestCount        int
	HostCount         int
	VpcCount          int
	StorageCount      int
	StorageCacheCount int
	EipCount          int
	SnapshotCount     int
}

type SCloudregion

type SCloudregion struct {
	db.SEnabledStatusStandaloneResourceBase
	SInfrastructure

	Latitude  float32 `list:"user"`
	Longitude float32 `list:"user"`
	Provider  string  `width:"64" charset:"ascii" list:"user"`
}

func (*SCloudregion) AllowPerformDefaultVpc

func (self *SCloudregion) AllowPerformDefaultVpc(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SCloudregion) CustomizeCreate

func (self *SCloudregion) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SCloudregion) GetCustomizeColumns

func (self *SCloudregion) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SCloudregion) GetExtraDetails

func (self *SCloudregion) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SCloudregion) GetGuestCount

func (self *SCloudregion) GetGuestCount(increment bool) int

func (*SCloudregion) GetVpcCount

func (self *SCloudregion) GetVpcCount() int

func (*SCloudregion) GetZoneCount

func (self *SCloudregion) GetZoneCount() int

func (*SCloudregion) PerformDefaultVpc

func (self *SCloudregion) PerformDefaultVpc(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SCloudregion) ValidateDeleteCondition

func (self *SCloudregion) ValidateDeleteCondition(ctx context.Context) error

func (*SCloudregion) ValidateUpdateCondition

func (self *SCloudregion) ValidateUpdateCondition(ctx context.Context) error

type SCloudregionManager

var CloudregionManager *SCloudregionManager

func (*SCloudregionManager) AllowListItems

func (manager *SCloudregionManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SCloudregionManager) FetchRegionById

func (manager *SCloudregionManager) FetchRegionById(id string) *SCloudregion

func (*SCloudregionManager) InitializeData

func (manager *SCloudregionManager) InitializeData() error

func (*SCloudregionManager) ListItemFilter

func (manager *SCloudregionManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)

func (*SCloudregionManager) SyncRegions

func (*SCloudregionManager) ValidateCreateData

func (manager *SCloudregionManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SDeployConfig

type SDeployConfig struct {
	Path    string
	Action  string
	Content string
}

type SDisk

type SDisk struct {
	db.SSharableVirtualResourceBase

	SBillingResourceBase

	DiskFormat string `width:"32" charset:"ascii" nullable:"false" default:"qcow2" list:"user"` // Column(VARCHAR(32, charset='ascii'), nullable=False, default='qcow2')
	DiskSize   int    `nullable:"false" list:"user"`                                            // Column(Integer, nullable=False) # in MB
	AccessPath string `width:"256" charset:"ascii" nullable:"true" get:"user"`                  // = Column(VARCHAR(256, charset='ascii'), nullable=True)

	AutoDelete bool `nullable:"false" default:"false" get:"user" update:"user"` // Column(Boolean, nullable=False, default=False)

	StorageId string `width:"128" charset:"ascii" nullable:"true" list:"admin"` // Column(VARCHAR(ID_LENGTH, charset='ascii'), nullable=True)

	// # backing template id and type
	TemplateId string `width:"256" charset:"ascii" nullable:"true" list:"user"` // Column(VARCHAR(ID_LENGTH, charset='ascii'), nullable=True)
	// # file system
	FsFormat string `width:"32" charset:"ascii" nullable:"true" list:"user"` // Column(VARCHAR(32, charset='ascii'), nullable=True)
	// # disk type, OS, SWAP, DAT
	DiskType string `width:"32" charset:"ascii" nullable:"true" list:"user"` // Column(VARCHAR(32, charset='ascii'), nullable=True)
	// # is persistent
	Nonpersistent bool `default:"false" list:"user"` // Column(Boolean, default=False)
	AutoSnapshot  bool `default:"false" nullable:"true" get:"user" update:"user"`
}

func (*SDisk) AllowGetDetailsConvertSnapshot

func (self *SDisk) AllowGetDetailsConvertSnapshot(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SDisk) AllowPerformCancelDelete

func (self *SDisk) AllowPerformCancelDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SDisk) AllowPerformCreateSnapshot

func (self *SDisk) AllowPerformCreateSnapshot(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SDisk) AllowPerformDiskReset

func (self *SDisk) AllowPerformDiskReset(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SDisk) AllowPerformPurge

func (self *SDisk) AllowPerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SDisk) AllowPerformResize

func (self *SDisk) AllowPerformResize(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SDisk) AllowPerformSave

func (self *SDisk) AllowPerformSave(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SDisk) CleanUpDiskSnapshots

func (self *SDisk) CleanUpDiskSnapshots(ctx context.Context, userCred mcclient.TokenCredential, snapshot *SSnapshot) error

On disk reset, auto delete snapshots after the reset snapshot(reserve manualed snapshot)

func (*SDisk) ClearHostSchedCache

func (self *SDisk) ClearHostSchedCache() error

func (*SDisk) CustomizeCreate

func (self *SDisk) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SDisk) CustomizeDelete

func (self *SDisk) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SDisk) Delete

func (self *SDisk) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SDisk) GetAttachedGuests

func (self *SDisk) GetAttachedGuests() []SGuest

func (*SDisk) GetCloudprovider

func (self *SDisk) GetCloudprovider() *SCloudprovider

func (*SDisk) GetCustomizeColumns

func (self *SDisk) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SDisk) GetDetailsConvertSnapshot

func (self *SDisk) GetDetailsConvertSnapshot(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SDisk) GetExtraDetails

func (self *SDisk) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SDisk) GetFetchUrl

func (self *SDisk) GetFetchUrl() string

func (*SDisk) GetFsFormat

func (self *SDisk) GetFsFormat() string

func (*SDisk) GetGuestDiskCount

func (self *SDisk) GetGuestDiskCount() int

func (*SDisk) GetGuestdisks

func (self *SDisk) GetGuestdisks() []SGuestdisk

func (*SDisk) GetGuests

func (self *SDisk) GetGuests() []SGuest

func (*SDisk) GetGuestsCount

func (self *SDisk) GetGuestsCount() int

func (*SDisk) GetIDisk

func (self *SDisk) GetIDisk() (cloudprovider.ICloudDisk, error)

func (*SDisk) GetIStorage

func (self *SDisk) GetIStorage() (cloudprovider.ICloudStorage, error)

func (*SDisk) GetMountPoint

func (self *SDisk) GetMountPoint() string

func (*SDisk) GetPathAtHost

func (self *SDisk) GetPathAtHost(host *SHost) string

func (*SDisk) GetRuningGuestCount

func (self *SDisk) GetRuningGuestCount() int

func (*SDisk) GetShortDesc

func (self *SDisk) GetShortDesc() *jsonutils.JSONDict

func (*SDisk) GetSnapshotCount

func (self *SDisk) GetSnapshotCount() int

func (*SDisk) GetStorage

func (self *SDisk) GetStorage() *SStorage

func (*SDisk) GetTemplateId

func (self *SDisk) GetTemplateId() string

func (*SDisk) GetZone

func (self *SDisk) GetZone() *SZone

func (*SDisk) IsLocal

func (self *SDisk) IsLocal() bool

func (*SDisk) PerformCancelDelete

func (self *SDisk) PerformCancelDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SDisk) PerformCreateSnapshot

func (self *SDisk) PerformCreateSnapshot(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SDisk) PerformDiskReset

func (self *SDisk) PerformDiskReset(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SDisk) PerformPurge

func (self *SDisk) PerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SDisk) PerformResize

func (self *SDisk) PerformResize(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SDisk) PerformSave

func (*SDisk) PrepareSaveImage

func (self *SDisk) PrepareSaveImage(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict) (string, error)

func (*SDisk) RealDelete

func (self *SDisk) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SDisk) SetDiskReady

func (self *SDisk) SetDiskReady(ctx context.Context, userCred mcclient.TokenCredential, reason string)

func (*SDisk) SetStorageByHost

func (disk *SDisk) SetStorageByHost(hostId string, diskConfig *SDiskConfig) error

func (*SDisk) StartAllocate

func (self *SDisk) StartAllocate(ctx context.Context, host *SHost, storage *SStorage, taskId string, userCred mcclient.TokenCredential, rebuild bool, snapshot string, task taskman.ITask) error

func (*SDisk) StartDiskCreateTask

func (self *SDisk) StartDiskCreateTask(ctx context.Context, userCred mcclient.TokenCredential, rebuild bool, snapshot string, parentTaskId string) error

func (*SDisk) StartDiskDeleteTask

func (self *SDisk) StartDiskDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string, isPurge bool) error

func (*SDisk) StartDiskResizeTask

func (self *SDisk) StartDiskResizeTask(ctx context.Context, userCred mcclient.TokenCredential, size int64, parentTaskId string, pendingUsage quotas.IQuota) error

func (*SDisk) StartDiskSaveTask

func (self *SDisk) StartDiskSaveTask(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentTaskId string) error

func (*SDisk) StartResetDisk

func (self *SDisk) StartResetDisk(ctx context.Context, userCred mcclient.TokenCredential, snapshotId string, autoStart bool) error

func (*SDisk) ToDiskInfo

func (self *SDisk) ToDiskInfo() DiskInfo

func (*SDisk) ValidateDeleteCondition

func (self *SDisk) ValidateDeleteCondition(ctx context.Context) error

type SDiskConfig

type SDiskConfig struct {
	ImageId string
	// ImageDiskFormat string
	Size            int    // MB
	Fs              string // file system
	Format          string //
	Driver          string //
	Cache           string //
	Mountpoint      string //
	Backend         string // stroageType
	Medium          string
	ImageProperties map[string]string
}

type SDiskManager

type SDiskManager struct {
	db.SSharableVirtualResourceBaseManager
}
var DiskManager *SDiskManager

func (*SDiskManager) AutoDiskSnapshot

func (manager *SDiskManager) AutoDiskSnapshot(ctx context.Context, userCred mcclient.TokenCredential)

func (*SDiskManager) CleanPendingDeleteDisks

func (manager *SDiskManager) CleanPendingDeleteDisks(ctx context.Context, userCred mcclient.TokenCredential)

func (*SDiskManager) GetContextManager

func (manager *SDiskManager) GetContextManager() []db.IModelManager

func (*SDiskManager) ListItemFilter

func (manager *SDiskManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)

func (*SDiskManager) OnCreateComplete

func (manager *SDiskManager) OnCreateComplete(ctx context.Context, items []db.IModel, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SDiskManager) SyncDisks

func (manager *SDiskManager) SyncDisks(ctx context.Context, userCred mcclient.TokenCredential, storage *SStorage, disks []cloudprovider.ICloudDisk, projectId string, projectSync bool) ([]SDisk, []cloudprovider.ICloudDisk, compare.SyncResult)

func (*SDiskManager) ValidateCreateData

func (manager *SDiskManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SDnsRecord

type SDnsRecord struct {
	db.SAdminSharableVirtualResourceBase
	Ttl     int  `nullable:"true" default:"1" create:"optional" list:"user" update:"user"`
	Enabled bool `nullable:"false" default:"true" create:"optional" list:"user"`
}

func (*SDnsRecord) AddInfo

func (rec *SDnsRecord) AddInfo(userCred mcclient.TokenCredential, data jsonutils.JSONObject) error

func (*SDnsRecord) AllowPerformAddRecords

func (rec *SDnsRecord) AllowPerformAddRecords(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SDnsRecord) AllowPerformDisable

func (rec *SDnsRecord) AllowPerformDisable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SDnsRecord) AllowPerformEnable

func (rec *SDnsRecord) AllowPerformEnable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SDnsRecord) AllowPerformRemoveRecords

func (rec *SDnsRecord) AllowPerformRemoveRecords(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SDnsRecord) GetInfo

func (rec *SDnsRecord) GetInfo() []string

func (*SDnsRecord) PerformAddRecords

func (rec *SDnsRecord) PerformAddRecords(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SDnsRecord) PerformDisable

func (*SDnsRecord) PerformEnable

func (*SDnsRecord) PerformRemoveRecords

func (rec *SDnsRecord) PerformRemoveRecords(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SDnsRecord) ValidateUpdateData

func (rec *SDnsRecord) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SDnsRecordManager

type SDnsRecordManager struct {
	db.SAdminSharableVirtualResourceBaseManager
}
var DnsRecordManager *SDnsRecordManager

func (*SDnsRecordManager) GetRecordsLimit

func (man *SDnsRecordManager) GetRecordsLimit() int

GetRecordsLimit implements IAdminSharableVirtualModelManager

func (*SDnsRecordManager) GetRecordsSeparator

func (man *SDnsRecordManager) GetRecordsSeparator() string

GetRecordsSeparator implements IAdminSharableVirtualModelManager

func (*SDnsRecordManager) ParseInputInfo

func (man *SDnsRecordManager) ParseInputInfo(data *jsonutils.JSONDict) ([]string, error)

ParseInputInfo implements IAdminSharableVirtualModelManager

func (*SDnsRecordManager) QueryDns

func (man *SDnsRecordManager) QueryDns(projectId, name string) *SDnsRecord

func (*SDnsRecordManager) QueryDnsIps

func (man *SDnsRecordManager) QueryDnsIps(projectId, name, kind string) []*DnsIp

func (*SDnsRecordManager) ValidateCreateData

func (man *SDnsRecordManager) ValidateCreateData(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	ownerProjId string,
	query jsonutils.JSONObject,
	data *jsonutils.JSONDict,
) (*jsonutils.JSONDict, error)

type SDynamicschedtag

type SDynamicschedtag struct {
	db.SStandaloneResourceBase
	SInfrastructure

	Condition  string `width:"256" charset:"ascii" nullable:"false" list:"user" create:"required" update:"admin"`
	SchedtagId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" update:"admin"`

	Enabled bool `nullable:"false" default:"true" create:"optional" list:"user" update:"user"`
}

dynamic schedtag is called before scan host candidates, dynamically adding additional schedtag to hosts condition examples:

host.sys_load > 1.5 || host.mem_used_percent > 0.7 => "high_load"

func (*SDynamicschedtag) AllowPerformEvaluate

func (self *SDynamicschedtag) AllowPerformEvaluate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SDynamicschedtag) GetCustomizeColumns

func (self *SDynamicschedtag) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SDynamicschedtag) GetExtraDetails

func (self *SDynamicschedtag) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SDynamicschedtag) PerformEvaluate

func (*SDynamicschedtag) ValidateUpdateData

func (self *SDynamicschedtag) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SDynamicschedtagManager

type SDynamicschedtagManager struct {
	db.SStandaloneResourceBaseManager
	SInfrastructureManager
}
var DynamicschedtagManager *SDynamicschedtagManager

func (*SDynamicschedtagManager) ValidateCreateData

func (manager *SDynamicschedtagManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SElasticip

type SElasticip struct {
	db.SVirtualResourceBase

	SManagedResourceBase

	Mode string `width:"32" charset:"ascii" list:"user"`

	IpAddr string `width:"17" charset:"ascii" list:"user"`

	AssociateType string `width:"32" charset:"ascii" list:"user"`
	AssociateId   string `width:"256" charset:"ascii" list:"user"`

	Bandwidth int `list:"user" create:"required"`

	ChargeType string `list:"user" create:"required" default:"traffic"`

	AutoDellocate tristate.TriState `default:"false" get:"user" create:"optional"`

	CloudregionId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required"`
}

func (*SElasticip) AllowPerformAssociate

func (self *SElasticip) AllowPerformAssociate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SElasticip) AllowPerformChangeBandwidth

func (self *SElasticip) AllowPerformChangeBandwidth(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SElasticip) AllowPerformDissociate

func (self *SElasticip) AllowPerformDissociate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SElasticip) AllowPerformPurge

func (self *SElasticip) AllowPerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SElasticip) AllowPerformSync

func (self *SElasticip) AllowPerformSync(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SElasticip) AssociateVM

func (self *SElasticip) AssociateVM(userCred mcclient.TokenCredential, vm *SGuest) error

func (*SElasticip) CustomizeDelete

func (self *SElasticip) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SElasticip) Delete

func (self *SElasticip) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SElasticip) Dissociate

func (self *SElasticip) Dissociate(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SElasticip) DoChangeBandwidth

func (self *SElasticip) DoChangeBandwidth(userCred mcclient.TokenCredential, bandwidth int) error

func (*SElasticip) DoPendingDelete

func (self *SElasticip) DoPendingDelete(ctx context.Context, userCred mcclient.TokenCredential)

func (*SElasticip) GetAssociateVM

func (self *SElasticip) GetAssociateVM() *SGuest

func (*SElasticip) GetCustomizeColumns

func (self *SElasticip) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SElasticip) GetExtraDetails

func (self *SElasticip) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SElasticip) GetIEip

func (self *SElasticip) GetIEip() (cloudprovider.ICloudEIP, error)

func (*SElasticip) GetIRegion

func (self *SElasticip) GetIRegion() (cloudprovider.ICloudRegion, error)

func (*SElasticip) GetRegion

func (self *SElasticip) GetRegion() *SCloudregion

func (*SElasticip) GetShortDesc

func (self *SElasticip) GetShortDesc() *jsonutils.JSONDict

func (*SElasticip) PerformAssociate

func (self *SElasticip) PerformAssociate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SElasticip) PerformChangeBandwidth

func (self *SElasticip) PerformChangeBandwidth(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SElasticip) PerformDissociate

func (self *SElasticip) PerformDissociate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SElasticip) PerformPurge

func (*SElasticip) PerformSync

func (*SElasticip) PostCreate

func (self *SElasticip) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SElasticip) RealDelete

func (self *SElasticip) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SElasticip) StartEipAssociateTask

func (self *SElasticip) StartEipAssociateTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict) error

func (*SElasticip) StartEipChangeBandwidthTask

func (self *SElasticip) StartEipChangeBandwidthTask(ctx context.Context, userCred mcclient.TokenCredential, bandwidth int64) error

func (*SElasticip) StartEipDeallocateTask

func (self *SElasticip) StartEipDeallocateTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SElasticip) StartEipDissociateTask

func (self *SElasticip) StartEipDissociateTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SElasticip) StartEipSyncstatusTask

func (self *SElasticip) StartEipSyncstatusTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SElasticip) SyncInstanceWithCloudEip

func (self *SElasticip) SyncInstanceWithCloudEip(ctx context.Context, userCred mcclient.TokenCredential, ext cloudprovider.ICloudEIP) error

func (*SElasticip) SyncWithCloudEip

func (self *SElasticip) SyncWithCloudEip(userCred mcclient.TokenCredential, ext cloudprovider.ICloudEIP, projectId string, projectSync bool) error

func (*SElasticip) ValidateDeleteCondition

func (self *SElasticip) ValidateDeleteCondition(ctx context.Context) error

type SElasticipManager

type SElasticipManager struct {
	db.SVirtualResourceBaseManager
}
var ElasticipManager *SElasticipManager

func (*SElasticipManager) ListItemFilter

func (manager *SElasticipManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)

func (*SElasticipManager) SyncEips

func (manager *SElasticipManager) SyncEips(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, region *SCloudregion, eips []cloudprovider.ICloudEIP, projectId string, projectSync bool) compare.SyncResult

func (*SElasticipManager) TotalCount

func (manager *SElasticipManager) TotalCount(projectId string, rangeObj db.IStandaloneModel, hostTypes []string) EipUsage

func (*SElasticipManager) ValidateCreateData

func (manager *SElasticipManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SGroup

type SGroup struct {
	db.SVirtualResourceBase

	ServiceType string `width:"36" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"` // Column(VARCHAR(36, charset='ascii'), nullable=True)

	ParentId string `width:"36" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"` // Column(VARCHAR(36, charset='ascii'), nullable=True)

	ZoneId string `width:"36" charset:"ascii" nullable:"true" list:"user" update:"user" create:"required"` // Column(VARCHAR(36, charset='ascii'), nullable=True)

	SchedStrategy string `width:"16" charset:"ascii" nullable:"true" default:"" list:"user" update:"user" create:"optional"` // Column(VARCHAR(16, charset='ascii'), nullable=True, default=”)
}

type SGroupJointsBase

type SGroupJointsBase struct {
	db.SVirtualJointResourceBase

	SrvtagId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" key_index:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=False)
}

func (*SGroupJointsBase) GetGroup

func (self *SGroupJointsBase) GetGroup() *SGuest

type SGroupJointsManager

type SGroupJointsManager struct {
	db.SVirtualJointResourceBaseManager
}

func NewGroupJointsManager

func NewGroupJointsManager(dt interface{}, tableName string, keyword string, keywordPlural string, slave db.IVirtualModelManager) SGroupJointsManager

type SGroupManager

type SGroupManager struct {
	db.SVirtualResourceBaseManager
}
var GroupManager *SGroupManager

type SGroupguest

type SGroupguest struct {
	SGroupJointsBase

	Tag     string `width:"256" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"`    // Column(VARCHAR(256, charset='ascii'), nullable=True)
	GuestId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" key_index:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=False)
}

func (*SGroupguest) Delete

func (self *SGroupguest) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SGroupguest) Detach

func (self *SGroupguest) Detach(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SGroupguest) GetCustomizeColumns

func (self *SGroupguest) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SGroupguest) GetExtraDetails

func (self *SGroupguest) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SGroupguest) GetGuest

func (self *SGroupguest) GetGuest() *SGuest

func (*SGroupguest) Master

func (joint *SGroupguest) Master() db.IStandaloneModel

func (*SGroupguest) Slave

func (joint *SGroupguest) Slave() db.IStandaloneModel

type SGroupguestManager

type SGroupguestManager struct {
	SGroupJointsManager
}
var GroupguestManager *SGroupguestManager

type SGroupnetwork

type SGroupnetwork struct {
	SGroupJointsBase

	NetworkId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" key_index:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=False)

	IpAddr string `width:"16" charset:"ascii" nullable:"true" list:"user" create:"optional"` // Column(VARCHAR(16, charset='ascii'), nullable=True)

	Index int8 `nullable:"false" default:"0" list:"user" list:"user" update:"user" create:"optional"` // Column(TINYINT, nullable=False, default=0)

	EipId string `width:"36" charset:"ascii" nullable:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=True)
}

func (*SGroupnetwork) Delete

func (self *SGroupnetwork) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SGroupnetwork) Detach

func (self *SGroupnetwork) Detach(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SGroupnetwork) GetCustomizeColumns

func (self *SGroupnetwork) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SGroupnetwork) GetExtraDetails

func (self *SGroupnetwork) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SGroupnetwork) Master

func (joint *SGroupnetwork) Master() db.IStandaloneModel

func (*SGroupnetwork) Slave

func (joint *SGroupnetwork) Slave() db.IStandaloneModel

type SGroupnetworkManager

type SGroupnetworkManager struct {
	SGroupJointsManager
}
var GroupnetworkManager *SGroupnetworkManager

type SGuest

type SGuest struct {
	db.SVirtualResourceBase

	SBillingResourceBase

	VcpuCount int8 `nullable:"false" default:"1" list:"user" create:"optional"` // Column(TINYINT, nullable=False, default=1)
	VmemSize  int  `nullable:"false" list:"user" create:"required"`             // Column(Integer, nullable=False)

	BootOrder string `width:"8" charset:"ascii" nullable:"true" default:"cdn" list:"user" update:"user" create:"optional"` // Column(VARCHAR(8, charset='ascii'), nullable=True, default='cdn')

	DisableDelete    tristate.TriState `nullable:"false" default:"true" list:"user" update:"user" create:"optional"`           // Column(Boolean, nullable=False, default=True)
	ShutdownBehavior string            `width:"16" charset:"ascii" default:"stop" list:"user" update:"user" create:"optional"` // Column(VARCHAR(16, charset='ascii'), default=SHUTDOWN_STOP)

	KeypairId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"` // Column(VARCHAR(36, charset='ascii'), nullable=True)

	HostId string `width:"36" charset:"ascii" nullable:"true" list:"admin" get:"admin"` // Column(VARCHAR(36, charset='ascii'), nullable=True)

	Vga     string `width:"36" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"` // Column(VARCHAR(36, charset='ascii'), nullable=True)
	Vdi     string `width:"36" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"` // Column(VARCHAR(36, charset='ascii'), nullable=True)
	Machine string `width:"36" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"` // Column(VARCHAR(36, charset='ascii'), nullable=True)
	Bios    string `width:"36" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"` // Column(VARCHAR(36, charset='ascii'), nullable=True)
	OsType  string `width:"36" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"` // Column(VARCHAR(36, charset='ascii'), nullable=True)

	FlavorId string `width:"36" charset:"ascii" nullable:"true" list:"user" create:"optional"` // Column(VARCHAR(36, charset='ascii'), nullable=True)

	SecgrpId      string `width:"36" charset:"ascii" nullable:"true" get:"user" create:"optional"` // Column(VARCHAR(36, charset='ascii'), nullable=True)
	AdminSecgrpId string `width:"36" charset:"ascii" nullable:"true" get:"admin"`                  // Column(VARCHAR(36, charset='ascii'), nullable=True)

	Hypervisor string `width:"16" charset:"ascii" nullable:"false" default:"kvm" list:"user" create:"required"` // Column(VARCHAR(16, charset='ascii'), nullable=False, default=HYPERVISOR_DEFAULT)
}

func (*SGuest) AllowDeleteItem

func (self *SGuest) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) AllowGetDetailsDesc

func (self *SGuest) AllowGetDetailsDesc(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SGuest) AllowGetDetailsMonitor

func (self *SGuest) AllowGetDetailsMonitor(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SGuest) AllowGetDetailsVnc

func (self *SGuest) AllowGetDetailsVnc(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SGuest) AllowPerformAssignSecgroup

func (self *SGuest) AllowPerformAssignSecgroup(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformAssociateEip

func (self *SGuest) AllowPerformAssociateEip(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformAttachIsolatedDevice

func (self *SGuest) AllowPerformAttachIsolatedDevice(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformAttachdisk

func (self *SGuest) AllowPerformAttachdisk(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformAttachnetwork

func (self *SGuest) AllowPerformAttachnetwork(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformCancelDelete

func (model *SGuest) AllowPerformCancelDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformChangeBandwidth

func (self *SGuest) AllowPerformChangeBandwidth(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformChangeConfig

func (self *SGuest) AllowPerformChangeConfig(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformCreateEip

func (self *SGuest) AllowPerformCreateEip(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformCreatedisk

func (self *SGuest) AllowPerformCreatedisk(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformDeploy

func (self *SGuest) AllowPerformDeploy(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformDetachIsolatedDevice

func (self *SGuest) AllowPerformDetachIsolatedDevice(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformDetachdisk

func (self *SGuest) AllowPerformDetachdisk(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformDetachnetwork

func (self *SGuest) AllowPerformDetachnetwork(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformDiskSnapshot

func (self *SGuest) AllowPerformDiskSnapshot(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformDissociateEip

func (self *SGuest) AllowPerformDissociateEip(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformLiveMigrate

func (self *SGuest) AllowPerformLiveMigrate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformMigrate

func (self *SGuest) AllowPerformMigrate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformPurge

func (self *SGuest) AllowPerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformRebuildRoot

func (self *SGuest) AllowPerformRebuildRoot(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformReset

func (self *SGuest) AllowPerformReset(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformRestart

func (self *SGuest) AllowPerformRestart(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformRevokeSecgroup

func (self *SGuest) AllowPerformRevokeSecgroup(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformSaveImage

func (self *SGuest) AllowPerformSaveImage(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformSendkeys

func (self *SGuest) AllowPerformSendkeys(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformStart

func (self *SGuest) AllowPerformStart(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformStop

func (self *SGuest) AllowPerformStop(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformSuspend

func (self *SGuest) AllowPerformSuspend(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformSync

func (self *SGuest) AllowPerformSync(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformSyncstatus

func (self *SGuest) AllowPerformSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) AllowPerformUserData

func (self *SGuest) AllowPerformUserData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuest) Attach2Network

func (self *SGuest) Attach2Network(ctx context.Context, userCred mcclient.TokenCredential, network *SNetwork, pendingUsage quotas.IQuota,
	address string, mac string, driver string, bwLimit int, virtual bool, index int8, reserved bool, allocDir IPAddlocationDirection, requireDesignatedIP bool) error

func (*SGuest) AttachDisk

func (self *SGuest) AttachDisk(disk *SDisk, userCred mcclient.TokenCredential, driver string, cache string, mountpoint string) error

func (*SGuest) CategorizeDisks

func (self *SGuest) CategorizeDisks() SGuestDiskCategory

func (*SGuest) CategorizeNics

func (self *SGuest) CategorizeNics() SGuestNicCategory

func (*SGuest) CheckQemuVersion

func (self *SGuest) CheckQemuVersion(qemuVer, compareVer string) bool

if qemuVer >= compareVer return true

func (*SGuest) CreateDisksOnHost

func (self *SGuest) CreateDisksOnHost(ctx context.Context, userCred mcclient.TokenCredential, host *SHost, data *jsonutils.JSONDict, pendingUsage quotas.IQuota) error

func (*SGuest) CreateIsolatedDeviceOnHost

func (self *SGuest) CreateIsolatedDeviceOnHost(ctx context.Context, userCred mcclient.TokenCredential, host *SHost, data *jsonutils.JSONDict, pendingUsage quotas.IQuota) error

func (*SGuest) CreateNetworksOnHost

func (self *SGuest) CreateNetworksOnHost(ctx context.Context, userCred mcclient.TokenCredential, host *SHost, data *jsonutils.JSONDict, pendingUsage quotas.IQuota) error

func (*SGuest) CustomizeCreate

func (guest *SGuest) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SGuest) CustomizeDelete

func (self *SGuest) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SGuest) Delete

func (self *SGuest) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SGuest) DeleteAllDisksInDB

func (self *SGuest) DeleteAllDisksInDB(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SGuest) DeleteEip

func (self *SGuest) DeleteEip(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SGuest) DetachAllNetworks

func (self *SGuest) DetachAllNetworks(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SGuest) DetachDisk

func (self *SGuest) DetachDisk(ctx context.Context, disk *SDisk, userCred mcclient.TokenCredential)

func (*SGuest) DiskCount

func (guest *SGuest) DiskCount() int

func (*SGuest) DoCancelPendingDelete

func (self *SGuest) DoCancelPendingDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SGuest) DoPendingDelete

func (self *SGuest) DoPendingDelete(ctx context.Context, userCred mcclient.TokenCredential)

func (*SGuest) EjectIso

func (self *SGuest) EjectIso(userCred mcclient.TokenCredential) bool

func (*SGuest) FillDiskSchedDesc

func (self *SGuest) FillDiskSchedDesc(desc *jsonutils.JSONDict)

func (*SGuest) FillGroupSchedDesc

func (self *SGuest) FillGroupSchedDesc(desc *jsonutils.JSONDict)

func (*SGuest) FillNetSchedDesc

func (self *SGuest) FillNetSchedDesc(desc *jsonutils.JSONDict)

func (*SGuest) GetApptags

func (self *SGuest) GetApptags() []string

func (*SGuest) GetCustomizeColumns

func (self *SGuest) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SGuest) GetDeployConfigOnHost

func (self *SGuest) GetDeployConfigOnHost(ctx context.Context, host *SHost, params *jsonutils.JSONDict) *jsonutils.JSONDict

func (*SGuest) GetDetailsDesc

func (self *SGuest) GetDetailsDesc(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) GetDetailsIso

func (self *SGuest) GetDetailsIso(userCred mcclient.TokenCredential) jsonutils.JSONObject

func (*SGuest) GetDetailsMonitor

func (self *SGuest) GetDetailsMonitor(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) GetDetailsVnc

func (self *SGuest) GetDetailsVnc(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) GetDisks

func (guest *SGuest) GetDisks() []SGuestdisk

func (*SGuest) GetDisksQuery

func (guest *SGuest) GetDisksQuery() *sqlchemy.SQuery

func (*SGuest) GetDriver

func (guest *SGuest) GetDriver() IGuestDriver

func (*SGuest) GetEip

func (self *SGuest) GetEip() (*SElasticip, error)

func (*SGuest) GetExtraDetails

func (self *SGuest) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SGuest) GetGroups

func (guest *SGuest) GetGroups() []SGroupguest

func (*SGuest) GetGuestDisk

func (guest *SGuest) GetGuestDisk(diskId string) *SGuestdisk

func (*SGuest) GetHost

func (guest *SGuest) GetHost() *SHost

func (*SGuest) GetHostType

func (guest *SGuest) GetHostType() string

func (*SGuest) GetHypervisor

func (guest *SGuest) GetHypervisor() string

func (*SGuest) GetIVM

func (self *SGuest) GetIVM() (cloudprovider.ICloudVM, error)

func (*SGuest) GetIsolatedDevices

func (self *SGuest) GetIsolatedDevices() []SIsolatedDevice

func (*SGuest) GetJsonDescAtBaremetal

func (self *SGuest) GetJsonDescAtBaremetal(ctx context.Context, host *SHost) *jsonutils.JSONDict

func (*SGuest) GetJsonDescAtHypervisor

func (self *SGuest) GetJsonDescAtHypervisor(ctx context.Context, host *SHost) *jsonutils.JSONDict

func (*SGuest) GetKeypairPublicKey

func (self *SGuest) GetKeypairPublicKey() string

func (*SGuest) GetNetworks

func (guest *SGuest) GetNetworks() []SGuestnetwork

func (*SGuest) GetNetworksQuery

func (guest *SGuest) GetNetworksQuery() *sqlchemy.SQuery

func (*SGuest) GetOS

func (self *SGuest) GetOS() string

func (*SGuest) GetQemuVersion

func (self *SGuest) GetQemuVersion(userCred mcclient.TokenCredential) string

func (*SGuest) GetRealIps

func (self *SGuest) GetRealIps() []string

func (*SGuest) GetSecRules

func (self *SGuest) GetSecRules() []secrules.SecurityRule

func (*SGuest) GetSecgroupName

func (self *SGuest) GetSecgroupName() string

func (*SGuest) GetShortDesc

func (self *SGuest) GetShortDesc() *jsonutils.JSONDict

func (*SGuest) GetSpec

func (self *SGuest) GetSpec(checkStatus bool) *jsonutils.JSONDict

func (*SGuest) GetTemplateId

func (self *SGuest) GetTemplateId() string

func (*SGuest) GetVdi

func (self *SGuest) GetVdi() string

func (*SGuest) InsertIsoSucc

func (self *SGuest) InsertIsoSucc(imageId string, path string, size int, name string) bool

func (*SGuest) IsExitOnly

func (self *SGuest) IsExitOnly() bool

func (*SGuest) IsLegalKey

func (self *SGuest) IsLegalKey(key string) bool

func (*SGuest) IsLinux

func (self *SGuest) IsLinux() bool

func (*SGuest) IsNetworkAllocated

func (guest *SGuest) IsNetworkAllocated() bool

func (*SGuest) IsWindows

func (self *SGuest) IsWindows() bool

func (*SGuest) JoinGroups

func (self *SGuest) JoinGroups(userCred mcclient.TokenCredential, params *jsonutils.JSONDict)

func (*SGuest) LeaveAllGroups

func (self *SGuest) LeaveAllGroups(userCred mcclient.TokenCredential)

func (*SGuest) NetworkCount

func (guest *SGuest) NetworkCount() int

func (*SGuest) NotifyAdminServerEvent

func (self *SGuest) NotifyAdminServerEvent(ctx context.Context, event string, priority string) error

func (*SGuest) NotifyServerEvent

func (self *SGuest) NotifyServerEvent(event string, priority string, loginInfo bool) error

func (*SGuest) PerformAssignSecgroup

func (self *SGuest) PerformAssignSecgroup(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformAssociateEip

func (self *SGuest) PerformAssociateEip(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformAttachIsolatedDevice

func (self *SGuest) PerformAttachIsolatedDevice(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformAttachdisk

func (self *SGuest) PerformAttachdisk(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformAttachnetwork

func (self *SGuest) PerformAttachnetwork(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformCancelDelete

func (self *SGuest) PerformCancelDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformChangeBandwidth

func (self *SGuest) PerformChangeBandwidth(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformChangeConfig

func (self *SGuest) PerformChangeConfig(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformCreateEip

func (self *SGuest) PerformCreateEip(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformCreatedisk

func (self *SGuest) PerformCreatedisk(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformDeploy

func (self *SGuest) PerformDeploy(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformDetachIsolatedDevice

func (self *SGuest) PerformDetachIsolatedDevice(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformDetachdisk

func (self *SGuest) PerformDetachdisk(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformDetachnetwork

func (self *SGuest) PerformDetachnetwork(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformDiskSnapshot

func (self *SGuest) PerformDiskSnapshot(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformDissociateEip

func (self *SGuest) PerformDissociateEip(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformLiveMigrate

func (self *SGuest) PerformLiveMigrate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformMigrate

func (self *SGuest) PerformMigrate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformPurge

func (self *SGuest) PerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformRebuildRoot

func (self *SGuest) PerformRebuildRoot(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformReset

func (self *SGuest) PerformReset(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject,
	data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformRestart

func (self *SGuest) PerformRestart(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformRevokeSecgroup

func (self *SGuest) PerformRevokeSecgroup(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformSaveImage

func (self *SGuest) PerformSaveImage(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformSendkeys

func (self *SGuest) PerformSendkeys(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformStart

func (self *SGuest) PerformStart(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject,
	data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformStatus

func (self *SGuest) PerformStatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformStop

func (*SGuest) PerformSuspend

func (self *SGuest) PerformSuspend(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformSync

func (*SGuest) PerformSyncstatus

func (self *SGuest) PerformSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PerformUserData

func (self *SGuest) PerformUserData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SGuest) PostCreate

func (guest *SGuest) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SGuest) RealDelete

func (self *SGuest) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SGuest) SaveDeployInfo

func (self *SGuest) SaveDeployInfo(ctx context.Context, userCred mcclient.TokenCredential, data jsonutils.JSONObject)

func (*SGuest) SendMonitorCommand

func (self *SGuest) SendMonitorCommand(ctx context.Context, userCred mcclient.TokenCredential, cmd string) (jsonutils.JSONObject, error)

func (*SGuest) SetDisableDelete

func (self *SGuest) SetDisableDelete(val bool) error

func (*SGuest) SetHostId

func (guest *SGuest) SetHostId(hostId string) error

func (*SGuest) StartAutoDeleteGuestTask

func (self *SGuest) StartAutoDeleteGuestTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SGuest) StartChangeConfigTask

func (self *SGuest) StartChangeConfigTask(ctx context.Context, userCred mcclient.TokenCredential,
	data *jsonutils.JSONDict, parentTaskId string, pendingUsage quotas.IQuota) error

func (*SGuest) StartDeleteGuestTask

func (self *SGuest) StartDeleteGuestTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string, isPurge bool, overridePendingDelete bool) error

func (*SGuest) StartDiskSnapshot

func (self *SGuest) StartDiskSnapshot(ctx context.Context, userCred mcclient.TokenCredential, diskId, snapshotId string) error

func (*SGuest) StartGuestCreateDiskTask

func (self *SGuest) StartGuestCreateDiskTask(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentTaskId string) error

func (*SGuest) StartGuestCreateTask

func (self *SGuest) StartGuestCreateTask(ctx context.Context, userCred mcclient.TokenCredential, params *jsonutils.JSONDict, pendingUsage quotas.IQuota, parentTaskId string) error

func (*SGuest) StartGuestDeployTask

func (self *SGuest) StartGuestDeployTask(ctx context.Context, userCred mcclient.TokenCredential, kwargs *jsonutils.JSONDict, action string, parentTaskId string) error

func (*SGuest) StartGuestLiveMigrateTask

func (self *SGuest) StartGuestLiveMigrateTask(ctx context.Context, userCred mcclient.TokenCredential, guestStatus, preferHostId, parentTaskId string) error

func (*SGuest) StartGuestSaveImage

func (self *SGuest) StartGuestSaveImage(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentTaskId string) error

func (*SGuest) StartGuestStopTask

func (self *SGuest) StartGuestStopTask(ctx context.Context, userCred mcclient.TokenCredential, isForce bool, parentTaskId string) error

func (*SGuest) StartGueststartTask

func (self *SGuest) StartGueststartTask(ctx context.Context, userCred mcclient.TokenCredential, data *jsonutils.JSONDict, parentTaskId string) error

func (*SGuest) StartInsertIsoTask

func (self *SGuest) StartInsertIsoTask(ctx context.Context, imageId string, hostId string, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SGuest) StartMigrateTask

func (self *SGuest) StartMigrateTask(ctx context.Context, userCred mcclient.TokenCredential, isRescueMode bool, guestStatus, preferHostId, parentTaskId string) error

func (*SGuest) StartRebuildRootTask

func (self *SGuest) StartRebuildRootTask(ctx context.Context, userCred mcclient.TokenCredential, imageId string, needStop, autoStart bool, passwd string, resetPasswd bool) error

func (*SGuest) StartSuspendTask

func (self *SGuest) StartSuspendTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SGuest) StartSyncTask

func (self *SGuest) StartSyncTask(ctx context.Context, userCred mcclient.TokenCredential, fw_only bool, parentTaskId string) error

func (*SGuest) StartSyncstatus

func (self *SGuest) StartSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SGuest) StartUndeployGuestTask

func (self *SGuest) StartUndeployGuestTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string, targetHostId string) error

func (*SGuest) SyncVMDisks

func (self *SGuest) SyncVMDisks(ctx context.Context, userCred mcclient.TokenCredential, host *SHost, vdisks []cloudprovider.ICloudDisk, projectId string, projectSync bool) compare.SyncResult

func (*SGuest) SyncVMEip

func (self *SGuest) SyncVMEip(ctx context.Context, userCred mcclient.TokenCredential, extEip cloudprovider.ICloudEIP, projectId string) compare.SyncResult

func (*SGuest) SyncVMNics

func (self *SGuest) SyncVMNics(ctx context.Context, userCred mcclient.TokenCredential, host *SHost, vnics []cloudprovider.ICloudNic) compare.SyncResult

func (*SGuest) ToSchedDesc

func (self *SGuest) ToSchedDesc() *jsonutils.JSONDict

func (*SGuest) ValidateAttachDisk

func (self *SGuest) ValidateAttachDisk(ctx context.Context, disk *SDisk) error

func (*SGuest) ValidateDeleteCondition

func (guest *SGuest) ValidateDeleteCondition(ctx context.Context) error

func (*SGuest) ValidateResizeDisk

func (guest *SGuest) ValidateResizeDisk(disk *SDisk, storage *SStorage) error

func (*SGuest) ValidateUpdateData

func (self *SGuest) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

func (*SGuest) VerifySendKeys

func (self *SGuest) VerifySendKeys(keyStr string) error

type SGuestCountStat

type SGuestCountStat struct {
	TotalGuestCount    int
	TotalCpuCount      int
	TotalMemSize       int
	TotalDiskSize      int
	TotalIsolatedCount int
}

type SGuestDiskCategory

type SGuestDiskCategory struct {
	Root *SDisk
	Swap []*SDisk
	Data []*SDisk
}

type SGuestJointsBase

type SGuestJointsBase struct {
	db.SVirtualJointResourceBase

	GuestId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" key_index:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=False)
}

type SGuestJointsManager

type SGuestJointsManager struct {
	db.SVirtualJointResourceBaseManager
}

func NewGuestJointsManager

func NewGuestJointsManager(dt interface{}, tableName string, keyword string, keywordPlural string, slave db.IVirtualModelManager) SGuestJointsManager

type SGuestManager

type SGuestManager struct {
	db.SVirtualResourceBaseManager
}
var GuestManager *SGuestManager

func (*SGuestManager) AllowListItems

func (manager *SGuestManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SGuestManager) CleanPendingDeleteServers

func (manager *SGuestManager) CleanPendingDeleteServers(ctx context.Context, userCred mcclient.TokenCredential)

func (*SGuestManager) ExtraSearchConditions

func (manager *SGuestManager) ExtraSearchConditions(ctx context.Context, q *sqlchemy.SQuery, like string) []sqlchemy.ICondition

func (*SGuestManager) FetchGuestById

func (manager *SGuestManager) FetchGuestById(guestId string) *SGuest

func (*SGuestManager) GetExportExtraKeys

func (manager *SGuestManager) GetExportExtraKeys(ctx context.Context, query jsonutils.JSONObject, rowMap map[string]string) *jsonutils.JSONDict

func (*SGuestManager) GetIpInProjectWithName

func (manager *SGuestManager) GetIpInProjectWithName(projectId, name string, isExitOnly bool) []string

func (*SGuestManager) GetSpecIdent

func (manager *SGuestManager) GetSpecIdent(spec *jsonutils.JSONDict) []string

func (*SGuestManager) ListItemExportKeys

func (manager *SGuestManager) ListItemExportKeys(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)

func (*SGuestManager) ListItemFilter

func (manager *SGuestManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)

func (*SGuestManager) OnCreateComplete

func (manager *SGuestManager) OnCreateComplete(ctx context.Context, items []db.IModel, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SGuestManager) TotalCount

func (manager *SGuestManager) TotalCount(
	projectId string, rangeObj db.IStandaloneModel,
	status []string, hypervisors []string,
	includeSystem bool, pendingDelete bool, hostType string,
) SGuestCountStat

func (*SGuestManager) ValidateCreateData

func (manager *SGuestManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SGuestNicCategory

type SGuestNicCategory struct {
	InternalNics []SGuestnetwork
	ExternalNics []SGuestnetwork
}

type SGuestcdrom

type SGuestcdrom struct {
	db.SModelBase

	Id            string    `width:"36" charset:"ascii" primary:"true"`   // = Column(VARCHAR(36, charset='ascii'), primary_key=True)
	ImageId       string    `width:"36" charset:"ascii" nullable:"true"`  // Column(VARCHAR(36, charset='ascii'), nullable=True)
	Name          string    `width:"64" charset:"ascii" nullable:"true"`  // Column(VARCHAR(64, charset='ascii'), nullable=True)
	Path          string    `width:"256" charset:"ascii" nullable:"true"` // Column(VARCHAR(256, charset='ascii'), nullable=True)
	Size          int       `nullable:"false" default:"0"`                // = Column(Integer, nullable=False, default=0)
	UpdatedAt     time.Time `nullable:"false" updated_at:"true" nullable:"false"`
	UpdateVersion int       `default:"0" nullable:"false" auto_version:"true"`
}

func (*SGuestcdrom) GetDetails

func (self *SGuestcdrom) GetDetails() string

type SGuestcdromManager

type SGuestcdromManager struct {
	db.SModelBaseManager
}
var GuestcdromManager *SGuestcdromManager

type SGuestdisk

type SGuestdisk struct {
	SGuestJointsBase

	DiskId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" key_index:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=False)

	ImagePath string `width:"256" charset:"ascii" nullable:"false" get:"user" create:"required"` // Column(VARCHAR(256, charset='ascii'), nullable=False)

	Driver    string `width:"32" charset:"ascii" nullable:"true" list:"user" update:"user"` // Column(VARCHAR(32, charset='ascii'), nullable=True)
	CacheMode string `width:"32" charset:"ascii" nullable:"true" list:"user" update:"user"` // Column(VARCHAR(32, charset='ascii'), nullable=True)
	AioMode   string `width:"32" charset:"ascii" nullable:"true" get:"user" update:"user"`  // Column(VARCHAR(32, charset='ascii'), nullable=True)

	Mountpoint string `width:"256" charset:"utf8" nullable:"true" get:"user"` // Column(VARCHAR(256, charset='utf8'), nullable=True)

	Index int8 `nullable:"false" default:"0" list:"user" update:"user"` // Column(TINYINT(4), nullable=False, default=0)
}

func (*SGuestdisk) AllowDeleteItem

func (self *SGuestdisk) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuestdisk) Delete

func (self *SGuestdisk) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SGuestdisk) Detach

func (self *SGuestdisk) Detach(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SGuestdisk) DoSave

func (self *SGuestdisk) DoSave(driver string, cache string, mountpoint string) error

func (*SGuestdisk) GetCustomizeColumns

func (self *SGuestdisk) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SGuestdisk) GetDetailedJson

func (self *SGuestdisk) GetDetailedJson() *jsonutils.JSONDict

func (*SGuestdisk) GetDetailedString

func (self *SGuestdisk) GetDetailedString() string

func (*SGuestdisk) GetDisk

func (self *SGuestdisk) GetDisk() *SDisk

func (*SGuestdisk) GetExtraDetails

func (self *SGuestdisk) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SGuestdisk) GetJsonDescAtHost

func (self *SGuestdisk) GetJsonDescAtHost(host *SHost) jsonutils.JSONObject

func (*SGuestdisk) Master

func (joint *SGuestdisk) Master() db.IStandaloneModel

func (*SGuestdisk) Slave

func (joint *SGuestdisk) Slave() db.IStandaloneModel

func (*SGuestdisk) ToDiskInfo

func (self *SGuestdisk) ToDiskInfo() DiskInfo

func (*SGuestdisk) ValidateUpdateData

func (self *SGuestdisk) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SGuestdiskManager

type SGuestdiskManager struct {
	SGuestJointsManager
}
var GuestdiskManager *SGuestdiskManager

func (*SGuestdiskManager) AllowCreateItem

func (manager *SGuestdiskManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

type SGuestnetwork

type SGuestnetwork struct {
	SGuestJointsBase

	NetworkId string `width:"36" charset:"ascii" nullable:"false" list:"user"  key_index:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=False)
	MacAddr   string `width:"32" charset:"ascii" nullable:"false" list:"user"`                   // Column(VARCHAR(32, charset='ascii'), nullable=False)
	IpAddr    string `width:"16" charset:"ascii" nullable:"false" list:"user"`                   // Column(VARCHAR(16, charset='ascii'), nullable=True)
	Ip6Addr   string `width:"64" charset:"ascii" nullable:"true" list:"user"`                    // Column(VARCHAR(64, charset='ascii'), nullable=True)
	Driver    string `width:"16" charset:"ascii" nullable:"true" list:"user" update:"user"`      // Column(VARCHAR(16, charset='ascii'), nullable=True)
	BwLimit   int    `nullable:"false" default:"0" list:"user"`                                  // Column(Integer, nullable=False, default=0) # Mbps
	Index     int8   `nullable:"false" default:"0" list:"user" update:"user"`                    // Column(TINYINT, nullable=False, default=0)
	Virtual   bool   `default:"false" list:"user"`                                               // Column(Boolean, default=False)
	Ifname    string `width:"16" charset:"ascii" nullable:"true" list:"user" update:"user"`      // Column(VARCHAR(16, charset='ascii'), nullable=True)
}

func (*SGuestnetwork) AllowDeleteItem

func (gn *SGuestnetwork) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuestnetwork) Delete

func (self *SGuestnetwork) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SGuestnetwork) Detach

func (self *SGuestnetwork) Detach(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SGuestnetwork) GetCustomizeColumns

func (self *SGuestnetwork) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SGuestnetwork) GetDetailedString

func (self *SGuestnetwork) GetDetailedString() string

func (*SGuestnetwork) GetExtraDetails

func (self *SGuestnetwork) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SGuestnetwork) GetFreeIfname

func (self *SGuestnetwork) GetFreeIfname(network *SNetwork, ifTable map[string]bool) string

func (*SGuestnetwork) GetGuest

func (self *SGuestnetwork) GetGuest() *SGuest

func (*SGuestnetwork) GetIfname

func (self *SGuestnetwork) GetIfname() string

func (*SGuestnetwork) GetJsonDescAtHost

func (self *SGuestnetwork) GetJsonDescAtHost(host *SHost) jsonutils.JSONObject

func (*SGuestnetwork) GetNetwork

func (gn *SGuestnetwork) GetNetwork() *SNetwork

func (*SGuestnetwork) GetVirtualIPs

func (self *SGuestnetwork) GetVirtualIPs() []string

func (*SGuestnetwork) IsAllocated

func (self *SGuestnetwork) IsAllocated() bool

func (*SGuestnetwork) IsExit

func (self *SGuestnetwork) IsExit() bool

func (*SGuestnetwork) LogDetachEvent

func (self *SGuestnetwork) LogDetachEvent(userCred mcclient.TokenCredential, guest *SGuest, network *SNetwork)

func (*SGuestnetwork) Master

func (joint *SGuestnetwork) Master() db.IStandaloneModel

func (*SGuestnetwork) Slave

func (joint *SGuestnetwork) Slave() db.IStandaloneModel

func (*SGuestnetwork) ValidateUpdateData

func (self *SGuestnetwork) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SGuestnetworkManager

type SGuestnetworkManager struct {
	SGuestJointsManager
}
var GuestnetworkManager *SGuestnetworkManager

func (*SGuestnetworkManager) AllowCreateItem

func (manager *SGuestnetworkManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SGuestnetworkManager) DeleteGuestNics

func (manager *SGuestnetworkManager) DeleteGuestNics(ctx context.Context, guest *SGuest, userCred mcclient.TokenCredential, network *SNetwork, reserve bool) error

func (*SGuestnetworkManager) GenerateMac

func (manager *SGuestnetworkManager) GenerateMac(netId string, suggestion string) string

func (*SGuestnetworkManager) GetGuestByAddress

func (manager *SGuestnetworkManager) GetGuestByAddress(address string) *SGuest

type SHost

type SHost struct {
	db.SEnabledStatusStandaloneResourceBase
	SInfrastructure
	SManagedResourceBase

	Rack  string `width:"16" charset:"ascii" nullable:"true" get:"admin" update:"admin" create:"admin_optional"` // Column(VARCHAR(16, charset='ascii'), nullable=True)
	Slots string `width:"16" charset:"ascii" nullable:"true" get:"admin" update:"admin" create:"admin_optional"` // Column(VARCHAR(16, charset='ascii'), nullable=True)

	AccessMac  string `width:"32" charset:"ascii" nullable:"false" index:"true" list:"admin" update:"admin" create:"admin_required"` // Column(VARCHAR(32, charset='ascii'), nullable=False, index=True)
	AccessIp   string `width:"16" charset:"ascii" nullable:"true" list:"admin" update:"admin" create:"admin_optional"`               // Column(VARCHAR(16, charset='ascii'), nullable=True)
	ManagerUri string `width:"256" charset:"ascii" nullable:"true" list:"admin" update:"admin" create:"admin_optional"`              // Column(VARCHAR(256, charset='ascii'), nullable=True)

	SysInfo jsonutils.JSONObject `nullable:"true" search:"admin" get:"admin" update:"admin" create:"admin_optional"`               // Column(JSONEncodedDict, nullable=True)
	SN      string               `width:"128" charset:"ascii" nullable:"true" list:"admin" update:"admin" create:"admin_optional"` // Column(VARCHAR(128, charset='ascii'), nullable=True)

	CpuCount    int8    `nullable:"true" list:"admin" update:"admin" create:"admin_optional"`                           // Column(TINYINT, nullable=True) # cpu count
	NodeCount   int8    `nullable:"true" list:"admin" update:"admin" create:"admin_optional"`                           // Column(TINYINT, nullable=True)
	CpuDesc     string  `width:"64" charset:"ascii" nullable:"true" get:"admin" update:"admin" create:"admin_optional"` // Column(VARCHAR(64, charset='ascii'), nullable=True)
	CpuMhz      int     `nullable:"true" get:"admin" update:"admin" create:"admin_optional"`                            // Column(Integer, nullable=True) # cpu MHz
	CpuCache    int     `nullable:"true" get:"admin" update:"admin" create:"admin_optional"`                            // Column(Integer, nullable=True) # cpu Cache in KB
	CpuReserved int8    `nullable:"true" default:"0" list:"admin" update:"admin" create:"admin_optional"`               // Column(TINYINT, nullable=True, default=0)
	CpuCmtbound float32 `nullable:"true" list:"admin" update:"admin" create:"admin_optional"`                           // = Column(Float, nullable=True)

	MemSize     int     `nullable:"true" list:"admin" update:"admin" create:"admin_optional"`             // Column(Integer, nullable=True) # memory size in MB
	MemReserved int     `nullable:"true" default:"0" list:"admin" update:"admin" create:"admin_optional"` // Column(Integer, nullable=True, default=0) # memory reserved in MB
	MemCmtbound float32 `nullable:"true" update:"admin" create:"admin_optional"`                          // = Column(Float, nullable=True)

	StorageSize   int                  `nullable:"true" list:"admin" update:"admin" create:"admin_optional"`                            // Column(Integer, nullable=True) # storage size in MB
	StorageType   string               `width:"20" charset:"ascii" nullable:"true" list:"admin" update:"admin" create:"admin_optional"` // Column(VARCHAR(20, charset='ascii'), nullable=True)
	StorageDriver string               `width:"20" charset:"ascii" nullable:"true" update:"admin" create:"admin_optional"`              // Column(VARCHAR(20, charset='ascii'), nullable=True)
	StorageInfo   jsonutils.JSONObject `nullable:"true" get:"admin" update:"admin" create:"admin_optional"`                             // Column(JSONEncodedDict, nullable=True)

	IpmiInfo jsonutils.JSONObject `nullable:"true" get:"admin" update:"admin" create:"admin_optional"` // Column(JSONEncodedDict, nullable=True)

	// Status  string = Column(VARCHAR(16, charset='ascii'), nullable=False, default=baremetalstatus.INIT) # status
	HostStatus string `width:"16" charset:"ascii" nullable:"false" default:"offline" list:"admin"` // Column(VARCHAR(16, charset='ascii'), nullable=False, server_default=HOST_OFFLINE, default=HOST_OFFLINE)

	ZoneId string `width:"128" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"` // Column(VARCHAR(ID_LENGTH, charset='ascii'), nullable=False)

	HostType string `width:"36" charset:"ascii" nullable:"false" list:"admin" update:"admin" create:"admin_required"` // Column(VARCHAR(36, charset='ascii'), nullable=False)

	Version string `width:"64" charset:"ascii" list:"admin" update:"admin" create:"admin_optional"` // Column(VARCHAR(64, charset='ascii'))

	IsBaremetal bool `nullable:"true" default:"false" list:"admin" update:"true" create:"admin_optional"` // Column(Boolean, nullable=True, default=False)

	IsMaintenance bool `nullable:"true" default:"false" list:"admin"` // Column(Boolean, nullable=True, default=False)

	LastPingAt time.Time ``
}

func (*SHost) AllowGetDetailsIpmi

func (self *SHost) AllowGetDetailsIpmi(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SHost) AllowGetDetailsVnc

func (self *SHost) AllowGetDetailsVnc(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SHost) AllowPerformAddNetif

func (self *SHost) AllowPerformAddNetif(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject) bool

func (*SHost) AllowPerformCacheImage

func (self *SHost) AllowPerformCacheImage(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject) bool

func (*SHost) AllowPerformConvertHypervisor

func (self *SHost) AllowPerformConvertHypervisor(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject) bool

func (*SHost) AllowPerformDisable

func (self *SHost) AllowPerformDisable(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject) bool

func (*SHost) AllowPerformDisableNetif

func (self *SHost) AllowPerformDisableNetif(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject) bool

func (*SHost) AllowPerformEnableNetif

func (self *SHost) AllowPerformEnableNetif(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject) bool

func (*SHost) AllowPerformMaintenance

func (self *SHost) AllowPerformMaintenance(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject) bool

func (*SHost) AllowPerformOffline

func (self *SHost) AllowPerformOffline(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject) bool

func (*SHost) AllowPerformOnline

func (self *SHost) AllowPerformOnline(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject) bool

func (*SHost) AllowPerformPing

func (self *SHost) AllowPerformPing(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject) bool

func (*SHost) AllowPerformPrepare

func (self *SHost) AllowPerformPrepare(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject) bool

func (*SHost) AllowPerformRemoveAllNetifs

func (self *SHost) AllowPerformRemoveAllNetifs(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject) bool

func (*SHost) AllowPerformRemoveNetif

func (self *SHost) AllowPerformRemoveNetif(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject) bool

func (*SHost) AllowPerformReset

func (self *SHost) AllowPerformReset(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject) bool

func (*SHost) AllowPerformStart

func (self *SHost) AllowPerformStart(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject) bool

func (*SHost) AllowPerformStop

func (self *SHost) AllowPerformStop(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject) bool

func (*SHost) AllowPerformSyncstatus

func (self *SHost) AllowPerformSyncstatus(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject) bool

func (*SHost) AllowPerformUndoConvert

func (self *SHost) AllowPerformUndoConvert(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject) bool

func (*SHost) AllowPerformUnmaintenance

func (self *SHost) AllowPerformUnmaintenance(ctx context.Context,
	userCred mcclient.TokenCredential,
	query jsonutils.JSONObject,
	data jsonutils.JSONObject) bool

func (*SHost) Attach2Network

func (self *SHost) Attach2Network(ctx context.Context, userCred mcclient.TokenCredential, netif *SNetInterface, net *SNetwork, ipAddr, allocDir string, reserved, requireDesignatedIp bool) error

func (*SHost) Attach2Storage

func (self *SHost) Attach2Storage(ctx context.Context, userCred mcclient.TokenCredential, storage *SStorage, mountPoint string) error

func (*SHost) Attach2Wire

func (self *SHost) Attach2Wire(ctx context.Context, userCred mcclient.TokenCredential, wire *SWire) error

func (*SHost) BaremetalSyncRequest

func (self *SHost) BaremetalSyncRequest(ctx context.Context, method, url string, headers http.Header, body *jsonutils.JSONDict) (jsonutils.JSONObject, error)

func (*SHost) ClearSchedDescCache

func (self *SHost) ClearSchedDescCache() error

func (*SHost) CustomizeDelete

func (self *SHost) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SHost) Delete

func (self *SHost) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SHost) DeleteBaremetalnetwork

func (self *SHost) DeleteBaremetalnetwork(ctx context.Context, userCred mcclient.TokenCredential, bn *SHostnetwork, reserve bool)

func (*SHost) DisableNetif

func (self *SHost) DisableNetif(ctx context.Context, userCred mcclient.TokenCredential, netif *SNetInterface, reserve bool) error

func (*SHost) EnableNetif

func (self *SHost) EnableNetif(ctx context.Context, userCred mcclient.TokenCredential, netif *SNetInterface, network, ipAddr, allocDir string, reserve, requireDesignatedIp bool) error

func (*SHost) FetchIpmiInfo

func (self *SHost) FetchIpmiInfo(data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

func (*SHost) GetAdminNetInterface

func (self *SHost) GetAdminNetInterface() *SNetInterface

func (*SHost) GetAttach2Network

func (self *SHost) GetAttach2Network(network *SNetwork) *SHostnetwork

func (*SHost) GetAttachedStorageCapacity

func (self *SHost) GetAttachedStorageCapacity() SStorageCapacity

func (*SHost) GetAttachedStorages

func (self *SHost) GetAttachedStorages(storageType string) []SStorage

func (*SHost) GetBaremetalServer

func (self *SHost) GetBaremetalServer() *SGuest

func (*SHost) GetBaremetalnetworks

func (self *SHost) GetBaremetalnetworks() []SHostnetwork

func (*SHost) GetBaremetalnetworksQuery

func (self *SHost) GetBaremetalnetworksQuery() *sqlchemy.SQuery

func (*SHost) GetBaremetalstorage

func (self *SHost) GetBaremetalstorage() *SHoststorage

func (*SHost) GetCPUOvercommitBound

func (self *SHost) GetCPUOvercommitBound() float32

func (*SHost) GetCpuCount

func (self *SHost) GetCpuCount() int

func (*SHost) GetCustomizeColumns

func (self *SHost) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SHost) GetDetailsIpmi

func (self *SHost) GetDetailsIpmi(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SHost) GetDetailsVnc

func (self *SHost) GetDetailsVnc(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SHost) GetDriverWithDefault

func (self *SHost) GetDriverWithDefault() IHostDriver

func (*SHost) GetExtraDetails

func (self *SHost) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SHost) GetFetchUrl

func (self *SHost) GetFetchUrl() string

func (*SHost) GetGuestCount

func (self *SHost) GetGuestCount() int

func (*SHost) GetGuests

func (self *SHost) GetGuests() []SGuest

func (*SHost) GetGuestsQuery

func (self *SHost) GetGuestsQuery() *sqlchemy.SQuery

func (*SHost) GetHardwareSpecification

func (self *SHost) GetHardwareSpecification() *jsonutils.JSONDict

func (*SHost) GetHostDriver

func (self *SHost) GetHostDriver() IHostDriver

func (*SHost) GetHostschedtags

func (self *SHost) GetHostschedtags() []SHostschedtag

func (*SHost) GetHoststorageOfId

func (self *SHost) GetHoststorageOfId(storageId string) *SHoststorage

func (*SHost) GetHoststorages

func (self *SHost) GetHoststorages() []SHoststorage

func (*SHost) GetHoststoragesQuery

func (self *SHost) GetHoststoragesQuery() *sqlchemy.SQuery

func (*SHost) GetHostwires

func (self *SHost) GetHostwires() []SHostwire

func (*SHost) GetIHost

func (self *SHost) GetIHost() (cloudprovider.ICloudHost, error)

func (*SHost) GetLeastUsedStorage

func (self *SHost) GetLeastUsedStorage(backend string) *SStorage

func (*SHost) GetLocalStoragecache

func (self *SHost) GetLocalStoragecache() *SStoragecache

func (*SHost) GetMasterHostwire

func (self *SHost) GetMasterHostwire() *SHostwire

func (*SHost) GetMasterWire

func (self *SHost) GetMasterWire() *SWire

func (*SHost) GetMemSize

func (self *SHost) GetMemSize() int

func (*SHost) GetMemoryOvercommitBound

func (self *SHost) GetMemoryOvercommitBound() float32

func (*SHost) GetNetInterface

func (self *SHost) GetNetInterface(mac string) *SNetInterface

func (*SHost) GetNetInterfaces

func (self *SHost) GetNetInterfaces() []SNetInterface

func (*SHost) GetNetifName

func (self *SHost) GetNetifName(netif *SNetInterface) string

func (*SHost) GetNetifsOnWire

func (self *SHost) GetNetifsOnWire(wire *SWire) []SNetInterface

func (*SHost) GetNetinterfaceWithNetworkAndCredential

func (self *SHost) GetNetinterfaceWithNetworkAndCredential(netId string, userCred mcclient.TokenCredential, reserved bool) (*SNetInterface, *SNetwork)

func (*SHost) GetNetworkWithIdAndCredential

func (self *SHost) GetNetworkWithIdAndCredential(netId string, userCred mcclient.TokenCredential, reserved bool) (*SNetwork, error)

func (*SHost) GetNonsystemGuestCount

func (self *SHost) GetNonsystemGuestCount() int

func (*SHost) GetRegion

func (self *SHost) GetRegion() *SCloudregion

func (*SHost) GetRunningGuestCount

func (self *SHost) GetRunningGuestCount() int

func (*SHost) GetSpec

func (self *SHost) GetSpec(statusCheck bool) *jsonutils.JSONDict

func (*SHost) GetStorageCount

func (self *SHost) GetStorageCount() int

func (*SHost) GetVirtualCPUCount

func (self *SHost) GetVirtualCPUCount() float32

func (*SHost) GetVirtualMemorySize

func (self *SHost) GetVirtualMemorySize() float32

func (*SHost) GetWireCount

func (self *SHost) GetWireCount() int

func (*SHost) GetWiresQuery

func (self *SHost) GetWiresQuery() *sqlchemy.SQuery

func (*SHost) GetZone

func (self *SHost) GetZone() *SZone

func (*SHost) InitializedGuestStart

func (self *SHost) InitializedGuestStart(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest) error

func (*SHost) InitializedGuestStop

func (self *SHost) InitializedGuestStop(ctx context.Context, userCred mcclient.TokenCredential, guest *SGuest) error

func (*SHost) IsBaremetalAgentReady

func (self *SHost) IsBaremetalAgentReady() bool

func (*SHost) PerformAddNetif

func (self *SHost) PerformAddNetif(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SHost) PerformCacheImage

func (self *SHost) PerformCacheImage(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SHost) PerformConvertHypervisor

func (self *SHost) PerformConvertHypervisor(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SHost) PerformDisable

func (self *SHost) PerformDisable(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SHost) PerformDisableNetif

func (self *SHost) PerformDisableNetif(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SHost) PerformEnableNetif

func (self *SHost) PerformEnableNetif(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SHost) PerformMaintenance

func (self *SHost) PerformMaintenance(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SHost) PerformOffline

func (self *SHost) PerformOffline(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SHost) PerformOnline

func (self *SHost) PerformOnline(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SHost) PerformPing

func (*SHost) PerformPrepare

func (self *SHost) PerformPrepare(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SHost) PerformRemoveAllNetifs

func (self *SHost) PerformRemoveAllNetifs(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SHost) PerformRemoveNetif

func (self *SHost) PerformRemoveNetif(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SHost) PerformReset

func (self *SHost) PerformReset(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SHost) PerformStart

func (self *SHost) PerformStart(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject,
	data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SHost) PerformStop

func (*SHost) PerformSyncstatus

func (self *SHost) PerformSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SHost) PerformUndoConvert

func (self *SHost) PerformUndoConvert(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SHost) PerformUnmaintenance

func (self *SHost) PerformUnmaintenance(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SHost) PostCreate

func (self *SHost) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SHost) RealDelete

func (self *SHost) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SHost) RemoveNetif

func (self *SHost) RemoveNetif(ctx context.Context, userCred mcclient.TokenCredential, netif *SNetInterface, reserve bool) error

func (*SHost) Request

func (self *SHost) Request(userCred mcclient.TokenCredential, method string, url string, headers http.Header, body jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SHost) StartBaremetalUnmaintenanceTask

func (self *SHost) StartBaremetalUnmaintenanceTask(ctx context.Context, userCred mcclient.TokenCredential, startGuest bool, action string) error

func (*SHost) StartDeleteBaremetalTask

func (self *SHost) StartDeleteBaremetalTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SHost) StartImageCacheTask

func (self *SHost) StartImageCacheTask(ctx context.Context, userCred mcclient.TokenCredential, imageId string, isForce bool) error

func (*SHost) StartPrepareTask

func (self *SHost) StartPrepareTask(ctx context.Context, userCred mcclient.TokenCredential, onfinish, parentTaskId string) error

func (*SHost) StartSyncAllGuestsStatusTask

func (self *SHost) StartSyncAllGuestsStatusTask(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SHost) StartSyncstatus

func (self *SHost) StartSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SHost) SyncAttachedStorageStatus

func (self *SHost) SyncAttachedStorageStatus()

func (*SHost) SyncHostStorages

func (self *SHost) SyncHostStorages(ctx context.Context, userCred mcclient.TokenCredential, storages []cloudprovider.ICloudStorage) compare.SyncResult

func (*SHost) SyncHostVMs

func (self *SHost) SyncHostVMs(ctx context.Context, userCred mcclient.TokenCredential, vms []cloudprovider.ICloudVM, projectId string, projectSync bool) ([]SGuest, []cloudprovider.ICloudVM, compare.SyncResult)

func (*SHost) SyncHostWires

func (self *SHost) SyncHostWires(ctx context.Context, userCred mcclient.TokenCredential, wires []cloudprovider.ICloudWire) compare.SyncResult

func (*SHost) UpdateDiskConfig

func (self *SHost) UpdateDiskConfig(layouts []baremetal.Layout) error

func (*SHost) UpdateDnsRecord

func (self *SHost) UpdateDnsRecord(netif *SNetInterface, isAdd bool)

func (*SHost) UpdateDnsRecords

func (self *SHost) UpdateDnsRecords(isAdd bool)

func (*SHost) ValidateDeleteCondition

func (self *SHost) ValidateDeleteCondition(ctx context.Context) error

func (*SHost) ValidateUpdateData

func (self *SHost) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SHostGuestResourceUsage

type SHostGuestResourceUsage struct {
	GuestCount     int
	GuestVcpuCount int
	GuestVmemSize  int
}

type SHostJointsBase

type SHostJointsBase struct {
	db.SJointResourceBase
}

func (*SHostJointsBase) AllowDeleteItem

func (self *SHostJointsBase) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SHostJointsBase) AllowGetDetails

func (self *SHostJointsBase) AllowGetDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SHostJointsBase) AllowUpdateItem

func (self *SHostJointsBase) AllowUpdateItem(ctx context.Context, userCred mcclient.TokenCredential) bool

type SHostJointsManager

type SHostJointsManager struct {
	db.SJointResourceBaseManager
}

func NewHostJointsManager

func NewHostJointsManager(dt interface{}, tableName string, keyword string, keywordPlural string, slave db.IStandaloneModelManager) SHostJointsManager

func (*SHostJointsManager) AllowAttach

func (manager *SHostJointsManager) AllowAttach(ctx context.Context, userCred mcclient.TokenCredential, master db.IStandaloneModel, slave db.IStandaloneModel) bool

func (*SHostJointsManager) AllowCreateItem

func (manager *SHostJointsManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SHostJointsManager) AllowListDescendent

func (manager *SHostJointsManager) AllowListDescendent(ctx context.Context, userCred mcclient.TokenCredential, model db.IStandaloneModel, query jsonutils.JSONObject) bool

func (*SHostJointsManager) AllowListItems

func (manager *SHostJointsManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

type SHostManager

var HostManager *SHostManager

func (*SHostManager) AllowCreateItem

func (manager *SHostManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SHostManager) AllowGetPropertyBmStartRegisterScript

func (self *SHostManager) AllowGetPropertyBmStartRegisterScript(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SHostManager) ClearAllSchedDescCache

func (maanger *SHostManager) ClearAllSchedDescCache() error

func (*SHostManager) ClearSchedDescCache

func (maanger *SHostManager) ClearSchedDescCache(hostId string) error

func (*SHostManager) FetchHostById

func (manager *SHostManager) FetchHostById(hostId string) *SHost

func (*SHostManager) GetContextManager

func (manager *SHostManager) GetContextManager() []db.IModelManager

func (*SHostManager) GetHostsByManagerAndRegion

func (manager *SHostManager) GetHostsByManagerAndRegion(managerId string, regionId string) []SHost

func (*SHostManager) GetPropertyBmStartRegisterScript

func (self *SHostManager) GetPropertyBmStartRegisterScript(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SHostManager) GetSpecIdent

func (manager *SHostManager) GetSpecIdent(spec *jsonutils.JSONDict) []string

func (*SHostManager) ListItemFilter

func (manager *SHostManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)

func (*SHostManager) SyncHosts

func (manager *SHostManager) SyncHosts(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, zone *SZone, hosts []cloudprovider.ICloudHost) ([]SHost, []cloudprovider.ICloudHost, compare.SyncResult)

func (*SHostManager) TotalCount

func (manager *SHostManager) TotalCount(
	userCred mcclient.TokenCredential,
	rangeObj db.IStandaloneModel,
	hostStatus, status string,
	hostTypes []string,
	enabled, isBaremetal tristate.TriState,
) HostsCountStat

func (*SHostManager) ValidateCreateData

func (manager *SHostManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

func (*SHostManager) ValidateSizeParams

func (manager *SHostManager) ValidateSizeParams(data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SHostnetwork

type SHostnetwork struct {
	SHostJointsBase

	BaremetalId string `width:"36" charset:"ascii" nullable:"false" list:"admin" key_index:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=False)
	NetworkId   string `width:"36" charset:"ascii" nullable:"false" list:"admin" key_index:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=False)
	IpAddr      string `width:"16" charset:"ascii" list:"admin"`                                   // Column(VARCHAR(16, charset='ascii'))
	MacAddr     string `width:"18" charset:"ascii" list:"admin"`                                   // Column(VARCHAR(18, charset='ascii'))
}

func (*SHostnetwork) Delete

func (bn *SHostnetwork) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SHostnetwork) Detach

func (bn *SHostnetwork) Detach(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SHostnetwork) GetCustomizeColumns

func (bn *SHostnetwork) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SHostnetwork) GetExtraDetails

func (bn *SHostnetwork) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SHostnetwork) GetHost

func (bn *SHostnetwork) GetHost() *SHost

func (*SHostnetwork) GetNetInterface

func (bn *SHostnetwork) GetNetInterface() *SNetInterface

func (*SHostnetwork) GetNetwork

func (bn *SHostnetwork) GetNetwork() *SNetwork

func (*SHostnetwork) Master

func (bn *SHostnetwork) Master() db.IStandaloneModel

func (*SHostnetwork) Slave

func (bn *SHostnetwork) Slave() db.IStandaloneModel

type SHostnetworkManager

type SHostnetworkManager struct {
	SHostJointsManager
}
var HostnetworkManager *SHostnetworkManager

func (*SHostnetworkManager) GetHostByAddress

func (man *SHostnetworkManager) GetHostByAddress(addr string) *SHost

func (*SHostnetworkManager) GetHostNetworkByAddress

func (man *SHostnetworkManager) GetHostNetworkByAddress(addr string) *SHostnetwork

func (*SHostnetworkManager) GetNetworkByAddress

func (man *SHostnetworkManager) GetNetworkByAddress(addr string) *SNetwork

func (*SHostnetworkManager) QueryByAddress

func (man *SHostnetworkManager) QueryByAddress(addr string) *sqlchemy.SQuery

type SHostschedtag

type SHostschedtag struct {
	SHostJointsBase

	HostId     string `width:"36" charset:"ascii" nullable:"false" list:"admin" create:"admin_required" key_index:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=False)
	SchedtagId string `width:"36" charset:"ascii" nullable:"false" list:"admin" create:"admin_required" key_index:"true"` // =Column(VARCHAR(36, charset='ascii'), nullable=False)
}

func (*SHostschedtag) Delete

func (self *SHostschedtag) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SHostschedtag) Detach

func (self *SHostschedtag) Detach(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SHostschedtag) GetCustomizeColumns

func (self *SHostschedtag) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SHostschedtag) GetExtraDetails

func (self *SHostschedtag) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SHostschedtag) Master

func (joint *SHostschedtag) Master() db.IStandaloneModel

func (*SHostschedtag) Slave

func (joint *SHostschedtag) Slave() db.IStandaloneModel

type SHostschedtagManager

type SHostschedtagManager struct {
	SHostJointsManager
}
var HostschedtagManager *SHostschedtagManager

type SHoststorage

type SHoststorage struct {
	SHostJointsBase

	MountPoint string `width:"256" charset:"ascii" nullable:"false" list:"admin" update:"admin" create:"required"` // Column(VARCHAR(256, charset='ascii'), nullable=False)

	HostId    string `width:"36" charset:"ascii" nullable:"false" list:"admin" key_index:"true" create:"required"` // Column(VARCHAR(36, charset='ascii'), nullable=False)
	StorageId string `width:"36" charset:"ascii" nullable:"false" list:"admin" key_index:"true" create:"required"` // Column(VARCHAR(36, charset='ascii'), nullable=False)

	Config       *jsonutils.JSONArray `nullable:"true" get:"admin"`  // Column(JSONEncodedDict, nullable=True)
	RealCapacity int                  `nullable:"true" list:"admin"` // Column(Integer, nullable=True)
}

func (*SHoststorage) Delete

func (self *SHoststorage) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SHoststorage) Detach

func (self *SHoststorage) Detach(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SHoststorage) GetCustomizeColumns

func (self *SHoststorage) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SHoststorage) GetExtraDetails

func (self *SHoststorage) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SHoststorage) GetGuestDiskCount

func (self *SHoststorage) GetGuestDiskCount() int

func (*SHoststorage) GetHost

func (self *SHoststorage) GetHost() *SHost

func (*SHoststorage) GetStorage

func (self *SHoststorage) GetStorage() *SStorage

func (*SHoststorage) Master

func (joint *SHoststorage) Master() db.IStandaloneModel

func (*SHoststorage) Slave

func (joint *SHoststorage) Slave() db.IStandaloneModel

func (*SHoststorage) ValidateDeleteCondition

func (self *SHoststorage) ValidateDeleteCondition(ctx context.Context) error

type SHoststorageManager

type SHoststorageManager struct {
	SHostJointsManager
}
var HoststorageManager *SHoststorageManager

func (*SHoststorageManager) GetStorages

func (manager *SHoststorageManager) GetStorages(hostId string) ([]SHoststorage, error)

func (*SHoststorageManager) ValidateCreateData

func (manager *SHoststorageManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SHostwire

type SHostwire struct {
	SHostJointsBase

	Bridge    string `width:"16" charset:"ascii" nullable:"false" list:"admin" update:"admin" create:"admin_required"` // Column(VARCHAR(16, charset='ascii'), nullable=False)
	Interface string `width:"16" charset:"ascii" nullable:"false" list:"admin" update:"admin" create:"admin_required"` // Column(VARCHAR(16, charset='ascii'), nullable=False)
	IsMaster  bool   `nullable:"true" default:"false" update:"admin" create:"admin_optional"`                          // Column(Boolean, nullable=True, default=False)
	MacAddr   string `width:"18" charset:"ascii" list:"admin" update:"admin" create:"admin_required"`                  // Column(VARCHAR(18, charset='ascii'))

	HostId string `width:"128" charset:"ascii" nullable:"false" list:"admin" create:"admin_required" key_index:"true"` // = Column(VARCHAR(ID_LENGTH, charset='ascii'), nullable=False)
	WireId string `width:"128" charset:"ascii" nullable:"false" list:"admin" create:"admin_required" key_index:"true"` // Column(VARCHAR(ID_LENGTH, charset='ascii'), nullable=False)
}

func (*SHostwire) Delete

func (self *SHostwire) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SHostwire) Detach

func (self *SHostwire) Detach(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SHostwire) GetCustomizeColumns

func (self *SHostwire) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SHostwire) GetExtraDetails

func (self *SHostwire) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SHostwire) GetGuestnicsCount

func (self *SHostwire) GetGuestnicsCount() int

func (*SHostwire) GetHost

func (hw *SHostwire) GetHost() *SHost

func (*SHostwire) GetWire

func (hw *SHostwire) GetWire() *SWire

func (*SHostwire) Master

func (joint *SHostwire) Master() db.IStandaloneModel

func (*SHostwire) Slave

func (joint *SHostwire) Slave() db.IStandaloneModel

func (*SHostwire) ValidateDeleteCondition

func (self *SHostwire) ValidateDeleteCondition(ctx context.Context) error

type SHostwireManager

type SHostwireManager struct {
	SHostJointsManager
}
var HostwireManager *SHostwireManager

type SImage

type SImage struct {
	Checksum        string
	ContainerFormat string
	CreatedAt       time.Time
	Deleted         bool
	DiskFormat      string
	Id              string
	IsPublic        bool
	MinDisk         int
	MinRam          int
	Name            string
	Owner           string
	Properties      map[string]string
	Protected       bool
	Size            int
	Status          string
	UpdatedAt       time.Time
}

type SInfrastructure

type SInfrastructure struct {
}

func (*SInfrastructure) AllowDeleteItem

func (self *SInfrastructure) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SInfrastructure) AllowGetDetails

func (self *SInfrastructure) AllowGetDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SInfrastructure) AllowUpdateItem

func (self *SInfrastructure) AllowUpdateItem(ctx context.Context, userCred mcclient.TokenCredential) bool

type SInfrastructureManager

type SInfrastructureManager struct {
}

func (*SInfrastructureManager) AllowCreateItem

func (self *SInfrastructureManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SInfrastructureManager) AllowListItems

func (self *SInfrastructureManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

type SIsolatedDevice

type SIsolatedDevice struct {
	db.SStandaloneResourceBase

	HostId string `width:"36" charset:"ascii" nullable:"false" default:"" index:"true" list:"admin" create:"admin_required"` // Column(VARCHAR(36, charset='ascii'), nullable=False, default=”, server_default=”, index=True)

	// # PCI / GPU-HPC / GPU-VGA / USB / NIC
	DevType string `width:"16" charset:"ascii" nullable:"false" default:"" index:"true" list:"admin" create:"admin_required"` // Column(VARCHAR(16, charset='ascii'), nullable=False, default=”, server_default=”, index=True)

	// # Specific device name read from lspci command, e.g. `Tesla K40m` ...
	Model string `width:"32" charset:"ascii" nullable:"false" default:"" index:"true" list:"admin" create:"admin_required"` // Column(VARCHAR(32, charset='ascii'), nullable=False, default=”, server_default=”, index=True)

	GuestId string `width:"36" charset:"ascii" nullable:"true" index:"true" list:"admin"` // Column(VARCHAR(36, charset='ascii'), nullable=True, index=True)

	// # pci address of `Bus:Device.Function` format, or usb bus address of `bus.addr`
	Addr string `width:"16" charset:"ascii" nullable:"true" list:"admin" update:"admin" create:"admin_optional"` // Column(VARCHAR(16, charset='ascii'), nullable=True)

	VendorDeviceId string `width:"16" charset:"ascii" nullable:"true" list:"admin" create:"admin_optional"` // Column(VARCHAR(16, charset='ascii'), nullable=True)
}

func (*SIsolatedDevice) ClearSchedDescCache

func (self *SIsolatedDevice) ClearSchedDescCache() error

func (*SIsolatedDevice) CustomizeDelete

func (self *SIsolatedDevice) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SIsolatedDevice) GetCustomizeColumns

func (self *SIsolatedDevice) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SIsolatedDevice) GetExtraDetails

func (self *SIsolatedDevice) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SIsolatedDevice) GetShortDesc

func (self *SIsolatedDevice) GetShortDesc() *jsonutils.JSONDict

func (*SIsolatedDevice) GetSpec

func (self *SIsolatedDevice) GetSpec(statusCheck bool) *jsonutils.JSONDict

func (*SIsolatedDevice) RealDelete

func (self *SIsolatedDevice) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SIsolatedDevice) ValidateDeleteCondition

func (self *SIsolatedDevice) ValidateDeleteCondition(ctx context.Context) error

type SIsolatedDeviceConfig

type SIsolatedDeviceConfig struct {
	Id      string
	DevType string
	Model   string
	Vendor  string
}

type SIsolatedDeviceManager

type SIsolatedDeviceManager struct {
	db.SStandaloneResourceBaseManager
}
var IsolatedDeviceManager *SIsolatedDeviceManager

func (*SIsolatedDeviceManager) AllowCreateItem

func (manager *SIsolatedDeviceManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SIsolatedDeviceManager) AllowListItems

func (manager *SIsolatedDeviceManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SIsolatedDeviceManager) DeleteDevicesByHost

func (manager *SIsolatedDeviceManager) DeleteDevicesByHost(ctx context.Context, userCred mcclient.TokenCredential, host *SHost)

func (*SIsolatedDeviceManager) ExtraSearchConditions

func (manager *SIsolatedDeviceManager) ExtraSearchConditions(ctx context.Context, q *sqlchemy.SQuery, like string) []sqlchemy.ICondition

func (*SIsolatedDeviceManager) FindByHost

func (manager *SIsolatedDeviceManager) FindByHost(id string) []SIsolatedDevice

func (*SIsolatedDeviceManager) FindByHosts

func (manager *SIsolatedDeviceManager) FindByHosts(ids []string) []SIsolatedDevice

func (*SIsolatedDeviceManager) FindUnusedByModels

func (manager *SIsolatedDeviceManager) FindUnusedByModels(models []string) ([]SIsolatedDevice, error)

func (*SIsolatedDeviceManager) FindUnusedGpusOnHost

func (manager *SIsolatedDeviceManager) FindUnusedGpusOnHost(hostId string) ([]SIsolatedDevice, error)

func (*SIsolatedDeviceManager) GetSpecIdent

func (man *SIsolatedDeviceManager) GetSpecIdent(spec *jsonutils.JSONDict) []string

func (*SIsolatedDeviceManager) ListItemFilter

func (manager *SIsolatedDeviceManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)

func (*SIsolatedDeviceManager) ReleaseDevicesOfGuest

func (manager *SIsolatedDeviceManager) ReleaseDevicesOfGuest(guest *SGuest, userCred mcclient.TokenCredential) error

func (*SIsolatedDeviceManager) TotalCount

func (manager *SIsolatedDeviceManager) TotalCount(hostType []string, rangeObj db.IStandaloneModel) IsolatedDeviceCountStat

func (*SIsolatedDeviceManager) UnusedGpuQuery

func (manager *SIsolatedDeviceManager) UnusedGpuQuery() *sqlchemy.SQuery

type SKeypair

type SKeypair struct {
	db.SStandaloneResourceBase

	Scheme      string `width:"12" charset:"ascii" nullable:"true" default:"RSA" list:"user" create:"required"` // Column(VARCHAR(length=12, charset='ascii'), nullable=True, default='RSA')
	Fingerprint string `width:"48" charset:"ascii" nullable:"false" list:"user" create:"required"`              // Column(VARCHAR(length=48, charset='ascii'), nullable=False)
	PrivateKey  string `width:"2048" charset:"ascii" nullable:"false" create:"optional"`                        // Column(VARCHAR(length=2048, charset='ascii'), nullable=False)
	PublicKey   string `width:"1024" charset:"ascii" nullable:"false" list:"user" create:"required"`            // Column(VARCHAR(length=1024, charset='ascii'), nullable=False)
	OwnerId     string `width:"128" charset:"ascii" index:"true" nullable:"false" create:"required"`            // Column(VARCHAR(length=36, charset='ascii'), index=True, nullable=False)
}

func (*SKeypair) AllowDeleteItem

func (self *SKeypair) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SKeypair) AllowGetDetails

func (self *SKeypair) AllowGetDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SKeypair) AllowGetDetailsPrivatekey

func (keypair *SKeypair) AllowGetDetailsPrivatekey(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SKeypair) AllowUpdateItem

func (self *SKeypair) AllowUpdateItem(ctx context.Context, userCred mcclient.TokenCredential) bool

func (*SKeypair) GetCustomizeColumns

func (self *SKeypair) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SKeypair) GetDetailsPrivatekey

func (keypair *SKeypair) GetDetailsPrivatekey(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SKeypair) GetExtraDetails

func (self *SKeypair) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SKeypair) GetLinkedGuestsCount

func (self *SKeypair) GetLinkedGuestsCount() int

func (*SKeypair) GetOwnerProjectId

func (self *SKeypair) GetOwnerProjectId() string

func (*SKeypair) IsOwner

func (self *SKeypair) IsOwner(userCred mcclient.TokenCredential) bool

func (*SKeypair) ValidateDeleteCondition

func (self *SKeypair) ValidateDeleteCondition(ctx context.Context) error

type SKeypairManager

type SKeypairManager struct {
	db.SStandaloneResourceBaseManager
}
var KeypairManager *SKeypairManager

func (*SKeypairManager) AllowCreateItem

func (manager *SKeypairManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SKeypairManager) AllowListItems

func (manager *SKeypairManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SKeypairManager) FetchByIdOrName

func (manager *SKeypairManager) FetchByIdOrName(userCred mcclient.IIdentityProvider, idStr string) (db.IModel, error)

func (*SKeypairManager) FetchByName

func (manager *SKeypairManager) FetchByName(userCred mcclient.IIdentityProvider, idStr string) (db.IModel, error)

func (*SKeypairManager) FilterByOwner

func (manager *SKeypairManager) FilterByOwner(q *sqlchemy.SQuery, owner string) *sqlchemy.SQuery

func (*SKeypairManager) GetOwnerId

func (manager *SKeypairManager) GetOwnerId(userCred mcclient.IIdentityProvider) string

func (*SKeypairManager) ListItemFilter

func (manager *SKeypairManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)

func (*SKeypairManager) ValidateCreateData

func (manager *SKeypairManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SLoadbalancer

type SLoadbalancer struct {
	db.SVirtualResourceBase

	Address     string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"optional"`
	AddressType string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"optional"`
	NetworkType string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"optional"`
	NetworkId   string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required"`
	ZoneId      string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional"`

	BackendGroupId string `width:"36" charset:"ascii" nullable:"false" list:"user" update:"user" update:"user"`
}

TODO build errors on pkg/httperrors/errors.go NewGetManagerError NewMissingArgumentError NewInvalidArgumentError

TODO ZoneId or RegionId bandwidth scheduler

TODO update backendgroupid

func (*SLoadbalancer) AllowPerformStatus

func (lb *SLoadbalancer) AllowPerformStatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SLoadbalancer) CustomizeDelete

func (lb *SLoadbalancer) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SLoadbalancer) Delete

func (lb *SLoadbalancer) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SLoadbalancer) GetCustomizeColumns

func (lb *SLoadbalancer) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SLoadbalancer) GetExtraDetails

func (lb *SLoadbalancer) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SLoadbalancer) PostCreate

func (lb *SLoadbalancer) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SLoadbalancer) PreDelete

func (lb *SLoadbalancer) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)

func (*SLoadbalancer) PreDeleteSubs

func (lb *SLoadbalancer) PreDeleteSubs(ctx context.Context, userCred mcclient.TokenCredential)

func (*SLoadbalancer) ValidateUpdateData

func (lb *SLoadbalancer) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SLoadbalancerAcl

type SLoadbalancerAcl struct {
	db.SSharableVirtualResourceBase

	AclEntries *SLoadbalancerAclEntries `list:"user" update:"user" create:"required"`
}

func (*SLoadbalancerAcl) AllowPerformPatch

func (lbacl *SLoadbalancerAcl) AllowPerformPatch(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) bool

func (*SLoadbalancerAcl) AllowPerformStatus

func (lbacl *SLoadbalancerAcl) AllowPerformStatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SLoadbalancerAcl) Delete

func (lbacl *SLoadbalancerAcl) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SLoadbalancerAcl) PerformPatch

PerformPatch patches acl entries by adding then deleting the specified acls. This is intended mainly for command line operations.

func (*SLoadbalancerAcl) PreDelete

func (lbacl *SLoadbalancerAcl) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)

func (*SLoadbalancerAcl) ValidateDeleteCondition

func (lbacl *SLoadbalancerAcl) ValidateDeleteCondition(ctx context.Context) error

func (*SLoadbalancerAcl) ValidateUpdateData

func (lbacl *SLoadbalancerAcl) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SLoadbalancerAclEntries

type SLoadbalancerAclEntries []*SLoadbalancerAclEntry

func (*SLoadbalancerAclEntries) IsZero

func (aclEntries *SLoadbalancerAclEntries) IsZero() bool

func (*SLoadbalancerAclEntries) String

func (aclEntries *SLoadbalancerAclEntries) String() string

func (*SLoadbalancerAclEntries) Validate

func (aclEntries *SLoadbalancerAclEntries) Validate(data *jsonutils.JSONDict) error

type SLoadbalancerAclEntry

type SLoadbalancerAclEntry struct {
	Cidr    string
	Comment string
}

func (*SLoadbalancerAclEntry) Validate

func (aclEntry *SLoadbalancerAclEntry) Validate(data *jsonutils.JSONDict) error

type SLoadbalancerAclManager

type SLoadbalancerAclManager struct {
	db.SSharableVirtualResourceBaseManager
}
var LoadbalancerAclManager *SLoadbalancerAclManager

func (*SLoadbalancerAclManager) ValidateCreateData

func (man *SLoadbalancerAclManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SLoadbalancerAgent

type SLoadbalancerAgent struct {
	db.SStandaloneResourceBase
	SInfrastructure

	HbLastSeen time.Time                 `nullable:"true" list:"admin" update:"admin"`
	HbTimeout  int                       `nullable:"true" list:"admin" update:"admin" create:"optional" default:"3600"`
	Params     *SLoadbalancerAgentParams `create:"optional" get:"admin"`

	Loadbalancers             time.Time `nullable:"true" list:"admin" update:"admin"`
	LoadbalancerListeners     time.Time `nullable:"true" list:"admin" update:"admin"`
	LoadbalancerListenerRules time.Time `nullable:"true" list:"admin" update:"admin"`
	LoadbalancerBackendGroups time.Time `nullable:"true" list:"admin" update:"admin"`
	LoadbalancerBackends      time.Time `nullable:"true" list:"admin" update:"admin"`
	LoadbalancerAcls          time.Time `nullable:"true" list:"admin" update:"admin"`
	LoadbalancerCertificates  time.Time `nullable:"true" list:"admin" update:"admin"`
}

TODO

  • scrub stale backends: Guests with deleted=1
  • agent configuration params

func (*SLoadbalancerAgent) AllowPerformHb

func (lbagent *SLoadbalancerAgent) AllowPerformHb(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) bool

func (*SLoadbalancerAgent) AllowPerformParamsPatch

func (lbagent *SLoadbalancerAgent) AllowPerformParamsPatch(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) bool

func (*SLoadbalancerAgent) IsActive

func (lbagent *SLoadbalancerAgent) IsActive() bool

func (*SLoadbalancerAgent) PerformHb

func (*SLoadbalancerAgent) PerformParamsPatch

func (lbagent *SLoadbalancerAgent) PerformParamsPatch(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

func (*SLoadbalancerAgent) ValidateUpdateData

func (lbagent *SLoadbalancerAgent) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SLoadbalancerAgentManager

type SLoadbalancerAgentManager struct {
	db.SStandaloneResourceBaseManager
	SInfrastructureManager
}
var LoadbalancerAgentManager *SLoadbalancerAgentManager

func (*SLoadbalancerAgentManager) AllowCreateItem

func (*SLoadbalancerAgentManager) CleanPendingDeleteLoadbalancers

func (man *SLoadbalancerAgentManager) CleanPendingDeleteLoadbalancers(ctx context.Context, userCred mcclient.TokenCredential)

func (*SLoadbalancerAgentManager) ValidateCreateData

func (man *SLoadbalancerAgentManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SLoadbalancerAgentParams

type SLoadbalancerAgentParams struct {
	KeepalivedConfTmpl string
	HaproxyConfTmpl    string
	TelegrafConfTmpl   string
	Vrrp               SLoadbalancerAgentParamsVrrp
	Haproxy            SLoadbalancerAgentParamsHaproxy
	Telegraf           SLoadbalancerAgentParamsTelegraf
}

func (*SLoadbalancerAgentParams) IsZero

func (p *SLoadbalancerAgentParams) IsZero() bool

func (*SLoadbalancerAgentParams) String

func (p *SLoadbalancerAgentParams) String() string

func (*SLoadbalancerAgentParams) Validate

func (p *SLoadbalancerAgentParams) Validate(data *jsonutils.JSONDict) error

type SLoadbalancerAgentParamsHaproxy

type SLoadbalancerAgentParamsHaproxy struct {
	GlobalLog      string
	GlobalNbthread int
	LogHttp        bool
	LogTcp         bool
	LogNormal      bool
}

func (*SLoadbalancerAgentParamsHaproxy) Validate

type SLoadbalancerAgentParamsTelegraf

type SLoadbalancerAgentParamsTelegraf struct {
	InfluxDbOutputUrl    string
	InfluxDbOutputName   string
	HaproxyInputInterval int
}

func (*SLoadbalancerAgentParamsTelegraf) Validate

type SLoadbalancerAgentParamsVrrp

type SLoadbalancerAgentParamsVrrp struct {
	Priority          int
	VirtualRouterId   int
	GarpMasterRefresh int
	Preempt           bool
	Interface         string
	AdvertInt         int
	Pass              string
}

func (*SLoadbalancerAgentParamsVrrp) Validate

type SLoadbalancerBackend

type SLoadbalancerBackend struct {
	db.SVirtualResourceBase

	BackendGroupId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional"`
	BackendId      string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional"`
	BackendType    string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional"`
	Weight         int    `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"`
	Address        string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional"`
	Port           int    `nullable:"false" list:"user" create:"required" update:"user"`
}

func (*SLoadbalancerBackend) AllowPerformStatus

func (lbb *SLoadbalancerBackend) AllowPerformStatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SLoadbalancerBackend) Delete

func (*SLoadbalancerBackend) PreDelete

func (lbb *SLoadbalancerBackend) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)

func (*SLoadbalancerBackend) ValidateUpdateData

func (lbb *SLoadbalancerBackend) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SLoadbalancerBackendGroup

type SLoadbalancerBackendGroup struct {
	db.SVirtualResourceBase

	LoadbalancerId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional"`
}

func (*SLoadbalancerBackendGroup) AllowPerformStatus

func (lbbg *SLoadbalancerBackendGroup) AllowPerformStatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SLoadbalancerBackendGroup) Delete

func (*SLoadbalancerBackendGroup) GetCustomizeColumns

func (lbbg *SLoadbalancerBackendGroup) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SLoadbalancerBackendGroup) GetExtraDetails

func (*SLoadbalancerBackendGroup) GetLoadbalancer

func (lbbg *SLoadbalancerBackendGroup) GetLoadbalancer() *SLoadbalancer

func (*SLoadbalancerBackendGroup) PreDelete

func (lbbg *SLoadbalancerBackendGroup) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)

func (*SLoadbalancerBackendGroup) PreDeleteSubs

func (lbbg *SLoadbalancerBackendGroup) PreDeleteSubs(ctx context.Context, userCred mcclient.TokenCredential)

func (*SLoadbalancerBackendGroup) ValidateDeleteCondition

func (lbbg *SLoadbalancerBackendGroup) ValidateDeleteCondition(ctx context.Context) error

type SLoadbalancerBackendGroupManager

type SLoadbalancerBackendGroupManager struct {
	db.SVirtualResourceBaseManager
}
var LoadbalancerBackendGroupManager *SLoadbalancerBackendGroupManager

func (*SLoadbalancerBackendGroupManager) ListItemFilter

func (*SLoadbalancerBackendGroupManager) PreDeleteSubs

func (*SLoadbalancerBackendGroupManager) ValidateCreateData

func (man *SLoadbalancerBackendGroupManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SLoadbalancerBackendManager

type SLoadbalancerBackendManager struct {
	db.SVirtualResourceBaseManager
}
var LoadbalancerBackendManager *SLoadbalancerBackendManager

func (*SLoadbalancerBackendManager) ListItemFilter

func (*SLoadbalancerBackendManager) PreDeleteSubs

func (man *SLoadbalancerBackendManager) PreDeleteSubs(ctx context.Context, userCred mcclient.TokenCredential, q *sqlchemy.SQuery)

func (*SLoadbalancerBackendManager) ValidateCreateData

func (man *SLoadbalancerBackendManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SLoadbalancerCertificate

type SLoadbalancerCertificate struct {
	db.SVirtualResourceBase

	Certificate string `create:"required" list:"admin" update:"user"`
	PrivateKey  string `create:"required" list:"admin" update:"user"`

	// derived attributes
	PublicKeyAlgorithm      string    `create:"optional" list:"user" update:"user"`
	PublicKeyBitLen         int       `create:"optional" list:"user" update:"user"`
	SignatureAlgorithm      string    `create:"optional" list:"user" update:"user"`
	FingerprintSha256       string    `create:"optional" list:"user" update:"user"`
	NotBefore               time.Time `create:"optional" list:"user" update:"user"`
	NotAfter                time.Time `create:"optional" list:"user" update:"user"`
	CommonName              string    `create:"optional" list:"user" update:"user"`
	SubjectAlternativeNames string    `create:"optional" list:"user" update:"user"`
}

TODO

  • notify users of cert expiration
  • ca info: self-signed, public ca

func (*SLoadbalancerCertificate) AllowPerformStatus

func (lbcert *SLoadbalancerCertificate) AllowPerformStatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SLoadbalancerCertificate) Delete

func (lbcert *SLoadbalancerCertificate) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SLoadbalancerCertificate) PreDelete

func (lbcert *SLoadbalancerCertificate) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)

func (*SLoadbalancerCertificate) ValidateDeleteCondition

func (lbcert *SLoadbalancerCertificate) ValidateDeleteCondition(ctx context.Context) error

func (*SLoadbalancerCertificate) ValidateUpdateData

func (lbcert *SLoadbalancerCertificate) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SLoadbalancerCertificateManager

type SLoadbalancerCertificateManager struct {
	db.SVirtualResourceBaseManager
}
var LoadbalancerCertificateManager *SLoadbalancerCertificateManager

func (*SLoadbalancerCertificateManager) PreDeleteSubs

func (*SLoadbalancerCertificateManager) ValidateCreateData

func (man *SLoadbalancerCertificateManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SLoadbalancerHTTPListener

type SLoadbalancerHTTPListener struct {
	StickySession              string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"`
	StickySessionType          string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"`
	StickySessionCookie        string `width:"128" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"`
	StickySessionCookieTimeout int    `nullable:"false" list:"user" create:"optional" update:"user"`

	//XForwardedForSLBIP bool `nullable:"false" list:"user" create:"optional"`
	//XForwardedForSLBID bool `nullable:"false" list:"user" create:"optional"`
	XForwardedFor bool `nullable:"false" list:"user" create:"optional" update:"user"`
	Gzip          bool `nullable:"false" list:"user" create:"optional" update:"user"`
}

TODO sensible default for knobs

type SLoadbalancerHTTPSListener

type SLoadbalancerHTTPSListener struct {
	CertificateId   string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional"`
	TLSCipherPolicy string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional"`
	EnableHttp2     bool   `create:"optional" list:"user"`
}

TODO

  • CACertificate string
  • Certificate2Id // multiple certificates for rsa, ecdsa
  • Use certificate for tcp listener
  • Customize ciphers?

type SLoadbalancerListener

type SLoadbalancerListener struct {
	db.SVirtualResourceBase

	LoadbalancerId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional"`
	ListenerType   string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"required"`
	ListenerPort   int    `nullable:"false" list:"user" create:"required"`
	BackendGroupId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"`

	Bandwidth int    `nullable:"false" list:"user" create:"optional" update:"user"`
	Scheduler string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"required" update:"user"`

	ClientRequestTimeout  int `nullable:"false" list:"user" create:"optional" update:"user"`
	ClientIdleTimeout     int `nullable:"false" list:"user" create:"optional" update:"user"`
	BackendConnectTimeout int `nullable:"false" list:"user" create:"optional" update:"user"`
	BackendIdleTimeout    int `nullable:"false" list:"user" create:"optional" update:"user"`

	AclStatus string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"`
	AclType   string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"`
	AclId     string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"`

	HealthCheck     string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"`
	HealthCheckType string `width:"16" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"`

	HealthCheckDomain   string `charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"`
	HealthCheckURI      string `charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"`
	HealthCheckHttpCode string `charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"`

	HealthCheckRise     int `nullable:"false" list:"user" create:"optional" update:"user"`
	HealthCheckFall     int `nullable:"false" list:"user" create:"optional" update:"user"`
	HealthCheckTimeout  int `nullable:"false" list:"user" create:"optional" update:"user"`
	HealthCheckInterval int `nullable:"false" list:"user" create:"optional" update:"user"`

	HealthCheckReq string `list:"user" create:"optional" update:"user"`
	HealthCheckExp string `list:"user" create:"optional" update:"user"`

	SLoadbalancerTCPListener
	SLoadbalancerUDPListener
	SLoadbalancerHTTPListener
	SLoadbalancerHTTPSListener
}

func (*SLoadbalancerListener) AllowPerformStatus

func (lblis *SLoadbalancerListener) AllowPerformStatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SLoadbalancerListener) Delete

func (lblis *SLoadbalancerListener) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SLoadbalancerListener) GetCustomizeColumns

func (lblis *SLoadbalancerListener) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SLoadbalancerListener) GetExtraDetails

func (lblis *SLoadbalancerListener) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SLoadbalancerListener) PreDelete

func (lblis *SLoadbalancerListener) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)

func (*SLoadbalancerListener) PreDeleteSubs

func (lblis *SLoadbalancerListener) PreDeleteSubs(ctx context.Context, userCred mcclient.TokenCredential)

func (*SLoadbalancerListener) ValidateUpdateData

func (lblis *SLoadbalancerListener) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SLoadbalancerListenerManager

type SLoadbalancerListenerManager struct {
	db.SVirtualResourceBaseManager
}
var LoadbalancerListenerManager *SLoadbalancerListenerManager

func (*SLoadbalancerListenerManager) ListItemFilter

func (*SLoadbalancerListenerManager) PreDeleteSubs

func (man *SLoadbalancerListenerManager) PreDeleteSubs(ctx context.Context, userCred mcclient.TokenCredential, q *sqlchemy.SQuery)

func (*SLoadbalancerListenerManager) ValidateCreateData

func (man *SLoadbalancerListenerManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SLoadbalancerListenerRule

type SLoadbalancerListenerRule struct {
	db.SVirtualResourceBase

	ListenerId     string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional"`
	BackendGroupId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"optional" update:"user"`

	Domain string `width:"128" charset:"ascii" nullable:"false" list:"user" create:"optional"`
	Path   string `width:"128" charset:"ascii" nullable:"false" list:"user" create:"optional"`
}

func (*SLoadbalancerListenerRule) AllowPerformStatus

func (lbr *SLoadbalancerListenerRule) AllowPerformStatus(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SLoadbalancerListenerRule) Delete

func (*SLoadbalancerListenerRule) GetCustomizeColumns

func (*SLoadbalancerListenerRule) GetExtraDetails

func (*SLoadbalancerListenerRule) PreDelete

func (lbr *SLoadbalancerListenerRule) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)

func (*SLoadbalancerListenerRule) ValidateUpdateData

type SLoadbalancerListenerRuleManager

type SLoadbalancerListenerRuleManager struct {
	db.SVirtualResourceBaseManager
}
var LoadbalancerListenerRuleManager *SLoadbalancerListenerRuleManager

func (*SLoadbalancerListenerRuleManager) ListItemFilter

func (*SLoadbalancerListenerRuleManager) PreDeleteSubs

func (*SLoadbalancerListenerRuleManager) ValidateCreateData

func (man *SLoadbalancerListenerRuleManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SLoadbalancerManager

type SLoadbalancerManager struct {
	db.SVirtualResourceBaseManager
}
var LoadbalancerManager *SLoadbalancerManager

func (*SLoadbalancerManager) ListItemFilter

func (*SLoadbalancerManager) ValidateCreateData

func (man *SLoadbalancerManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SLoadbalancerNetwork

type SLoadbalancerNetwork struct {
	db.SVirtualJointResourceBase

	LoadbalancerId string `width:"36" charset:"ascii" nullable:"false" key_index:"true" list:"admin"`
	NetworkId      string `width:"36" charset:"ascii" nullable:"false" key_index:"true" list:"admin"`
	IpAddr         string `width:"16" charset:"ascii" list:"admin"`
}

func (*SLoadbalancerNetwork) Delete

func (lbNetwork *SLoadbalancerNetwork) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SLoadbalancerNetwork) Network

func (ln *SLoadbalancerNetwork) Network() *SNetwork

type SLoadbalancerNetworkDeleteData

type SLoadbalancerNetworkDeleteData struct {
	// contains filtered or unexported fields
}

type SLoadbalancerNetworkRequestData

type SLoadbalancerNetworkRequestData struct {
	// contains filtered or unexported fields
}

type SLoadbalancerNotifier

type SLoadbalancerNotifier struct{}

TODO notify on post create/update/delete

func (*SLoadbalancerNotifier) PostCreate

func (n *SLoadbalancerNotifier) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject)

type SLoadbalancerStatus

type SLoadbalancerStatus struct {
	RuntimeStatus string `width:"36" charset:"ascii" nullable:"false" default:"init" list:"user"`
}

type SLoadbalancerTCPListener

type SLoadbalancerTCPListener struct{}

type SLoadbalancerUDPListener

type SLoadbalancerUDPListener struct{}

type SLoadbalancernetworkManager

type SLoadbalancernetworkManager struct {
	db.SVirtualJointResourceBaseManager
}
var LoadbalancernetworkManager *SLoadbalancernetworkManager

func (*SLoadbalancernetworkManager) DeleteLoadbalancerNetwork

func (*SLoadbalancernetworkManager) NewLoadbalancerNetwork

type SManagedResourceBase

type SManagedResourceBase struct {
	ManagerId string `width:"128" charset:"ascii" nullable:"true" list:"admin" create:"admin_optional"` // Column(VARCHAR(ID_LENGTH, charset='ascii'), nullable=True)
}

func (*SManagedResourceBase) GetCloudprovider

func (self *SManagedResourceBase) GetCloudprovider() *SCloudprovider

func (*SManagedResourceBase) GetDriver

func (*SManagedResourceBase) IsManaged

func (self *SManagedResourceBase) IsManaged() bool

type SNetInterface

type SNetInterface struct {
	db.SModelBase

	Mac         string `width:"36" charset:"ascii" primary:"true"`  // Column(VARCHAR(36, charset='ascii'), primary_key=True)
	BaremetalId string `width:"36" charset:"ascii" nullable:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=True)
	WireId      string `width:"36" charset:"ascii" nullable:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=True)
	Rate        int    `nullable:"true"`                            // Column(Integer, nullable=True) # Mbps
	NicType     string `width:"36" charset:"ascii" nullable:"true"` // Column(VARCHAR(36, charset='ascii'), nullable=True)
	Index       int8   `nullable:"true"`                            // Column(TINYINT, nullable=True)
	LinkUp      bool   `nullable:"true"`                            // Column(Boolean, nullable=True)
	Mtu         int16  `nullable:"true"`                            // Column(SMALLINT, nullable=True)
}

func (*SNetInterface) GetBaremetal

func (netif *SNetInterface) GetBaremetal() *SHost

func (*SNetInterface) GetBaremetalNetwork

func (netif *SNetInterface) GetBaremetalNetwork() *SHostnetwork

func (*SNetInterface) GetCandidateNetworkForIp

func (self *SNetInterface) GetCandidateNetworkForIp(userCred mcclient.TokenCredential, ipAddr string) (*SNetwork, error)

func (*SNetInterface) GetId

func (netif *SNetInterface) GetId() string

func (*SNetInterface) GetWire

func (netif *SNetInterface) GetWire() *SWire

func (*SNetInterface) IsUsableServernic

func (self *SNetInterface) IsUsableServernic() bool

func (*SNetInterface) Remove

func (self *SNetInterface) Remove(ctx context.Context, userCred mcclient.TokenCredential) error

type SNetInterfaceManager

type SNetInterfaceManager struct {
	db.SModelBaseManager
}
var NetInterfaceManager *SNetInterfaceManager

func (*SNetInterfaceManager) FetchByMac

func (manager *SNetInterfaceManager) FetchByMac(mac string) (*SNetInterface, error)

type SNetwork

type SNetwork struct {
	db.SSharableVirtualResourceBase

	GuestIpStart string `width:"16" charset:"ascii" nullable:"false" list:"user" update:"user" create:"required"` // Column(VARCHAR(16, charset='ascii'), nullable=False)
	GuestIpEnd   string `width:"16" charset:"ascii" nullable:"false" list:"user" update:"user" create:"required"` // Column(VARCHAR(16, charset='ascii'), nullable=False)
	GuestIpMask  int8   `nullable:"false" list:"user" update:"user" create:"required"`                            // Column(TINYINT, nullable=False)
	GuestGateway string `width:"16" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"`  // Column(VARCHAR(16, charset='ascii'), nullable=True)
	GuestDns     string `width:"16" charset:"ascii" nullable:"true" get:"user" update:"user" create:"optional"`   // Column(VARCHAR(16, charset='ascii'), nullable=True)
	GuestDhcp    string `width:"16" charset:"ascii" nullable:"true" get:"user" update:"user" create:"optional"`   // Column(VARCHAR(16, charset='ascii'), nullable=True)

	GuestDomain string `width:"128" charset:"ascii" nullable:"true" get:"user" update:"user"` // Column(VARCHAR(128, charset='ascii'), nullable=True)

	GuestIp6Start string `width:"64" charset:"ascii" nullable:"true"` // Column(VARCHAR(64, charset='ascii'), nullable=True)
	GuestIp6End   string `width:"64" charset:"ascii" nullable:"true"` // Column(VARCHAR(64, charset='ascii'), nullable=True)
	GuestIp6Mask  int8   `nullable:"true"`                            // Column(TINYINT, nullable=True)
	GuestGateway6 string `width:"64" charset:"ascii" nullable:"true"` // Column(VARCHAR(64, charset='ascii'), nullable=True)
	GuestDns6     string `width:"64" charset:"ascii" nullable:"true"` // Column(VARCHAR(64, charset='ascii'), nullable=True)

	GuestDomain6 string `width:"128" charset:"ascii" nullable:"true"` // Column(VARCHAR(128, charset='ascii'), nullable=True)

	VlanId int `nullable:"false" default:"1" list:"user" update:"user" create:"optional"` // Column(Integer, nullable=False, default=1)

	WireId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required"` // Column(VARCHAR(36, charset='ascii'), nullable=False)

	ServerType string `width:"16" charset:"ascii" nullable:"true" list:"user" update:"user" create:"optional"` // Column(VARCHAR(16, charset='ascii'), nullable=True)

	AllocPolicy string `width:"16" charset:"ascii" nullable:"true" get:"user" update:"user" create:"optional"` // Column(VARCHAR(16, charset='ascii'), nullable=True)

	AllocTimoutSeconds int `default:"0" nullable:"true" get:"admin"`
}

func ChooseCandidateNetworks

func ChooseCandidateNetworks(nets []SNetwork, isExit bool, serverType string) *SNetwork

func (*SNetwork) AllowGetDetailsReservedIps

func (self *SNetwork) AllowGetDetailsReservedIps(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SNetwork) AllowPerformPurge

func (self *SNetwork) AllowPerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SNetwork) AllowPerformReleaseReservedIp

func (self *SNetwork) AllowPerformReleaseReservedIp(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SNetwork) AllowPerformReserveIp

func (self *SNetwork) AllowPerformReserveIp(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SNetwork) CustomizeCreate

func (self *SNetwork) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SNetwork) CustomizeDelete

func (self *SNetwork) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SNetwork) Delete

func (self *SNetwork) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SNetwork) GetBaremetalNicsCount

func (self *SNetwork) GetBaremetalNicsCount() int

func (*SNetwork) GetCustomizeColumns

func (self *SNetwork) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SNetwork) GetDNS

func (self *SNetwork) GetDNS() string

func (*SNetwork) GetDetailsReservedIps

func (self *SNetwork) GetDetailsReservedIps(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SNetwork) GetDomain

func (self *SNetwork) GetDomain() string

func (*SNetwork) GetExtraDetails

func (self *SNetwork) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SNetwork) GetFreeIP

func (self *SNetwork) GetFreeIP(ctx context.Context, userCred mcclient.TokenCredential, addrTable map[string]bool, recentUsedAddrTable map[string]bool, candidate string, allocDir IPAddlocationDirection, reserved bool) (string, error)

func (*SNetwork) GetGroupNicsCount

func (self *SNetwork) GetGroupNicsCount() int

func (*SNetwork) GetGuestIpv4StartAddress

func (self *SNetwork) GetGuestIpv4StartAddress() netutils.IPV4Addr

func (*SNetwork) GetGuestnicsCount

func (self *SNetwork) GetGuestnicsCount() int

func (*SNetwork) GetINetwork

func (self *SNetwork) GetINetwork() (cloudprovider.ICloudNetwork, error)

func (*SNetwork) GetNetAddr

func (self *SNetwork) GetNetAddr() netutils.IPV4Addr

func (*SNetwork) GetPrefix

func (self *SNetwork) GetPrefix() (netutils.IPV4Prefix, error)

func (*SNetwork) GetReservedNicsCount

func (self *SNetwork) GetReservedNicsCount() int

func (*SNetwork) GetRoutes

func (self *SNetwork) GetRoutes() [][]string

func (*SNetwork) GetTotalNicCount

func (self *SNetwork) GetTotalNicCount() int

func (*SNetwork) GetUsedAddresses

func (self *SNetwork) GetUsedAddresses() map[string]bool

func (*SNetwork) GetUsedIfnames

func (self *SNetwork) GetUsedIfnames() map[string]bool

func (*SNetwork) GetVpc

func (self *SNetwork) GetVpc() *SVpc

func (*SNetwork) GetWire

func (self *SNetwork) GetWire() *SWire

func (*SNetwork) IsExitNetwork

func (self *SNetwork) IsExitNetwork() bool

func (*SNetwork) PerformPurge

func (*SNetwork) PerformReleaseReservedIp

func (self *SNetwork) PerformReleaseReservedIp(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SNetwork) PerformReserveIp

func (self *SNetwork) PerformReserveIp(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SNetwork) PostCreate

func (self *SNetwork) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SNetwork) RealDelete

func (self *SNetwork) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SNetwork) StartDeleteNetworkTask

func (self *SNetwork) StartDeleteNetworkTask(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SNetwork) SyncWithCloudNetwork

func (self *SNetwork) SyncWithCloudNetwork(userCred mcclient.TokenCredential, extNet cloudprovider.ICloudNetwork, projectId string, projectSync bool) error

func (*SNetwork) UpdateBaremetalNetmap

func (self *SNetwork) UpdateBaremetalNetmap(nic *SHostnetwork, name string)

func (*SNetwork) UpdateNetmap

func (self *SNetwork) UpdateNetmap(ip, project, name string)

func (*SNetwork) ValidateDeleteCondition

func (self *SNetwork) ValidateDeleteCondition(ctx context.Context) error

func (*SNetwork) ValidateUpdateCondition

func (self *SNetwork) ValidateUpdateCondition(ctx context.Context) error

func (*SNetwork) ValidateUpdateData

func (self *SNetwork) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SNetworkConfig

type SNetworkConfig struct {
	Network  string
	Wire     string
	Exit     bool
	Private  bool
	Mac      string
	Address  string
	Address6 string
	Driver   string
	BwLimit  int
	Vip      bool
	Reserved bool
}

type SNetworkManager

type SNetworkManager struct {
	db.SSharableVirtualResourceBaseManager
}
var NetworkManager *SNetworkManager

func (*SNetworkManager) AllowCreateItem

func (manager *SNetworkManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SNetworkManager) CustomizeFilterList

func (manager *SNetworkManager) CustomizeFilterList(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*db.CustomizeListFilters, error)

func (*SNetworkManager) GetContextManager

func (manager *SNetworkManager) GetContextManager() []db.IModelManager

func (*SNetworkManager) GetNetworkOfIP

func (manager *SNetworkManager) GetNetworkOfIP(ipAddr string, serverType string, isPublic tristate.TriState) (*SNetwork, error)

func (*SNetworkManager) InitializeData

func (manager *SNetworkManager) InitializeData() error

func (*SNetworkManager) ListItemFilter

func (manager *SNetworkManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)

func (*SNetworkManager) SyncNetworks

func (manager *SNetworkManager) SyncNetworks(ctx context.Context, userCred mcclient.TokenCredential, wire *SWire, nets []cloudprovider.ICloudNetwork, projectId string, projectSync bool) ([]SNetwork, []cloudprovider.ICloudNetwork, compare.SyncResult)

func (*SNetworkManager) TotalPortCount

func (manager *SNetworkManager) TotalPortCount(userCred mcclient.TokenCredential, rangeObj db.IStandaloneModel) NetworkPortStat

func (*SNetworkManager) ValidateCreateData

func (manager *SNetworkManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SQuota

type SQuota struct {
	Cpu            int
	Memory         int
	Storage        int
	Port           int
	Eip            int
	Eport          int
	Bw             int
	Ebw            int
	Keypair        int
	Image          int
	Group          int
	Secgroup       int
	IsolatedDevice int
	Snapshot       int
}

func (*SQuota) Add

func (self *SQuota) Add(quota quotas.IQuota)

func (*SQuota) Exceed

func (self *SQuota) Exceed(request quotas.IQuota, quota quotas.IQuota) error

func (*SQuota) FetchSystemQuota

func (self *SQuota) FetchSystemQuota()

func (*SQuota) FetchUsage

func (self *SQuota) FetchUsage(projectId string) error

func (*SQuota) IsEmpty

func (self *SQuota) IsEmpty() bool

func (*SQuota) Sub

func (self *SQuota) Sub(quota quotas.IQuota)

func (*SQuota) ToJSON

func (self *SQuota) ToJSON(prefix string) jsonutils.JSONObject

func (*SQuota) Update

func (self *SQuota) Update(quota quotas.IQuota)

type SReservedip

type SReservedip struct {
	db.SResourceBase

	Id        int64  `primary:"true" auto_increment:"true" list:"admin"`        // = Column(BigInteger, primary_key=True)
	NetworkId string `width:"36" charset:"ascii" nullable:"false" list:"admin"` // Column(VARCHAR(36, charset='ascii'), nullable=False)
	IpAddr    string `width:"16" charset:"ascii" list:"admin"`                  // Column(VARCHAR(16, charset='ascii'))
	Notes     string `width:"512" charset:"utf8" nullable:"true" list:"admin"`  // ]Column(VARCHAR(512, charset='utf8'), nullable=True)
}

func (*SReservedip) AllowDeleteItem

func (self *SReservedip) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SReservedip) AllowGetDetails

func (self *SReservedip) AllowGetDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SReservedip) AllowUpdateItem

func (self *SReservedip) AllowUpdateItem(ctx context.Context, userCred mcclient.TokenCredential) bool

func (*SReservedip) GetCustomizeColumns

func (self *SReservedip) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SReservedip) GetNetwork

func (self *SReservedip) GetNetwork() *SNetwork

func (*SReservedip) Release

func (self *SReservedip) Release(ctx context.Context, userCred mcclient.TokenCredential, network *SNetwork) error

type SReservedipManager

type SReservedipManager struct {
	db.SResourceBaseManager
}
var ReservedipManager *SReservedipManager

func (*SReservedipManager) AllowCreateItem

func (manager *SReservedipManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SReservedipManager) AllowListItems

func (manager *SReservedipManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SReservedipManager) GetReservedIP

func (manager *SReservedipManager) GetReservedIP(network *SNetwork, ip string) *SReservedip

func (*SReservedipManager) GetReservedIPs

func (manager *SReservedipManager) GetReservedIPs(network *SNetwork) []SReservedip

func (*SReservedipManager) ListItemFilter

func (manager *SReservedipManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)

func (*SReservedipManager) ReserveIP

func (manager *SReservedipManager) ReserveIP(userCred mcclient.TokenCredential, network *SNetwork, ip string, notes string) error

type SSchedpolicy

type SSchedpolicy struct {
	db.SStandaloneResourceBase
	SInfrastructure

	Condition  string `width:"256" charset:"ascii" nullable:"false" list:"user" create:"required" update:"user"`
	SchedtagId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"required" update:"user"`
	Strategy   string `width:"32" charset:"ascii" nullable:"false" list:"user" create:"required" update:"user"`

	Enabled bool `nullable:"false" default:"true" create:"optional" list:"user" update:"user"`
}

sched policy is called before calling scheduler, add additional preferences for schedtags

func (*SSchedpolicy) AllowPerformEvaluate

func (self *SSchedpolicy) AllowPerformEvaluate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SSchedpolicy) GetCustomizeColumns

func (self *SSchedpolicy) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SSchedpolicy) GetExtraDetails

func (self *SSchedpolicy) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SSchedpolicy) PerformEvaluate

func (*SSchedpolicy) ValidateUpdateData

func (self *SSchedpolicy) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SSchedpolicyManager

type SSchedpolicyManager struct {
	db.SStandaloneResourceBaseManager
	SInfrastructureManager
}
var SchedpolicyManager *SSchedpolicyManager

func (*SSchedpolicyManager) ValidateCreateData

func (manager *SSchedpolicyManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SSchedtag

type SSchedtag struct {
	db.SStandaloneResourceBase
	SInfrastructure

	DefaultStrategy string `width:"16" charset:"ascii" nullable:"true" default:"" list:"user" update:"admin" create:"admin_optional"` // Column(VARCHAR(16, charset='ascii'), nullable=True, default=”)
}

func (*SSchedtag) AllowGetDetails

func (self *SSchedtag) AllowGetDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SSchedtag) GetCustomizeColumns

func (self *SSchedtag) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SSchedtag) GetExtraDetails

func (self *SSchedtag) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SSchedtag) GetHostCount

func (self *SSchedtag) GetHostCount() int

func (*SSchedtag) GetHostQuery

func (self *SSchedtag) GetHostQuery() *sqlchemy.SQuery

func (*SSchedtag) GetHosts

func (self *SSchedtag) GetHosts() []SHost

func (*SSchedtag) GetShortDesc

func (self *SSchedtag) GetShortDesc() *jsonutils.JSONDict

func (*SSchedtag) ValidateDeleteCondition

func (self *SSchedtag) ValidateDeleteCondition(ctx context.Context) error

func (*SSchedtag) ValidateUpdateData

func (self *SSchedtag) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SSchedtagManager

type SSchedtagManager struct {
	db.SStandaloneResourceBaseManager
	SInfrastructureManager
}
var SchedtagManager *SSchedtagManager

func (*SSchedtagManager) AllowListItems

func (manager *SSchedtagManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SSchedtagManager) ValidateCreateData

func (manager *SSchedtagManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

func (*SSchedtagManager) ValidateSchedtags

func (manager *SSchedtagManager) ValidateSchedtags(userCred mcclient.TokenCredential, schedtags map[string]string) (map[string]string, error)

type SSecurityGroup

type SSecurityGroup struct {
	db.SSharableVirtualResourceBase
	IsDirty bool `nullable:"false" default:"false"` // Column(Boolean, nullable=False, default=False)
}

func (*SSecurityGroup) AllowPerformClone

func (self *SSecurityGroup) AllowPerformClone(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SSecurityGroup) DoSync

func (self *SSecurityGroup) DoSync(ctx context.Context, userCred mcclient.TokenCredential)

func (*SSecurityGroup) GetCustomizeColumns

func (self *SSecurityGroup) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SSecurityGroup) GetExtraDetails

func (self *SSecurityGroup) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SSecurityGroup) GetGuests

func (self *SSecurityGroup) GetGuests() []SGuest

func (*SSecurityGroup) GetGuestsCount

func (self *SSecurityGroup) GetGuestsCount() int

func (*SSecurityGroup) GetGuestsQuery

func (self *SSecurityGroup) GetGuestsQuery() *sqlchemy.SQuery

func (*SSecurityGroup) PerformClone

func (*SSecurityGroup) SyncWithCloudSecurityGroup

func (self *SSecurityGroup) SyncWithCloudSecurityGroup(userCred mcclient.TokenCredential, extSec cloudprovider.ICloudSecurityGroup, projectId string, projectSync bool) error

func (*SSecurityGroup) ValidateDeleteCondition

func (self *SSecurityGroup) ValidateDeleteCondition(ctx context.Context) error

type SSecurityGroupManager

type SSecurityGroupManager struct {
	db.SSharableVirtualResourceBaseManager
}
var SecurityGroupManager *SSecurityGroupManager

func (*SSecurityGroupManager) DelaySync

func (manager *SSecurityGroupManager) DelaySync(ctx context.Context, userCred mcclient.TokenCredential, idStr string)

func (*SSecurityGroupManager) FetchSecgroupById

func (manager *SSecurityGroupManager) FetchSecgroupById(secId string) *SSecurityGroup

func (*SSecurityGroupManager) InitializeData

func (manager *SSecurityGroupManager) InitializeData() error

func (*SSecurityGroupManager) SyncSecgroups

func (*SSecurityGroupManager) ValidateCreateData

func (manager *SSecurityGroupManager) ValidateCreateData(
	ctx context.Context,
	userCred mcclient.TokenCredential,
	ownerProjId string,
	query jsonutils.JSONObject,
	data *jsonutils.JSONDict,
) (*jsonutils.JSONDict, error)

type SSecurityGroupRule

type SSecurityGroupRule struct {
	db.SResourceBase
	Id          string `width:"128" charset:"ascii" primary:"true" list:"user"`
	Priority    int64  `default:"1" list:"user" update:"user" list:"user"`
	Protocol    string `width:"5" charset:"ascii" nullable:"false" list:"user" update:"user"`
	Ports       string `width:"256" charset:"ascii" list:"user" update:"user"`
	Direction   string `width:"3" charset:"ascii" list:"user" create:"required"`
	CIDR        string `width:"256" charset:"ascii" list:"user" update:"user"`
	Action      string `width:"5" charset:"ascii" nullable:"false" list:"user" update:"user" create:"required"`
	Description string `width:"256" charset:"utf8" list:"user" update:"user"`
	SecgroupID  string `width:"128" charset:"ascii" create:"required"`
}

func (*SSecurityGroupRule) AllowDeleteItem

func (self *SSecurityGroupRule) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SSecurityGroupRule) AllowUpdateItem

func (self *SSecurityGroupRule) AllowUpdateItem(ctx context.Context, userCred mcclient.TokenCredential) bool

func (*SSecurityGroupRule) BeforeInsert

func (self *SSecurityGroupRule) BeforeInsert()

func (*SSecurityGroupRule) Delete

func (self *SSecurityGroupRule) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SSecurityGroupRule) GetSecGroup

func (self *SSecurityGroupRule) GetSecGroup() *SSecurityGroup

func (*SSecurityGroupRule) PostCreate

func (self *SSecurityGroupRule) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SSecurityGroupRule) PostUpdate

func (self *SSecurityGroupRule) PostUpdate(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SSecurityGroupRule) PreDelete

func (self *SSecurityGroupRule) PreDelete(ctx context.Context, userCred mcclient.TokenCredential)

func (*SSecurityGroupRule) SingleRules

func (self *SSecurityGroupRule) SingleRules() ([]secrules.SecurityRule, error)

func (*SSecurityGroupRule) String

func (self *SSecurityGroupRule) String() string

func (*SSecurityGroupRule) ValidateUpdateData

func (self *SSecurityGroupRule) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SSecurityGroupRuleManager

type SSecurityGroupRuleManager struct {
	db.SResourceBaseManager
}
var SecurityGroupRuleManager *SSecurityGroupRuleManager

func (*SSecurityGroupRuleManager) AllowCreateItem

func (manager *SSecurityGroupRuleManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SSecurityGroupRuleManager) AllowListItems

func (manager *SSecurityGroupRuleManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SSecurityGroupRuleManager) FilterById

func (manager *SSecurityGroupRuleManager) FilterById(q *sqlchemy.SQuery, idStr string) *sqlchemy.SQuery

func (*SSecurityGroupRuleManager) ListItemFilter

func (manager *SSecurityGroupRuleManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (sql *sqlchemy.SQuery, err error)

func (*SSecurityGroupRuleManager) SyncRules

func (*SSecurityGroupRuleManager) ValidateCreateData

func (manager *SSecurityGroupRuleManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SSnapshot

type SSnapshot struct {
	db.SVirtualResourceBase
	SManagedResourceBase

	DiskId      string `width:"36" charset:"ascii" nullable:"true" create:"required" key_index:"true" list:"user"`
	StorageId   string `width:"36" charset:"ascii" nullable:"true" list:"admin"`
	CreatedBy   string `width:"36" charset:"ascii" nullable:"false" default:"manual" list:"admin"`
	Location    string `charset:"ascii" nullable:"true" list:"admin"`
	Size        int    `nullable:"false" list:"user"` // MB
	OutOfChain  bool   `nullable:"false" default:"false" index:"true" list:"admin"`
	FakeDeleted bool   `nullable:"false" default:"false" index:"true"`
	DiskType    string `width:"32" charset:"ascii" nullable:"true" list:"user"`

	CloudregionId string `width:"36" charset:"ascii" nullable:"true" list:"user"`
}

func (*SSnapshot) AllowCreateItem

func (self *SSnapshot) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SSnapshot) AllowDeleteItem

func (self *SSnapshot) AllowDeleteItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SSnapshot) AllowGetDetails

func (self *SSnapshot) AllowGetDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SSnapshot) AllowListItems

func (self *SSnapshot) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SSnapshot) AllowPerformDeleted

func (self *SSnapshot) AllowPerformDeleted(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SSnapshot) AllowPerformPurge

func (self *SSnapshot) AllowPerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SSnapshot) AllowUpdateItem

func (self *SSnapshot) AllowUpdateItem(ctx context.Context, userCred mcclient.TokenCredential) bool

func (*SSnapshot) CustomizeCreate

func (self *SSnapshot) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SSnapshot) CustomizeDelete

func (self *SSnapshot) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SSnapshot) Delete

func (self *SSnapshot) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SSnapshot) FakeDelete

func (self *SSnapshot) FakeDelete() error

func (*SSnapshot) GetCustomizeColumns

func (self *SSnapshot) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SSnapshot) GetDisk

func (self *SSnapshot) GetDisk() (*SDisk, error)

func (*SSnapshot) GetExtraDetails

func (self *SSnapshot) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SSnapshot) GetGuest

func (self *SSnapshot) GetGuest() (*SGuest, error)

func (*SSnapshot) GetHost

func (self *SSnapshot) GetHost() *SHost

func (*SSnapshot) GetISnapshotRegion

func (self *SSnapshot) GetISnapshotRegion() (cloudprovider.ICloudRegion, error)

func (*SSnapshot) GetRegion

func (self *SSnapshot) GetRegion() *SCloudregion

func (*SSnapshot) GetShortDesc

func (self *SSnapshot) GetShortDesc() *jsonutils.JSONDict

func (*SSnapshot) PerformDeleted

func (self *SSnapshot) PerformDeleted(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SSnapshot) PerformPurge

func (*SSnapshot) RealDelete

func (self *SSnapshot) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SSnapshot) StartSnapshotDeleteTask

func (self *SSnapshot) StartSnapshotDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, reloadDisk bool, parentTaskId string) error

func (*SSnapshot) StartSnapshotsDeleteTask

func (self *SSnapshot) StartSnapshotsDeleteTask(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error

func (*SSnapshot) SyncWithCloudSnapshot

func (self *SSnapshot) SyncWithCloudSnapshot(userCred mcclient.TokenCredential, ext cloudprovider.ICloudSnapshot, projectId string, projectSync bool) error

Only sync snapshot status

func (*SSnapshot) ValidateDeleteCondition

func (self *SSnapshot) ValidateDeleteCondition(ctx context.Context) error

type SSnapshotManager

type SSnapshotManager struct {
	db.SVirtualResourceBaseManager
}
var SnapshotManager *SSnapshotManager

func (*SSnapshotManager) AllowGetPropertyMaxCount

func (self *SSnapshotManager) AllowGetPropertyMaxCount(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SSnapshotManager) AllowPerformDeleteDiskSnapshots

func (self *SSnapshotManager) AllowPerformDeleteDiskSnapshots(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SSnapshotManager) CreateSnapshot

func (self *SSnapshotManager) CreateSnapshot(ctx context.Context, userCred mcclient.TokenCredential, createdBy, diskId, guestId, location, name string) (*SSnapshot, error)

func (*SSnapshotManager) GetConvertSnapshot

func (self *SSnapshotManager) GetConvertSnapshot(deleteSnapshot *SSnapshot) (*SSnapshot, error)

func (*SSnapshotManager) GetDiskFirstSnapshot

func (self *SSnapshotManager) GetDiskFirstSnapshot(diskId string) *SSnapshot

func (*SSnapshotManager) GetDiskSnapshotCount

func (self *SSnapshotManager) GetDiskSnapshotCount(diskId string) int

func (*SSnapshotManager) GetDiskSnapshots

func (self *SSnapshotManager) GetDiskSnapshots(diskId string) []SSnapshot

func (*SSnapshotManager) GetDiskSnapshotsByCreate

func (self *SSnapshotManager) GetDiskSnapshotsByCreate(diskId, createdBy string) []SSnapshot

func (*SSnapshotManager) GetPropertyMaxCount

func (self *SSnapshotManager) GetPropertyMaxCount(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SSnapshotManager) ListItemFilter

func (manager *SSnapshotManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)

func (*SSnapshotManager) PerformDeleteDiskSnapshots

func (self *SSnapshotManager) PerformDeleteDiskSnapshots(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SSnapshotManager) SyncSnapshots

func (manager *SSnapshotManager) SyncSnapshots(ctx context.Context, userCred mcclient.TokenCredential, provider *SCloudprovider, region *SCloudregion, snapshots []cloudprovider.ICloudSnapshot, projectId string, projectSync bool) compare.SyncResult

type SStorage

type SStorage struct {
	db.SEnabledStatusStandaloneResourceBase
	SInfrastructure
	SManagedResourceBase

	Capacity    int                  `nullable:"false" list:"admin" update:"admin" create:"admin_required"`                           // Column(Integer, nullable=False) # capacity of disk in MB
	Reserved    int                  `nullable:"true" default:"0" list:"admin" update:"admin"`                                        // Column(Integer, nullable=True, default=0)
	StorageType string               `width:"32" charset:"ascii" nullable:"false" list:"user" update:"admin" create:"admin_required"` // Column(VARCHAR(32, charset='ascii'), nullable=False)
	MediumType  string               `width:"32" charset:"ascii" nullable:"false" list:"user" update:"admin" create:"admin_required"` // Column(VARCHAR(32, charset='ascii'), nullable=False)
	Cmtbound    float32              `nullable:"true" list:"admin" update:"admin"`                                                    // Column(Float, nullable=True)
	StorageConf jsonutils.JSONObject `nullable:"true" get:"admin" update:"admin"`                                                     // = Column(JSONEncodedDict, nullable=True)

	ZoneId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"admin_required"`

	StoragecacheId string `width:"36" charset:"ascii" nullable:"true" list:"admin" get:"admin"`
}

func (*SStorage) AllowPerformCacheImage

func (self *SStorage) AllowPerformCacheImage(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SStorage) AllowPerformUncacheImage

func (self *SStorage) AllowPerformUncacheImage(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SStorage) GetAllAttachingHosts

func (self *SStorage) GetAllAttachingHosts() []SHost

func (*SStorage) GetAttachedHosts

func (self *SStorage) GetAttachedHosts() []SHost

func (*SStorage) GetCapacity

func (self *SStorage) GetCapacity() int

func (*SStorage) GetCustomizeColumns

func (self *SStorage) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SStorage) GetDiskCount

func (self *SStorage) GetDiskCount() int

func (*SStorage) GetFreeCapacity

func (self *SStorage) GetFreeCapacity() int

func (*SStorage) GetHostCount

func (self *SStorage) GetHostCount() int

func (*SStorage) GetIStorage

func (self *SStorage) GetIStorage() (cloudprovider.ICloudStorage, error)

func (*SStorage) GetMasterHost

func (self *SStorage) GetMasterHost() *SHost

func (*SStorage) GetOvercommitBound

func (self *SStorage) GetOvercommitBound() float32

func (*SStorage) GetReserved

func (self *SStorage) GetReserved() int

func (*SStorage) GetSnapshotCount

func (self *SStorage) GetSnapshotCount() int

func (*SStorage) GetStoragecache

func (self *SStorage) GetStoragecache() *SStoragecache

func (*SStorage) GetUsedCapacity

func (self *SStorage) GetUsedCapacity(isReady tristate.TriState) int

func (*SStorage) GetZoneId

func (self *SStorage) GetZoneId() string

func (*SStorage) IsLocal

func (self *SStorage) IsLocal() bool

func (*SStorage) PerformCacheImage

func (self *SStorage) PerformCacheImage(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SStorage) PerformUncacheImage

func (self *SStorage) PerformUncacheImage(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SStorage) SetStoragecache

func (self *SStorage) SetStoragecache(cache *SStoragecache) error

func (*SStorage) SyncStatusWithHosts

func (self *SStorage) SyncStatusWithHosts()

func (*SStorage) ValidateDeleteCondition

func (self *SStorage) ValidateDeleteCondition(ctx context.Context) error

type SStorageCapacity

type SStorageCapacity struct {
	Capacity  int
	Used      int
	Wasted    int
	VCapacity int
}

type SStorageManager

var StorageManager *SStorageManager

func (*SStorageManager) AllowListItems

func (manager *SStorageManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SStorageManager) FetchStorageById

func (manager *SStorageManager) FetchStorageById(storageId string) *SStorage

func (*SStorageManager) GetContextManager

func (manager *SStorageManager) GetContextManager() []db.IModelManager

func (*SStorageManager) InitializeData

func (manager *SStorageManager) InitializeData() error

func (*SStorageManager) ListItemFilter

func (manager *SStorageManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)

func (*SStorageManager) SyncStorages

func (*SStorageManager) TotalCapacity

func (manager *SStorageManager) TotalCapacity(rangeObj db.IStandaloneModel, hostTypes []string) StoragesCapacityStat

func (*SStorageManager) ValidateCreateData

func (manager *SStorageManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SStoragecache

type SStoragecache struct {
	db.SStandaloneResourceBase
	SInfrastructure
	SManagedResourceBase

	Path string `width:"256" charset:"utf8" nullable:"true" list:"admin" update:"admin" create:"admin_optional"` // = Column(VARCHAR(256, charset='utf8'), nullable=True)
}

func (*SStoragecache) AllowPerformCacheImage

func (self *SStoragecache) AllowPerformCacheImage(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SStoragecache) AllowPerformUncacheImage

func (self *SStoragecache) AllowPerformUncacheImage(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SStoragecache) GetCustomizeColumns

func (self *SStoragecache) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SStoragecache) GetExtraDetails

func (self *SStoragecache) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SStoragecache) GetHost

func (self *SStoragecache) GetHost() (*SHost, error)

func (*SStoragecache) GetIStorageCache

func (self *SStoragecache) GetIStorageCache() (cloudprovider.ICloudStoragecache, error)

func (*SStoragecache) PerformCacheImage

func (self *SStoragecache) PerformCacheImage(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SStoragecache) PerformUncacheImage

func (self *SStoragecache) PerformUncacheImage(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SStoragecache) StartImageCacheTask

func (self *SStoragecache) StartImageCacheTask(ctx context.Context, userCred mcclient.TokenCredential, imageId string, isForce bool, parentTaskId string) error

func (*SStoragecache) StartImageUncacheTask

func (self *SStoragecache) StartImageUncacheTask(ctx context.Context, userCred mcclient.TokenCredential, imageId string, isForce bool, parentTaskId string) error

func (*SStoragecache) ValidateDeleteCondition

func (self *SStoragecache) ValidateDeleteCondition(ctx context.Context) error

type SStoragecacheManager

type SStoragecacheManager struct {
	db.SStandaloneResourceBaseManager
	SInfrastructureManager
}
var StoragecacheManager *SStoragecacheManager

func (*SStoragecacheManager) ListItemFilter

func (manager *SStoragecacheManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)

func (*SStoragecacheManager) SyncWithCloudStoragecache

func (manager *SStoragecacheManager) SyncWithCloudStoragecache(cloudCache cloudprovider.ICloudStoragecache) (*SStoragecache, error)

type SStoragecachedimage

type SStoragecachedimage struct {
	db.SJointResourceBase
	SInfrastructure

	StoragecacheId string `width:"36" charset:"ascii" nullable:"false" list:"admin" create:"admin_required" key_index:"true"`
	CachedimageId  string `width:"36" charset:"ascii" nullable:"false" list:"admin" create:"admin_required" key_index:"true"`

	ExternalId string `width:"256" charset:"utf8" nullable:"false" get:"admin"`

	Status         string    `width:"32" charset:"ascii" nullable:"false" default:"init" list:"admin" update:"admin" create:"admin_required"` // = Column(VARCHAR(32, charset='ascii'), nullable=False,
	Path           string    `width:"256" charset:"utf8" nullable:"true" list:"admin" update:"admin" create:"admin_optional"`                 // = Column(VARCHAR(256, charset='utf8'), nullable=True)
	LastDownload   time.Time `get:"admin"`                                                                                                    // = Column(DateTime)
	DownloadRefcnt int       `get:"admin"`                                                                                                    // = Column(Integer)
}

func (*SStoragecachedimage) AddDownloadRefcount

func (self *SStoragecachedimage) AddDownloadRefcount() error

func (*SStoragecachedimage) Delete

func (self *SStoragecachedimage) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SStoragecachedimage) Detach

func (self *SStoragecachedimage) Detach(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SStoragecachedimage) GetCachedimage

func (self *SStoragecachedimage) GetCachedimage() *SCachedimage

func (*SStoragecachedimage) GetCustomizeColumns

func (self *SStoragecachedimage) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SStoragecachedimage) GetExtraDetails

func (self *SStoragecachedimage) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SStoragecachedimage) GetHost

func (self *SStoragecachedimage) GetHost() (*SHost, error)

func (*SStoragecachedimage) GetStoragecache

func (self *SStoragecachedimage) GetStoragecache() *SStoragecache

func (*SStoragecachedimage) Master

func (joint *SStoragecachedimage) Master() db.IStandaloneModel

func (*SStoragecachedimage) SetExternalId

func (self *SStoragecachedimage) SetExternalId(externalId string) error

func (*SStoragecachedimage) SetStatus

func (self *SStoragecachedimage) SetStatus(userCred mcclient.TokenCredential, status string, reason string) error

func (*SStoragecachedimage) Slave

func (joint *SStoragecachedimage) Slave() db.IStandaloneModel

func (*SStoragecachedimage) ValidateDeleteCondition

func (self *SStoragecachedimage) ValidateDeleteCondition(ctx context.Context) error

type SStoragecachedimageManager

type SStoragecachedimageManager struct {
	db.SJointResourceBaseManager
	SInfrastructureManager
}
var StoragecachedimageManager *SStoragecachedimageManager

func (*SStoragecachedimageManager) AllowListDescendent

func (manager *SStoragecachedimageManager) AllowListDescendent(ctx context.Context, userCred mcclient.TokenCredential, model db.IStandaloneModel, query jsonutils.JSONObject) bool

func (*SStoragecachedimageManager) GetStoragecachedimage

func (manager *SStoragecachedimageManager) GetStoragecachedimage(cacheId string, imageId string) *SStoragecachedimage

func (*SStoragecachedimageManager) Register

func (manager *SStoragecachedimageManager) Register(ctx context.Context, userCred mcclient.TokenCredential, cacheId, imageId string) *SStoragecachedimage

type SSyncRange

type SSyncRange struct {
	Force       bool
	FullSync    bool
	ProjectSync bool
	Region      []string
	Zone        []string
	Host        []string
}

func (*SSyncRange) NeedSyncInfo

func (sr *SSyncRange) NeedSyncInfo() bool

func (*SSyncRange) Normalize

func (sr *SSyncRange) Normalize() error

type SVCenter

type SVCenter struct {
	db.SEnabledStatusStandaloneResourceBase
	SInfrastructure

	Hostname string `width:"64" charset:"ascii" nullable:"false" list:"admin"` // = Column(VARCHAR(64, charset='ascii'), nullable=False)
	Port     int    `nullable:"false" list:"admin"`                            // = Column(Integer, nullable=False)
	Account  string `width:"64" charset:"ascii" nullable:"false" list:"admin"` // = Column(VARCHAR(64, charset='ascii'), nullable=False)
	Password string `width:"256" charset:"ascii" nullable:"false"`             // = Column(VARCHAR(256, charset='ascii'), nullable=False)

	LastSync time.Time `nullable:"true" get:"admin"` // = Column(DateTime, nullable=True)

	Version string `width:"32" charset:"ascii" nullable:"true" list:"admin"` // = Column(VARCHAR(32, charset='ascii'), nullable=True)

	Sysinfo jsonutils.JSONObject `nullable:"true" get:"admin"` // = Column(JSONEncodedDict, nullable=True)
}

type SVCenterManager

var VCenterManager *SVCenterManager

func (*SVCenterManager) AllowCreateItem

func (manager *SVCenterManager) AllowCreateItem(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

type SVpc

type SVpc struct {
	db.SEnabledStatusStandaloneResourceBase
	SInfrastructure
	SManagedResourceBase

	IsDefault bool `default:"false" list:"admin" create:"admin_optional"`

	CidrBlock string `width:"64" charset:"ascii" nullable:"true" list:"admin" create:"admin_required"`

	CloudregionId string `width:"36" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"`
}

func (*SVpc) AllowPerformPurge

func (self *SVpc) AllowPerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) bool

func (*SVpc) CustomizeCreate

func (self *SVpc) CustomizeCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SVpc) CustomizeDelete

func (self *SVpc) CustomizeDelete(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) error

func (*SVpc) Delete

func (self *SVpc) Delete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SVpc) GetCloudRegionId

func (self *SVpc) GetCloudRegionId() string

func (*SVpc) GetCustomizeColumns

func (self *SVpc) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SVpc) GetExtraDetails

func (self *SVpc) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SVpc) GetIRegion

func (self *SVpc) GetIRegion() (cloudprovider.ICloudRegion, error)

func (*SVpc) GetIVpc

func (self *SVpc) GetIVpc() (cloudprovider.ICloudVpc, error)

func (*SVpc) GetNetworkCount

func (self *SVpc) GetNetworkCount() int

func (*SVpc) GetRegion

func (self *SVpc) GetRegion() *SCloudregion

func (*SVpc) GetWireCount

func (self *SVpc) GetWireCount() int

func (*SVpc) GetWires

func (self *SVpc) GetWires() []SWire

func (*SVpc) PerformPurge

func (self *SVpc) PerformPurge(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SVpc) PostCreate

func (self *SVpc) PostCreate(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data jsonutils.JSONObject)

func (*SVpc) RealDelete

func (self *SVpc) RealDelete(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SVpc) StartDeleteVpcTask

func (self *SVpc) StartDeleteVpcTask(ctx context.Context, userCred mcclient.TokenCredential) error

func (*SVpc) SyncWithCloudVpc

func (self *SVpc) SyncWithCloudVpc(extVPC cloudprovider.ICloudVpc) error

func (*SVpc) ValidateDeleteCondition

func (self *SVpc) ValidateDeleteCondition(ctx context.Context) error

type SVpcManager

var VpcManager *SVpcManager

func (*SVpcManager) GetContextManager

func (manager *SVpcManager) GetContextManager() []db.IModelManager

func (*SVpcManager) InitializeData

func (manager *SVpcManager) InitializeData() error

func (*SVpcManager) ListItemFilter

func (manager *SVpcManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)

func (*SVpcManager) SyncVPCs

func (*SVpcManager) ValidateCreateData

func (manager *SVpcManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SWire

type SWire struct {
	db.SStandaloneResourceBase
	SInfrastructure

	Bandwidth    int    `list:"admin" update:"admin" nullable:"false" create:"admin_required"`             // = Column(Integer, nullable=False) # bandwidth of network in Mbps
	ScheduleRank int    `list:"admin" update:"admin"`                                                      // = Column(Integer, default=0, nullable=True)
	ZoneId       string `width:"36" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"` // = Column(VARCHAR(36, charset='ascii'), nullable=False)
	VpcId        string `wdith:"36" charset:"ascii" nullable:"false" list:"admin" create:"admin_required"`
}

func (*SWire) GetCandidateNetworkForIp

func (self *SWire) GetCandidateNetworkForIp(userCred mcclient.TokenCredential, ipAddr string) (*SNetwork, error)

func (*SWire) GetCandidatePrivateNetwork

func (self *SWire) GetCandidatePrivateNetwork(userCred mcclient.TokenCredential, isExit bool, serverType string) (*SNetwork, error)

func (*SWire) GetCandidatePublicNetwork

func (self *SWire) GetCandidatePublicNetwork(isExit bool, serverType string) (*SNetwork, error)

func (*SWire) GetCustomizeColumns

func (self *SWire) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SWire) GetExtraDetails

func (self *SWire) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SWire) GetHostwires

func (wire *SWire) GetHostwires() ([]SHostwire, error)

func (*SWire) GetIWire

func (self *SWire) GetIWire() (cloudprovider.ICloudWire, error)

func (*SWire) GetVpcId

func (wire *SWire) GetVpcId() string

func (*SWire) GetZone

func (self *SWire) GetZone() *SZone

func (*SWire) HostCount

func (wire *SWire) HostCount() int

func (*SWire) NetworkCount

func (wire *SWire) NetworkCount() int

func (*SWire) ValidateDeleteCondition

func (wire *SWire) ValidateDeleteCondition(ctx context.Context) error

func (*SWire) ValidateUpdateData

func (wire *SWire) ValidateUpdateData(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SWireManager

var WireManager *SWireManager

func (*SWireManager) FetchWireById

func (manager *SWireManager) FetchWireById(wireId string) *SWire

func (*SWireManager) GetContextManager

func (manager *SWireManager) GetContextManager() []db.IModelManager

func (*SWireManager) GetWireOfIp

func (manager *SWireManager) GetWireOfIp(ipAddr string) (*SWire, error)

func (*SWireManager) InitializeData

func (manager *SWireManager) InitializeData() error

func (*SWireManager) ListItemFilter

func (manager *SWireManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)

func (*SWireManager) SyncWires

func (*SWireManager) TotalCount

func (manager *SWireManager) TotalCount(rangeObj db.IStandaloneModel, hostTypes []string) WiresCountStat

func (*SWireManager) ValidateCreateData

func (manager *SWireManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SZone

type SZone struct {
	db.SStatusStandaloneResourceBase
	SInfrastructure

	Location string `width:"256" charset:"utf8" get:"user" update:"admin"` // = Column(VARCHAR(256, charset='utf8'))
	Contacts string `width:"256" charset:"utf8" get:"user" update:"admin"` // = Column(VARCHAR(256, charset='utf8'))
	NameCn   string `width:"256" charset:"utf8"`                           // = Column(VARCHAR(256, charset='utf8'))
	// status = Column(VARCHAR(36, charset='ascii'), nullable=False, default=ZONE_DISABLE)
	ManagerUri string `width:"256" charset:"ascii" list:"admin" update:"admin"` // = Column(VARCHAR(256, charset='ascii'), nullable=True)
	// admin_id = Column(VARCHAR(36, charset='ascii'), nullable=False)
	CloudregionId string `width:"36" charset:"ascii" nullable:"false" list:"user" create:"admin_required"`
}

func (*SZone) AllowGetDetailsCapability

func (self *SZone) AllowGetDetailsCapability(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SZone) GeneralUsage

func (zone *SZone) GeneralUsage() ZoneGeneralUsage

func (*SZone) GetCloudRegionId

func (zone *SZone) GetCloudRegionId() string

func (*SZone) GetCustomizeColumns

func (zone *SZone) GetCustomizeColumns(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SZone) GetDetailsCapability

func (self *SZone) GetDetailsCapability(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (jsonutils.JSONObject, error)

func (*SZone) GetExtraDetails

func (zone *SZone) GetExtraDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) *jsonutils.JSONDict

func (*SZone) GetRegion

func (zone *SZone) GetRegion() *SCloudregion

func (*SZone) HostCount

func (zone *SZone) HostCount(status string, hostStatus string, enabled tristate.TriState, hostType string, isBaremetal tristate.TriState) int

func (*SZone) ValidateDeleteCondition

func (zone *SZone) ValidateDeleteCondition(ctx context.Context) error

type SZoneManager

var ZoneManager *SZoneManager

func (*SZoneManager) AllowListItems

func (manager *SZoneManager) AllowListItems(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject) bool

func (*SZoneManager) Count

func (manager *SZoneManager) Count() int

func (*SZoneManager) FetchZoneById

func (manager *SZoneManager) FetchZoneById(zoneId string) *SZone

func (*SZoneManager) GetContextManager

func (manager *SZoneManager) GetContextManager() []db.IModelManager

func (*SZoneManager) InitializeData

func (manager *SZoneManager) InitializeData() error

func (*SZoneManager) ListItemFilter

func (manager *SZoneManager) ListItemFilter(ctx context.Context, q *sqlchemy.SQuery, userCred mcclient.TokenCredential, query jsonutils.JSONObject) (*sqlchemy.SQuery, error)

func (*SZoneManager) SyncZones

func (*SZoneManager) ValidateCreateData

func (manager *SZoneManager) ValidateCreateData(ctx context.Context, userCred mcclient.TokenCredential, ownerProjId string, query jsonutils.JSONObject, data *jsonutils.JSONDict) (*jsonutils.JSONDict, error)

type SchedStrategyType

type SchedStrategyType string

type SecurityGroupRuleSet

type SecurityGroupRuleSet []SSecurityGroupRule

func (SecurityGroupRuleSet) Len

func (v SecurityGroupRuleSet) Len() int

func (SecurityGroupRuleSet) Less

func (v SecurityGroupRuleSet) Less(i, j int) bool

func (SecurityGroupRuleSet) Swap

func (v SecurityGroupRuleSet) Swap(i, j int)

type StorageCapacityStat

type StorageCapacityStat struct {
	TotalSize        int64
	TotalSizeVirtual float64
}

type StorageStat

type StorageStat struct {
	Capacity             int
	Reserved             int
	Cmtbound             float32
	UsedCapacity         int
	FailedCapacity       int
	AttachedUsedCapacity int
	DetachedUsedCapacity int
}

type StoragesCapacityStat

type StoragesCapacityStat struct {
	Capacity         int64
	CapacityVirtual  float64
	CapacityUsed     int64
	CapacityUnread   int64
	AttachedCapacity int64
	DetachedCapacity int64
}

type WiresCountStat

type WiresCountStat struct {
	WiresCount    int
	NetCount      int
	GuestNicCount int
	HostNicCount  int
	ReservedCount int
}

type ZoneGeneralUsage

type ZoneGeneralUsage struct {
	Hosts             int
	HostsEnabled      int
	Baremetals        int
	BaremetalsEnabled int
	Wires             int
	Networks          int
	Storages          int
}

Jump to

Keyboard shortcuts

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