Documentation ¶
Index ¶
- Variables
- func AddRules(connectionName string, sgName string, reqInfoList []cres.SecurityRuleInfo) (*cres.SecurityInfo, error)
- func AddSubnet(connectionName string, rsType string, vpcName string, reqInfo cres.SubnetInfo) (*cres.VPCInfo, error)
- func ControlVM(connectionName string, rsType string, nameID string, action string) (cres.VMStatus, error)
- func CreateImage(connectionName string, rsType string, reqInfo cres.ImageReqInfo) (*cres.ImageInfo, error)
- func CreateKey(connectionName string, rsType string, reqInfo cres.KeyPairReqInfo) (*cres.KeyPairInfo, error)
- func CreateSecurity(connectionName string, rsType string, reqInfo cres.SecurityReqInfo) (*cres.SecurityInfo, error)
- func CreateVPC(connectionName string, rsType string, reqInfo cres.VPCReqInfo) (*cres.VPCInfo, error)
- func DeleteCSPResource(connectionName string, rsType string, systemID string) (bool, cres.VMStatus, error)
- func DeleteImage(connectionName string, rsType string, nameID string) (bool, error)
- func DeleteResource(connectionName string, rsType string, nameID string, force string) (bool, cres.VMStatus, error)
- func EmptyCheckAndTrim(inputName string, inputValue string) (string, error)
- func GetImage(connectionName string, rsType string, nameID string) (*cres.ImageInfo, error)
- func GetKey(connectionName string, rsType string, nameID string) (*cres.KeyPairInfo, error)
- func GetOrgVMSpec(connectionName string, nameID string) (string, error)
- func GetRegisterImage(connectionName string, rsType string, nameID string) (*cres.ImageInfo, error)
- func GetSGOwnerVPC(connectionName string, cspID string) (owerVPC cres.IID, err error)
- func GetSecurity(connectionName string, rsType string, nameID string) (*cres.SecurityInfo, error)
- func GetVM(connectionName string, rsType string, nameID string) (*cres.VMInfo, error)
- func GetVMSpec(connectionName string, nameID string) (*cres.VMSpecInfo, error)
- func GetVMStatus(connectionName string, rsType string, nameID string) (cres.VMStatus, error)
- func GetVPC(connectionName string, rsType string, nameID string) (*cres.VPCInfo, error)
- func ListImage(connectionName string, rsType string) ([]*cres.ImageInfo, error)
- func ListKey(connectionName string, rsType string) ([]*cres.KeyPairInfo, error)
- func ListOrgVMSpec(connectionName string) (string, error)
- func ListRegisterImage(connectionName string, rsType string) ([]*cres.ImageInfo, error)
- func ListSecurity(connectionName string, rsType string) ([]*cres.SecurityInfo, error)
- func ListVM(connectionName string, rsType string) ([]*cres.VMInfo, error)
- func ListVMSpec(connectionName string) ([]*cres.VMSpecInfo, error)
- func ListVMStatus(connectionName string, rsType string) ([]*cres.VMStatusInfo, error)
- func ListVPC(connectionName string, rsType string) ([]*cres.VPCInfo, error)
- func RegisterKey(connectionName string, userIID cres.IID) (*cres.KeyPairInfo, error)
- func RegisterSecurity(connectionName string, vpcUserID string, userIID cres.IID) (*cres.SecurityInfo, error)
- func RegisterVM(connectionName string, userIID cres.IID) (*cres.VMInfo, error)
- func RegisterVPC(connectionName string, userIID cres.IID) (*cres.VPCInfo, error)
- func RemoveCSPSubnet(connectionName string, vpcName string, systemID string) (bool, error)
- func RemoveRules(connectionName string, sgName string, reqRuleInfoList []cres.SecurityRuleInfo) (bool, error)
- func RemoveSubnet(connectionName string, vpcName string, nameID string, force string) (bool, error)
- func RsTypeString(rsType string) string
- func StartVM(connectionName string, rsType string, reqInfo cres.VMReqInfo) (*cres.VMInfo, error)
- func UnregisterResource(connectionName string, rsType string, nameId string) (bool, error)
- func ValidateStruct(is interface{}, emptyPermissionList []string) error
- type AllResourceList
- type VMUsingResources
Constants ¶
This section is empty.
Variables ¶
var GoServicePort string
GO Service Port
var MiddleStartTime string
var ServerIPorName string
// CB-Spider Servcie Address Configuration // cf) https://github.com/cloud-barista/cb-spider/wiki/CB-Spider-Service-Address-Configuration REST and GO SERVER_ADDRESS since v0.4.4
var ServerPort string
var ServiceIPorName string
REST SERVICE_ADDRESS for AdminWeb since v0.4.4
var ServicePort string
var ShortStartTime string
var StartTime string
Functions ¶
func AddRules ¶ added in v0.5.4
func AddRules(connectionName string, sgName string, reqInfoList []cres.SecurityRuleInfo) (*cres.SecurityInfo, error)
(1) check exist(NameID) (2) add Rules
func AddSubnet ¶ added in v0.3.1
func AddSubnet(connectionName string, rsType string, vpcName string, reqInfo cres.SubnetInfo) (*cres.VPCInfo, error)
(1) check exist(NameID) (2) create Resource (3) insert IID
func ControlVM ¶
func ControlVM(connectionName string, rsType string, nameID string, action string) (cres.VMStatus, error)
(1) get IID(NameId) (2) control CSP:VM(SystemId)
func CreateImage ¶
func CreateImage(connectionName string, rsType string, reqInfo cres.ImageReqInfo) (*cres.ImageInfo, error)
================ Image Handler @todo (1) check exist(NameID) (2) gen SP-XID and create userIID, driverIID (3) create Resource (4) create spiderIID: {UserNameID, "DriverNameID:CSPSystemID"} (5) insert spiderIID
func CreateKey ¶
func CreateKey(connectionName string, rsType string, reqInfo cres.KeyPairReqInfo) (*cres.KeyPairInfo, error)
(1) check exist(NameID) (2) generate SP-XID and create reqIID, driverIID (3) create Resource (4) create spiderIID: {reqNameID, "driverNameID:driverSystemID"} (5) insert spiderIID (6) create userIID
func CreateSecurity ¶
func CreateSecurity(connectionName string, rsType string, reqInfo cres.SecurityReqInfo) (*cres.SecurityInfo, error)
(1) check exist(NameID) (2) generate SP-XID and create reqIID, driverIID (3) create Resource (4) create spiderIID: {reqNameID, "driverNameID:driverSystemID"} (5) insert spiderIID (6) create userIID
func CreateVPC ¶
func CreateVPC(connectionName string, rsType string, reqInfo cres.VPCReqInfo) (*cres.VPCInfo, error)
(1) check exist(NameID) (2) generate SP-XID and create reqIID, driverIID (3) create Resource (4) create spiderIID: {reqNameID, "driverNameID:driverSystemID"} (5) insert spiderIID (6) create userIID
func DeleteCSPResource ¶
func DeleteCSPResource(connectionName string, rsType string, systemID string) (bool, cres.VMStatus, error)
delete CSP's Resource(SystemId)
func DeleteImage ¶
(1) get spiderIID(NameId) (2) extract driverIID from spiderIID (3) delete Resource(SystemId) (4) delete spiderIID
func DeleteResource ¶
func DeleteResource(connectionName string, rsType string, nameID string, force string) (bool, cres.VMStatus, error)
(1) get spiderIID (2) delete Resource(SystemId) (3) delete IID
func EmptyCheckAndTrim ¶ added in v0.4.15
func GetRegisterImage ¶
(1) get spiderIID(NameId) (2) extract driverIID from spiderIID (3) get resource(SystemId) (4) set ResourceInfo(IID.NameId)
func GetSGOwnerVPC ¶ added in v0.5.5
func GetSecurity ¶
(1) get IID(NameId) (2) get resource(SystemId) (3) set ResourceInfo(IID.NameId)
func GetVMStatus ¶
(1) get IID(NameId) (2) get CSP:VMStatus(SystemId)
func ListKey ¶
func ListKey(connectionName string, rsType string) ([]*cres.KeyPairInfo, error)
(1) get IID:list (2) get KeyInfo:list
func ListOrgVMSpec ¶
func ListRegisterImage ¶
(1) get spiderIID:list (2) get CSP:list (3) filtering CSP-list by spiderIID-list
func ListSecurity ¶
func ListSecurity(connectionName string, rsType string) ([]*cres.SecurityInfo, error)
(1) get IID:list (2) get SecurityInfo:list (3) set userIID, and ...
func ListVMSpec ¶
func ListVMSpec(connectionName string) ([]*cres.VMSpecInfo, error)
================ VMSpec Handler
func ListVMStatus ¶
func ListVMStatus(connectionName string, rsType string) ([]*cres.VMStatusInfo, error)
(1) get IID:list (2) get VMStatusInfo:list
func RegisterKey ¶ added in v0.4.12
UserIID{UserID, CSP-ID} => SpiderIID{UserID, SP-XID:CSP-ID} (1) check existence(UserID) (2) get resource info(CSP-ID) (3) create spiderIID: {UserID, SP-XID:CSP-ID} (4) insert spiderIID
func RegisterSecurity ¶ added in v0.4.12
func RegisterSecurity(connectionName string, vpcUserID string, userIID cres.IID) (*cres.SecurityInfo, error)
UserIID{UserID, CSP-ID} => SpiderIID{UserID, SP-XID:CSP-ID} (0) check VPC existence(VPC UserID) (1) check existence(UserID) (2) get resource info(CSP-ID) (3) create spiderIID: {UserID, SP-XID:CSP-ID} (4) insert spiderIID
func RegisterVM ¶ added in v0.4.12
UserIID{UserID, CSP-ID} => SpiderIID{UserID, SP-XID:CSP-ID} (1) check existence(UserID) (2) get resource info(CSP-ID) (3) create spiderIID: {UserID, SP-XID:CSP-ID} (4) insert spiderIID
func RegisterVPC ¶ added in v0.4.12
UserIID{UserID, CSP-ID} => SpiderIID{UserID, SP-XID:CSP-ID} (1) check existence(UserID) (2) get resource info(CSP-ID) (3) create spiderIID: {UserID, SP-XID:CSP-ID} (4) insert spiderIID
func RemoveCSPSubnet ¶ added in v0.4.11
remove CSP's Subnet(SystemId)
func RemoveRules ¶ added in v0.5.4
func RemoveRules(connectionName string, sgName string, reqRuleInfoList []cres.SecurityRuleInfo) (bool, error)
(1) check exist(NameID) (2) remove Rules
func RemoveSubnet ¶ added in v0.4.11
(1) get spiderIID (2) delete Resource(SystemId) (3) delete IID
func RsTypeString ¶ added in v0.5.1
func StartVM ¶
(1) check exist(NameID) (2) generate SP-XID and create reqIID, driverIID (3) clone the reqInfo with DriverIID (4) create Resource (5) create spiderIID: {reqNameID, "driverNameID:driverSystemID"} (6) insert spiderIID (7) create userIID
func UnregisterResource ¶ added in v0.4.12
UnregisterResource API does not delete the real resource. This API just unregister the resource from Spider. (1) check exist(NameID) (2) delete SpiderIID
func ValidateStruct ¶ added in v0.4.15
Types ¶
type AllResourceList ¶
type AllResourceList struct { AllList struct { MappedList []*cres.IID `json:"MappedList"` OnlySpiderList []*cres.IID `json:"OnlySpiderList"` OnlyCSPList []*cres.IID `json:"OnlyCSPList"` } }
func ListAllResource ¶
func ListAllResource(connectionName string, rsType string) (AllResourceList, error)
list all Resources for management (1) get IID:list (2) get CSP:list (3) filtering CSP-list by IID-list (4) make MappedList, OnlySpiderList, OnlyCSPList
type VMUsingResources ¶ added in v0.5.5
type VMUsingResources struct { Resources struct { VPC *cres.IID `json:"VPC"` SGList []*cres.IID `json:"SGList"` VMKey *cres.IID `json:"VMKey"` } }
func GetVMUsingRS ¶ added in v0.5.5
func GetVMUsingRS(connectionName string, cspID string) (VMUsingResources, error)