Documentation
¶
Index ¶
- func DelAllResources(nsId string, resourceType string, forceFlag string) error
- func DelRecommendSpec(nsId string, specId string, cpuSize uint16, memSize uint16, diskSize uint32) error
- func DelResource(nsId string, resourceType string, resourceId string, forceFlag string) error
- func FetchImages(nsId string) (connConfigCount uint, imageCount uint, err error)
- func FetchSpecs(nsId string) (connConfigCount uint, specCount uint, err error)
- func GetNameFromStruct(u interface{}) string
- func GetResource(nsId string, resourceType string, resourceId string) (interface{}, error)
- func ListResource(nsId string, resourceType string) (interface{}, error)
- func ListResourceId(nsId string, resourceType string) []string
- func LowerizeAndCheckResource(nsId string, resourceType string, resourceId string) (bool, string, error)
- func RegisterRecommendList(nsId string, connectionName string, cpuSize uint16, memSize uint16, ...) error
- type FilterSpecsByRangeRequest
- type NameOnly
- type Range
- type ReturnValue
- type SpiderGpuInfo
- type SpiderImageInfo
- type SpiderImageList
- type SpiderImageReqInfoWrapper
- type SpiderKeyPairInfo
- type SpiderKeyPairReqInfoWrapper
- type SpiderSecurityInfo
- type SpiderSecurityReqInfoWrapper
- type SpiderSecurityRuleInfo
- type SpiderSpecInfo
- type SpiderSpecList
- type SpiderSubnetInfo
- type SpiderSubnetReqInfo
- type SpiderVCpuInfo
- type SpiderVPCInfo
- type SpiderVPCReqInfo
- type SpiderVPCReqInfoWrapper
- type TbImageInfo
- func ConvertSpiderImageToTumblebugImage(spiderImage SpiderImageInfo) (TbImageInfo, error)
- func RegisterImageWithId(nsId string, u *TbImageReq) (TbImageInfo, error)
- func RegisterImageWithInfo(nsId string, content *TbImageInfo) (TbImageInfo, error)
- func SearchImage(nsId string, keywords ...string) ([]TbImageInfo, error)
- type TbImageReq
- type TbSecurityGroupInfo
- type TbSecurityGroupReq
- type TbSpecInfo
- func ConvertSpiderSpecToTumblebugSpec(spiderSpec SpiderSpecInfo) (TbSpecInfo, error)
- func FilterSpecs(nsId string, filter TbSpecInfo) ([]TbSpecInfo, error)
- func FilterSpecsByRange(nsId string, filter FilterSpecsByRangeRequest) ([]TbSpecInfo, error)
- func RegisterSpecWithCspSpecName(nsId string, u *TbSpecReq) (TbSpecInfo, error)
- func RegisterSpecWithInfo(nsId string, content *TbSpecInfo) (TbSpecInfo, error)
- func SortSpecs(specList []TbSpecInfo, orderBy string, direction string) ([]TbSpecInfo, error)
- func UpdateSpec(nsId string, newSpec TbSpecInfo) (TbSpecInfo, error)
- type TbSpecReq
- type TbSshKeyInfo
- type TbSshKeyReq
- type TbVNetInfo
- type TbVNetReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DelAllResources ¶
func DelRecommendSpec ¶
func DelResource ¶
func DelResource(nsId string, resourceType string, resourceId string, forceFlag string) (int, []byte, error) {
func GetNameFromStruct ¶
func GetNameFromStruct(u interface{}) string
func GetResource ¶
func ListResource ¶
func ListResourceId ¶
Types ¶
type FilterSpecsByRangeRequest ¶ added in v0.2.8
type FilterSpecsByRangeRequest struct {
Num_vCPU Range `json:"num_vCPU"`
Num_core Range `json:"num_core"`
Mem_GiB Range `json:"mem_GiB"`
Storage_GiB Range `json:"storage_GiB"`
Cost_per_hour Range `json:"cost_per_hour"`
Num_storage Range `json:"num_storage"`
Max_num_storage Range `json:"max_num_storage"`
Max_total_storage_TiB Range `json:"max_total_storage_TiB"`
Net_bw_Gbps Range `json:"net_bw_Gbps"`
Ebs_bw_Mbps Range `json:"ebs_bw_Mbps"`
Num_gpu Range `json:"num_gpu"`
Gpumem_GiB Range `json:"gpumem_GiB"`
EvaluationScore_01 Range `json:"evaluationScore_01"`
EvaluationScore_02 Range `json:"evaluationScore_02"`
EvaluationScore_03 Range `json:"evaluationScore_03"`
EvaluationScore_04 Range `json:"evaluationScore_04"`
EvaluationScore_05 Range `json:"evaluationScore_05"`
EvaluationScore_06 Range `json:"evaluationScore_06"`
EvaluationScore_07 Range `json:"evaluationScore_07"`
EvaluationScore_08 Range `json:"evaluationScore_08"`
EvaluationScore_09 Range `json:"evaluationScore_09"`
EvaluationScore_10 Range `json:"evaluationScore_10"`
}
type ReturnValue ¶
type ReturnValue struct {
CustomStruct interface{}
}
type SpiderImageInfo ¶
type SpiderImageInfo struct {
// Fields for request
Name string
// Fields for response
IId common.IID // {NameId, SystemId}
GuestOS string // Windows7, Ubuntu etc.
Status string // available, unavailable
KeyValueList []common.KeyValue
}
func LookupImage ¶
func LookupImage(connConfig string, imageId string) (SpiderImageInfo, error)
type SpiderImageList ¶
type SpiderImageList struct {
Image []SpiderImageInfo `json:"image"`
}
func LookupImageList ¶
func LookupImageList(connConfig string) (SpiderImageList, error)
type SpiderImageReqInfoWrapper ¶
type SpiderImageReqInfoWrapper struct {
ConnectionName string
ReqInfo SpiderImageInfo
}
type SpiderKeyPairInfo ¶
type SpiderKeyPairReqInfoWrapper ¶
type SpiderKeyPairReqInfoWrapper struct {
ConnectionName string
ReqInfo SpiderKeyPairInfo
}
type SpiderSecurityInfo ¶
type SpiderSecurityInfo struct {
// Fields for request
Name string
VPCName string
// Fields for both request and response
SecurityRules *[]SpiderSecurityRuleInfo
// Fields for response
IId common.IID // {NameId, SystemId}
VpcIID common.IID // {NameId, SystemId}
Direction string // @todo userd??
KeyValueList []common.KeyValue
}
type SpiderSecurityReqInfoWrapper ¶
type SpiderSecurityReqInfoWrapper struct {
ConnectionName string
ReqInfo SpiderSecurityInfo
}
type SpiderSecurityRuleInfo ¶
type SpiderSpecInfo ¶
type SpiderSpecInfo struct {
Region string
Name string
VCpu SpiderVCpuInfo
Mem string
Gpu []SpiderGpuInfo
KeyValueList []common.KeyValue
}
func LookupSpec ¶
func LookupSpec(connConfig string, specName string) (SpiderSpecInfo, error)
func LookupSpec(u *TbSpecInfo) (SpiderSpecInfo, error) {
type SpiderSpecList ¶
type SpiderSpecList struct {
Vmspec []SpiderSpecInfo `json:"vmspec"`
}
func LookupSpecList ¶
func LookupSpecList(connConfig string) (SpiderSpecList, error)
type SpiderSubnetInfo ¶
type SpiderSubnetReqInfo ¶
type SpiderVCpuInfo ¶
type SpiderVPCInfo ¶
type SpiderVPCReqInfo ¶
type SpiderVPCReqInfo struct {
Name string
IPv4_CIDR string
SubnetInfoList []SpiderSubnetReqInfo
}
type SpiderVPCReqInfoWrapper ¶
type SpiderVPCReqInfoWrapper struct {
ConnectionName string
ReqInfo SpiderVPCReqInfo
}
type TbImageInfo ¶
type TbImageInfo struct {
Id string `json:"id"`
Name string `json:"name"`
ConnectionName string `json:"connectionName"`
CspImageId string `json:"cspImageId"`
CspImageName string `json:"cspImageName"`
Description string `json:"description"`
CreationDate string `json:"creationDate"`
GuestOS string `json:"guestOS"` // Windows7, Ubuntu etc.
Status string `json:"status"` // available, unavailable
KeyValueList []common.KeyValue `json:"keyValueList"`
}
func ConvertSpiderImageToTumblebugImage ¶
func ConvertSpiderImageToTumblebugImage(spiderImage SpiderImageInfo) (TbImageInfo, error)
func RegisterImageWithId ¶
func RegisterImageWithId(nsId string, u *TbImageReq) (TbImageInfo, error)
func RegisterImageWithInfo ¶
func RegisterImageWithInfo(nsId string, content *TbImageInfo) (TbImageInfo, error)
func SearchImage ¶ added in v0.2.8
func SearchImage(nsId string, keywords ...string) ([]TbImageInfo, error)
type TbImageReq ¶
type TbSecurityGroupInfo ¶
type TbSecurityGroupInfo struct {
Id string `json:"id"`
Name string `json:"name"`
ConnectionName string `json:"connectionName"`
VNetId string `json:"vNetId"`
Description string `json:"description"`
FirewallRules *[]SpiderSecurityRuleInfo `json:"firewallRules"`
CspSecurityGroupId string `json:"cspSecurityGroupId"`
CspSecurityGroupName string `json:"cspSecurityGroupName"`
KeyValueList []common.KeyValue `json:"keyValueList"`
}
func CreateSecurityGroup ¶
func CreateSecurityGroup(nsId string, u *TbSecurityGroupReq) (TbSecurityGroupInfo, error)
type TbSecurityGroupReq ¶
type TbSecurityGroupReq struct {
Name string `json:"name"`
ConnectionName string `json:"connectionName"`
VNetId string `json:"vNetId"`
Description string `json:"description"`
FirewallRules *[]SpiderSecurityRuleInfo `json:"firewallRules"`
}
type TbSpecInfo ¶
type TbSpecInfo struct {
Id string `json:"id"`
Name string `json:"name"`
ConnectionName string `json:"connectionName"`
CspSpecName string `json:"cspSpecName"`
Os_type string `json:"os_type"`
Num_vCPU uint16 `json:"num_vCPU"`
Num_core uint16 `json:"num_core"`
Mem_GiB uint16 `json:"mem_GiB"`
Storage_GiB uint32 `json:"storage_GiB"`
Description string `json:"description"`
Cost_per_hour float32 `json:"cost_per_hour"`
Num_storage uint8 `json:"num_storage"`
Max_num_storage uint8 `json:"max_num_storage"`
Max_total_storage_TiB uint16 `json:"max_total_storage_TiB"`
Net_bw_Gbps uint16 `json:"net_bw_Gbps"`
Ebs_bw_Mbps uint32 `json:"ebs_bw_Mbps"`
Gpu_model string `json:"gpu_model"`
Num_gpu uint8 `json:"num_gpu"`
Gpumem_GiB uint16 `json:"gpumem_GiB"`
Gpu_p2p string `json:"gpu_p2p"`
OrderInFilteredResult uint16 `json:"orderInFilteredResult"`
EvaluationStatus string `json:"evaluationStatus"`
EvaluationScore_01 float32 `json:"evaluationScore_01"`
EvaluationScore_02 float32 `json:"evaluationScore_02"`
EvaluationScore_03 float32 `json:"evaluationScore_03"`
EvaluationScore_04 float32 `json:"evaluationScore_04"`
EvaluationScore_05 float32 `json:"evaluationScore_05"`
EvaluationScore_06 float32 `json:"evaluationScore_06"`
EvaluationScore_07 float32 `json:"evaluationScore_07"`
EvaluationScore_08 float32 `json:"evaluationScore_08"`
EvaluationScore_09 float32 `json:"evaluationScore_09"`
EvaluationScore_10 float32 `json:"evaluationScore_10"`
}
func ConvertSpiderSpecToTumblebugSpec ¶
func ConvertSpiderSpecToTumblebugSpec(spiderSpec SpiderSpecInfo) (TbSpecInfo, error)
func FilterSpecs ¶ added in v0.2.8
func FilterSpecs(nsId string, filter TbSpecInfo) ([]TbSpecInfo, error)
func FilterSpecsByRange ¶ added in v0.2.8
func FilterSpecsByRange(nsId string, filter FilterSpecsByRangeRequest) ([]TbSpecInfo, error)
func RegisterSpecWithCspSpecName ¶
func RegisterSpecWithCspSpecName(nsId string, u *TbSpecReq) (TbSpecInfo, error)
func RegisterSpecWithInfo ¶
func RegisterSpecWithInfo(nsId string, content *TbSpecInfo) (TbSpecInfo, error)
func SortSpecs ¶ added in v0.2.8
func SortSpecs(specList []TbSpecInfo, orderBy string, direction string) ([]TbSpecInfo, error)
func UpdateSpec ¶ added in v0.2.8
func UpdateSpec(nsId string, newSpec TbSpecInfo) (TbSpecInfo, error)
type TbSshKeyInfo ¶
type TbSshKeyInfo struct {
Id string `json:"id"`
Name string `json:"name"`
ConnectionName string `json:"connectionName"`
Description string `json:"description"`
CspSshKeyName string `json:"cspSshKeyName"`
Fingerprint string `json:"fingerprint"`
Username string `json:"username"`
PublicKey string `json:"publicKey"`
PrivateKey string `json:"privateKey"`
KeyValueList []common.KeyValue `json:"keyValueList"`
}
func CreateSshKey ¶
func CreateSshKey(nsId string, u *TbSshKeyReq) (TbSshKeyInfo, error)
type TbSshKeyReq ¶
type TbVNetInfo ¶
type TbVNetInfo struct {
Id string `json:"id"`
Name string `json:"name"`
ConnectionName string `json:"connectionName"`
CidrBlock string `json:"cidrBlock"`
SubnetInfoList []SpiderSubnetInfo `json:"subnetInfoList"`
Description string `json:"description"`
CspVNetId string `json:"cspVNetId"`
CspVNetName string `json:"cspVNetName"`
Status string `json:"status"`
KeyValueList []common.KeyValue `json:"keyValueList"`
}
func CreateVNet ¶
func CreateVNet(nsId string, u *TbVNetReq) (TbVNetInfo, error)
Click to show internal directories.
Click to hide internal directories.