ktcloudsdk

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 14 Imported by: 4

README

KT Cloud SDK Go

Go SDK for KT Cloud G1/G2 Platform REST API. This Go SDK is being used for the KT Cloud Classic connection driver of Cloud-Barista.

Example usage of the SDK

Showing the Guest OS and State of a Product Type(VM Image) :

package main

import (
	"fmt"
	"strings"
	"os"
	"errors"
	ktsdk "github.com/cloud-barista/ktcloud-sdk-go"
)

func main() {
	imgIdToGetInfo := "87838094-af4f-449f-a2f4-f5b4b581eb29" // An Image ID on 'KOR-Seoul M' zone.
	zoneId := "95e2f517-d64a-4866-8585-5177c256f7c7" // KT Cloud 'KOR-Seoul M' zone ID

	guestOS, imgStatus, err := GetVMImageInfo(imgIdToGetInfo, zoneId)
	if err != nil {
		fmt.Errorf("Failed to Find the Image Info : [%v]", err)
		os.Exit(1)
	}
	fmt.Printf("# Guest OS : [%s], Image Status : [%s] of the Image ID.\n", guestOS, imgStatus)
}

func GetVMImageInfo(imageId string, zoneId string) (string, string, error) {
	apiKey := os.Getenv("KTCLOUD_API_KEY")
	if len(apiKey) == 0 {
		fmt.Println("Failed to Find KTCLOUD_API_KEY, exiting")
		os.Exit(1)
	}
	secretKey := os.Getenv("KTCLOUD_SECRET_KEY")
	if len(secretKey) == 0 {
		fmt.Println("Failed to Find KTCLOUD_SECRET_KEY, exiting")
		os.Exit(1)
	}

	// If KT Cloud Zone is 'KOR-Seoul M2' => use API v2, else use API v1.
	var apiUrl string
	if zoneId == "d7d0177e-6cda-404a-a46f-a5b356d2874e" { // 'KOR-Seoul M2' zone
	apiUrl = "https://api.ucloudbiz.olleh.com/server/v2/client/api" // API v2
	} else {
	apiUrl = "https://api.ucloudbiz.olleh.com/server/v1/client/api" // API v1
	}

	// Always validate any SSL certificates in the chain
	insecureskipverify := false
	cs := ktsdk.KtCloudClient{}.New(apiUrl, apiKey, secretKey, insecureskipverify)

	result, err := cs.ListAvailableProductTypes(zoneId)
	if err != nil {
		return "", "", fmt.Errorf("Failed to Find the List of Product Types : [%v]", err)
	}

	if len(result.Listavailableproducttypesresponse.ProductTypes) < 1 {
		return "", "", errors.New("Failed to Get Product Type List!!")
	} else {
		var guestOS string
		var imgStatus string
		for _, productType := range result.Listavailableproducttypesresponse.ProductTypes {
			if strings.EqualFold(productType.TemplateId, imageId) {	
				guestOS 	= productType.TemplateDesc
				imgStatus 	= productType.ProductState
				break
			}
		}
		if !strings.EqualFold(guestOS, "") {
			return guestOS, imgStatus, nil		
		} else {
			return "", "", errors.New("Failed to Find the Product Types in the Zone!!")
		}
	}
}

Original source code of ktcloud-sdk-go

The original source code, gopherstack is a CloudStack Go SDK.

< Original code Licensed under the MIT >

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRequest

func NewRequest(c KtCloudClient, request string, params url.Values) (interface{}, error)

Types

type AssociateIpAddressResponse

type AssociateIpAddressResponse struct {
	Associateipaddressresponse struct {
		ID    string `json:"id"` // PublicIP ID
		JobId string `json:"jobid"`
	} `json:"associateipaddressresponse"`
}

type AssociatePublicIpReqInfo

type AssociatePublicIpReqInfo struct {
	ZoneId        string
	UsagePlanType string
	Account       string
	DomainId      string
	NetworkId     string
}

type CreateFirewallRuleReqInfo

type CreateFirewallRuleReqInfo struct {
	IpAddressId string
	Protocol    string
	CidrList    string
	// StartPort   int
	// EndPort     int
	StartPort string
	EndPort   string
	IcmpCode  string
	IcmpType  string
	Type      string // Firewall 설정 타입으로 user 또는 system 입력(Default : user)
}

type CreateFirewallRuleResponse

type CreateFirewallRuleResponse struct {
	Createfirewallruleresponse struct {
		ID    string `json:"id"` // FirewallRule ID
		JobId string `json:"jobid"`
	} `json:"createfirewallruleresponse"`
}

