bingocloud

package
v0.3.10-0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 26 Imported by: 3

Documentation

Index

Constants

View Source
const (
	CLOUD_PROVIDER_BINGO_CLOUD = api.CLOUD_PROVIDER_BINGO_CLOUD

	MAX_RESULT = 20
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AttachmentSet

type AttachmentSet struct {
	AttachTime          string `json:"attachTime"`
	Cache               string `json:"cache"`
	DeleteOnTermination string `json:"deleteOnTermination"`
	Device              string `json:"device"`
	InstanceId          string `json:"instanceId"`
	Status              string `json:"status"`
	VolumeId            string `json:"volumeId"`
}

type BingoCloudConfig

type BingoCloudConfig struct {
	// contains filtered or unexported fields
}

func NewBingoCloudClientConfig

func NewBingoCloudClientConfig(endpoint, accessKey, secretKey string) *BingoCloudConfig

func (*BingoCloudConfig) CloudproviderConfig

func (cfg *BingoCloudConfig) CloudproviderConfig(cpcfg cloudprovider.ProviderConfig) *BingoCloudConfig

func (*BingoCloudConfig) Debug

func (cfg *BingoCloudConfig) Debug(debug bool) *BingoCloudConfig

type BingoTags

type BingoTags struct {
	TagSet []struct {
		Key   string
		Value string
	}
}

func (*BingoTags) GetSysTags

func (self *BingoTags) GetSysTags() map[string]string

func (*BingoTags) GetTags

func (self *BingoTags) GetTags() (map[string]string, error)

func (*BingoTags) SetTags

func (self *BingoTags) SetTags(tags map[string]string, replace bool) error

type DatapointMember

type DatapointMember struct {
	Average     float64
	Maximum     float64
	Minimum     float64
	SampleCount float64
	Sum         float64
	Timestamp   time.Time
	Unit        string
}

func (DatapointMember) GetValue

func (self DatapointMember) GetValue() float64

type Datapoints

type Datapoints struct {
	Member []DatapointMember
}

type IPPermissionsEgress

type IPPermissionsEgress struct {
	BoundType   string `json:"boundType"`
	Description string `json:"description"`
	FromPort    int    `json:"fromPort"`
	IPProtocol  string `json:"ipProtocol"`
	Groups      []struct {
		GroupId   string
		GroupName string
	} `json:"groups"`
	IPRanges []struct {
		CIdRIP string `json:"cidrIp"`
	} `json:"ipRanges"`
	L2Accept     string `json:"l2Accept"`
	PermissionId string `json:"permissionId"`
	Policy       string `json:"policy"`
	ToPort       int    `json:"toPort"`
}

type MetricOutput

type MetricOutput struct {
	Datapoints Datapoints
	ObjName    string
	Period     int64
}

type SBingoCloudClient

type SBingoCloudClient struct {
	*BingoCloudConfig
	// contains filtered or unexported fields
}

func NewBingoCloudClient

func NewBingoCloudClient(cfg *BingoCloudConfig) (*SBingoCloudClient, error)

func (*SBingoCloudClient) DescribeMetricList

func (self *SBingoCloudClient) DescribeMetricList(ns, metricNm, dimensionName, dimensionValue string, since time.Time, until time.Time) (*MetricOutput, error)

func (*SBingoCloudClient) GetAccountId

func (self *SBingoCloudClient) GetAccountId() string

func (*SBingoCloudClient) GetCapabilities

func (self *SBingoCloudClient) GetCapabilities() []string

func (*SBingoCloudClient) GetEcsMetrics

func (*SBingoCloudClient) GetHostMetrics

func (*SBingoCloudClient) GetIRegionById

func (self *SBingoCloudClient) GetIRegionById(id string) (cloudprovider.ICloudRegion, error)

func (*SBingoCloudClient) GetIRegions

func (self *SBingoCloudClient) GetIRegions() []cloudprovider.ICloudRegion

func (*SBingoCloudClient) GetMetrics

func (*SBingoCloudClient) GetRegion

func (self *SBingoCloudClient) GetRegion(id string) (*SRegion, error)

func (*SBingoCloudClient) GetRegions

func (self *SBingoCloudClient) GetRegions() ([]SRegion, error)

func (*SBingoCloudClient) GetSubAccounts

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

type SCluster

type SCluster struct {
	multicloud.SResourceBase
	multicloud.STagBase

	ClusterControllerSet []struct {
		Address string
		Role    string
	}
	ClusterId        string
	ClusterName      string
	CreateVolumeMode string
	ExtendDiskMode   string
	Hypervisor       string
	MaxVolumeStorage string
	SchedPolicy      string
	Status           string
	// contains filtered or unexported fields
}

func (*SCluster) GetGlobalId

func (self *SCluster) GetGlobalId() string

func (*SCluster) GetI18n

func (self *SCluster) GetI18n() cloudprovider.SModelI18nTable

func (*SCluster) GetIHostById

func (self *SCluster) GetIHostById(id string) (cloudprovider.ICloudHost, error)

func (*SCluster) GetIHosts

func (self *SCluster) GetIHosts() ([]cloudprovider.ICloudHost, error)

func (*SCluster) GetIRegion

func (self *SCluster) GetIRegion() cloudprovider.ICloudRegion

func (*SCluster) GetIStorageById

func (self *SCluster) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)

func (*SCluster) GetIStorages

func (self *SCluster) GetIStorages() ([]cloudprovider.ICloudStorage, error)

func (*SCluster) GetId

func (self *SCluster) GetId() string

func (*SCluster) GetName

func (self *SCluster) GetName() string

func (*SCluster) GetStatus

func (self *SCluster) GetStatus() string

type SDisk

