jdcloud

package
v0.0.0-...-e842130 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2019 License: MPL-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAX_SECURITY_GROUP_COUNT = 5
	MAX_RECONNECT_COUNT      = 3

	MAX_NI_RECONNECT  = 6
	MAX_EIP_RECONNECT = 10

	REQUEST_COMPLETED  = 0
	RESOURCE_EXISTS    = 0
	RESOURCE_EMPTY     = 0
	RESOURCE_NOT_FOUND = 404
	REQUEST_INVALID    = 400

	MAX_DISK_COUNT          = 1
	DISK_AVAILABLE          = "available"
	DISK_DELETED            = "deleted"
	DISK_TIMEOUT            = 60
	DISK_ATTACHMENT_TIMEOUT = 60
	DISK_ATTACHED           = "attached"
	DISK_DETACHED           = "detached"

	MAX_EIP_COUNT     = 1
	MAX_SYSDISK_COUNT = 1
	DISKTYPE_CLOUD    = "cloud"
	MAX_VM_COUNT      = 1
	VM_TIMEOUT        = 600
	VM_PENDING        = "pending"
	VM_STARTING       = "starting"
	VM_RUNNING        = "running"
	VM_STOPPING       = "stopping"
	VM_STOPPED        = "stopped"
	VM_REBOOTING      = "rebooting"
	VM_REBUILDING     = "rebuilding"
	VM_RESIZING       = "resizing"
	VM_DELETING       = "deleting"
	VM_TERMINATED     = "terminated"
	VM_ERROR          = "error"
	VM_DELETED        = ""

	KEYPAIRS_PERM = 0600
	KEYPAIRS_PRIV = 0400

	RDS_TIMEOUT       = 300
	RDS_READY         = "RUNNING"
	RDS_DELETED       = ""
	RDS_MAX_RECONNECT = 6
	CONNECT_FAILED    = "Client.Timeout exceeded"
)

Variables

This section is empty.

Functions

func DeleteVmInstance

func DeleteVmInstance(d *schema.ResourceData, m interface{}) (*apis.DeleteInstanceResponse, error)

func GetIntAddr

func GetIntAddr(d *schema.ResourceData, key string) *int

func GetStringAddr

func GetStringAddr(d *schema.ResourceData, key string) *string

func Provider

func Provider() *schema.Provider

func QueryInstanceDetail

func QueryInstanceDetail(d *schema.ResourceData, m interface{}) (*apis.DescribeInstanceResponse, error)

func StartVmInstance

func StartVmInstance(d *schema.ResourceData, m interface{}) (*apis.StartInstanceResponse, error)

func StopVmInstance

func StopVmInstance(d *schema.ResourceData, m interface{}) error

Types

type JDCloudConfig

type JDCloudConfig struct {
	AccessKey  string
	SecretKey  string
	Region     string
	Credential *core.Credential
}

Jump to

Keyboard shortcuts

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