type CreatePortForwardingRuleReqInfo

type CreatePortForwardingRuleReqInfo struct {
	IpAddressId      string
	PrivatePort      string
	Protocol         string //TCP or UDP
	PublicPort       string //Port of the public IP Address
	VirtualmachineId string
	OpenFirewall     bool
	//CidrList      				string  // # Parameter cidrList is deprecated!!
	PrivateEndPort string
	PublicEndPort  string
}

type CreatePortForwardingRuleResponse

type CreatePortForwardingRuleResponse struct {
	Createportforwardingruleresponse struct {
		ID    string `json:"id"` // PortForwardingRule ID
		JobId string `json:"jobid"`
	} `json:"createportforwardingruleresponse"`
}

type CreateSshKeyPairResponse

type CreateSshKeyPairResponse struct {
	Createsshkeypairresponse struct {
		KeyPair KeyPair `json:"keypair"`
	} `json:"createsshkeypairresponse"`
}

type CreateTags

type CreateTags struct {
	ResourceIds  []string `json:"resourceids"`
	ResourceType string   `json:"resourcetype`
	Tags         []TagArg `json:"tags`
}

type CreateTagsResponse

type CreateTagsResponse struct {
	Createtagsresponse struct {
		JobId string `json:"jobid"`
	} `json:"createtagsresponse"`
}

type DeleteFirewallRuleResponse

type DeleteFirewallRuleResponse struct {
	Deletefirewallruleresponse struct {
		JobId string `json:"jobid"`
	} `json:"deletefirewallruleresponse"`
}

type DeletePortForwardingRuleResponse

type DeletePortForwardingRuleResponse struct {
	Deleteportforwardingruleresponse struct {
		JobId string `json:"jobid"`
	} `json:"deleteportforwardingruleresponse"`
}

type DeleteSshKeyPairResponse

type DeleteSshKeyPairResponse struct {
	Deletesshkeypairresponse struct {
		Success string `json:"success"`
	} `json:"deletesshkeypairresponse"`
}

type DeleteTags

type DeleteTags struct {
	ResourceIds  []string `json:"resourceids"`
	ResourceType string   `json:"resourcetype`
	Tags         []TagArg `json:"tags`
}

type DeleteTagsResponse

type DeleteTagsResponse struct {
	Deletetagsresponse struct {
		JobId string `json:"jobid"`
	} `json:"deletetagsresponse"`
}

type DeployVMReqInfo

type DeployVMReqInfo struct {
	ZoneId            string
	ServiceOfferingId string // VMSpec ID
	TemplateId        string // VMImage ID
	DiskOfferingId    string
	ProductCode       string
	VMHostName        string
	DisplayName       string
	UsagePlanType     string
	RunSysPrep        bool
	Account           string
	DomainId          string
	Group             string
	Hypervisor        string
	KeyPair           string
	IPtoNetworkList   []string
	Keyboard          string
	NetworkIds        []string
	ProjectId         string
	UserData          string
}

type DeployVirtualMachineResponse

type DeployVirtualMachineResponse struct {
	Deployvirtualmachineresponse struct {
		ID     string `json:"id"` // Virtualmachine ID
		JobId  string `json:"jobid"`
		RootId string `json:"rootid"` // Created Root Volume ID
	} `json:"deployvirtualmachineresponse"`
}

type DestroyVirtualMachineResponse

type DestroyVirtualMachineResponse struct {
	Destroyvirtualmachineresponse struct {
		JobId string `json:"jobid"`
	} `json:"destroyvirtualmachineresponse"`
}

type DisassociateIpAddressResponse

type DisassociateIpAddressResponse struct {
	Disassociateipaddressresponse struct {
		JobId string `json:"jobid"`
	} `json:"disassociateipaddressresponse"`
}

type FirewallRule

type FirewallRule struct {
	ID          string        `json:"id"`
	Protocol    string        `json:"protocol"`
	StartPort   int           `json:"startport"` // Caution!! (Parameter type)
	EndPort     int           `json:"endport"`   // Caution!! (Parameter type)
	IpAddressId string        `json:"ipaddressid"`
	NetworkId   string        `json:"networkid"`
	IpAddress   string        `json:"ipaddress"`
	State       string        `json:"state"`
	CidrList    string        `json:"cidrlist"`
	Tags        []interface{} `json:"tags"`
	ForDisplay  bool          `json:"fordisplay"`
}

type KeyPair