type SDisk struct {
	BingoTags
	multicloud.SDisk

	AttachmentSet    []AttachmentSet `json:"attachmentSet"`
	AvailabilityZone string          `json:"availabilityZone"`
	CreateTime       string          `json:"createTime"`
	Description      string          `json:"description"`
	DetachBehavior   string          `json:"detachBehavior"`
	Goal             string          `json:"goal"`
	Iops             string          `json:"iops"`
	IsDeductQuota    string          `json:"isDeductQuota"`
	IsEncrypt        string          `json:"isEncrypt"`
	IsForSleepInst   string          `json:"isForSleepInst"`
	IsMirrorVolume   string          `json:"isMirrorVolume"`
	IsMultiAttach    string          `json:"isMultiAttach"`
	IsOneInst        string          `json:"isOneInst"`
	IsRoot           string          `json:"isRoot"`
	Location         string          `json:"location"`
	MirrorFrom       string          `json:"mirrorFrom"`
	MirrorProcess    string          `json:"mirrorProcess"`
	MirrorStatus     string          `json:"mirrorStatus"`
	NodeId           string          `json:"nodeId"`
	Owner            string          `json:"owner"`
	Passphrase       string          `json:"passphrase"`
	Readonly         string          `json:"readonly"`
	Size             int             `json:"size"`
	SnapshotId       string          `json:"snapshotId"`
	Status           string          `json:"status"`
	StorageId        string          `json:"storageId"`
	VolumeId         string          `json:"volumeId"`
	VolumeName       string          `json:"volumeName"`
	// contains filtered or unexported fields
}

func (*SDisk) CreateISnapshot

func (self *SDisk) CreateISnapshot(ctx context.Context, name string, desc string) (cloudprovider.ICloudSnapshot, error)

func (*SDisk) Delete

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

func (*SDisk) GetAccessPath

func (self *SDisk) GetAccessPath() string

func (*SDisk) GetCacheMode

func (self *SDisk) GetCacheMode() string

func (*SDisk) GetDiskFormat

func (self *SDisk) GetDiskFormat() string

func (*SDisk) GetDiskSizeMB

func (self *SDisk) GetDiskSizeMB() int

func (*SDisk) GetDiskType

func (self *SDisk) GetDiskType() string

func (*SDisk) GetDriver

func (self *SDisk) GetDriver() string

func (*SDisk) GetExtSnapshotPolicyIds

func (self *SDisk) GetExtSnapshotPolicyIds() ([]string, error)

func (*SDisk) GetFsFormat

func (self *SDisk) GetFsFormat() string

func (*SDisk) GetGlobalId

func (self *SDisk) GetGlobalId() string

func (*SDisk) GetISnapshots

func (self *SDisk) GetISnapshots() ([]cloudprovider.ICloudSnapshot, error)

func (*SDisk) GetIStorage

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

func (*SDisk) GetIStorageId

func (self *SDisk) GetIStorageId() string

func (*SDisk) GetId

func (self *SDisk) GetId() string

func (*SDisk) GetIsAutoDelete

func (self *SDisk) GetIsAutoDelete() bool

func (*SDisk) GetIsNonPersistent

func (self *SDisk) GetIsNonPersistent() bool

func (*SDisk) GetMountpoint

func (self *SDisk) GetMountpoint() string

func (*SDisk) GetName

func (self *SDisk) GetName() string

func (*SDisk) GetStatus

func (self *SDisk) GetStatus() string

func (*SDisk) GetTemplateId

func (self *SDisk) GetTemplateId() string

func (*SDisk) Rebuild

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

func (*SDisk) Reset

func (self *SDisk) Reset(ctx context.Context, snapshotId string) (string, error)

func (*SDisk) Resize

func (self *SDisk) Resize(ctx context.Context, newSizeMB int64) error

type SEip

type SEip struct {
	multicloud.SEipBase
	BingoTags

	AddressId    string
	AddressType  string
	Bandtype     string
	Bandwidth    int
	CanAssociate bool
	InstanceId   string
	Owner        string
	PublicIp     string
	SubnetId     string
	VpcId        string
	// contains filtered or unexported fields
}

func (*SEip) Associate

func (self *SEip) Associate(conf *cloudprovider.AssociateConfig) error

func (*SEip) ChangeBandwidth

func (self *SEip) ChangeBandwidth(bw int) error

func (*SEip) Delete

func (self *SEip) Delete() error

func (*SEip) Dissociate

func (self *SEip) Dissociate() error

func (*SEip) GetAssociationExternalId

func (self *SEip) GetAssociationExternalId() string

func (*SEip) GetAssociationType

func (self *SEip) GetAssociationType() string

func (*SEip) GetBandwidth

func (self *SEip) GetBandwidth() int

func (*SEip) GetGlobalId

func (self *SEip) GetGlobalId() string

func (*SEip) GetINetworkId

func (self *SEip) GetINetworkId() string

func (*SEip) GetId

func (self *SEip) GetId() string

func (*SEip) GetInternetChargeType

func (self *SEip) GetInternetChargeType() string

func (*SEip) GetIpAddr

func (self *SEip) GetIpAddr() string

func (*SEip) GetMode

func (self *SEip) GetMode() string

func (*SEip) GetName

func (self *SEip) GetName() string

func (*SEip) GetProjectId

func (self *SEip) GetProjectId() string

func (*SEip) GetStatus

func (self *SEip) GetStatus() string

type SHost

type SHost struct {
	CPUHz           string    `json:"CpuHz"`
	ModelId         string    `json:"ModelId"`
	MonitorType     string    `json:"MonitorType"`
	IpmiMgrEnabled  string    `json:"IpmiMgrEnabled"`
	JoinTime        time.Time `json:"JoinTime"`
	IsBareMetal     string    `json:"isBareMetal"`
	BmcPwd          string    `json:"BmcPwd"`
	Extra           string    `json:"Extra"`
	InstanceId      string    `json:"instanceId"`
	Manufacturer    string    `json:"Manufacturer"`
	BaseBoardSerial string    `json:"BaseBoardSerial"`
	BareMetalHWInfo string    `json:"BareMetalHWInfo"`
	BmcPort         string    `json:"BmcPort"`
	CPUCores        int       `json:"CpuCores"`
	BmcIP           string    `json:"BmcIp"`
	Cabinet         string    `json:"Cabinet"`
	Memo            string    `json:"Memo"`
	HostIP          string    `json:"HostIp"`
	Memory          int       `json:"Memory"`
	HostId          string    `json:"HostId"`
	CPUKind         string    `json:"CpuKind"`
	SystemSerial    string    `json:"SystemSerial"`
	InCloud         string    `json:"InCloud"`
	Location        string    `json:"Location"`
	BmcUser         string    `json:"BmcUser"`
	PublicIP        string    `json:"PublicIp"`
	Status          string    `json:"Status"`
	Room            string    `json:"Room"`
	SSHMgrEnabled   string    `json:"SshMgrEnabled"`
	BmState         string    `json:"bmState"`
	HostName        string    `json:"HostName"`
}

