Documentation ¶
Overview ¶
Package resource is to manage multi-cloud infra resource
Package resource is to manage multi-cloud infra resource ¶
Package resource is to manage multi-cloud infra resource ¶
Package resource is to manage multi-cloud infra resource ¶
Package resource is to manage multi-cloud infra resource ¶
Package resource is to manage multi-cloud infra resource ¶
Package resource is to manage multi-cloud infra resource ¶
Package resource is to manage multi-cloud infra resource ¶
Package resource is to manage multi-cloud infra resource ¶
Package resource is to manage multi-cloud infra resource
Index ¶
- func AddK8sNodeGroup(nsId string, k8sClusterId string, u *model.TbK8sNodeGroupReq) (model.TbK8sClusterInfo, error)
- func ChangeK8sNodeGroupAutoscaleSize(nsId string, k8sClusterId string, k8sNodeGroupName string, ...) (model.TbChangeK8sNodeGroupAutoscaleSizeRes, error)
- func CheckChildResource(nsId string, resourceType string, parentResourceId string, resourceId string) (bool, error)
- func CheckK8sCluster(nsId string, k8sClusterId string) (bool, error)
- func CheckResource(nsId string, resourceType string, resourceId string) (bool, error)
- func ContainsZone(zones []string, zone string) bool
- func ConvertSpiderImageToTumblebugImage(spiderImage model.SpiderImageInfo) (model.TbImageInfo, error)
- func ConvertSpiderMyImageToTumblebugCustomImage(spiderMyImage model.SpiderMyImageInfo) (model.TbCustomImageInfo, error)
- func ConvertSpiderSpecToTumblebugSpec(spiderSpec model.SpiderSpecInfo) (model.TbSpecInfo, error)
- func CreateDataDisk(nsId string, u *model.TbDataDiskReq, option string) (model.TbDataDiskInfo, error)
- func CreateFirewallRules(nsId string, securityGroupId string, req []model.TbFirewallRuleInfo, ...) (model.TbSecurityGroupInfo, error)
- func CreateK8sCluster(nsId string, req *model.TbK8sClusterReq, option string) (model.TbK8sClusterInfo, error)
- func CreateSecurityGroup(nsId string, u *model.TbSecurityGroupReq, option string) (model.TbSecurityGroupInfo, error)
- func CreateSharedResource(nsId string, resType string, connectionName string) error
- func CreateSshKey(nsId string, u *model.TbSshKeyReq, option string) (model.TbSshKeyInfo, error)
- func CreateSubnet(nsId string, vNetId string, subnetReq *model.TbSubnetReq) (model.TbSubnetInfo, error)
- func CreateVNet(nsId string, vNetReq *model.TbVNetReq) (model.TbVNetInfo, error)
- func DelAllResources(nsId string, resourceType string, subString string, forceFlag string) (model.IdList, error)
- func DelAllSharedResources(nsId string) (model.IdList, error)
- func DelEleInSlice(arr interface{}, index int)
- func DelResource(nsId string, resourceType string, resourceId string, forceFlag string) error
- func DeleteAllK8sCluster(nsId string, subString string, forceFlag string) (model.IdList, error)
- func DeleteFirewallRules(nsId string, securityGroupId string, req []model.TbFirewallRuleInfo) (model.TbSecurityGroupInfo, error)
- func DeleteK8sCluster(nsId string, k8sClusterId string, forceFlag string) (bool, error)
- func DeleteSubnet(nsId string, vNetId string, subnetId string) (model.SimpleMsg, error)
- func DeleteVNet(nsId string, vNetId string, withSubnets string) (model.SimpleMsg, error)
- func DeregisterSubnet(nsId string, vNetId string, subnetId string) (model.SimpleMsg, error)
- func DeregisterVNet(nsId string, vNetId string, withSubnets string) (model.SimpleMsg, error)
- func DesignVNets(reqt *model.VNetDesignRequest) (model.VNetDesignResponse, error)
- func FetchImagesForAllConnConfigs(nsId string) (connConfigCount uint, imageCount uint, err error)
- func FetchImagesForConnConfig(connConfig string, nsId string) (imageCount uint, err error)
- func FetchSpecsForAllConnConfigs(nsId string) (connConfigCount uint, specCount uint, err error)
- func FetchSpecsForConnConfig(connConfigName string, nsId string) (uint, error)
- func FilterSpecsByRange(nsId string, filter model.FilterSpecsByRangeRequest) ([]model.TbSpecInfo, error)
- func GenK8sClusterKey(nsId string, k8sClusterId string) string
- func GenSpecMapKey(region, specName string) string
- func GetAssociatedObjectCount(nsId string, resourceType string, resourceId string) (int, error)
- func GetAssociatedObjectList(nsId string, resourceType string, resourceId string) ([]string, error)
- func GetCspResourceName(nsId string, resourceType string, resourceId string) (string, error)
- func GetFirstNZones(connectionName string, firstN int) ([]string, int, error)
- func GetIdFromStruct(u interface{}) (string, error)
- func GetImage(nsId string, imageKey string) (model.TbImageInfo, error)
- func GetK8sCluster(nsId string, k8sClusterId string) (model.TbK8sClusterInfo, error)
- func GetNameFromStruct(u interface{}) (string, error)
- func GetProviderRegionZoneResourceKey(providerName, regionName, zoneName, resourceName string) string
- func GetResource(nsId string, resourceType string, resourceId string) (interface{}, error)
- func GetSpec(nsId string, specKey string) (model.TbSpecInfo, error)
- func GetSubnet(nsId string, vNetId string, subnetId string) (model.TbSubnetInfo, error)
- func GetVNet(nsId string, vNetId string) (model.TbVNetInfo, error)
- func ListK8sCluster(nsId string, filterKey string, filterVal string) (interface{}, error)
- func ListK8sClusterId(nsId string) ([]string, error)
- func ListResource(nsId string, resourceType string, filterKey string, filterVal string) (interface{}, error)
- func ListResourceId(nsId string, resourceType string) ([]string, error)
- func ListSubnet(nsId string, vNetId string) ([]model.TbSubnetInfo, error)
- func LoadAssets() (model.IdList, error)
- func LookupImage(connConfig string, imageId string) (model.SpiderImageInfo, error)
- func LookupImageList(connConfig string) (model.SpiderImageList, error)
- func LookupMyImage(connConfig string, myImageId string) (model.SpiderMyImageInfo, error)
- func LookupSpec(connConfig string, specName string) (model.SpiderSpecInfo, error)
- func LookupSpecList(connConfig string) (model.SpiderSpecList, error)
- func RegisterCustomImageWithId(nsId string, u *model.TbCustomImageReq) (model.TbCustomImageInfo, error)
- func RegisterCustomImageWithInfo(nsId string, content model.TbCustomImageInfo) (model.TbCustomImageInfo, error)
- func RegisterImageWithId(nsId string, u *model.TbImageReq, update bool, RDBonly bool) (model.TbImageInfo, error)
- func RegisterImageWithInfo(nsId string, content *model.TbImageInfo, update bool) (model.TbImageInfo, error)
- func RegisterSpecWithCspResourceId(nsId string, u *model.TbSpecReq, update bool) (model.TbSpecInfo, error)
- func RegisterSpecWithInfo(nsId string, content *model.TbSpecInfo, update bool) (model.TbSpecInfo, error)
- func RegisterSubnet(nsId string, vNetId string, subnetReq *model.TbRegisterSubnetReq) (model.TbSubnetInfo, error)
- func RegisterVNet(nsId string, vNetRegisterReq *model.TbRegisterVNetReq) (model.TbVNetInfo, error)
- func RemoveK8sNodeGroup(nsId string, k8sClusterId string, k8sNodeGroupName string, forceFlag string) (bool, error)
- func SearchImage(nsId string, keywords ...string) ([]model.TbImageInfo, error)
- func SetK8sNodeGroupAutoscaling(nsId string, k8sClusterId string, k8sNodeGroupName string, ...) (model.TbSetK8sNodeGroupAutoscalingRes, error)
- func TbCustomImageReqStructLevelValidation(sl validator.StructLevel)
- func TbDataDiskReqStructLevelValidation(sl validator.StructLevel)
- func TbImageReqStructLevelValidation(sl validator.StructLevel)
- func TbK8sClusterReqStructLevelValidation(sl validator.StructLevel)
- func TbSecurityGroupReqStructLevelValidation(sl validator.StructLevel)
- func TbSpecReqStructLevelValidation(sl validator.StructLevel)
- func TbSshKeyReqStructLevelValidation(sl validator.StructLevel)
- func TbSubnetReqStructLevelValidation(sl validator.StructLevel)
- func TbVNetReqStructLevelValidation(sl validator.StructLevel)
- func ToNamingRuleCompatible(rawName string) string
- func UpdateAssociatedObjectList(nsId string, resourceType string, resourceId string, cmd string, ...) ([]string, error)
- func UpdateImage(nsId string, imageId string, fieldsToUpdate model.TbImageInfo, RDBonly bool) (model.TbImageInfo, error)
- func UpdateResourceObject(nsId string, resourceType string, resourceObject interface{})
- func UpdateSpec(nsId string, specId string, fieldsToUpdate model.TbSpecInfo) (model.TbSpecInfo, error)
- func UpdateSshKey(nsId string, sshKeyId string, fieldsToUpdate model.TbSshKeyInfo) (model.TbSshKeyInfo, error)
- func UpgradeK8sCluster(nsId string, k8sClusterId string, u *model.TbUpgradeK8sClusterReq) (model.TbK8sClusterInfo, error)
- func UpsizeDataDisk(nsId string, resourceId string, u *model.TbDataDiskUpsizeReq) (model.TbDataDiskInfo, error)
- func ValidateSubnetReq(subnetReq *model.TbSubnetReq, existingVNet model.TbVNetInfo) error
- func ValidateVNetReq(vNetReq *model.TbVNetReq) error
- type IdNameOnly
- type NetworkStatus
- type Range
- type TbDataDiskUpsizeReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddK8sNodeGroup ¶
func AddK8sNodeGroup(nsId string, k8sClusterId string, u *model.TbK8sNodeGroupReq) (model.TbK8sClusterInfo, error)
AddK8sNodeGroup adds a NodeGroup
func ChangeK8sNodeGroupAutoscaleSize ¶
func ChangeK8sNodeGroupAutoscaleSize(nsId string, k8sClusterId string, k8sNodeGroupName string, u *model.TbChangeK8sNodeGroupAutoscaleSizeReq) (model.TbChangeK8sNodeGroupAutoscaleSizeRes, error)
ChangeK8sNodeGroupAutoscaleSize change NodeGroup's Autoscaling Size
func CheckChildResource ¶
func CheckChildResource(nsId string, resourceType string, parentResourceId string, resourceId string) (bool, error)
CheckChildResource returns the existence of the TB Resource resource in bool form.
func CheckK8sCluster ¶
CheckK8sCluster returns the existence of the TB K8sCluster object in bool form.
func CheckResource ¶
CheckResource returns the existence of the TB Resource resource in bool form.
func ContainsZone ¶ added in v0.9.9
func ConvertSpiderImageToTumblebugImage ¶
func ConvertSpiderImageToTumblebugImage(spiderImage model.SpiderImageInfo) (model.TbImageInfo, error)
ConvertSpiderImageToTumblebugImage accepts an Spider image object, converts to and returns an TB image object
func ConvertSpiderMyImageToTumblebugCustomImage ¶
func ConvertSpiderMyImageToTumblebugCustomImage(spiderMyImage model.SpiderMyImageInfo) (model.TbCustomImageInfo, error)
ConvertSpiderMyImageToTumblebugCustomImage accepts an Spider MyImage object, converts to and returns an TB customImage object
func ConvertSpiderSpecToTumblebugSpec ¶
func ConvertSpiderSpecToTumblebugSpec(spiderSpec model.SpiderSpecInfo) (model.TbSpecInfo, error)
ConvertSpiderSpecToTumblebugSpec accepts an Spider spec object, converts to and returns an TB spec object
func CreateDataDisk ¶
func CreateDataDisk(nsId string, u *model.TbDataDiskReq, option string) (model.TbDataDiskInfo, error)
CreateDataDisk accepts DataDisk creation request, creates and returns an TB dataDisk object
func CreateFirewallRules ¶
func CreateFirewallRules(nsId string, securityGroupId string, req []model.TbFirewallRuleInfo, objectOnly bool) (model.TbSecurityGroupInfo, error)
CreateFirewallRules accepts firewallRule creation request, creates and returns an TB securityGroup object
func CreateK8sCluster ¶
func CreateK8sCluster(nsId string, req *model.TbK8sClusterReq, option string) (model.TbK8sClusterInfo, error)
CreateK8sCluster create a k8s cluster
func CreateSecurityGroup ¶
func CreateSecurityGroup(nsId string, u *model.TbSecurityGroupReq, option string) (model.TbSecurityGroupInfo, error)
CreateSecurityGroup accepts SG creation request, creates and returns an TB SG object
func CreateSharedResource ¶ added in v0.9.10
CreateSharedResource is to register default resource from asset files (../assets/*.csv)
func CreateSshKey ¶
func CreateSshKey(nsId string, u *model.TbSshKeyReq, option string) (model.TbSshKeyInfo, error)
CreateSshKey accepts SSH key creation request, creates and returns an TB sshKey object
func CreateSubnet ¶
func CreateSubnet(nsId string, vNetId string, subnetReq *model.TbSubnetReq) (model.TbSubnetInfo, error)
CreateSubnet creates and returns the vNet object
func CreateVNet ¶
CreateVNet accepts vNet creation request, creates and returns an TB vNet object
func DelAllResources ¶
func DelAllResources(nsId string, resourceType string, subString string, forceFlag string) (model.IdList, error)
DelAllResources deletes all TB Resource object of given resourceType
func DelAllSharedResources ¶
DelAllSharedResources deletes all Default securityGroup, sshKey, vNet objects
func DelEleInSlice ¶
func DelEleInSlice(arr interface{}, index int)
DelEleInSlice delete an element from slice by index
- arr: the reference of slice
- index: the index of element will be deleted
func DelResource ¶
DelResource deletes the TB Resource object
func DeleteAllK8sCluster ¶
DeleteAllK8sCluster deletes all clusters
func DeleteFirewallRules ¶
func DeleteFirewallRules(nsId string, securityGroupId string, req []model.TbFirewallRuleInfo) (model.TbSecurityGroupInfo, error)
DeleteFirewallRules accepts firewallRule creation request, creates and returns an TB securityGroup object
func DeleteK8sCluster ¶
DeleteK8sCluster deletes a k8s cluster
func DeleteSubnet ¶ added in v0.9.9
DeleteSubnet deletes and returns the result
func DeleteVNet ¶ added in v0.9.9
DeleteVNet accepts vNet creation request, creates and returns an TB vNet object
func DeregisterSubnet ¶ added in v0.9.9
DeregisterSubnet deregister subnet and returns the result
func DeregisterVNet ¶ added in v0.9.9
DeregisterVNet accepts vNet unregistration request, deregister and returns the result
func DesignVNets ¶ added in v0.9.10
func DesignVNets(reqt *model.VNetDesignRequest) (model.VNetDesignResponse, error)
DesignVNets accepts a VNet design request, designs and returns a VNet design response
func FetchImagesForAllConnConfigs ¶
FetchImagesForAllConnConfigs gets all conn configs from Spider, lookups all images for each region of conn config, and saves into TB image objects
func FetchImagesForConnConfig ¶
FetchImagesForAllConnConfigs gets all conn configs from Spider, lookups all images for each region of conn config, and saves into TB image objects
func FetchSpecsForAllConnConfigs ¶
FetchSpecsForAllConnConfigs gets all conn configs from Spider, lookups all specs for each region of conn config, and saves into TB spec objects
func FetchSpecsForConnConfig ¶
FetchSpecsForConnConfig lookups all specs for region of conn config, and saves into TB spec objects
func FilterSpecsByRange ¶
func FilterSpecsByRange(nsId string, filter model.FilterSpecsByRangeRequest) ([]model.TbSpecInfo, error)
FilterSpecsByRange accepts criteria ranges for filtering, and returns the list of filtered TB spec objects
func GenK8sClusterKey ¶
GenK8sClusterKey is func to generate a key from K8sCluster ID
func GenSpecMapKey ¶
GenSpecMapKey generates a SpecMap key for storing or accessing data in a map
func GetAssociatedObjectCount ¶
GetAssociatedObjectCount returns the number of Resource's associated Tumblebug objects
func GetAssociatedObjectList ¶
GetAssociatedObjectList returns the list of Resource's associated Tumblebug objects
func GetCspResourceName ¶ added in v0.9.10
GetCspResourceName is func to retrieve CSP native resource ID
func GetFirstNZones ¶ added in v0.9.10
GetFirstNZones returns the first N zones of the given connection
func GetIdFromStruct ¶
GetIdFromStruct accepts any struct for argument, and returns value of the field 'Id'
func GetImage ¶
func GetImage(nsId string, imageKey string) (model.TbImageInfo, error)
GetImage accepts namespace Id and imageKey(Id,CspResourceId,GuestOS,...), and returns the TB image object
func GetK8sCluster ¶
func GetK8sCluster(nsId string, k8sClusterId string) (model.TbK8sClusterInfo, error)
GetK8sCluster retrives a k8s cluster information
func GetNameFromStruct ¶
GetNameFromStruct accepts any struct for argument, and returns value of the field 'Name'
func GetResource ¶
GetResource returns the requested TB Resource object
func GetSpec ¶
func GetSpec(nsId string, specKey string) (model.TbSpecInfo, error)
GetSpec accepts namespace Id and specKey(Id,CspResourceId,...), and returns the TB spec object
func ListK8sCluster ¶
ListK8sCluster returns the list of TB K8sCluster objects of given nsId
func ListK8sClusterId ¶
ListK8sClusterId returns the list of TB K8sCluster object IDs of given nsId
func ListResource ¶
func ListResource(nsId string, resourceType string, filterKey string, filterVal string) (interface{}, error)
ListResource returns the list of TB Resource objects of given resourceType
func ListResourceId ¶
ListResourceId returns the list of TB Resource object IDs of given resourceType
func ListSubnet ¶ added in v0.9.9
func ListSubnet(nsId string, vNetId string) ([]model.TbSubnetInfo, error)
ListSubnet
func LoadAssets ¶ added in v0.9.10
LoadAssets is to register common resources from asset files (../assets/*.csv)
func LookupImage ¶
func LookupImage(connConfig string, imageId string) (model.SpiderImageInfo, error)
LookupImage accepts Spider conn config and CSP image ID, lookups and returns the Spider image object
func LookupImageList ¶
func LookupImageList(connConfig string) (model.SpiderImageList, error)
LookupImageList accepts Spider conn config, lookups and returns the list of all images in the region of conn config in the form of the list of Spider image objects
func LookupMyImage ¶
func LookupMyImage(connConfig string, myImageId string) (model.SpiderMyImageInfo, error)
LookupMyImage accepts Spider conn config and CSP myImage ID, lookups and returns the Spider image object
func LookupSpec ¶
func LookupSpec(connConfig string, specName string) (model.SpiderSpecInfo, error)
LookupSpec accepts Spider conn config and CSP spec name, lookups and returns the Spider spec object
func LookupSpecList ¶
func LookupSpecList(connConfig string) (model.SpiderSpecList, error)
LookupSpecList accepts Spider conn config, lookups and returns the list of all specs in the region of conn config in the form of the list of Spider spec objects
func RegisterCustomImageWithId ¶
func RegisterCustomImageWithId(nsId string, u *model.TbCustomImageReq) (model.TbCustomImageInfo, error)
RegisterCustomImageWithId accepts customimage creation request, creates and returns an TB customimage object
func RegisterCustomImageWithInfo ¶
func RegisterCustomImageWithInfo(nsId string, content model.TbCustomImageInfo) (model.TbCustomImageInfo, error)
RegisterCustomImageWithInfo accepts customimage registration request, creates and returns an TB customimage object
func RegisterImageWithId ¶
func RegisterImageWithId(nsId string, u *model.TbImageReq, update bool, RDBonly bool) (model.TbImageInfo, error)
RegisterImageWithId accepts image creation request, creates and returns an TB image object
func RegisterImageWithInfo ¶
func RegisterImageWithInfo(nsId string, content *model.TbImageInfo, update bool) (model.TbImageInfo, error)
RegisterImageWithInfo accepts image creation request, creates and returns an TB image object
func RegisterSpecWithCspResourceId ¶ added in v0.9.10
func RegisterSpecWithCspResourceId(nsId string, u *model.TbSpecReq, update bool) (model.TbSpecInfo, error)
RegisterSpecWithCspResourceId accepts spec creation request, creates and returns an TB spec object
func RegisterSpecWithInfo ¶
func RegisterSpecWithInfo(nsId string, content *model.TbSpecInfo, update bool) (model.TbSpecInfo, error)
RegisterSpecWithInfo accepts spec creation request, creates and returns an TB spec object
func RegisterSubnet ¶ added in v0.9.9
func RegisterSubnet(nsId string, vNetId string, subnetReq *model.TbRegisterSubnetReq) (model.TbSubnetInfo, error)
func RegisterVNet ¶ added in v0.9.9
func RegisterVNet(nsId string, vNetRegisterReq *model.TbRegisterVNetReq) (model.TbVNetInfo, error)
RegisterVNet accepts vNet registration request, register and returns an TB vNet object
func RemoveK8sNodeGroup ¶
func RemoveK8sNodeGroup(nsId string, k8sClusterId string, k8sNodeGroupName string, forceFlag string) (bool, error)
RemoveK8sNodeGroup removes a specified NodeGroup
func SearchImage ¶
func SearchImage(nsId string, keywords ...string) ([]model.TbImageInfo, error)
SearchImage accepts arbitrary number of keywords, and returns the list of matched TB image objects
func SetK8sNodeGroupAutoscaling ¶
func SetK8sNodeGroupAutoscaling(nsId string, k8sClusterId string, k8sNodeGroupName string, u *model.TbSetK8sNodeGroupAutoscalingReq) (model.TbSetK8sNodeGroupAutoscalingRes, error)
SetK8sNodeGroupAutoscaling set NodeGroup's Autoscaling On/Off
func TbCustomImageReqStructLevelValidation ¶
func TbCustomImageReqStructLevelValidation(sl validator.StructLevel)
TbImageReqStructLevelValidation func is for Validation
func TbDataDiskReqStructLevelValidation ¶
func TbDataDiskReqStructLevelValidation(sl validator.StructLevel)
TbDataDiskReqStructLevelValidation func is for Validation
func TbImageReqStructLevelValidation ¶
func TbImageReqStructLevelValidation(sl validator.StructLevel)
TbImageReqStructLevelValidation func is for Validation
func TbK8sClusterReqStructLevelValidation ¶
func TbK8sClusterReqStructLevelValidation(sl validator.StructLevel)
TbK8sClusterReqStructLevelValidation is a function to validate 'model.TbK8sClusterReq' object.
func TbSecurityGroupReqStructLevelValidation ¶
func TbSecurityGroupReqStructLevelValidation(sl validator.StructLevel)
TbSecurityGroupReqStructLevelValidation is a function to validate 'TbSecurityGroupReq' object.
func TbSpecReqStructLevelValidation ¶
func TbSpecReqStructLevelValidation(sl validator.StructLevel)
TbSpecReqStructLevelValidation is a function to validate 'TbSpecReq' object.
func TbSshKeyReqStructLevelValidation ¶
func TbSshKeyReqStructLevelValidation(sl validator.StructLevel)
TbSshKeyReqStructLevelValidation is a function to validate 'TbSshKeyReq' object.
func TbSubnetReqStructLevelValidation ¶
func TbSubnetReqStructLevelValidation(sl validator.StructLevel)
TbSubnetReqStructLevelValidation is a function to validate 'TbSubnetReq' object.
func TbVNetReqStructLevelValidation ¶
func TbVNetReqStructLevelValidation(sl validator.StructLevel)
TbVNetReqStructLevelValidation is a function to validate 'TbVNetReq' object.
func ToNamingRuleCompatible ¶
ToNamingRuleCompatible function transforms a given string to match the regex pattern [a-z]([-a-z0-9]*[a-z0-9])?.
func UpdateAssociatedObjectList ¶
func UpdateAssociatedObjectList(nsId string, resourceType string, resourceId string, cmd string, objectKey string) ([]string, error)
UpdateAssociatedObjectList adds or deletes the objectKey (currently, vmKey) to/from TB object's associatedObjectList
func UpdateImage ¶
func UpdateImage(nsId string, imageId string, fieldsToUpdate model.TbImageInfo, RDBonly bool) (model.TbImageInfo, error)
UpdateImage accepts to-be TB image objects, updates and returns the updated TB image objects
func UpdateResourceObject ¶
UpdateResourceObject is func to update the resource object
func UpdateSpec ¶
func UpdateSpec(nsId string, specId string, fieldsToUpdate model.TbSpecInfo) (model.TbSpecInfo, error)
UpdateSpec accepts to-be TB spec objects, updates and returns the updated TB spec objects
func UpdateSshKey ¶
func UpdateSshKey(nsId string, sshKeyId string, fieldsToUpdate model.TbSshKeyInfo) (model.TbSshKeyInfo, error)
UpdateSshKey accepts to-be TB sshKey objects, updates and returns the updated TB sshKey objects
func UpgradeK8sCluster ¶
func UpgradeK8sCluster(nsId string, k8sClusterId string, u *model.TbUpgradeK8sClusterReq) (model.TbK8sClusterInfo, error)
UpgradeK8sCluster upgrades an existing k8s cluster to the specified version
func UpsizeDataDisk ¶
func UpsizeDataDisk(nsId string, resourceId string, u *model.TbDataDiskUpsizeReq) (model.TbDataDiskInfo, error)
UpsizeDataDisk accepts DataDisk upsize request, creates and returns an TB dataDisk object
func ValidateSubnetReq ¶ added in v0.9.9
func ValidateSubnetReq(subnetReq *model.TbSubnetReq, existingVNet model.TbVNetInfo) error
func ValidateVNetReq ¶ added in v0.9.9
Types ¶
type IdNameOnly ¶
type NetworkStatus ¶ added in v0.9.9
type NetworkStatus string
NetworkStatus represents the status of a network resource.
const ( // CRUD operations NetworkOnConfiguring NetworkStatus = "Configuring" // Resources are being configured. NetworkOnReading NetworkStatus = "Reading" // The network information is being read. NetworkOnUpdating NetworkStatus = "Updating" // The network is being updated. NetworkOnDeleting NetworkStatus = "Deleting" // The network is being deleted. // Register/deregister operations NetworkOnRegistering NetworkStatus = "Registering" // The network is being registered. NetworkOnDeregistering NetworkStatus = "Dergistering" // The network is being registered. // Available status NetworkAvailable NetworkStatus = "Available" // The network is fully created and ready for use. // In Use status NetworkInUse NetworkStatus = "InUse" // The network is currently in use. // Unknwon status NetworkUnknown NetworkStatus = "Unknown" // The network status is unknown. // Error Handling NetworkError NetworkStatus = "Error" // An error occurred during a CRUD operation. NetworkErrorOnConfiguring NetworkStatus = "ErrorOnConfiguring" // An error occurred during the configuring operation. NetworkErrorOnReading NetworkStatus = "ErrorOnReading" // An error occurred during the reading operation. NetworkErrorOnUpdating NetworkStatus = "ErrorOnUpdating" // An error occurred during the updating operation. NetworkErrorOnDeleting NetworkStatus = "ErrorOnDeleting" // An error occurred during the deleting operation. NetworkErrorOnRegistering NetworkStatus = "ErrorOnRegistering" // An error occurred during the registering operation. )
type TbDataDiskUpsizeReq ¶
type TbDataDiskUpsizeReq struct { DiskSize string `json:"diskSize" validate:"required"` Description string `json:"description"` }
TbDataDiskUpsizeReq is a struct to handle 'Upsize dataDisk' request toward CB-Tumblebug.