type KeyPair struct {
	PrivateKey string `json:"privatekey"`

	Name        string `json:"name"`
	Account     string `json:"account"`
	DomainId    string `json:"domainid"`
	Domain      string `json:"domain"`
	Fingerprint string `json:"fingerprint"`
}

type KtCloudClient

type KtCloudClient struct {

	// The base URL of the API
	BaseURL string

	// Credentials
	APIKey    string
	SecretKey string
	// contains filtered or unexported fields
}

func (KtCloudClient) AssociateIpAddress

func (c KtCloudClient) AssociateIpAddress(ipReqInfo AssociatePublicIpReqInfo) (AssociateIpAddressResponse, error)

func (KtCloudClient) CreateFirewallRule

func (c KtCloudClient) CreateFirewallRule(filewallRuleCreateReqInfo CreateFirewallRuleReqInfo) (CreateFirewallRuleResponse, error)

func (KtCloudClient) CreatePortForwardingRule

func (c KtCloudClient) CreatePortForwardingRule(portForwardingRuleCreateReqInfo CreatePortForwardingRuleReqInfo) (CreatePortForwardingRuleResponse, error)

Creates a PortForwardingRule

func (KtCloudClient) CreateSSHKeyPair

func (c KtCloudClient) CreateSSHKeyPair(name string) (CreateSshKeyPairResponse, error)

Create a SSH key pair

func (KtCloudClient) CreateTags

func (c KtCloudClient) CreateTags(options *CreateTags) (CreateTagsResponse, error)

Add tags to specified resources

func (KtCloudClient) DeleteFirewallRule

func (c KtCloudClient) DeleteFirewallRule(ruleId string) (DeleteFirewallRuleResponse, error)

func (KtCloudClient) DeletePortForwardingRule

func (c KtCloudClient) DeletePortForwardingRule(ruleId string) (DeletePortForwardingRuleResponse, error)

Deletes a PortForwarding Rule by its ID.

func (KtCloudClient) DeleteSSHKeyPair

func (c KtCloudClient) DeleteSSHKeyPair(name string) (DeleteSshKeyPairResponse, error)

Deletes an SSH key pair

func (KtCloudClient) DeleteTags

func (c KtCloudClient) DeleteTags(options *DeleteTags) (DeleteTagsResponse, error)

Remove tags from specified resources

func (KtCloudClient) DeployVirtualMachine

func (c KtCloudClient) DeployVirtualMachine(vmReqInfo DeployVMReqInfo) (DeployVirtualMachineResponse, error)

Deploys a Virtual Machine and returns it's id

func (KtCloudClient) DestroyVirtualMachine

func (c KtCloudClient) DestroyVirtualMachine(vmId string) (DestroyVirtualMachineResponse, error)

Destroys a Virtual Machine

func (KtCloudClient) DisassociateIpAddress

func (c KtCloudClient) DisassociateIpAddress(publicIpId string) (DisassociateIpAddressResponse, error)

func (KtCloudClient) ListAvailableProductTypes

func (c KtCloudClient) ListAvailableProductTypes(zoneId string) (ListAvailableProductTypesResponse, error)

func (KtCloudClient) ListFirewallRules

func (c KtCloudClient) ListFirewallRules(filewallRuleListReqInfo ListFirewallRulesReqInfo) (ListFirewallRulesResponse, error)

func (KtCloudClient) ListPortForwardingRules

func (c KtCloudClient) ListPortForwardingRules(portForwardingRulesListReqInfo ListPortForwardingRulesReqInfo) (ListPortForwardingRulesResponse, error)

Returns all available templates

func (KtCloudClient) ListPublicIpAddresses

func (c KtCloudClient) ListPublicIpAddresses(ipListReqInfo ListPublicIpReqInfo) (ListPublicIpAddressesResponse, error)

func (KtCloudClient) ListSSHKeyPairs

func (c KtCloudClient) ListSSHKeyPairs(name string) (ListSshKeyPairsResponse, error)

List SSH keypairs

func (KtCloudClient) ListTags

func (c KtCloudClient) ListTags(options *ListTags) (ListTagsResponse, error)

Returns all items with a particular tag

func (KtCloudClient) ListVirtualMachines

func (c KtCloudClient) ListVirtualMachines(vmListReqInfo ListVMReqInfo) (ListVirtualMachinesResponse, error)

func (KtCloudClient) ListZones

func (c KtCloudClient) ListZones(isAvailable bool, domainId string, zoneId string, keyword string) (ListZonesResponse, error)

func (KtCloudClient) New