type SImage

type SImage struct {
	multicloud.SResourceBase
	BingoTags

	Architecture       string `json:"architecture"`
	BlockDeviceMapping string `json:"blockDeviceMapping"`
	Bootloader         string `json:"bootloader"`
	Clonemode          string `json:"clonemode"`
	ClusterId          string `json:"clusterId"`
	Contentmode        string `json:"contentmode"`
	DefaultStorageId   string `json:"defaultStorageId"`
	Description        string `json:"description"`
	DiskBus            string `json:"diskBus"`
	ExtendDisk         string `json:"extendDisk"`
	Features           string `json:"features"`
	Hypervisor         string `json:"hypervisor"`
	ImageId            string `json:"imageId"`
	ImageLocation      string `json:"imageLocation"`
	ImageOwnerId       string `json:"imageOwnerId"`
	ImagePath          string `json:"imagePath"`
	ImageSize          int64  `json:"imageSize"`
	ImageState         string `json:"imageState"`
	ImageType          string `json:"imageType"`
	IsBareMetal        string `json:"isBareMetal"`
	IsPublic           bool   `json:"isPublic"`
	KernelId           string `json:"kernelId"`
	Name               string `json:"name"`
	OsId               string `json:"osId"`
	OSName             string `json:"osName"`
	Platform           string `json:"platform"`
	RamdiskId          string `json:"ramdiskId"`
	RootDeviceName     string `json:"rootDeviceName"`
	RootDeviceType     string `json:"rootDeviceType"`
	ScheduleTags       string `json:"scheduleTags"`
	Shared             string `json:"shared"`
	Sharemode          string `json:"sharemode"`
	StateReason        string `json:"stateReason"`
	StorageId          string `json:"storageId"`
	// contains filtered or unexported fields
}

func (*SImage) Delete

func (self *SImage) Delete(ctx context.Context) error

func (*SImage) GetBios

func (i *SImage) GetBios() cloudprovider.TBiosType

func (*SImage) GetCreatedAt

func (self *SImage) GetCreatedAt() time.Time

func (*SImage) GetFullOsName

func (i *SImage) GetFullOsName() string

func (*SImage) GetGlobalId

func (self *SImage) GetGlobalId() string

func (*SImage) GetIStoragecache

func (self *SImage) GetIStoragecache() cloudprovider.ICloudStoragecache

func (*SImage) GetId

func (self *SImage) GetId() string

func (*SImage) GetImageFormat

func (self *SImage) GetImageFormat() string

func (*SImage) GetImageStatus

func (self *SImage) GetImageStatus() string

func (*SImage) GetImageType

func (self *SImage) GetImageType() cloudprovider.TImageType

func (*SImage) GetMinOsDiskSizeGb

func (self *SImage) GetMinOsDiskSizeGb() int

func (*SImage) GetMinRamSizeMb

func (self *SImage) GetMinRamSizeMb() int

func (*SImage) GetName

func (self *SImage) GetName() string

func (*SImage) GetOsArch

func (i *SImage) GetOsArch() string

func (*SImage) GetOsDist

func (i *SImage) GetOsDist() string

func (*SImage) GetOsLang

func (i *SImage) GetOsLang() string

func (*SImage) GetOsType

func (i *SImage) GetOsType() cloudprovider.TOsType

func (*SImage) GetOsVersion

func (i *SImage) GetOsVersion() string

func (*SImage) GetProjectId

func (self *SImage) GetProjectId() string

func (*SImage) GetPublicScope

func (self *SImage) GetPublicScope() rbacutils.TRbacScope

func (*SImage) GetSizeByte

func (self *SImage) GetSizeByte() int64

func (*SImage) GetStatus

func (self *SImage) GetStatus() string

func (*SImage) GetSubImages

func (self *SImage) GetSubImages() []cloudprovider.SSubImage

func (*SImage) UEFI

func (self *SImage) UEFI() bool

type SInstance

