Documentation
¶
Index ¶
- Constants
- func AllowUserWebLogin(s *mcclient.ClientSession, username string) (jsonutils.JSONObject, error)
- func ChangeUserPassword(s *mcclient.ClientSession, username string, password string) (jsonutils.JSONObject, error)
- func CreateCommonAlert(s *mcclient.ClientSession, tem CommonAlertTem) (jsonutils.JSONObject, error)
- func CreateDevtoolTemplate(s *mcclient.ClientSession, name string, hosts []string, mods []string, ...) (jsonutils.JSONObject, error)
- func CreateDynamicSchedtag(s *mcclient.ClientSession, name, schedtag, condition string) (jsonutils.JSONObject, error)
- func CreateNetwork(s *mcclient.ClientSession, name string, gateway string, serverType string, ...) (jsonutils.JSONObject, error)
- func CreateRegion(s *mcclient.ClientSession, region, zone string) (jsonutils.JSONObject, error)
- func CreateRole(s *mcclient.ClientSession, roleName, description string) (jsonutils.JSONObject, error)
- func CreateSchedtag(s *mcclient.ClientSession, name string, strategy string, description string) (jsonutils.JSONObject, error)
- func CreateService(s *mcclient.ClientSession, svcName, svcType string) (jsonutils.JSONObject, error)
- func CreateServiceCertificate(s *mcclient.ClientSession, certName string, certDetails *jsonutils.JSONDict) (jsonutils.JSONObject, error)
- func CreateUser(s *mcclient.ClientSession, username string, password string) (jsonutils.JSONObject, error)
- func CreateWire(s *mcclient.ClientSession, zone string, wire string, bw int, vpc string) (jsonutils.JSONObject, error)
- func CreateZone(s *mcclient.ClientSession, zone string) (jsonutils.JSONObject, error)
- func DeleteCommonAlert(s *mcclient.ClientSession, ids []string)
- func DeleteResource(s *mcclient.ClientSession, man modulebase.Manager, name string) error
- func DeleteServiceEndpoints(s *mcclient.ClientSession, serviceName string) error
- func DevtoolTemplateCreateParams(name string, hostLines []string, mods []string, files map[string]string, ...) (*jsonutils.JSONDict, error)
- func DisableEndpoint(s *mcclient.ClientSession, id string) error
- func DisableService(s *mcclient.ClientSession, id string) error
- func EnsureAgentAnsiblePlaybookRef(s *mcclient.ClientSession) error
- func EnsureDevtoolTemplate(s *mcclient.ClientSession, name string, hosts []string, mods []string, ...) (jsonutils.JSONObject, error)
- func EnsureDynamicSchedtag(s *mcclient.ClientSession, name, schedtag, condition string) (jsonutils.JSONObject, error)
- func EnsureEndpoint(s *mcclient.ClientSession, ...) (jsonutils.JSONObject, error)
- func EnsureResource(s *mcclient.ClientSession, man modulebase.Manager, name string, ...) (jsonutils.JSONObject, error)
- func EnsureRole(s *mcclient.ClientSession, roleName, description string) (jsonutils.JSONObject, error)
- func EnsureSchedtag(s *mcclient.ClientSession, name string, strategy string, description string) (jsonutils.JSONObject, error)
- func EnsureService(s *mcclient.ClientSession, svcName, svcType string) (jsonutils.JSONObject, error)
- func EnsureServiceCertificate(s *mcclient.ClientSession, certName string, certDetails *jsonutils.JSONDict) (jsonutils.JSONObject, error)
- func GetCommonAlertOfSys(session *mcclient.ClientSession) ([]jsonutils.JSONObject, error)
- func GetEndpointsByService(s *mcclient.ClientSession, serviceName string) ([]jsonutils.JSONObject, error)
- func GetSystemCluster(s *mcclient.ClientSession) (jsonutils.JSONObject, error)
- func InitServiceAccount(s *mcclient.ClientSession, username string, password string) error
- func IsDynamicSchedtagExists(s *mcclient.ClientSession, name string) (jsonutils.JSONObject, bool, error)
- func IsEndpointExists(s *mcclient.ClientSession, svcId, regionId, interfaceType string) (jsonutils.JSONObject, bool, error)
- func IsNetworkExists(s *mcclient.ClientSession, net string) (jsonutils.JSONObject, bool, error)
- func IsNotFoundError(err error) bool
- func IsResourceExists(s *mcclient.ClientSession, manager modulebase.Manager, name string) (jsonutils.JSONObject, bool, error)
- func IsRoleExists(s *mcclient.ClientSession, roleName string) (jsonutils.JSONObject, bool, error)
- func IsSchedtagExists(s *mcclient.ClientSession, name string) (jsonutils.JSONObject, bool, error)
- func IsServiceExists(s *mcclient.ClientSession, svcName string) (jsonutils.JSONObject, bool, error)
- func IsUserExists(s *mcclient.ClientSession, username string) (jsonutils.JSONObject, bool, error)
- func IsWireExists(s *mcclient.ClientSession, wire string) (jsonutils.JSONObject, bool, error)
- func IsZoneExists(s *mcclient.ClientSession, zone string) (jsonutils.JSONObject, bool, error)
- func NetworkPrivate(s *mcclient.ClientSession, name string) (jsonutils.JSONObject, error)
- func ProjectAddUser(s *mcclient.ClientSession, projectId string, userId string, roleId string) error
- func RegisterServiceEndpointByInterfaces(s *mcclient.ClientSession, regionId string, serviceName string, ...) error
- func RegisterServiceEndpoints(s *mcclient.ClientSession, regionId string, serviceName string, ...) error
- func RegisterServicePublicInternalEndpoint(s *mcclient.ClientSession, regionId string, serviceName string, ...) error
- func SyncMinio(s *mcclient.ClientSession, input *v1alpha1.Minio, ...) error
- func SyncMonitorMinio(s *mcclient.ClientSession, input *EnableMinioParams, ...) error
- func SyncMonitorStack(s *mcclient.ClientSession, input *v1alpha1.OnecloudClusterSpec, ...) error
- func SyncMonitorThanos(s *mcclient.ClientSession, spec *v1alpha1.OnecloudClusterSpec, ...) error
- func SyncServiceConfig(s *mcclient.ClientSession, syncConf map[string]string, serviceName string) (jsonutils.JSONObject, error)
- func SyncSystemCluster(s *mcclient.ClientSession, id string) error
- func ToPlaybook(hostLines []string, mods []string, files map[string]string) (*ansible.Playbook, error)
- func UpdateCommonAlert(s *mcclient.ClientSession, tem CommonAlertTem, id string, ...) (jsonutils.JSONObject, error)
- type ClusterComponentType
- type ClusterComponentsStatus
- type ClusterEnableComponentMinioOpt
- type CommonAlertTem
- type ComponentStatus
- type EnableMinioParams
- type OCWaiter
- type Waiter
Constants ¶
View Source
const ( NotFoundMsg = "NotFoundError" K8SSystemClusterName = "system-default" )
View Source
const (
DevtoolTelegrafConf = `` /* 1275-byte string literal not displayed */
)
Variables ¶
This section is empty.
Functions ¶
func AllowUserWebLogin ¶
func AllowUserWebLogin(s *mcclient.ClientSession, username string) (jsonutils.JSONObject, error)
func ChangeUserPassword ¶
func ChangeUserPassword(s *mcclient.ClientSession, username string, password string) (jsonutils.JSONObject, error)
func CreateCommonAlert ¶
func CreateCommonAlert(s *mcclient.ClientSession, tem CommonAlertTem) (jsonutils.JSONObject, error)
func CreateDevtoolTemplate ¶
func CreateDynamicSchedtag ¶
func CreateDynamicSchedtag(s *mcclient.ClientSession, name, schedtag, condition string) (jsonutils.JSONObject, error)
func CreateNetwork ¶
func CreateRegion ¶
func CreateRegion(s *mcclient.ClientSession, region, zone string) (jsonutils.JSONObject, error)
func CreateRole ¶
func CreateRole(s *mcclient.ClientSession, roleName, description string) (jsonutils.JSONObject, error)
func CreateSchedtag ¶
func CreateSchedtag(s *mcclient.ClientSession, name string, strategy string, description string) (jsonutils.JSONObject, error)
func CreateService ¶
func CreateService(s *mcclient.ClientSession, svcName, svcType string) (jsonutils.JSONObject, error)
func CreateServiceCertificate ¶
func CreateServiceCertificate(s *mcclient.ClientSession, certName string, certDetails *jsonutils.JSONDict) (jsonutils.JSONObject, error)
func CreateUser ¶
func CreateUser(s *mcclient.ClientSession, username string, password string) (jsonutils.JSONObject, error)
func CreateWire ¶
func CreateWire(s *mcclient.ClientSession, zone string, wire string, bw int, vpc string) (jsonutils.JSONObject, error)
func CreateZone ¶
func CreateZone(s *mcclient.ClientSession, zone string) (jsonutils.JSONObject, error)
func DeleteCommonAlert ¶
func DeleteCommonAlert(s *mcclient.ClientSession, ids []string)
func DeleteResource ¶
func DeleteResource( s *mcclient.ClientSession, man modulebase.Manager, name string, ) error
func DeleteServiceEndpoints ¶
func DeleteServiceEndpoints(s *mcclient.ClientSession, serviceName string) error
func DisableEndpoint ¶
func DisableEndpoint(s *mcclient.ClientSession, id string) error
func DisableService ¶
func DisableService(s *mcclient.ClientSession, id string) error
func EnsureAgentAnsiblePlaybookRef ¶
func EnsureAgentAnsiblePlaybookRef(s *mcclient.ClientSession) error
func EnsureDevtoolTemplate ¶
func EnsureDynamicSchedtag ¶
func EnsureDynamicSchedtag(s *mcclient.ClientSession, name, schedtag, condition string) (jsonutils.JSONObject, error)
func EnsureEndpoint ¶
func EnsureEndpoint( s *mcclient.ClientSession, svcId, regionId, interfaceType, url, serviceCert string, ) (jsonutils.JSONObject, error)
func EnsureResource ¶
func EnsureResource( s *mcclient.ClientSession, man modulebase.Manager, name string, createFunc func() (jsonutils.JSONObject, error), ) (jsonutils.JSONObject, error)
func EnsureRole ¶
func EnsureRole(s *mcclient.ClientSession, roleName, description string) (jsonutils.JSONObject, error)
func EnsureSchedtag ¶
func EnsureSchedtag(s *mcclient.ClientSession, name string, strategy string, description string) (jsonutils.JSONObject, error)
func EnsureService ¶
func EnsureService(s *mcclient.ClientSession, svcName, svcType string) (jsonutils.JSONObject, error)
func EnsureServiceCertificate ¶
func EnsureServiceCertificate(s *mcclient.ClientSession, certName string, certDetails *jsonutils.JSONDict) (jsonutils.JSONObject, error)
func GetCommonAlertOfSys ¶
func GetCommonAlertOfSys(session *mcclient.ClientSession) ([]jsonutils.JSONObject, error)
func GetEndpointsByService ¶
func GetEndpointsByService(s *mcclient.ClientSession, serviceName string) ([]jsonutils.JSONObject, error)
func GetSystemCluster ¶
func GetSystemCluster(s *mcclient.ClientSession) (jsonutils.JSONObject, error)
func InitServiceAccount ¶
func InitServiceAccount(s *mcclient.ClientSession, username string, password string) error
func IsDynamicSchedtagExists ¶
func IsDynamicSchedtagExists(s *mcclient.ClientSession, name string) (jsonutils.JSONObject, bool, error)
func IsEndpointExists ¶
func IsEndpointExists(s *mcclient.ClientSession, svcId, regionId, interfaceType string) (jsonutils.JSONObject, bool, error)
func IsNetworkExists ¶
func IsNetworkExists(s *mcclient.ClientSession, net string) (jsonutils.JSONObject, bool, error)
func IsNotFoundError ¶
func IsResourceExists ¶
func IsResourceExists(s *mcclient.ClientSession, manager modulebase.Manager, name string) (jsonutils.JSONObject, bool, error)
func IsRoleExists ¶
func IsRoleExists(s *mcclient.ClientSession, roleName string) (jsonutils.JSONObject, bool, error)
func IsSchedtagExists ¶
func IsSchedtagExists(s *mcclient.ClientSession, name string) (jsonutils.JSONObject, bool, error)
func IsServiceExists ¶
func IsServiceExists(s *mcclient.ClientSession, svcName string) (jsonutils.JSONObject, bool, error)
func IsUserExists ¶
func IsUserExists(s *mcclient.ClientSession, username string) (jsonutils.JSONObject, bool, error)
func IsWireExists ¶
func IsWireExists(s *mcclient.ClientSession, wire string) (jsonutils.JSONObject, bool, error)
func IsZoneExists ¶
func IsZoneExists(s *mcclient.ClientSession, zone string) (jsonutils.JSONObject, bool, error)
func NetworkPrivate ¶
func NetworkPrivate(s *mcclient.ClientSession, name string) (jsonutils.JSONObject, error)
func ProjectAddUser ¶
func SyncMinio ¶
func SyncMinio(s *mcclient.ClientSession, input *v1alpha1.Minio, spec *v1alpha1.OnecloudClusterSpec) error
func SyncMonitorMinio ¶
func SyncMonitorMinio(s *mcclient.ClientSession, input *EnableMinioParams, spec *v1alpha1.OnecloudClusterSpec) error
func SyncMonitorStack ¶
func SyncMonitorStack(s *mcclient.ClientSession, input *v1alpha1.OnecloudClusterSpec, config *v1alpha1.OnecloudClusterConfig) error
func SyncMonitorThanos ¶
func SyncMonitorThanos(s *mcclient.ClientSession, spec *v1alpha1.OnecloudClusterSpec, input *v1alpha1.MonitorStackThanosSpec) error
func SyncServiceConfig ¶
func SyncServiceConfig( s *mcclient.ClientSession, syncConf map[string]string, serviceName string, ) (jsonutils.JSONObject, error)
func SyncSystemCluster ¶
func SyncSystemCluster(s *mcclient.ClientSession, id string) error
func ToPlaybook ¶
func UpdateCommonAlert ¶
func UpdateCommonAlert(s *mcclient.ClientSession, tem CommonAlertTem, id string, alert jsonutils.JSONObject) (jsonutils.JSONObject, error)
Types ¶
type ClusterComponentType ¶
type ClusterComponentType string
const ( ClusterComponentTypeMinio ClusterComponentType = "minio" ClusterComponentTypeMonitorMinio ClusterComponentType = "monitorMinio" ClusterComponentTypeMonitor ClusterComponentType = "monitor" ClusterComponentTypeThanos ClusterComponentType = "thanos" )
type ClusterComponentsStatus ¶
type ClusterComponentsStatus struct { CephCSI *ComponentStatus `json:"cephCSI"` Monitor *ComponentStatus `json:"monitor"` FluentBit *ComponentStatus `json:"fluentbit"` Thanos *ComponentStatus `json:"thanos"` Minio *ComponentStatus `json:"minio"` MonitorMinio *ComponentStatus `json:"monitorMinio"` }
func GetSystemClusterComponentsStatus ¶
func GetSystemClusterComponentsStatus(s *mcclient.ClientSession, id string) (*ClusterComponentsStatus, error)
type ClusterEnableComponentMinioOpt ¶
type ClusterEnableComponentMinioOpt struct { k8s.ClusterComponentOptions k8s.ClusterComponentMinioSetting }
func (ClusterEnableComponentMinioOpt) Params ¶
func (o ClusterEnableComponentMinioOpt) Params(ctype ClusterComponentType) (jsonutils.JSONObject, error)
type CommonAlertTem ¶
type CommonAlertTem struct { Database string `json:"database"` Measurement string `json:"measurement"` //rule operator rule [and|or] Operator string `json:"operator"` Field []string `json:"field"` FieldFunc string `json:"field_func"` Description string `json:"description"` Reduce string Comparator string `json:"comparator"` Threshold float64 `json:"threshold"` Filters []monitorapi.MetricQueryTag FieldOpt string `json:"field_opt"` GetPointStr bool `json:"get_point_str"` Name string ConditionType string `json:"condition_type"` From string `json:"from"` Interval string `json:"interval"` GroupBy string `json:"group_by"` Level string `json:"level"` NoDataState string `json:"no_data_state"` }
type ComponentStatus ¶
type EnableMinioParams ¶
type OCWaiter ¶
func (*OCWaiter) WaitForGlance ¶
func (*OCWaiter) WaitForKeystone ¶
func (*OCWaiter) WaitForPodsWithLabel ¶
WaitForPodsWithLabel will lookup pods with the given label and wait until they are all reporting status as running.
func (*OCWaiter) WaitForRegion ¶
func (*OCWaiter) WaitForScheduler ¶
func (*OCWaiter) WaitForServicePods ¶
Click to show internal directories.
Click to hide internal directories.