func (ktcloud KtCloudClient) New(apiUrl string, apiKey string, secretKey string, insecureSkipVerify bool) *KtCloudClient

Creates a new client for communicating with KT Cloud

func (KtCloudClient) QueryAsyncJobResult

func (c KtCloudClient) QueryAsyncJobResult(jobId string) (QueryAsyncJobResultResponse, error)

Query KT Cloud for the state of a scheduled job

func (KtCloudClient) RebootVirtualMachine

func (c KtCloudClient) RebootVirtualMachine(vmId string) (RebootVirtualMachineResponse, error)

Reboot a Virtual Machine

func (KtCloudClient) StartVirtualMachine

func (c KtCloudClient) StartVirtualMachine(vmId string) (StartVirtualMachineResponse, error)

Start a Virtual Machine

func (KtCloudClient) StopVirtualMachine

func (c KtCloudClient) StopVirtualMachine(vmId string) (StopVirtualMachineResponse, error)

Stops a Virtual Machine

func (KtCloudClient) UpdateVirtualMachine

func (c KtCloudClient) UpdateVirtualMachine(vmId string, displayname string, haenable string) (UpdateVirtualMachineResponse, error)

KT Cloud > Computing > Server Management > 'Server : 부가 정보 변경'

func (KtCloudClient) WaitForAsyncJob

func (c KtCloudClient) WaitForAsyncJob(jobId string, timeOut time.Duration) error

Blocks until the the asynchronous job has executed or has timed out. time.Duration unit => 1 nanosecond. timeOut * 1,000,000,000 => 1 second

func (KtCloudClient) WaitForVirtualMachineState

func (c KtCloudClient) WaitForVirtualMachineState(zoneId string, vmId string, wantedState string, timeOut time.Duration) error

WaitForVirtualMachineState simply blocks until the virtual machine is in the specified state.

type ListAvailableProductTypesResponse

type ListAvailableProductTypesResponse struct {
	Listavailableproducttypesresponse struct {
		Count        int            `json:"count"`
		ProductTypes []ProductTypes `json:"producttypes"`
	} `json:"listavailableproducttypesresponse"`
}

type ListFirewallRulesReqInfo

type ListFirewallRulesReqInfo struct {
	ID          string
	IpAddressId string
	Account     string
	DomainId    string
	IsRecursive bool
	Keyword     string
	Page        string
	PageSize    string
	ListAll     bool
}

type ListFirewallRulesResponse

type ListFirewallRulesResponse struct {
	Listfirewallrulesresponse struct {
		Count        int            `json:"count"`
		FirewallRule []FirewallRule `json:"firewallrule"`
	} `json:"listfirewallrulesresponse"`
}

type ListPortForwardingRulesReqInfo

type ListPortForwardingRulesReqInfo struct {
	ID          string
	IpAddressId string
	Account     string
	DomainId    string
	IsRecursive bool
	Keyword     string
	Page        string
	PageSize    string
	ListAll     bool
}

type ListPortForwardingRulesResponse

type ListPortForwardingRulesResponse struct {
	Listportforwardingrulesresponse struct {
		PortForwardingRule []PortForwardingRule `json:"portforwardingrule"`
	} `json:"listportforwardingrulesresponse"`
}

type ListPublicIpAddressesResponse

type ListPublicIpAddressesResponse struct {
	Listpublicipaddressesresponse struct {
		Count           int               `json:"count"`
		PublicIpAddress []PublicIpAddress `json:"publicipaddress"`
	} `json:"listpublicipaddressesresponse"`
}

type ListPublicIpReqInfo

type ListPublicIpReqInfo struct {
	ID                  string // PublicIP ID
	VLanId              string
	IpAddress           string
	Account             string
	DomainId            string
	IsRecursive         bool
	Keyword             string
	Page                string
	PageSize            string
	ZoneId              string
	IsSourceNat         bool
	IsStaticNat         bool
	AssociatedNetworkId string
	PhysicalNetworkId   string
	ForVirtualNetwork   string
	AllocatedOnly       string
	ListAll             bool
}

type ListSshKeyPairsResponse

type ListSshKeyPairsResponse struct {
	Listsshkeypairsresponse struct {
		Count   int       `json:"count"`
		KeyPair []KeyPair `json:"sshkeypair"`
	} `json:"listsshkeypairsresponse"`
}

type ListTags

type ListTags struct {
	Account      string `json:"account"`
	DomainId     string `json:"domainid"`
	Key          string `json:"key"`
	Value        string `json:"value`
	ResourceIds  string `json:"resourceids"`
	ResourceType string `json:"resourcetype`
}