type SInstance struct {
	BingoTags
	multicloud.SInstanceBase

	ReservationId string `json:"reservationId"`
	OwnerId       string
	GroupSet      []struct {
		GroupId   string
		GroupName string
	}
	InstancesSet struct {
		InstanceId    string `json:"instanceId"`
		InstanceName  string `json:"instanceName"`
		HostName      string `json:"hostName"`
		ImageId       string `json:"imageId"`
		InstanceState struct {
			Code            int    `json:"code"`
			Name            string `json:"name"`
			PendingProgress string `json:"pendingProgress"`
		} `json:"instanceState"`
		PrivateDNSName     string `json:"privateDnsName"`
		DNSName            string `json:"dnsName"`
		PrivateIPAddress   string `json:"privateIpAddress"`
		PrivateIPAddresses string `json:"privateIpAddresses"`
		IPAddress          string `json:"ipAddress"`
		NifInfo            string `json:"nifInfo"`
		KeyName            string `json:"keyName"`
		AmiLaunchIndex     int    `json:"amiLaunchIndex"`
		ProductCodesSet    []struct {
			ProductCode string `json:"productCode"`
		} `json:"productCodesSet"`
		InstanceType   string    `json:"instanceType"`
		VmtypeCPU      int       `json:"vmtype_cpu"`
		VmtypeMem      int       `json:"vmtype_mem"`
		VmtypeDisk     int       `json:"vmtype_disk"`
		VmtypeGpu      int       `json:"vmtype_gpu"`
		VmtypeSsd      int       `json:"vmtype_ssd"`
		VmtypeHdd      int       `json:"vmtype_hdd"`
		VmtypeHba      int       `json:"vmtype_hba"`
		VmtypeSriov    int       `json:"vmtype_sriov"`
		LaunchTime     time.Time `json:"launchTime"`
		RootDeviceType string    `json:"rootDeviceType"`
		HostAddress    string    `json:"hostAddress"`
		Platform       string    `json:"platform"`
		UseCompactMode bool      `json:"useCompactMode"`
		ExtendDisk     bool      `json:"extendDisk"`
		Placement      struct {
			AvailabilityZone string `json:"availabilityZone"`
		} `json:"placement"`
		Namespace    string `json:"namespace"`
		KernelId     string `json:"kernelId"`
		RamdiskId    string `json:"ramdiskId"`
		OperName     string `json:"operName"`
		OperProgress int    `json:"operProgress"`
		Features     string `json:"features"`
		Monitoring   struct {
			State string `json:"state"`
		} `json:"monitoring"`
		SubnetId              string    `json:"subnetId"`
		VpcId                 string    `json:"vpcId"`
		StorageId             string    `json:"storageId"`
		DisableAPITermination bool      `json:"disableApiTermination"`
		Vncdisabled           bool      `json:"vncdisabled"`
		StartTime             time.Time `json:"startTime"`
		CustomStatus          string    `json:"customStatus"`
		SystemStatus          int       `json:"systemStatus"`
		NetworkStatus         int       `json:"networkStatus"`
		ScheduleTags          string    `json:"scheduleTags"`
		StorageScheduleTags   string    `json:"storageScheduleTags"`
		IsEncrypt             bool      `json:"isEncrypt"`
		IsImported            bool      `json:"isImported"`
		Ec2Version            string    `json:"ec2Version"`
		Passphrase            string    `json:"passphrase"`
		DrsEnabled            bool      `json:"drs_enabled"`
		LaunchPriority        int       `json:"launchPriority"`
		CPUPriority           int       `json:"cpuPriority"`
		MemPriority           int       `json:"memPriority"`
		CPUQuota              int       `json:"cpuQuota"`
		AutoMigrate           bool      `json:"autoMigrate"`
		DrMirrorId            string    `json:"drMirrorId"`
		BlockDeviceMapping    []struct {
			DeviceName string `json:"deviceName"`
			Ebs        struct {
				AttachTime          time.Time `json:"attachTime"`
				DeleteOnTermination bool      `json:"deleteOnTermination"`
				Status              string    `json:"status"`
				VolumeId            string    `json:"volumeId"`
				Size                int       `json:"size"`
			} `json:"ebs"`
		} `json:"blockDeviceMapping"`
		EnableLiveScaleup bool   `json:"enableLiveScaleup"`
		ImageBytes        int64  `json:"imageBytes"`
		StatusReason      string `json:"statusReason"`
		Hypervisor        string `json:"hypervisor"`
		Bootloader        string `json:"bootloader"`
		BmMachineId       string `json:"bmMachineId"`
	}
	// contains filtered or unexported fields
}

func (*SInstance) AssignSecurityGroup

func (self *SInstance) AssignSecurityGroup(secgroupId string) error

func (*SInstance) AttachDisk

func (self *SInstance) AttachDisk(ctx context.Context, diskId string) error

func (*SInstance) ChangeConfig

func (self *SInstance) ChangeConfig(ctx context.Context, config *cloudprovider.SManagedVMChangeConfig) error

func (*SInstance) DeleteVM

func (self *SInstance) DeleteVM(ctx context.Context) error

func (*SInstance) DeployVM

func (self *SInstance) DeployVM(ctx context.Context, name string, username string, password string, publicKey string, deleteKeypair bool, description string) error

func (*SInstance) DetachDisk

func (self *SInstance) DetachDisk(ctx context.Context, diskId string) error

func (*SInstance) GetBios

func (self *SInstance) GetBios() cloudprovider.TBiosType

func (*SInstance) GetBootOrder

func (self *SInstance) GetBootOrder() string

func (*SInstance) GetError

func (self *SInstance) GetError() error

func (*SInstance) GetFullOsName

func (self *SInstance) GetFullOsName() string

func (*SInstance) GetGlobalId

func (self *SInstance) GetGlobalId() string

func (*SInstance) GetHostname

func (self *SInstance) GetHostname() string

func (*SInstance) GetHypervisor

func (self *SInstance) GetHypervisor() string

func (*SInstance) GetIDisks

func (self *SInstance) GetIDisks() ([]cloudprovider.ICloudDisk, error)

func (*SInstance) GetIEIP

func (self *SInstance) GetIEIP() (cloudprovider.ICloudEIP, error)

func (*SInstance) GetIHost

func (self *SInstance) GetIHost() cloudprovider.ICloudHost

func (*SInstance) GetIHostId

func (self *SInstance) GetIHostId() string

func (*SInstance) GetINics

func (self *SInstance) GetINics() ([]cloudprovider.ICloudNic, error)

func (*SInstance) GetId

func (self *SInstance) GetId() string

func (*SInstance) GetInstanceType

func (self *SInstance) GetInstanceType() string

func (*SInstance) GetMachine

func (self *SInstance) GetMachine() string

func (*SInstance) GetName

func (self *SInstance) GetName() string

func (*SInstance) GetOsArch

func (self *SInstance) GetOsArch() string

func (*SInstance) GetOsDist

func (i *SInstance) GetOsDist() string

func (*SInstance) GetOsLang

func (i *SInstance) GetOsLang() string

func (*SInstance) GetOsType

func (self *SInstance) GetOsType() cloudprovider.TOsType

func (*SInstance) GetOsVersion

func (i *SInstance) GetOsVersion() string

func (*SInstance) GetProjectId

func (self *SInstance) GetProjectId() string

func (*SInstance) GetSecurityGroupIds

func (self *SInstance) GetSecurityGroupIds() ([]string, error)

func (*SInstance) GetStatus

func (self *SInstance) GetStatus() string

func (*SInstance) GetVNCInfo

func (*SInstance) GetVcpuCount

func (self *SInstance) GetVcpuCount() int

func (*SInstance) GetVdi

func (self *SInstance) GetVdi() string

func (*SInstance) GetVga

func (self *SInstance) GetVga() string

func (*SInstance) GetVmemSizeMB

func (self *SInstance) GetVmemSizeMB() int

