Documentation ¶
Index ¶
- Constants
- func CheckFolderAndCreate(folderPath string) error
- func ConvertDiskStatus(diskStatus string) irs.DiskStatus
- func ConvertImageStatus(myImageStatus string) irs.MyImageStatus
- func ConvertJsonString(v interface{}) (string, error)
- func ConvertVMStatusString(vmStatus string) (irs.VMStatus, error)
- func GetCallLogScheme(zoneInfo string, resourceType call.RES_TYPE, resourceName string, ...) call.CLOUDLOGSCHEMA
- func GetOriginalNameId(IID2NameId string) string
- func InitLog()
- func LoggingError(hiscallInfo call.CLOUDLOGSCHEMA, err error)
- func LoggingInfo(hiscallInfo call.CLOUDLOGSCHEMA, start time.Time)
- func MappingImageInfo(serverImage server.Product) irs.ImageInfo
- func MappingKeyPairInfo(NcpKeyPairList *server.LoginKey) irs.KeyPairInfo
- func MappingVMSpecInfo(Region string, ImageId string, NcpVMSpec server.Product) irs.VMSpecInfo
- func Reverse(s string) (result string)
- func String(n int32) string
- type Code
- type ErrorResponse
- type IId
- type KeyValue
- type NcpDiskHandler
- func (diskHandler *NcpDiskHandler) AttachDisk(diskIID irs.IID, vmIID irs.IID) (irs.DiskInfo, error)
- func (diskHandler *NcpDiskHandler) ChangeDiskSize(diskIID irs.IID, size string) (bool, error)
- func (diskHandler *NcpDiskHandler) CreateDisk(diskReqInfo irs.DiskInfo) (irs.DiskInfo, error)
- func (diskHandler *NcpDiskHandler) DeleteDisk(diskIID irs.IID) (bool, error)
- func (diskHandler *NcpDiskHandler) DetachDisk(diskIID irs.IID, ownerVM irs.IID) (bool, error)
- func (diskHandler *NcpDiskHandler) GetDisk(diskIID irs.IID) (irs.DiskInfo, error)
- func (diskHandler *NcpDiskHandler) GetDiskStatus(diskIID irs.IID) (irs.DiskStatus, error)
- func (diskHandler *NcpDiskHandler) GetNcpDiskInfo(diskIID irs.IID) (*server.BlockStorageInstance, error)
- func (diskHandler *NcpDiskHandler) GetNcpVMList() ([]*server.ServerInstance, error)
- func (diskHandler *NcpDiskHandler) IsBasicBlockStorage(diskIID irs.IID) (bool, error)
- func (diskHandler *NcpDiskHandler) ListDisk() ([]*irs.DiskInfo, error)
- func (diskHandler *NcpDiskHandler) MappingDiskInfo(storage server.BlockStorageInstance) (irs.DiskInfo, error)
- func (diskHandler *NcpDiskHandler) WaitForDiskAttachment(diskIID irs.IID) (irs.DiskStatus, error)
- func (diskHandler *NcpDiskHandler) WaitForDiskCreation(diskIID irs.IID) (irs.DiskStatus, error)
- func (diskHandler *NcpDiskHandler) WaitForDiskDetachment(diskIID irs.IID) (irs.DiskStatus, error)
- type NcpImageHandler
- func (imageHandler *NcpImageHandler) CheckWindowsImage(imageIID irs.IID) (bool, error)
- func (imageHandler *NcpImageHandler) CreateImage(imageReqInfo irs.ImageReqInfo) (irs.ImageInfo, error)
- func (imageHandler *NcpImageHandler) DeleteImage(imageIID irs.IID) (bool, error)
- func (imageHandler *NcpImageHandler) GetImage(imageIID irs.IID) (irs.ImageInfo, error)
- func (imageHandler *NcpImageHandler) GetNcpImageInfo(imageIID irs.IID) (*server.Product, error)
- func (imageHandler *NcpImageHandler) ListImage() ([]*irs.ImageInfo, error)
- type NcpKeyPairHandler
- func (keyPairHandler *NcpKeyPairHandler) CreateKey(keyPairReqInfo irs.KeyPairReqInfo) (irs.KeyPairInfo, error)
- func (keyPairHandler *NcpKeyPairHandler) DeleteKey(keyIID irs.IID) (bool, error)
- func (keyPairHandler *NcpKeyPairHandler) GetKey(keyIID irs.IID) (irs.KeyPairInfo, error)
- func (keyPairHandler *NcpKeyPairHandler) ListKey() ([]*irs.KeyPairInfo, error)
- type NcpMyImageHandler
- func (myImageHandler *NcpMyImageHandler) CheckWindowsImage(myImageIID irs.IID) (bool, error)
- func (myImageHandler *NcpMyImageHandler) DeleteMyImage(myImageIID irs.IID) (bool, error)
- func (myImageHandler *NcpMyImageHandler) GetMyImage(myImageIID irs.IID) (irs.MyImageInfo, error)
- func (myImageHandler *NcpMyImageHandler) GetMyImageStatus(myImageIID irs.IID) (irs.MyImageStatus, error)
- func (myImageHandler *NcpMyImageHandler) GetNcpMemberServerImageInfo(myImageIID irs.IID) (server.MemberServerImage, error)
- func (myImageHandler *NcpMyImageHandler) GetOriginImageOSPlatform(imageIID irs.IID) (string, error)
- func (myImageHandler *NcpMyImageHandler) ListMyImage() ([]*irs.MyImageInfo, error)
- func (myImageHandler *NcpMyImageHandler) MappingMyImageInfo(myImage *server.MemberServerImage) (*irs.MyImageInfo, error)
- func (myImageHandler *NcpMyImageHandler) SnapshotVM(snapshotReqInfo irs.MyImageInfo) (irs.MyImageInfo, error)
- func (myImageHandler *NcpMyImageHandler) WaitForImageSnapshot(myImageIID irs.IID) (irs.MyImageStatus, error)
- type NcpNLBHandler
- func (nlbHandler *NcpNLBHandler) AddVMs(nlbIID irs.IID, vmIIDs *[]irs.IID) (irs.VMGroupInfo, error)
- func (nlbHandler *NcpNLBHandler) ChangeHealthCheckerInfo(nlbIID irs.IID, healthChecker irs.HealthCheckerInfo) (irs.HealthCheckerInfo, error)
- func (nlbHandler *NcpNLBHandler) ChangeListener(nlbIID irs.IID, listener irs.ListenerInfo) (irs.ListenerInfo, error)
- func (nlbHandler *NcpNLBHandler) ChangeVMGroupInfo(nlbIID irs.IID, vmGroup irs.VMGroupInfo) (irs.VMGroupInfo, error)
- func (nlbHandler *NcpNLBHandler) CreateNLB(nlbReqInfo irs.NLBInfo) (createNLB irs.NLBInfo, newErr error)
- func (nlbHandler *NcpNLBHandler) DeleteNLB(nlbIID irs.IID) (bool, error)
- func (nlbHandler *NcpNLBHandler) GetHealthCheckerInfo(nlb lb.LoadBalancerInstance) (irs.HealthCheckerInfo, error)
- func (nlbHandler *NcpNLBHandler) GetListenerInfo(nlb lb.LoadBalancerInstance) (irs.ListenerInfo, error)
- func (nlbHandler *NcpNLBHandler) GetNLB(nlbIID irs.IID) (irs.NLBInfo, error)
- func (nlbHandler *NcpNLBHandler) GetNcpNlbInfo(nlbIID irs.IID) (*lb.LoadBalancerInstance, error)
- func (nlbHandler *NcpNLBHandler) GetNcpNlbStatus(nlbIID irs.IID) (string, error)
- func (nlbHandler *NcpNLBHandler) GetVMGroupHealthInfo(nlbIID irs.IID) (irs.HealthInfo, error)
- func (nlbHandler *NcpNLBHandler) GetVMGroupInfo(nlb lb.LoadBalancerInstance) (irs.VMGroupInfo, error)
- func (nlbHandler *NcpNLBHandler) ListNLB() ([]*irs.NLBInfo, error)
- func (nlbHandler *NcpNLBHandler) MappingNlbInfo(nlb *lb.LoadBalancerInstance) (irs.NLBInfo, error)
- func (nlbHandler *NcpNLBHandler) RemoveVMs(nlbIID irs.IID, vmIIDs *[]irs.IID) (bool, error)
- func (nlbHandler *NcpNLBHandler) WaitForDelNlb(nlbIID irs.IID) (bool, error)
- func (nlbHandler *NcpNLBHandler) WaitToGetNlbInfo(nlbIID irs.IID) (bool, error)
- type NcpPriceInfoHandler
- func (priceInfoHandler *NcpPriceInfoHandler) GetPriceInfo(productFamily string, regionName string, filterList []irs.KeyValue) (string, error)
- func (priceInfoHandler *NcpPriceInfoHandler) GetRequestBody(regionCode string, callURL string) ([]uint8, error)
- func (priceInfoHandler *NcpPriceInfoHandler) GetRequestBodyWithProductCode(regionCode string, callURL string, productCode string, ...) ([]uint8, error)
- func (priceInfoHandler *NcpPriceInfoHandler) ListProductFamily(regionName string) ([]string, error)
- type NcpRegionZoneHandler
- func (regionZoneHandler NcpRegionZoneHandler) GetRegionZone(regionCode string) (irs.RegionZoneInfo, error)
- func (regionZoneHandler *NcpRegionZoneHandler) ListOrgRegion() (string, error)
- func (regionZoneHandler *NcpRegionZoneHandler) ListOrgZone() (string, error)
- func (regionZoneHandler *NcpRegionZoneHandler) ListRegionZone() ([]*irs.RegionZoneInfo, error)
- type NcpSecurityHandler
- func (securityHandler *NcpSecurityHandler) AddRules(sgIID irs.IID, securityRules *[]irs.SecurityRuleInfo) (irs.SecurityInfo, error)
- func (securityHandler *NcpSecurityHandler) CreateSecurity(securityReqInfo irs.SecurityReqInfo) (irs.SecurityInfo, error)
- func (securityHandler *NcpSecurityHandler) DeleteSecurity(securityIID irs.IID) (bool, error)
- func (securityHandler *NcpSecurityHandler) ExtractSecurityRuleInfo(ncpSecurityGroupId string) ([]irs.SecurityRuleInfo, error)
- func (securityHandler *NcpSecurityHandler) GetSecurity(securityIID irs.IID) (irs.SecurityInfo, error)
- func (securityHandler *NcpSecurityHandler) ListSecurity() ([]*irs.SecurityInfo, error)
- func (securityHandler *NcpSecurityHandler) MappingSecurityInfo(ncpSecurityGroup server.AccessControlGroup) (irs.SecurityInfo, error)
- func (securityHandler *NcpSecurityHandler) RemoveRules(sgIID irs.IID, securityRules *[]irs.SecurityRuleInfo) (bool, error)
- type NcpTagHandler
- func (tagHandler *NcpTagHandler) AddTag(resType irs.RSType, resIID irs.IID, tag irs.KeyValue) (irs.KeyValue, error)
- func (tagHandler *NcpTagHandler) FindTag(resType irs.RSType, keyword string) ([]*irs.TagInfo, error)
- func (tagHandler *NcpTagHandler) GetTag(resType irs.RSType, resIID irs.IID, key string) (irs.KeyValue, error)
- func (tagHandler *NcpTagHandler) ListTag(resType irs.RSType, resIID irs.IID) ([]irs.KeyValue, error)
- func (tagHandler *NcpTagHandler) RemoveTag(resType irs.RSType, resIID irs.IID, key string) (bool, error)
- type NcpVMHandler
- func (vmHandler *NcpVMHandler) CreateLinuxInitUserData(imageIID irs.IID, keyPairId string) (*string, error)
- func (vmHandler *NcpVMHandler) CreateVPCnSubnetTag(vmID *string, vpcName string, subnetName string) (bool, error)
- func (vmHandler *NcpVMHandler) CreateWinInitUserData(passWord string) (*string, error)
- func (vmHandler *NcpVMHandler) DeletePublicIP(vmInfo irs.VMInfo) (irs.VMStatus, error)
- func (vmHandler *NcpVMHandler) DeleteVMTags(vmID *string) (bool, error)
- func (vmHandler *NcpVMHandler) GetNcpVMInfo(vmId string) (*server.ServerInstance, error)
- func (vmHandler *NcpVMHandler) GetRegionNo(regionCode string) (*string, error)
- func (vmHandler *NcpVMHandler) GetVM(vmIID irs.IID) (irs.VMInfo, error)
- func (vmHandler *NcpVMHandler) GetVMStatus(vmIID irs.IID) (irs.VMStatus, error)
- func (vmHandler *NcpVMHandler) GetVPCnSubnetNameFromTag(vmID *string) (string, string, error)
- func (vmHandler *NcpVMHandler) GetVmDataDiskList(vmId *string) ([]irs.IID, error)
- func (vmHandler *NcpVMHandler) GetVmIdByName(vmNameID string) (string, error)
- func (vmHandler *NcpVMHandler) GetVmRootDiskInfo(vmId *string) (*string, *string, error)
- func (vmHandler *NcpVMHandler) GetZoneNo(regionCode string, zoneCode string) (*string, error)
- func (vmHandler *NcpVMHandler) ListVM() ([]*irs.VMInfo, error)
- func (vmHandler *NcpVMHandler) ListVMStatus() ([]*irs.VMStatusInfo, error)
- func (vmHandler *NcpVMHandler) MappingServerInfo(NcpInstance *server.ServerInstance) (irs.VMInfo, error)
- func (vmHandler *NcpVMHandler) RebootVM(vmIID irs.IID) (irs.VMStatus, error)
- func (vmHandler *NcpVMHandler) ResumeVM(vmIID irs.IID) (irs.VMStatus, error)
- func (vmHandler *NcpVMHandler) StartVM(vmReqInfo irs.VMReqInfo) (irs.VMInfo, error)
- func (vmHandler *NcpVMHandler) SuspendVM(vmIID irs.IID) (irs.VMStatus, error)
- func (vmHandler *NcpVMHandler) TerminateVM(vmIID irs.IID) (irs.VMStatus, error)
- func (vmHandler *NcpVMHandler) WaitToDelPublicIp(vmIID irs.IID) (irs.VMStatus, error)
- func (vmHandler *NcpVMHandler) WaitToGetVMInfo(vmIID irs.IID) (irs.VMStatus, error)
- type NcpVMSpecHandler
- func (vmSpecHandler *NcpVMSpecHandler) GetOrgVMSpec(Name string) (string, error)
- func (vmSpecHandler *NcpVMSpecHandler) GetVMSpec(Name string) (irs.VMSpecInfo, error)
- func (vmSpecHandler *NcpVMSpecHandler) ListOrgVMSpec() (string, error)
- func (vmSpecHandler *NcpVMSpecHandler) ListVMSpec() ([]*irs.VMSpecInfo, error)
- type NcpVPCHandler
- func (VPCHandler *NcpVPCHandler) AddSubnet(vpcIID irs.IID, subnetInfo irs.SubnetInfo) (irs.VPCInfo, error)
- func (VPCHandler *NcpVPCHandler) CreateSubnet(subnetReqInfo irs.SubnetInfo) (irs.SubnetInfo, error)
- func (VPCHandler *NcpVPCHandler) CreateVPC(vpcReqInfo irs.VPCReqInfo) (irs.VPCInfo, error)
- func (VPCHandler *NcpVPCHandler) DeleteVPC(vpcIID irs.IID) (bool, error)
- func (VPCHandler *NcpVPCHandler) GetVPC(vpcIID irs.IID) (irs.VPCInfo, error)
- func (VPCHandler *NcpVPCHandler) ListVPC() ([]*irs.VPCInfo, error)
- func (VPCHandler *NcpVPCHandler) MappingVPCInfo(vpcJSON VPC) (irs.VPCInfo, error)
- func (VPCHandler *NcpVPCHandler) RemoveSubnet(vpcIID irs.IID, subnetIID irs.IID) (bool, error)
- type Price
- type PriceListAPIResponse
- type Product
- type ProductItemKind
- type ProductItemKindDetail
- type ProductListAPIResponse
- type ProductPrice
- type Region
- type Subnet
- type VPC
Constants ¶
const ( // NCP Classic LB Algorithm type codes : RR (ROUND ROBIN), LC (LEAST_CONNECTION), SIPHS (Source IP Hash) DefaultLBAlgorithmType string = "RR" // ROUND ROBIN // You can select whether to create a load balancer with public/private IP // NCP Classic Cloud NLB network type code : PBLIP(Public IP LB), PRVT(Private IP LB). default : PBLIP NcpPublicNlBType string = "PBLIP" NcpInternalNlBType string = "PRVT" // 'L7HealthCheckPath' required if ProtocolTypeCode value is 'HTTP' or 'HTTPS' for NCP Classic NLB. DefaulthealthCheckPath string = "/index.html" )
const ( BaseURL string = "https://billingapi.apigw.ntruss.com/billing/v1" ProductListURL string = "/product/getProductList" ProductPriceListURL string = "/product/getProductPriceList" )
const ( LnxTypeOs string = "LINUX" WinTypeOS string = "WINDOWS" )
const (
DefaultDiskSize string = "10"
)
Variables ¶
This section is empty.
Functions ¶
func CheckFolderAndCreate ¶
func ConvertDiskStatus ¶
func ConvertDiskStatus(diskStatus string) irs.DiskStatus
func ConvertImageStatus ¶
func ConvertImageStatus(myImageStatus string) irs.MyImageStatus
func ConvertJsonString ¶
Cloud Object를 JSON String 타입으로 변환
func GetCallLogScheme ¶
func GetOriginalNameId ¶
func LoggingError ¶
func LoggingError(hiscallInfo call.CLOUDLOGSCHEMA, err error)
func LoggingInfo ¶
func LoggingInfo(hiscallInfo call.CLOUDLOGSCHEMA, start time.Time)
func MappingKeyPairInfo ¶
func MappingKeyPairInfo(NcpKeyPairList *server.LoginKey) irs.KeyPairInfo
KeyPair 정보를 추출함
func MappingVMSpecInfo ¶
Types ¶
type ErrorResponse ¶ added in v0.8.2
type ErrorResponse struct { Code string `json:"errorCode,omitempty"` Message string `json:"message,omitempty"` Details string `json:"details,omitempty"` }
=========================== Common ============================
type NcpDiskHandler ¶
type NcpDiskHandler struct { RegionInfo idrv.RegionInfo VMClient *server.APIClient }
func (*NcpDiskHandler) AttachDisk ¶
func (*NcpDiskHandler) ChangeDiskSize ¶
func (*NcpDiskHandler) CreateDisk ¶
Caution : Incase of NCP, there must be a created VM to create a new disk volume.
func (*NcpDiskHandler) DeleteDisk ¶
func (diskHandler *NcpDiskHandler) DeleteDisk(diskIID irs.IID) (bool, error)
func (*NcpDiskHandler) DetachDisk ¶
func (*NcpDiskHandler) GetDiskStatus ¶
func (diskHandler *NcpDiskHandler) GetDiskStatus(diskIID irs.IID) (irs.DiskStatus, error)
func (*NcpDiskHandler) GetNcpDiskInfo ¶
func (diskHandler *NcpDiskHandler) GetNcpDiskInfo(diskIID irs.IID) (*server.BlockStorageInstance, error)
func (*NcpDiskHandler) GetNcpVMList ¶
func (diskHandler *NcpDiskHandler) GetNcpVMList() ([]*server.ServerInstance, error)
func (*NcpDiskHandler) IsBasicBlockStorage ¶
func (diskHandler *NcpDiskHandler) IsBasicBlockStorage(diskIID irs.IID) (bool, error)
func (*NcpDiskHandler) ListDisk ¶
func (diskHandler *NcpDiskHandler) ListDisk() ([]*irs.DiskInfo, error)
func (*NcpDiskHandler) MappingDiskInfo ¶
func (diskHandler *NcpDiskHandler) MappingDiskInfo(storage server.BlockStorageInstance) (irs.DiskInfo, error)
func (*NcpDiskHandler) WaitForDiskAttachment ¶
func (diskHandler *NcpDiskHandler) WaitForDiskAttachment(diskIID irs.IID) (irs.DiskStatus, error)
Waiting for up to 500 seconds during Disk Attachment
func (*NcpDiskHandler) WaitForDiskCreation ¶
func (diskHandler *NcpDiskHandler) WaitForDiskCreation(diskIID irs.IID) (irs.DiskStatus, error)
Waiting for up to 500 seconds during Disk creation until Disk info. can be get
func (*NcpDiskHandler) WaitForDiskDetachment ¶
func (diskHandler *NcpDiskHandler) WaitForDiskDetachment(diskIID irs.IID) (irs.DiskStatus, error)
Waiting for up to 500 seconds during Disk Attachment
type NcpImageHandler ¶
type NcpImageHandler struct { CredentialInfo idrv.CredentialInfo RegionInfo idrv.RegionInfo VMClient *server.APIClient }
func (*NcpImageHandler) CheckWindowsImage ¶
func (imageHandler *NcpImageHandler) CheckWindowsImage(imageIID irs.IID) (bool, error)
func (*NcpImageHandler) CreateImage ¶
func (imageHandler *NcpImageHandler) CreateImage(imageReqInfo irs.ImageReqInfo) (irs.ImageInfo, error)
func (*NcpImageHandler) DeleteImage ¶
func (imageHandler *NcpImageHandler) DeleteImage(imageIID irs.IID) (bool, error)
func (*NcpImageHandler) GetNcpImageInfo ¶
type NcpKeyPairHandler ¶
type NcpKeyPairHandler struct { CredentialInfo idrv.CredentialInfo RegionInfo idrv.RegionInfo VMClient *server.APIClient }
func (*NcpKeyPairHandler) CreateKey ¶
func (keyPairHandler *NcpKeyPairHandler) CreateKey(keyPairReqInfo irs.KeyPairReqInfo) (irs.KeyPairInfo, error)
func (*NcpKeyPairHandler) DeleteKey ¶
func (keyPairHandler *NcpKeyPairHandler) DeleteKey(keyIID irs.IID) (bool, error)
func (*NcpKeyPairHandler) GetKey ¶
func (keyPairHandler *NcpKeyPairHandler) GetKey(keyIID irs.IID) (irs.KeyPairInfo, error)
func (*NcpKeyPairHandler) ListKey ¶
func (keyPairHandler *NcpKeyPairHandler) ListKey() ([]*irs.KeyPairInfo, error)
type NcpMyImageHandler ¶
type NcpMyImageHandler struct { RegionInfo idrv.RegionInfo VMClient *server.APIClient }
func (*NcpMyImageHandler) CheckWindowsImage ¶
func (myImageHandler *NcpMyImageHandler) CheckWindowsImage(myImageIID irs.IID) (bool, error)
func (*NcpMyImageHandler) DeleteMyImage ¶
func (myImageHandler *NcpMyImageHandler) DeleteMyImage(myImageIID irs.IID) (bool, error)
func (*NcpMyImageHandler) GetMyImage ¶
func (myImageHandler *NcpMyImageHandler) GetMyImage(myImageIID irs.IID) (irs.MyImageInfo, error)
func (*NcpMyImageHandler) GetMyImageStatus ¶
func (myImageHandler *NcpMyImageHandler) GetMyImageStatus(myImageIID irs.IID) (irs.MyImageStatus, error)
func (*NcpMyImageHandler) GetNcpMemberServerImageInfo ¶
func (myImageHandler *NcpMyImageHandler) GetNcpMemberServerImageInfo(myImageIID irs.IID) (server.MemberServerImage, error)
func (*NcpMyImageHandler) GetOriginImageOSPlatform ¶
func (myImageHandler *NcpMyImageHandler) GetOriginImageOSPlatform(imageIID irs.IID) (string, error)
func (*NcpMyImageHandler) ListMyImage ¶
func (myImageHandler *NcpMyImageHandler) ListMyImage() ([]*irs.MyImageInfo, error)
To Manage My Images
func (*NcpMyImageHandler) MappingMyImageInfo ¶
func (myImageHandler *NcpMyImageHandler) MappingMyImageInfo(myImage *server.MemberServerImage) (*irs.MyImageInfo, error)
func (*NcpMyImageHandler) SnapshotVM ¶
func (myImageHandler *NcpMyImageHandler) SnapshotVM(snapshotReqInfo irs.MyImageInfo) (irs.MyImageInfo, error)
func (*NcpMyImageHandler) WaitForImageSnapshot ¶
func (myImageHandler *NcpMyImageHandler) WaitForImageSnapshot(myImageIID irs.IID) (irs.MyImageStatus, error)
Waiting for up to 500 seconds during Taking a Snapshot from a VM
type NcpNLBHandler ¶
type NcpNLBHandler struct { CredentialInfo idrv.CredentialInfo RegionInfo idrv.RegionInfo VMClient *server.APIClient LBClient *lb.APIClient }
func (*NcpNLBHandler) AddVMs ¶
func (nlbHandler *NcpNLBHandler) AddVMs(nlbIID irs.IID, vmIIDs *[]irs.IID) (irs.VMGroupInfo, error)
func (*NcpNLBHandler) ChangeHealthCheckerInfo ¶
func (nlbHandler *NcpNLBHandler) ChangeHealthCheckerInfo(nlbIID irs.IID, healthChecker irs.HealthCheckerInfo) (irs.HealthCheckerInfo, error)
func (*NcpNLBHandler) ChangeListener ¶
func (nlbHandler *NcpNLBHandler) ChangeListener(nlbIID irs.IID, listener irs.ListenerInfo) (irs.ListenerInfo, error)
Note!! : Will be decided later if we would support bellow methoeds or not. ------ Frontend Control
func (*NcpNLBHandler) ChangeVMGroupInfo ¶
func (nlbHandler *NcpNLBHandler) ChangeVMGroupInfo(nlbIID irs.IID, vmGroup irs.VMGroupInfo) (irs.VMGroupInfo, error)
------ Backend Control
func (*NcpNLBHandler) CreateNLB ¶
func (nlbHandler *NcpNLBHandler) CreateNLB(nlbReqInfo irs.NLBInfo) (createNLB irs.NLBInfo, newErr error)
Note : Cloud-Barista supports only this case => [ LB : Listener : VM Group : Health Checker = 1 : 1 : 1 : 1 ] NCP Classic NLB Supported regions: Korea, US West, Hong Kong, Singapore, Japan, Germany ### Caution!! : Listener, VM Group and Healthchecker all use the same protocol type in NCP Classic NLB.(The Protocol specified by 'ProtocolTypeCode' when created).
func (*NcpNLBHandler) DeleteNLB ¶
func (nlbHandler *NcpNLBHandler) DeleteNLB(nlbIID irs.IID) (bool, error)
func (*NcpNLBHandler) GetHealthCheckerInfo ¶
func (nlbHandler *NcpNLBHandler) GetHealthCheckerInfo(nlb lb.LoadBalancerInstance) (irs.HealthCheckerInfo, error)
func (*NcpNLBHandler) GetListenerInfo ¶
func (nlbHandler *NcpNLBHandler) GetListenerInfo(nlb lb.LoadBalancerInstance) (irs.ListenerInfo, error)
func (*NcpNLBHandler) GetNcpNlbInfo ¶
func (nlbHandler *NcpNLBHandler) GetNcpNlbInfo(nlbIID irs.IID) (*lb.LoadBalancerInstance, error)
func (*NcpNLBHandler) GetNcpNlbStatus ¶
func (nlbHandler *NcpNLBHandler) GetNcpNlbStatus(nlbIID irs.IID) (string, error)
func (*NcpNLBHandler) GetVMGroupHealthInfo ¶
func (nlbHandler *NcpNLBHandler) GetVMGroupHealthInfo(nlbIID irs.IID) (irs.HealthInfo, error)
func (*NcpNLBHandler) GetVMGroupInfo ¶
func (nlbHandler *NcpNLBHandler) GetVMGroupInfo(nlb lb.LoadBalancerInstance) (irs.VMGroupInfo, error)
func (*NcpNLBHandler) MappingNlbInfo ¶
func (nlbHandler *NcpNLBHandler) MappingNlbInfo(nlb *lb.LoadBalancerInstance) (irs.NLBInfo, error)
NCP Classic LB resource Def. : https://api.ncloud-docs.com/docs/networking-loadbalancing-createloadbalancerinstance
func (*NcpNLBHandler) WaitForDelNlb ¶
func (nlbHandler *NcpNLBHandler) WaitForDelNlb(nlbIID irs.IID) (bool, error)
func (*NcpNLBHandler) WaitToGetNlbInfo ¶
func (nlbHandler *NcpNLBHandler) WaitToGetNlbInfo(nlbIID irs.IID) (bool, error)
type NcpPriceInfoHandler ¶ added in v0.8.2
type NcpPriceInfoHandler struct { CredentialInfo idrv.CredentialInfo RegionInfo idrv.RegionInfo VMClient *server.APIClient }
func (*NcpPriceInfoHandler) GetPriceInfo ¶ added in v0.8.2
func (*NcpPriceInfoHandler) GetRequestBody ¶ added in v0.8.2
func (priceInfoHandler *NcpPriceInfoHandler) GetRequestBody(regionCode string, callURL string) ([]uint8, error)
This is necessary because NCP GoSDK does not support these PriceInfo APIs.
func (*NcpPriceInfoHandler) GetRequestBodyWithProductCode ¶ added in v0.8.2
func (priceInfoHandler *NcpPriceInfoHandler) GetRequestBodyWithProductCode(regionCode string, callURL string, productCode string, filterList []irs.KeyValue) ([]uint8, error)
This is necessary because NCP GoSDK does not support these PriceInfo APIs.
func (*NcpPriceInfoHandler) ListProductFamily ¶ added in v0.8.2
func (priceInfoHandler *NcpPriceInfoHandler) ListProductFamily(regionName string) ([]string, error)
type NcpRegionZoneHandler ¶
type NcpRegionZoneHandler struct { CredentialInfo idrv.CredentialInfo RegionInfo idrv.RegionInfo VMClient *server.APIClient }
func (NcpRegionZoneHandler) GetRegionZone ¶
func (regionZoneHandler NcpRegionZoneHandler) GetRegionZone(regionCode string) (irs.RegionZoneInfo, error)
func (*NcpRegionZoneHandler) ListOrgRegion ¶
func (regionZoneHandler *NcpRegionZoneHandler) ListOrgRegion() (string, error)
func (*NcpRegionZoneHandler) ListOrgZone ¶
func (regionZoneHandler *NcpRegionZoneHandler) ListOrgZone() (string, error)
func (*NcpRegionZoneHandler) ListRegionZone ¶
func (regionZoneHandler *NcpRegionZoneHandler) ListRegionZone() ([]*irs.RegionZoneInfo, error)
type NcpSecurityHandler ¶
type NcpSecurityHandler struct { CredentialInfo idrv.CredentialInfo RegionInfo idrv.RegionInfo VMClient *server.APIClient }
func (*NcpSecurityHandler) AddRules ¶
func (securityHandler *NcpSecurityHandler) AddRules(sgIID irs.IID, securityRules *[]irs.SecurityRuleInfo) (irs.SecurityInfo, error)
func (*NcpSecurityHandler) CreateSecurity ¶
func (securityHandler *NcpSecurityHandler) CreateSecurity(securityReqInfo irs.SecurityReqInfo) (irs.SecurityInfo, error)
func (*NcpSecurityHandler) DeleteSecurity ¶
func (securityHandler *NcpSecurityHandler) DeleteSecurity(securityIID irs.IID) (bool, error)
func (*NcpSecurityHandler) ExtractSecurityRuleInfo ¶
func (securityHandler *NcpSecurityHandler) ExtractSecurityRuleInfo(ncpSecurityGroupId string) ([]irs.SecurityRuleInfo, error)
Search NCP SecurityGroup Rule List
func (*NcpSecurityHandler) GetSecurity ¶
func (securityHandler *NcpSecurityHandler) GetSecurity(securityIID irs.IID) (irs.SecurityInfo, error)
func (*NcpSecurityHandler) ListSecurity ¶
func (securityHandler *NcpSecurityHandler) ListSecurity() ([]*irs.SecurityInfo, error)
func (*NcpSecurityHandler) MappingSecurityInfo ¶
func (securityHandler *NcpSecurityHandler) MappingSecurityInfo(ncpSecurityGroup server.AccessControlGroup) (irs.SecurityInfo, error)
func (*NcpSecurityHandler) RemoveRules ¶
func (securityHandler *NcpSecurityHandler) RemoveRules(sgIID irs.IID, securityRules *[]irs.SecurityRuleInfo) (bool, error)
type NcpTagHandler ¶ added in v0.9.2
type NcpTagHandler struct { RegionInfo idrv.RegionInfo VMClient *server.APIClient }
type NcpVMHandler ¶
type NcpVMHandler struct { CredentialInfo idrv.CredentialInfo RegionInfo idrv.RegionInfo VMClient *server.APIClient }
func (*NcpVMHandler) CreateLinuxInitUserData ¶
func (*NcpVMHandler) CreateVPCnSubnetTag ¶
func (vmHandler *NcpVMHandler) CreateVPCnSubnetTag(vmID *string, vpcName string, subnetName string) (bool, error)
Save VPC/Subnet Name info as Tags on the VM
func (*NcpVMHandler) CreateWinInitUserData ¶
func (vmHandler *NcpVMHandler) CreateWinInitUserData(passWord string) (*string, error)
func (*NcpVMHandler) DeletePublicIP ¶
Whenever a VM is terminated, Delete the public IP that the VM has
func (*NcpVMHandler) DeleteVMTags ¶
func (vmHandler *NcpVMHandler) DeleteVMTags(vmID *string) (bool, error)
func (*NcpVMHandler) GetNcpVMInfo ¶
func (vmHandler *NcpVMHandler) GetNcpVMInfo(vmId string) (*server.ServerInstance, error)
func (*NcpVMHandler) GetRegionNo ¶
func (vmHandler *NcpVMHandler) GetRegionNo(regionCode string) (*string, error)
Find the RegionNo that corresponds to a RegionCode
func (*NcpVMHandler) GetVMStatus ¶
func (*NcpVMHandler) GetVPCnSubnetNameFromTag ¶
func (vmHandler *NcpVMHandler) GetVPCnSubnetNameFromTag(vmID *string) (string, string, error)
func (*NcpVMHandler) GetVmDataDiskList ¶
func (vmHandler *NcpVMHandler) GetVmDataDiskList(vmId *string) ([]irs.IID, error)
func (*NcpVMHandler) GetVmIdByName ¶
func (vmHandler *NcpVMHandler) GetVmIdByName(vmNameID string) (string, error)
func (*NcpVMHandler) GetVmRootDiskInfo ¶
func (vmHandler *NcpVMHandler) GetVmRootDiskInfo(vmId *string) (*string, *string, error)
func (*NcpVMHandler) GetZoneNo ¶
func (vmHandler *NcpVMHandler) GetZoneNo(regionCode string, zoneCode string) (*string, error)
Find the ZoneNo that corresponds to a ZoneCode
func (*NcpVMHandler) ListVMStatus ¶
func (vmHandler *NcpVMHandler) ListVMStatus() ([]*irs.VMStatusInfo, error)
func (*NcpVMHandler) MappingServerInfo ¶
func (vmHandler *NcpVMHandler) MappingServerInfo(NcpInstance *server.ServerInstance) (irs.VMInfo, error)
func (*NcpVMHandler) TerminateVM ¶
func (*NcpVMHandler) WaitToDelPublicIp ¶
Waiting for up to 300 seconds until Public IP can be deleted.
func (*NcpVMHandler) WaitToGetVMInfo ¶ added in v0.9.2
Waiting for up to 300 seconds until VM info. can be get
type NcpVMSpecHandler ¶
type NcpVMSpecHandler struct { CredentialInfo idrv.CredentialInfo RegionInfo idrv.RegionInfo VMClient *server.APIClient }
func (*NcpVMSpecHandler) GetOrgVMSpec ¶
func (vmSpecHandler *NcpVMSpecHandler) GetOrgVMSpec(Name string) (string, error)
func (*NcpVMSpecHandler) GetVMSpec ¶
func (vmSpecHandler *NcpVMSpecHandler) GetVMSpec(Name string) (irs.VMSpecInfo, error)
func (*NcpVMSpecHandler) ListOrgVMSpec ¶
func (vmSpecHandler *NcpVMSpecHandler) ListOrgVMSpec() (string, error)
func (*NcpVMSpecHandler) ListVMSpec ¶
func (vmSpecHandler *NcpVMSpecHandler) ListVMSpec() ([]*irs.VMSpecInfo, error)
type NcpVPCHandler ¶
type NcpVPCHandler struct { CredentialInfo idrv.CredentialInfo RegionInfo idrv.RegionInfo VMClient *server.APIClient }
func (*NcpVPCHandler) AddSubnet ¶
func (VPCHandler *NcpVPCHandler) AddSubnet(vpcIID irs.IID, subnetInfo irs.SubnetInfo) (irs.VPCInfo, error)
func (*NcpVPCHandler) CreateSubnet ¶
func (VPCHandler *NcpVPCHandler) CreateSubnet(subnetReqInfo irs.SubnetInfo) (irs.SubnetInfo, error)
func (*NcpVPCHandler) CreateVPC ¶
func (VPCHandler *NcpVPCHandler) CreateVPC(vpcReqInfo irs.VPCReqInfo) (irs.VPCInfo, error)
func (*NcpVPCHandler) DeleteVPC ¶
func (VPCHandler *NcpVPCHandler) DeleteVPC(vpcIID irs.IID) (bool, error)
func (*NcpVPCHandler) MappingVPCInfo ¶
func (VPCHandler *NcpVPCHandler) MappingVPCInfo(vpcJSON VPC) (irs.VPCInfo, error)
func (*NcpVPCHandler) RemoveSubnet ¶
type Price ¶ added in v0.8.2
type Price struct { PriceNo string `json:"priceNo"` // Not int PriceType Code `json:"priceType"` Region Region `json:"region"` ChargingUnitType Code `json:"chargingUnitType"` RatingUnitType Code `json:"ratingUnitType"` ChargingUnitBasicValue string `json:"chargingUnitBasicValue"` // Not int Unit Code `json:"unit"` PriceValue float32 `json:"price"` // Not float64 ConditionType Code `json:"conditionType"` ConditionPrice float32 `json:"conditionPrice"` // Not float64 PriceDescription string `json:"priceDescription"` MeteringUnit Code `json:"meteringUnit"` StartDate string `json:"startDate"` PayCurrency Code `json:"payCurrency"` }
type PriceListAPIResponse ¶ added in v0.8.2
type PriceListAPIResponse struct { GetProductPriceListResponse struct { RequestID string `json:"request_id"` ReturnCode int `json:"return_code"` ReturnMessage string `returnMessage` TotalRows int `json:"totalRows"` ProductPriceList []ProductPrice `json:"productPriceList"` } `json:"getProductPriceListResponse"` Error *ErrorResponse `json:"error,omitempty"` }
type Product ¶ added in v0.8.2
type Product struct { ItemKind ProductItemKind `json:"productItemKind"` ItemKindDetail ProductItemKindDetail `json:"productItemKindDetail"` ProductCode string `json:"productCode"` ProductName string `json:"productName"` Description string `json:"productDescription"` // contains filtered or unexported fields }
type ProductItemKind ¶ added in v0.8.2
=========================== For ProductList ============================
type ProductItemKindDetail ¶ added in v0.8.2
type ProductListAPIResponse ¶ added in v0.8.2
type ProductListAPIResponse struct { GetProductListResponse struct { RequestID string `json:"request_id"` ReturnCode int `json:"return_code"` ReturnMessage string `returnMessage` TotalRows int `json:"totalRows"` ProductList []Product `json:"productList"` } `json:"getProductListResponse"` Error *ErrorResponse `json:"error,omitempty"` }
type ProductPrice ¶ added in v0.8.2
type ProductPrice struct { ProductItemKind Code `json:"productItemKind"` ProductItemKindDetail Code `json:"productItemKindDetail"` ProductCode string `json:"productCode"` ProductName string `json:"productName"` ProductDescription string `json:"productDescription"` ProductType Code `json:"productType"` GpuCount int `json:"gpuCount"` CpuCount int `json:"cpuCount"` MemorySize int64 `json:"memorySize"` BaseBlockStorageSize int64 `json:"baseBlockStorageSize"` DiskType Code `json:"diskType"` DiskDetailType Code `json:"diskDetailType"` GenerationCode string `json:"generationCode"` PriceList []Price `json:"priceList"` // contains filtered or unexported fields }