type ListTagsResponse

type ListTagsResponse struct {
	Listtagsresponse struct {
		Count int   `json:"count"`
		Tag   []Tag `json:"tag"`
	} `json:"listtagsresponse"`
}

type ListVMReqInfo

type ListVMReqInfo struct {
	ZoneId string
	VMId   string
}

type ListVirtualMachinesResponse

type ListVirtualMachinesResponse struct {
	Listvirtualmachinesresponse struct {
		Count          float64          `json:"count"`
		Virtualmachine []Virtualmachine `json:"virtualmachine"`
	} `json:"listvirtualmachinesresponse"`
}

type ListZonesResponse

type ListZonesResponse struct {
	Listzonesresponse struct {
		Count int    `json:"count"`
		Zone  []Zone `json:"zone"`
	} `json:"listZonesResponse"`
}

type Nic

type Nic struct {
	ID           string `json:"id"`
	NetworkId    string `json:"networkid"`
	NetworkName  string `json:"networkname"`
	Netmask      string `json:"netmask"`
	Gateway      string `json:"gateway"`
	IpAddress    string `json:"ipaddress"`
	IsolationUri string `json:"isolationuri"`
	BroadcastUri string `json:"broadcasturi"`
	TrafficType  string `json:"traffictype"`
	Type         string `json:"type"`
	IsDefault    bool   `json:"isdefault"`
	MacAddress   string `json:"macaddress"`
	SecondaryIp  string `json:"secondaryip"`
}

type PortForwardingRule

type PortForwardingRule struct {
	ID                        string        `json:"id"`
	PrivatePort               string        `json:"privateport"`
	PrivateEndPort            string        `json:"privateendport"`
	Protocol                  string        `json:"protocol"`
	PublicPort                string        `json:"publicport"`
	PublicEndPort             string        `json:"publicendport"`
	VirtualmachineId          string        `json:"virtualmachineid"`
	VirtualmachineName        string        `json:"virtualmachinename"`
	VirtualmachineDisplayName string        `json:"virtualmachinedisplayname"`
	IpAddressId               string        `json:"ipaddressid"`
	IpAddress                 string        `json:"ipaddress"`
	State                     string        `json:"state"`
	CidrList                  string        `json:"cidrlist"`
	Tags                      []interface{} `json:"tags"`
	VmGuestIp                 string        `json:"vmguestip"`
	NetworkId                 string        `json:"networkid"`
	ForDisplay                bool          `json:"fordisplay"`
}

type ProductTypes

type ProductTypes struct {
	DiskOfferingDesc    string `json:"diskofferingdesc"`
	DiskOfferingId      string `json:"diskofferingid"`
	Product             string `json:"product"`
	ProductId           string `json:"productid"`
	ProductState        string `json:"productstate"`
	ServiceOfferingDesc string `json:"serviceofferingdesc"`
	ServiceOfferingId   string `json:"serviceofferingid"`
	TemplateDesc        string `json:"templatedesc"`
	TemplateId          string `json:"templateid"`
	ZoneDesc            string `json:"zonedesc"`
	ZoneId              string `json:"zoneid"`
}

type PublicIpAddress

type PublicIpAddress struct {
	ID                    string        `json:"id"`
	IpAddress             string        `json:"ipaddress"`
	Allocated             string        `json:"allocated"`
	ZoneId                string        `json:"zoneid"`
	ZoneName              string        `json:"zonename"`
	IsSourcenat           bool          `json:"issourcenat"`
	Account               string        `json:"account"`
	DomainId              string        `json:"domainid"`
	Domain                string        `json:"domain"`
	ForVirtualNetwork     string        `json:"forvirtualnetwork"`
	IsStaticNat           bool          `json:"isstaticnat"`
	IsSystem              bool          `json:"issystem"`
	AssociatedNetworkId   string        `json:"associatednetworkid"`
	AssociatedNetworkName string        `json:"associatednetworkname"`
	NetworktId            string        `json:"networkid"`
	State                 string        `json:"state"`
	PhysicalNetworkId     string        `json:"physicalnetworkid"`
	Tags                  []interface{} `json:"tags"`
	IsPortable            bool          `json:"isportable"`
	UsagePlanType         string        `json:"usageplantype"`
	Desc                  string        `json:"desc"`
}

type QueryAsyncJobResultResponse