func (*SInstance) RebuildRoot

func (self *SInstance) RebuildRoot(ctx context.Context, config *cloudprovider.SManagedVMRebuildRootConfig) (string, error)

func (*SInstance) SetSecurityGroups

func (self *SInstance) SetSecurityGroups(secgroupIds []string) error

func (*SInstance) StartVM

func (self *SInstance) StartVM(ctx context.Context) error

func (*SInstance) StopVM

func (self *SInstance) StopVM(ctx context.Context, opts *cloudprovider.ServerStopOptions) error

func (*SInstance) UpdateUserData

func (self *SInstance) UpdateUserData(userData string) error

func (*SInstance) UpdateVM

func (self *SInstance) UpdateVM(ctx context.Context, name string) error

type SInstanceNic

type SInstanceNic struct {
	Association string `json:"association"`
	Attachment  struct {
		AttachTime          string `json:"attachTime"`
		AttachmentId        string `json:"attachmentId"`
		DeleteOnTermination string `json:"deleteOnTermination"`
		DeviceIndex         string `json:"deviceIndex"`
		InstanceId          string `json:"instanceId"`
		InstanceOwnerId     string `json:"instanceOwnerId"`
		Status              string `json:"status"`
	} `json:"attachment"`
	AvailabilityZone      string `json:"availabilityZone"`
	Description           string `json:"description"`
	FirstPacketLimit      string `json:"firstPacketLimit"`
	MACAddress            string `json:"macAddress"`
	Model                 string `json:"model"`
	NetworkInterfaceId    string `json:"networkInterfaceId"`
	NoMatchPort           string `json:"noMatchPort"`
	OwnerId               string `json:"ownerId"`
	PrivateDNSName        string `json:"privateDnsName"`
	PrivateIPAddress      string `json:"privateIpAddress"`
	PrivateIPAddressesSet []struct {
		Association      string `json:"association"`
		Primary          string `json:"primary"`
		PrivateDNSName   string `json:"privateDnsName"`
		PrivateIPAddress string `json:"privateIpAddress"`
	} `json:"privateIpAddressesSet"`
	RequesterManaged string `json:"requesterManaged"`
	SourceDestCheck  string `json:"sourceDestCheck"`
	Status           string `json:"status"`
	SubnetId         string `json:"subnetId"`
	VpcId            string `json:"vpcId"`
}

func (*SInstanceNic) AssignAddress

func (self *SInstanceNic) AssignAddress(ipAddrs []string) error

func (*SInstanceNic) AssignNAddress

func (self *SInstanceNic) AssignNAddress(count int) ([]string, error)

func (*SInstanceNic) GetDriver

func (self *SInstanceNic) GetDriver() string

func (*SInstanceNic) GetINetworkId

func (self *SInstanceNic) GetINetworkId() string

func (*SInstanceNic) GetIP

func (self *SInstanceNic) GetIP() string

func (*SInstanceNic) GetId

func (self *SInstanceNic) GetId() string

func (*SInstanceNic) GetMAC

func (self *SInstanceNic) GetMAC() string

func (*SInstanceNic) GetSubAddress

func (self *SInstanceNic) GetSubAddress() ([]string, error)

func (*SInstanceNic) InClassicNetwork

func (self *SInstanceNic) InClassicNetwork() bool

func (*SInstanceNic) UnassignAddress

func (self *SInstanceNic) UnassignAddress(ipAddrs []string) error

type SNetwork

type SNetwork struct {
	multicloud.SResourceBase
	multicloud.STagBase

	CidrBlock               string `json:"cidrBlock"`
	MapPublicIPOnLaunch     string `json:"mapPublicIpOnLaunch"`
	RouterId                string `json:"routerId"`
	NetworkFrom             string `json:"networkFrom"`
	NetworkNode             string `json:"networkNode"`
	IsManagedNetwork        string `json:"isManagedNetwork"`
	SubnetName              string `json:"subnetName"`
	NetworkMask             string `json:"networkMask"`
	NetName                 string `json:"netName"`
	Index                   string `json:"index"`
	VpcIsPublic             string `json:"vpcIsPublic"`
	Description             string `json:"description"`
	MicroSegmentation       string `json:"microSegmentation"`
	State                   string `json:"state"`
	DefaultForAz            string `json:"defaultForAz"`
	Router                  string `json:"router"`
	Active                  string `json:"active"`
	VpcShared               string `json:"vpcShared"`
	DvswitchName            string `json:"dvswitchName"`
	AvailableIPAddressCount string `json:"availableIpAddressCount"`
	VlanNum                 string `json:"vlanNum"`
	RouterCc2               string `json:"router_cc2"`
	ResStatus               string `json:"res_status"`
	IPAddressCount          string `json:"ipAddressCount"`
	RouterCc                string `json:"router_cc"`
	VpcId                   string `json:"vpcId"`
	NetworkTo               string `json:"networkTo"`
	Broadcast               string `json:"broadcast"`
	UserName                string `json:"userName"`
	IPVersion               string `json:"ipVersion"`
	AvailabilityZone        string `json:"availabilityZone"`
	Network                 string `json:"network"`
	RouterMac               string `json:"router_mac"`
	CheckIP                 string `json:"checkIp"`
	FloatingPool            string `json:"floatingPool"`
	StaticPool              string `json:"staticPool"`
	DvsPortGroup            string `json:"dvsPortGroup"`
	SubnetId                string `json:"subnetId"`
	// contains filtered or unexported fields
}

func (*SNetwork) Delete

func (self *SNetwork) Delete() error

func (*SNetwork) GetAllocTimeoutSeconds

func (self *SNetwork) GetAllocTimeoutSeconds() int

func (*SNetwork) GetGateway

func (self *SNetwork) GetGateway() string

func (*SNetwork) GetGlobalId

func (self *SNetwork) GetGlobalId() string

func (*SNetwork) GetIWire

func (self *SNetwork) GetIWire() cloudprovider.ICloudWire

func (*SNetwork) GetId

func (self *SNetwork) GetId() string

func (*SNetwork) GetIpEnd

func (self *SNetwork) GetIpEnd() string

func (*SNetwork) GetIpMask

func (self *SNetwork) GetIpMask() int8

func (*SNetwork) GetIpStart

func (self *SNetwork) GetIpStart() string

func (*SNetwork) GetName

func (self *SNetwork) GetName() string

func (*SNetwork) GetProjectId

func (self *SNetwork) GetProjectId() string

func (*SNetwork) GetPublicScope

func (self *SNetwork) GetPublicScope() rbacutils.TRbacScope

func (*SNetwork) GetServerType

func (self *SNetwork) GetServerType() string

func (*SNetwork) GetStatus

func (self *SNetwork) GetStatus() string

type SNode

type SNode struct {
	multicloud.SHostBase
	multicloud.STagBase

	ClusterId    string
	CpuCores     int
	CpuMax       int
	CpuModel     string
	CpuNode      int
	CpuSockets   int
	CpuUsed      int
	DiskMax      int
	DiskNode     int
	DiskUsed     int
	MemNode      int
	MemoryMax    int
	MemoryUsed   int
	NodeId       string
	NodeName     string
	ScheduleTags string
	Status       string
	// contains filtered or unexported fields
}

func (*SNode) CreateVM

func (*SNode) GetAccessIp

func (self *SNode) GetAccessIp() string

func (*SNode) GetAccessMac

func (self *SNode) GetAccessMac() string

func (*SNode) GetCpuCmtbound

func (self *SNode) GetCpuCmtbound() float32

func (*SNode) GetCpuCount

func (self *SNode) GetCpuCount() int

func (*SNode) GetCpuDesc

func (self *SNode) GetCpuDesc() string

func (*SNode) GetCpuMhz

func (self *SNode) GetCpuMhz() int

func (*SNode) GetEnabled

func (self *SNode) GetEnabled() bool

func (*SNode) GetGlobalId

func (self *SNode) GetGlobalId() string

func (*SNode) GetHostStatus

func (self *SNode) GetHostStatus() string

func (*SNode) GetHostType

func (self *SNode) GetHostType() string

func (*SNode) GetIHostNics

func (self *SNode) GetIHostNics() ([]cloudprovider.ICloudHostNetInterface, error)

func (*SNode) GetIStorageById

func (self *SNode) GetIStorageById(id string) (cloudprovider.ICloudStorage, error)

func (*SNode) GetIStorages

func (self *SNode) GetIStorages() ([]cloudprovider.ICloudStorage, error)

func (*SNode) GetIVMById

func (self *SNode) GetIVMById(id string) (cloudprovider.ICloudVM, error)

func (*SNode) GetIVMs

func (self *SNode) GetIVMs() ([]cloudprovider.ICloudVM, error)

func (*SNode) GetIWires

func (self *SNode) GetIWires() ([]cloudprovider.ICloudWire, error)

func (*SNode) GetId

func (self *SNode) GetId() string

func (*SNode) GetIsMaintenance

func (self *SNode) GetIsMaintenance() bool

func (*SNode) GetMemCmtbound

func (self *SNode) GetMemCmtbound() float32

func (*SNode) GetMemSizeMB

func (self *SNode) GetMemSizeMB() int

func (*SNode) GetName

func (self *SNode) GetName() string

func (*SNode) GetNodeCount

func (self *SNode) GetNodeCount() int8

func (*SNode) GetNodeStatus

func (self *SNode) GetNodeStatus() string

func (*SNode) GetNodeType

func (self *SNode) GetNodeType() string

func (*SNode) GetReservedMemoryMb

func (self *SNode) GetReservedMemoryMb() int

func (*SNode) GetSN

func (self *SNode) GetSN() string

func (*SNode) GetSchedtags

func (self *SNode) GetSchedtags() ([]string, error)

func (*SNode) GetStatus

func (self *SNode) GetStatus() string

func (*SNode) GetStorageSizeMB

func (self *SNode) GetStorageSizeMB() int

func (*SNode) GetStorageType

func (self *SNode) GetStorageType() string

func (*SNode) GetSysInfo

func (self *SNode) GetSysInfo() jsonutils.JSONObject

func (*SNode) GetVersion

func (self *SNode) GetVersion() string

type SRegion

type SRegion struct {
	multicloud.SRegion
	multicloud.SRegionEipBase
	multicloud.SRegionLbBase
	multicloud.SRegionOssBase
	multicloud.SRegionSecurityGroupBase
	multicloud.SRegionVpcBase
	multicloud.SRegionZoneBase

	RegionId       string
	RegionName     string
	Hypervisor     string
	NetworkMode    string
	RegionEndpoint string
	// contains filtered or unexported fields
}

func (*SRegion) GetCapabilities

func (self *SRegion) GetCapabilities() []string

func (*SRegion) GetClient

func (self *SRegion) GetClient() *SBingoCloudClient

func (*SRegion) GetCloudEnv

func (self *SRegion) GetCloudEnv() string

func (*SRegion) GetClusters

func (self *SRegion) GetClusters() ([]SCluster, error)

func (*SRegion) GetDisk

func (self *SRegion) GetDisk(id string) (*SDisk, error)

func (*SRegion) GetDisks

func (self *SRegion) GetDisks(id string, maxResult int, nextToken string) ([]SDisk, string, error)

func (*SRegion) GetEips

func (self *SRegion) GetEips(ip, instanceId, nextToken string) ([]SEip, string, error)

func (*SRegion) GetGeographicInfo

func (self *SRegion) GetGeographicInfo() cloudprovider.SGeographicInfo

func (*SRegion) GetGlobalId

func (self *SRegion) GetGlobalId() string

func (*SRegion) GetHosts

func (self *SRegion) GetHosts(nextToken string) ([]SHost, string, error)

func (*SRegion) GetI18n

func (self *SRegion) GetI18n() cloudprovider.SModelI18nTable

func (*SRegion) GetIEipById

func (self *SRegion) GetIEipById(id string) (cloudprovider.ICloudEIP, error)

func (*SRegion) GetIEips

func (self *SRegion) GetIEips() ([]cloudprovider.ICloudEIP, error)

func (*SRegion) GetIHostById

func (self *SRegion) GetIHostById(id string) (cloudprovider.ICloudHost, error)