type QueryAsyncJobResultResponse struct {
	Queryasyncjobresultresponse struct {
		AccountId     string `json:"accountid"`
		UserId        string `json:"userid"`
		Cmd           string `json:"cmd"`
		JobStatus     int    `json:"jobstatus"`
		JobProcStatus int    `json:"jobprocstatus"`
		JobResultCode int    `json:"jobresultcode"`
		JobResultType string `json:"jobresulttype"`
		State         string `json:"state"`

		JobResult json.RawMessage `json:"jobresult"`

		JobInstanceType string `json:"jobinstancetype"`
		JobInstanceId   string `json:"jobinstanceid"`
		Created         string `json:"created"`
		JobId           string `json:"jobid"`
	} `json:"queryasyncjobresultresponse"`
}

type RebootVirtualMachineResponse

type RebootVirtualMachineResponse struct {
	Rebootvirtualmachineresponse struct {
		JobId string `json:"jobid"`
	} `json:"rebootvirtualmachineresponse"`
}

type StartVirtualMachineResponse

type StartVirtualMachineResponse struct {
	Startvirtualmachineresponse struct {
		JobId string `json:"jobid"`
	} `json:"startvirtualmachineresponse"`
}

type StopVirtualMachineResponse

type StopVirtualMachineResponse struct {
	Stopvirtualmachineresponse struct {
		JobId string `json:"jobid"`
	} `json:"stopvirtualmachineresponse"`
}

type Tag

type Tag struct {
	Key          string `json:"key"`
	Value        string `json:"value`
	ResourceType string `json:"resourcetype`
	ResourceId   string `json:"resourceid"`
	Account      string `json:"account"`
	DomainId     string `json:"domainid"`
	Domain       string `json:"domain"`
}

type TagArg

type TagArg struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type UpdateVirtualMachineResponse

type UpdateVirtualMachineResponse struct {
	Updatevirtualmachineresponse struct {
		Virtualmachine []Virtualmachine `json:"virtualmachine"`
	} `json:"updatevirtualmachineresponse"`
}

type Virtualmachine

type Virtualmachine struct {
	ID                    string        `json:"id"`
	Name                  string        `json:"name"`
	DisplayName           string        `json:"displayname"`
	Account               string        `json:"account"`
	UserId                string        `json:"userid"`
	UserName              string        `json:"username"`
	DomainId              string        `json:"domainid"`
	Domain                string        `json:"domain"`
	Created               string        `json:"created"`
	State                 string        `json:"state"`
	Haenable              bool          `json:"haenable"`
	ZoneId                string        `json:"zoneid"`
	ZoneName              string        `json:"zonename"`
	TemplateId            string        `json:"templateid"` // VMImage ID
	TemplateName          string        `json:"templatename"`
	TemplateDisplayText   string        `json:"templatedisplaytext"`
	PasswordEnabled       bool          `json:"passwordenabled"`
	ServiceOfferingId     string        `json:"serviceofferingid"` // VMSpec ID
	ServiceOfferingName   string        `json:"serviceofferingname"`
	CpuNumber             float64       `json:"cpunumber"`
	CpuSpeed              float64       `json:"cpuspeed"`
	Memory                float64       `json:"memory"`
	GuestOsId             string        `json:"guestosid"`
	RootDeviceId          float64       `json:"rootdeviceid"`
	RootDeviceType        string        `json:"rootdevicetype"`
	SecurityGroup         []interface{} `json:"securitygroup"`
	Password              string        `json:"password"` // KT Cloud API로는 지원하지 않는다고함.(Blank)
	Nic                   []Nic         `json:"nic"`
	Hypervisor            string        `json:"hypervisor"`
	KeyPair               string        `json:"keypair"` // ### Manual에는 parameter가 없으나 response 값 존재
	AffinityGroup         string        `json:"affinitygroup"`
	IsDynamicallyScalable string        `json:"isdynamicallyscalable"` // VM의 cpu 와 memory 에 대한 Scale up/down을 지원하기 위한 tools 포함 여부
	OsTypeId              string        `json:"ostypeid"`
	Tags                  []interface{} `json:"tags"`
}

type Zone

type Zone struct {
	ID                    string        `json:"id"`
	NetworkType           string        `json:"networktype"`
	SecurityGroupsEnabled bool          `json:"securitygroupsenabled"`
	AllocationState       string        `json:"allocationstate"`
	DhcpProvider          string        `json:"dhcpprovider"`
	LocalStorageEnabled   bool          `json:"localstorageenabled"`
	Tags                  []interface{} `json:"tags"`
	Name                  string        `json:"name"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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