func (*SRegion) GetIHosts

func (self *SRegion) GetIHosts() ([]cloudprovider.ICloudHost, error)

func (*SRegion) GetISecurityGroupById

func (self *SRegion) GetISecurityGroupById(id string) (cloudprovider.ICloudSecurityGroup, error)

func (*SRegion) GetISecurityGroupByName

func (*SRegion) GetIStoragecacheById

func (self *SRegion) GetIStoragecacheById(id string) (cloudprovider.ICloudStoragecache, error)

func (*SRegion) GetIStoragecaches

func (self *SRegion) GetIStoragecaches() ([]cloudprovider.ICloudStoragecache, error)

func (*SRegion) GetIVpcs

func (self *SRegion) GetIVpcs() ([]cloudprovider.ICloudVpc, error)

func (*SRegion) GetIZoneById

func (self *SRegion) GetIZoneById(id string) (cloudprovider.ICloudZone, error)

func (*SRegion) GetIZones

func (self *SRegion) GetIZones() ([]cloudprovider.ICloudZone, error)

func (*SRegion) GetId

func (self *SRegion) GetId() string

func (*SRegion) GetImages

func (self *SRegion) GetImages(id, nextToken string) ([]SImage, string, error)

func (*SRegion) GetInstanceNics

func (self *SRegion) GetInstanceNics(insId string) ([]SInstanceNic, error)

func (*SRegion) GetInstances

func (self *SRegion) GetInstances(id, nodeId string, maxResult int, nextToken string) ([]SInstance, string, error)

func (*SRegion) GetName

func (self *SRegion) GetName() string

func (*SRegion) GetNetworks

func (self *SRegion) GetNetworks(id, clusterId, vpcId string) ([]SNetwork, error)

func (*SRegion) GetNodes

func (self *SRegion) GetNodes(clusterId, nodeId string) ([]SNode, error)

func (*SRegion) GetProvider

func (self *SRegion) GetProvider() string

func (*SRegion) GetSecurityGroups

func (self *SRegion) GetSecurityGroups(id, name, nextToken string) ([]SSecurityGroup, string, error)

func (*SRegion) GetStatus

func (self *SRegion) GetStatus() string

func (*SRegion) GetStorages

func (self *SRegion) GetStorages(nextToken string) ([]SStorage, string, error)

func (*SRegion) GetVpcs

func (self *SRegion) GetVpcs(id string) ([]SVpc, error)

func (*SRegion) GetZones

func (self *SRegion) GetZones() ([]SZone, error)

type SSecurityGroup

type SSecurityGroup struct {
	multicloud.SResourceBase
	BingoTags

	ComplexIPPermissions       string                `json:"complexIpPermissions"`
	ComplexIPPermissionsEgress string                `json:"complexIpPermissionsEgress"`
	DisplayName                string                `json:"displayName"`
	GroupDescription           string                `json:"groupDescription"`
	GroupId                    string                `json:"groupId"`
	GroupName                  string                `json:"groupName"`
	IPPermissionType           string                `json:"ipPermissionType"`
	IPPermissions              string                `json:"ipPermissions"`
	IPPermissionsEgress        []IPPermissionsEgress `json:"ipPermissionsEgress"`
	OwnerId                    string                `json:"ownerId"`
	// contains filtered or unexported fields
}

func (*SSecurityGroup) Delete

func (self *SSecurityGroup) Delete() error

func (*SSecurityGroup) GetDescription

func (self *SSecurityGroup) GetDescription() string

func (*SSecurityGroup) GetGlobalId

func (self *SSecurityGroup) GetGlobalId() string

func (*SSecurityGroup) GetId

func (self *SSecurityGroup) GetId() string

func (*SSecurityGroup) GetName

func (self *SSecurityGroup) GetName() string

func (*SSecurityGroup) GetProjectId

func (self *SSecurityGroup) GetProjectId() string

func (*SSecurityGroup) GetReferences

func (self *SSecurityGroup) GetReferences() ([]cloudprovider.SecurityGroupReference, error)

func (*SSecurityGroup) GetRules

func (self *SSecurityGroup) GetRules() ([]cloudprovider.SecurityRule, error)

func (*SSecurityGroup) GetStatus

func (self *SSecurityGroup) GetStatus() string

func (*SSecurityGroup) GetVpcId

func (self *SSecurityGroup) GetVpcId() string

func (*SSecurityGroup) SyncRules

func (self *SSecurityGroup) SyncRules(common, inAdds, outAdds, inDels, outDels []cloudprovider.SecurityRule) error

type SStorage

type SStorage struct {
	multicloud.STagBase
	multicloud.SStorageBase

	StorageId    string `json:"storageId"`
	Location     string `json:"location"`
	UsedBy       string `json:"usedBy"`
	SpaceUsed    int64  `json:"spaceUsed"`
	StorageName  string `json:"storageName"`
	FileFormat   string `json:"fileFormat"`
	Disabled     string `json:"disabled"`
	SpaceMax     int64  `json:"spaceMax"`
	StorageType  string `json:"storageType"`
	DrCloudId    string `json:"drCloudId"`
	ParameterSet []struct {
		Name  string
		Value string
	} `json:"parameterSet"`
	ClusterId    string `json:"clusterId"`
	IsDRStorage  string `json:"isDRStorage"`
	ResUsage     string `json:"resUsage"`
	ScheduleTags string `json:"scheduleTags"`
	// contains filtered or unexported fields
}

func (*SStorage) CreateIDisk

func (*SStorage) DisableSync

func (self *SStorage) DisableSync() bool

func (*SStorage) GetCapacityMB

func (self *SStorage) GetCapacityMB() int64

func (*SStorage) GetCapacityUsedMB

func (self *SStorage) GetCapacityUsedMB() int64

func (*SStorage) GetEnabled

func (self *SStorage) GetEnabled() bool

func (*SStorage) GetGlobalId

func (self *SStorage) GetGlobalId() string

func (*SStorage) GetIDiskById

func (self *SStorage) GetIDiskById(id string) (cloudprovider.ICloudDisk, error)

func (*SStorage) GetIDisks

func (self *SStorage) GetIDisks() ([]cloudprovider.ICloudDisk, error)

func (*SStorage) GetIStoragecache

func (self *SStorage) GetIStoragecache() cloudprovider.ICloudStoragecache

func (*SStorage) GetIZone

func (self *SStorage) GetIZone() cloudprovider.ICloudZone

func (*SStorage) GetId

func (self *SStorage) GetId() string

func (*SStorage) GetMediumType

func (self *SStorage) GetMediumType() string

func (*SStorage) GetMountPoint

func (self *SStorage) GetMountPoint() string

func (*SStorage) GetName

func (self *SStorage) GetName() string

func (*SStorage) GetStatus

func (self *SStorage) GetStatus() string

func (*SStorage) GetStorageConf

func (self *SStorage) GetStorageConf() jsonutils.JSONObject

func (*SStorage) GetStorageType

func (self *SStorage) GetStorageType() string

func (*SStorage) IsSysDiskStore

func (self *SStorage) IsSysDiskStore() bool

type SStoragecache

type SStoragecache struct {
	multicloud.SResourceBase
	multicloud.STagBase
	// contains filtered or unexported fields
}

func (*SStoragecache) CreateIImage

func (self *SStoragecache) CreateIImage(snapshotId, imageName, osType, imageDesc string) (cloudprovider.ICloudImage, error)

func (*SStoragecache) DownloadImage

func (self *SStoragecache) DownloadImage(userCred mcclient.TokenCredential, imageId string, extId string, path string) (jsonutils.JSONObject, error)

func (*SStoragecache) GetGlobalId

func (self *SStoragecache) GetGlobalId() string

func (*SStoragecache) GetICloudImages

func (self *SStoragecache) GetICloudImages() ([]cloudprovider.ICloudImage, error)

func (*SStoragecache) GetICustomizedCloudImages

func (self *SStoragecache) GetICustomizedCloudImages() ([]cloudprovider.ICloudImage, error)

func (*SStoragecache) GetIImageById

func (self *SStoragecache) GetIImageById(id string) (cloudprovider.ICloudImage, error)

func (*SStoragecache) GetId

func (self *SStoragecache) GetId() string

func (*SStoragecache) GetName

func (self *SStoragecache) GetName() string

func (*SStoragecache) GetPath

func (self *SStoragecache) GetPath() string

func (*SStoragecache) GetStatus

func (self *SStoragecache) GetStatus() string

func (*SStoragecache) UploadImage

func (self *SStoragecache) UploadImage(ctx context.Context, userCred mcclient.TokenCredential, image *cloudprovider.SImageCreateOption, callback func(float32)) (string, error)

type SVpc

type SVpc struct {
	multicloud.SVpc
	multicloud.STagBase

	RequestId       string `json:"requestId"`
	VlanNum         string `json:"vlanNum"`
	AsGateway       string `json:"asGateway"`
	DhcpOptionsId   string `json:"dhcpOptionsId"`
	VpcName         string `json:"vpcName"`
	OwnerId         string `json:"ownerId"`
	WanCode         string `json:"wanCode"`
	Shared          string `json:"shared"`
	SubnetPolicy    string `json:"subnetPolicy"`
	Description     string `json:"description"`
	VpcId           string `json:"vpcId"`
	IsPublicNetwork string `json:"isPublicNetwork"`
	GatewayId       string `json:"gatewayId"`
	IsDefault       string `json:"isDefault"`
	Provider        string `json:"provider"`
	State           string `json:"state"`
	CidrBlock       string `json:"cidrBlock"`
	InstanceTenancy string `json:"instanceTenancy"`
	// contains filtered or unexported fields
}

func (*SVpc) Delete

func (self *SVpc) Delete() error

func (*SVpc) GetCidrBlock

func (self *SVpc) GetCidrBlock() string

func (*SVpc) GetGlobalId

func (self *SVpc) GetGlobalId() string

func (*SVpc) GetIRouteTableById

func (self *SVpc) GetIRouteTableById(id string) (cloudprovider.ICloudRouteTable, error)

func (*SVpc) GetIRouteTables

func (self *SVpc) GetIRouteTables() ([]cloudprovider.ICloudRouteTable, error)

func (*SVpc) GetISecurityGroups

func (self *SVpc) GetISecurityGroups() ([]cloudprovider.ICloudSecurityGroup, error)

func (*SVpc) GetIWireById

func (self *SVpc) GetIWireById(id string) (cloudprovider.ICloudWire, error)

func (*SVpc) GetIWires

func (self *SVpc) GetIWires() ([]cloudprovider.ICloudWire, error)

func (*SVpc) GetId

func (self *SVpc) GetId() string

func (*SVpc) GetIsDefault

func (self *SVpc) GetIsDefault() bool

func (*SVpc) GetName

func (self *SVpc) GetName() string

func (*SVpc) GetRegion

func (self *SVpc) GetRegion() cloudprovider.ICloudRegion

func (*SVpc) GetStatus

func (self *SVpc) GetStatus() string

type SWire

type SWire struct {
	multicloud.STagBase
	multicloud.SResourceBase
	// contains filtered or unexported fields
}

func (*SWire) CreateINetwork

func (*SWire) GetBandwidth

func (self *SWire) GetBandwidth() int

func (*SWire) GetGlobalId

func (self *SWire) GetGlobalId() string

func (*SWire) GetINetworkById

func (self *SWire) GetINetworkById(id string) (cloudprovider.ICloudNetwork, error)

func (*SWire) GetINetworks

func (self *SWire) GetINetworks() ([]cloudprovider.ICloudNetwork, error)

func (*SWire) GetIVpc

func (self *SWire) GetIVpc() cloudprovider.ICloudVpc

func (*SWire) GetIZone

func (self *SWire) GetIZone() cloudprovider.ICloudZone

func (*SWire) GetId

func (self *SWire) GetId() string

func (*SWire) GetName

func (self *SWire) GetName() string

func (*SWire) GetStatus

func (self *SWire) GetStatus() string

func (*SWire) IsEmulated

func (self *SWire) IsEmulated() bool

type SZone

type SZone struct {
	ZoneName    string
	DisplayName string
	ZoneState   string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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