models

package
v0.0.0-...-d1c0bb1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 29, 2016 License: Apache-2.0 Imports: 4 Imported by: 17

Documentation

Overview

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	DEFAULT_SSH_PORT   = 22
	DEFAULT_FS_TYPE    = "xfs"
	ENGINE_NAME        = "skyring"
	NODE_TYPE_OSD      = "OSD"
	REQUEST_SIZE_LIMIT = 1048576

	COLL_NAME_STORAGE                            = "storage"
	COLL_NAME_NODE_EVENTS                        = "node_events"
	COLL_NAME_APP_EVENTS                         = "app_events"
	COLL_NAME_STORAGE_NODES                      = "storage_nodes"
	COLL_NAME_STORAGE_CLUSTERS                   = "storage_clusters"
	COLL_NAME_SKYRING_UTILIZATION                = "skyring_utilization"
	COLL_NAME_CLUSTER_SUMMARY                    = "cluster_summary"
	COLL_NAME_STORAGE_LOGICAL_UNITS              = "storage_logical_units"
	COLL_NAME_TASKS                              = "tasks"
	COLL_NAME_SESSION_STORE                      = "skyring_session_store"
	COLL_NAME_USER                               = "skyringusers"
	COLL_NAME_STORAGE_PROFILE                    = "storage_profile"
	COLL_NAME_MAIL_NOTIFIER                      = "mailnotifier"
	COLL_NAME_LDAP                               = "ldap"
	COLL_NAME_BLOCK_DEVICES                      = "block_devices"
	COLL_NAME_SYSTEM_CAPABILITIES                = "system_capabilities"
	COLL_NAME_THRESHOLD_BREACHES                 = "threshold_breaches"
	COLL_NAME_CLUSTER_NOTIFICATION_SUBSCRIPTIONS = "cluster_notification_subscriptions"
	COLL_NAME_ARCHIVE_TASKS                      = "archive_tasks"
	COLL_NAME_ARCHIVE_EVENTS                     = "archive_events"

	TASKS_PER_PAGE      = 100
	LDAP_USERS_PER_PAGE = 100
	EVENTS_PER_PAGE     = 100

	CriticalAlerts             = "criticalAlerts"
	STORAGE_TYPE_REPLICATED    = "replicated"
	STORAGE_TYPE_ERASURE_CODED = "erasure_coded"
	Monitor                    = "monitor"
	Mon                        = "mon"
	Yes                        = "Y"
	No                         = "N"
	TotalSLU                   = "TotalSLU"
	ErrorSLU                   = "ErrorSLU"
	WarningSLU                 = "WarningSLU"
	DownSLU                    = "DownSLU"
	SLU_STATE_DOWN             = "Out"

	SKYRING_ENC_KEY_FILE = "/var/run/.skyring_enc_key"
)
View Source
const (
	CLUSTER_STATUS_OK = iota
	CLUSTER_STATUS_WARN
	CLUSTER_STATUS_ERROR
	CLUSTER_STATUS_UNKNOWN
)

Status values for the cluster

View Source
const (
	CLUSTER_STATE_CREATING = iota
	CLUSTER_STATE_FAILED
	CLUSTER_STATE_ACTIVE
	CLUSTER_STATE_UNMANAGED
	CLUSTER_STATE_SYNCING
)

State values for cluster

View Source
const (
	STATUS_UP   = "up"
	STATUS_DOWN = "down"
	STATUS_OK   = "ok"
	STATUS_WARN = "warning"
	STATUS_ERR  = "error"
)
View Source
const (
	TASK_STATUS_NONE = iota
	TASK_STATUS_SUCCESS
	TASK_STATUS_TIMED_OUT
	TASK_STATUS_FAILURE
)
View Source
const (
	NONE = iota
	SAS
	SSD
)
View Source
const (
	DefaultProfile1 = "sas"
	DefaultProfile2 = "ssd"
	DefaultProfile3 = "default"
	DefaultPriority = 100
)
View Source
const (
	NODE_STATE_UNACCEPTED = iota
	NODE_STATE_INITIALIZING
	NODE_STATE_ACTIVE
	NODE_STATE_FAILED
	NODE_STATE_UNMANAGED
	NODE_STATE_IMPORTING
)
View Source
const (
	NODES   = "nodes"
	CLUSTER = "cluster"
	TOTAL   = "total"
	SYSTEM  = "system"
)
View Source
const (
	NODE_STATUS_OK = iota
	NODE_STATUS_WARN
	NODE_STATUS_ERROR
	NODE_STATUS_UNKNOWN
)

Status values for the cluster

View Source
const (
	ALARM_STATUS_INDETERMINATE = iota
	ALARM_STATUS_CRITICAL
	ALARM_STATUS_MAJOR
	ALARM_STATUS_MINOR
	ALARM_STATUS_WARNING
	ALARM_STATUS_CLEARED
)

Status values for the cluster

View Source
const (
	NOTIFICATION_ENTITY_HOST = iota
	NOTIFICATION_ENTITY_CLUSTER
	NOTIFICATION_ENTITY_SLU
	NOTIFICATION_ENTITY_STORAGE
	NOTIFICATION_ENTITY_USER
	NOTIFICATION_ENTITY_BLOCK_DEVICE
	NOTIFICATION_ENTITY_STORAGE_PROFILE
	NOTIFICATION_ENTITY_MAIL_NOTIFIER
)

types of notification entities

View Source
const (
	SLU_STATUS_OK = iota
	SLU_STATUS_WARN
	SLU_STATUS_ERROR
	SLU_STATUS_UNKNOWN
)

Status values for the cluster

View Source
const (
	STORAGE_STATUS_OK = iota
	STORAGE_STATUS_WARN
	STORAGE_STATUS_ERROR
	STORAGE_STATUS_UNKNOWN
)

Status values for the cluster

View Source
const (
	CURRENT_VALUE     = "CurrentValue"
	CLUSTER_ID        = "ClusterId"
	ENTITY_ID         = "EntityId"
	PLUGIN            = "Plugin"
	THRESHOLD_TYPE    = "ThresholdType"
	THRESHOLD_VALUE   = "ThresholdValue"
	ENTITY_NAME       = "EntityName"
	CLUSTER_CONFIGS   = "cluster_configs"
	THRESHOLD_CONFIGS = "threshold_configs"
	NOTIFICATION_LIST = "notification_list"
	UTILIZATIONS      = "utilizations"
	NOTIFY            = "Notify"
	WARNING           = "WARNING"
	OK                = "OK"
	CRITICAL          = "CRITICAL"
	NEAR_FULL         = "nearfull"
)
View Source
const (
	CLUSTER_AVAILABILITY = "cluster_availability"
	QUORUM_LOSS          = "quorum_loss"
	HOST_AVAILABILITY    = "host_availability"
)
View Source
const (
	CEPH_OSD = 1 + iota
)

Storage logical unit types

Variables

View Source
var AlarmStatuses = [...]string{
	"indeterminate",
	"critical",
	"major",
	"minor",
	"warning",
	"cleared",
}
View Source
var ClusterStates = [...]string{
	"creating",
	"failed",
	"active",
	"unmanaged",
	"syncing",
}
View Source
var ClusterStatuses = [...]string{
	"ok",
	"warning",
	"error",
	"unknown",
}
View Source
var DiskTypes = [...]string{
	"none",
	"sas",
	"ssd",
}
View Source
var NodeStates = [...]string{
	"unaccepted",
	"initializing",
	"active",
	"failed",
	"unmanaged",
	"importing",
}
View Source
var NodeStatuses = [...]string{
	"ok",
	"warning",
	"error",
	"unknown",
}
View Source
var NotificationEntities = [...]string{
	"Host",
	"Cluster",
	"Slu",
	"Storage",
	"User",
	"Block Device",
	"Storage Profile",
	"Mail Notifier",
}
View Source
var Notifications = []NotificationSubscription{
	{
		Name:        CLUSTER_AVAILABILITY,
		Description: "Cluster Availability",
		Enabled:     true,
	},
	{
		Name:        HOST_AVAILABILITY,
		Description: "Host Availability",
		Enabled:     true,
	},
	{
		Name:        QUORUM_LOSS,
		Description: "Quorum Loss",
		Enabled:     false,
	},
}
View Source
var SkyringServices = [...]string{
	"collectd",
	"salt-minion",
}
View Source
var SluStatuses = [...]string{
	"ok",
	"warning",
	"error",
	"unknown",
}
View Source
var StorageLogicalUnitTypes = [...]string{
	"osd",
}
View Source
var StorageStatuses = [...]string{
	"ok",
	"warning",
	"error",
	"unknown",
}
View Source
var TaskStatuses = [...]string{
	"none",
	"success",
	"timedout",
	"failed",
}

Functions

This section is empty.

Types

type AddClusterRequest

type AddClusterRequest struct {
	Name               string                 `json:"name"`
	CompatVersion      string                 `json:"compat_version"`
	Type               string                 `json:"type"`
	WorkLoad           string                 `json:"workload"`
	Tags               []string               `json:"tags"`
	Options            map[string]interface{} `json:"options"`
	OpenStackServices  []string               `json:"openstackservices"`
	Nodes              []ClusterNode          `json:"nodes"`
	Networks           ClusterNetworks        `json:"networks"`
	MonitoringPlugins  []monitoring.Plugin    `json:"monitoringplugins"`
	MonitoringInterval int                    `json:"monitoringinterval"`
	DisableAutoExpand  bool                   `json:"disableautoexpand"`
	JournalSize        string                 `json:"journalSize"`
}

type AddStorageBlockDeviceRequest

type AddStorageBlockDeviceRequest struct {
	Name             string                  `json:"name"`
	Tags             []string                `json:"tags"`
	Size             string                  `json:"size"`
	SnapshotsEnabled bool                    `json:"snapshots_enabled"`
	SnapshotSchedule SnapshotScheduleRequest `json:"snapshot_schedule"`
	QuotaEnabled     bool                    `json:"quota_enabled"`
	QuotaParams      map[string]string       `json:"quota_params"`
	Options          map[string]string       `json:"options"`
}

type AddStorageNodeRequest

type AddStorageNodeRequest struct {
	Hostname       string `json:"hostname"`
	SshFingerprint string `json:"sshfingerprint"`
	User           string `json:"user"`
	Password       string `json:"password"`
	SshPort        int    `json:"sshport"`
}

type AddStorageRequest

type AddStorageRequest struct {
	Name             string                         `json:"name"`
	Type             string                         `json:"type"`
	Tags             []string                       `json:"tags"`
	Size             string                         `json:"size"`
	Replicas         int                            `json:"replicas"`
	Profile          string                         `json:"profile"`
	SnapshotsEnabled bool                           `json:"snapshots_enabled"`
	SnapshotSchedule SnapshotScheduleRequest        `json:"snapshot_schedule"`
	QuotaEnabled     bool                           `json:"quota_enabled"`
	QuotaParams      map[string]string              `json:"quota_params"`
	Options          map[string]string              `json:"options"`
	BlockDevices     []AddStorageBlockDeviceRequest `json:"blockdevices"`
}

type AlarmStatus

type AlarmStatus int

func (AlarmStatus) String

func (s AlarmStatus) String() string

type ApiRoute

type ApiRoute struct {
	Name    string
	Pattern string
	Method  string
	Version int
}

type AppEvent

type AppEvent struct {
	EventId            uuid.UUID          `json:"event_id"`
	ClusterId          uuid.UUID          `json:"cluster_id"`
	ClusterName        string             `json:"cluster_name"`
	NotificationEntity NotificationEntity `json:"notificationentity"`
	EntityId           uuid.UUID          `json:"entityid"`
	NodeId             uuid.UUID          `json:"node_id"`
	NodeName           string             `json:"nodename"`
	Timestamp          time.Time          `json:"timestamp"`
	Name               string             `json:"name"`
	Context            string             `json:"context"`
	Tags               map[string]string  `json:"tags"`
	Message            string             `json:"message"`
	Description        string             `json:"description"`
	Severity           AlarmStatus        `json:"severity"`
	CorrelationId      uuid.UUID          `json:"correlationid"`
	Acked              bool               `json:"acked"`
	UserAckedTime      time.Time          `json:"userackedtime"`
	SystemAckedTime    time.Time          `json:"systemackedtime"`
	AckedByUser        string             `json:"ackedbyuser"`
	AckedByEvent       string             `json:"ackedbyevent"`
	UserAckComment     string             `json:"userackcomment"`
	SystemAckComment   string             `json:"systemackcomment"`
	Notify             bool               `json:"notify"`
	Notified           bool               `json:"notified"`
}

type AppTask

type AppTask struct {
	Id          uuid.UUID         `json:"id"`
	Name        string            `json:"name"`
	Owner       string            `json:"owner"`
	ParentId    uuid.UUID         `json:"parentid"`
	Started     bool              `json:"started"`
	Completed   bool              `json:"completed"`
	StatusList  []Status          `json:"statuslist"`
	Tag         map[string]string `json:"tag"`
	LastUpdated time.Time         `json:"lastupdated"`
	SubTasks    []uuid.UUID       `json:"subtasks"`
	Status      TaskStatus        `json:"status"`
}

type AsyncResponse

type AsyncResponse struct {
	TaskId uuid.UUID `json:"taskid"`
}

type BlockDevice

type BlockDevice struct {
	Id                  uuid.UUID         `json:"id"`
	Name                string            `json:"name"`
	Tags                []string          `json:"tags"`
	ClusterId           uuid.UUID         `json:"clusterid"`
	ClusterName         string            `json:"clustername"`
	StorageId           uuid.UUID         `json:"storageid"`
	StorageName         string            `json:"storagename"`
	Size                string            `json:"size"`
	SnapshotsEnabled    bool              `json:"snapshots_enabled"`
	SnapshotScheduleIds []uuid.UUID       `json:"snapshot_schedule_ids"`
	QuotaEnabled        bool              `json:"quota_enabled"`
	QuotaParams         map[string]string `json:"quota_params"`
	Options             map[string]string `json:"options"`
	Usage               Utilization       `json:"usage"`
	AlmStatus           AlarmStatus       `json:"almstatus"`
	AlmWarnCount        int               `json:"almwarncount"`
	AlmCritCount        int               `json:"almcritcount"`
}

type Cluster

type Cluster struct {
	ClusterId           uuid.UUID              `json:"clusterid"`
	Name                string                 `json:"name"`
	CompatVersion       string                 `json:"compat_version"`
	Type                string                 `json:"type"`
	WorkLoad            string                 `json:"workload"`
	Status              ClusterStatus          `json:"status"`
	Tags                []string               `json:"tags"`
	Options             map[string]interface{} `json:"options"`
	OpenStackServices   []string               `json:"openstack_services"`
	Networks            ClusterNetworks        `json:"networks"`
	Monitoring          MonitoringState        `json:"monitoring"`
	MonitoringInterval  int                    `json:"monitoringinterval"`
	State               ClusterState           `json:"state"`
	AlmStatus           AlarmStatus            `json:"almstatus"`
	AlmWarnCount        int                    `json:"almwarncount"`
	AlmCritCount        int                    `json:"almcritcount"`
	Usage               Utilization            `json:"usage"`
	StorageProfileUsage map[string]Utilization `json:"storageprofileusage"`
	ObjectCount         map[string]int64       `json:"objectcount"`
	AutoExpand          bool                   `json:"autoexpand"`
	JournalSize         string                 `json:"journalsize"`
	Utilizations        map[string]interface{} `json:"utilizations"`
}

type ClusterForImport

type ClusterForImport struct {
	ClusterName string          `json:"clustername"`
	ClusterId   uuid.UUID       `json:"clusterid"`
	Version     string          `json:"version"`
	Compatible  bool            `json:"compatible"`
	Nodes       []NodeForImport `json:"nodes"`
}

type ClusterNetworks

type ClusterNetworks struct {
	Cluster string `json:"cluster"`
	Public  string `json:"public"`
}

type ClusterNode

type ClusterNode struct {
	NodeId   string              `json:"nodeid"`
	NodeType []string            `json:"nodetype"`
	Devices  []ClusterNodeDevice `json:"disks"`
	Options  map[string]string   `json:"options"`
}

type ClusterNodeDevice

type ClusterNodeDevice struct {
	Name    string            `json:"name"`
	FSType  string            `json:"fstype"`
	Options map[string]string `json:"options"`
}

type ClusterNotificationSubscription

type ClusterNotificationSubscription struct {
	ClusterId     uuid.UUID                  `json:"clusterid"`
	Notifications []NotificationSubscription `json:"notifications"`
}

type ClusterState

type ClusterState int

func (ClusterState) String

func (s ClusterState) String() string

type ClusterStatus

type ClusterStatus int

func (ClusterStatus) String

func (c ClusterStatus) String() string

type ClusterSummary

type ClusterSummary struct {
	ClusterId                 uuid.UUID                         `json:"clusterid"`
	Type                      string                            `json:"type"`
	Name                      string                            `json:"name"`
	MostUsedStorages          []StorageUsage                    `json:"storageusage"`
	Usage                     Utilization                       `json:"usage"`
	StorageProfileUsage       map[string]map[string]interface{} `json:"storageprofileusage"`
	ObjectCount               map[string]int64                  `json:"objectcount"`
	StorageCount              map[string]int                    `json:"storagecount"`
	SLUCount                  map[string]int                    `json:"slucount"`
	MonitoringPlugins         []monitoring.Plugin               `json:"monitoringplugins"`
	NodesCount                map[string]int                    `json:"nodescount"`
	ProviderMonitoringDetails map[string]map[string]interface{} `json:"providermonitoringdetails"`
	Utilizations              map[string]interface{}            `json:"utilizations"`
	UpdatedAt                 string                            `json:"updatedat"`
}

type Clusters

type Clusters []Cluster

type CollectdCpuMetric

type CollectdCpuMetric struct {
	PercentUsed string `json:"PercentUsed"`
}

type CollectdSingleValuedMetric

type CollectdSingleValuedMetric struct {
	Used        string `json:"Used"`
	Total       string `json:"Total"`
	PercentUsed string `json:"PercentUsed"`
}

type Cpu

type Cpu struct {
	Architecture   string `bson:"architecture",json:"architecture"`
	CpuOpMode      string `bson:"cpuopmode",json:"cpuopmode"`
	CPUs           string `bson:"cpus",json:"cpus"`
	VendorId       string `bson:"vendorid",json:"vendorid"`
	ModelName      string `bson:"modelname",json:"modelname"`
	CPUFamily      string `bson:"cpufamily",json:"cpufamily"`
	CPUMHz         string `bson:"cpumhz",json:"cpumhz"`
	Model          string `bson:"model",json:"model"`
	CoresPerSocket string `bson:"corespersocket",json:"corespersocket"`
}

type Directory

type Directory struct {
	LdapServer  string
	Type        string
	Port        uint
	Base        string
	DomainAdmin string
	Password    string
	Uid         string
	FirstName   string
	LastName    string
	DisplayName string
	Email       string
}

type Disk

type Disk struct {
	DevName        string    `bson:"devname",json:"devname"`
	FSType         string    `bson:"fstype",json:"fstype"`
	FSUUID         uuid.UUID `bson:"fsuuid",json:"fsuuid"`
	Model          string    `bson:"model",json:"model"`
	MountPoint     []string  `bson:"mountpoint",json:"mountpoint"`
	Name           string    `bson:"name",json:"name"`
	Parent         string    `bson:"parent",json:"parent"`
	Size           float64   `bson:"size",json:"size"`
	Type           string    `bson:"type",json:"type"`
	Used           bool      `bson:"used",json:"used"`
	SSD            bool      `bson:"ssd",json:"ssd"`
	Vendor         string    `bson:"vendor",json:"vendor"`
	StorageProfile string    `bson:"storageprofile",json:"storageprofile"`
	DiskId         uuid.UUID `bson:"diskid",json:"diskid"`
}

type DiskHierarchyDetails

type DiskHierarchyDetails struct {
	ClusterName string                       `json:"clustername"`
	Hierarchy   map[string]map[string]string `json:"hierarchy"`
	StorageSize float64                      `json:"storagesize"`
}

type DiskHierarchyRequest

type DiskHierarchyRequest struct {
	ClusterName  string        `json:"clustername"`
	ClusterType  string        `json:"clustertype"`
	JournalSize  string        `json:"journals"`
	ClusterNodes []ClusterNode `json:"clusternodes"`
}

type DiskProfile

type DiskProfile struct {
	Type  DiskType `json:"disktype"`
	Speed int      `json:"speed"`
}

type DiskType

type DiskType int

func (DiskType) String

func (d DiskType) String() string

type Event

type Event struct {
	EventId         uuid.UUID          `json:"event_id"`
	ClusterId       uuid.UUID          `json:"cluster_id"`
	NodeId          uuid.UUID          `json:"node_id"`
	Timestamp       time.Time          `json:"timestamp"`
	Tag             string             `json:"tag"`
	Tags            map[string]string  `json:"tags"`
	Message         string             `json:"message"`
	Severity        string             `json:"severity"`
	ImpactingEvents map[string][]Event `json:"impactingentities"`
}

type ExternalUsers

type ExternalUsers struct {
	Users      []User
	TotalCount int
	StartIndex int
	EndIndex   int
}

type ImportClusterRequest

type ImportClusterRequest struct {
	BootstrapNode string   `json:"bootstrapnode"`
	ClusterType   string   `json:"type"`
	Nodes         []string `json:"nodes"`
}

type MailNotifier

type MailNotifier struct {
	MailId           string `json:"mailid"`
	Passcode         string `json:"passcode"`
	SmtpServer       string `json:"smtpserver"`
	Port             int    `json:"port"`
	Encryption       string `json:"encryption"`
	SkipVerify       bool   `json:"skipverify"`
	MailNotification bool   `json:"mailnotification"`
	SubPrefix        string `json:"subprefix"`
}

type Memory

type Memory struct {
	TotalSize string `bson:"totalsize",json:"totalsize"`
	SwapTotal string `bson:"swaptotal",json:"swaptotal"`
	Active    string `bson:"active",json:"active"`
	Type      string `bson:"type",json:"type"`
}

type MonitoringState

type MonitoringState struct {
	Plugins    []monitoring.Plugin `json:"plugins"`
	StaleNodes []string            `json:"stalenodes"`
}

type Network

type Network struct {
	IPv4   []string `bson:"ipv4",json:"ipv4"`     // TODO: use ipv4 type
	IPv6   []string `bson:"ipv6",json:"ipv6"`     // TODO: use ipv6 type
	Subnet []string `bson:"subnet",json:"subnet"` // TODO: use subnet type
}

type Node

type Node struct {
	NodeId            uuid.UUID              `json:"nodeid"`
	Roles             []string               `json:"roles"`
	Hostname          string                 `json:"hostname"`
	Tags              []string               `json:"tags"`
	ManagementIP4     string                 `json:"management_ip4"`
	ClusterIP4        string                 `json:"cluster_ip4"`
	PublicIP4         string                 `json:"public_ip4"`
	ClusterId         uuid.UUID              `json:"clusterid"`
	Location          string                 `json:"location"`
	Status            NodeStatus             `json:"status"`
	State             NodeState              `json:"state"`
	AlmStatus         AlarmStatus            `json:"almstatus"`
	AlmWarnCount      int                    `json:"almwarncount"`
	AlmCritCount      int                    `json:"almcritcount"`
	Options           map[string]string      `json:"options"`
	CPUs              []Cpu                  `json:"cpus"`
	NetworkInfo       Network                `json:"network_info"`
	StorageDisks      []Disk                 `json:"storage_disks"`
	Memory            Memory                 `json:"memory"`
	OS                OperatingSystem        `json:"os"`
	Enabled           bool                   `json:"enabled"`
	Fingerprint       string                 `json:"saltfingerprint"`
	Utilizations      map[string]Utilization `json:"utilizations"`
	ServiceStatusList map[string][]string    `json:"servicestatuslist"`
}

type NodeEvent

type NodeEvent struct {
	Timestamp time.Time         `json:"timestamp"`
	Node      string            `json:"node"`
	Tag       string            `json:"tag"`
	Tags      map[string]string `json:"tags"`
	Message   string            `json:"message"`
	Severity  string            `json:"severity"`
}

type NodeForImport

type NodeForImport struct {
	Name  string   `json:"name"`
	Type  []string `json:"type"`
	Found bool     `json:"found"`
}

type NodeState

type NodeState int

func (NodeState) String

func (s NodeState) String() string

type NodeStatus

type NodeStatus int

func (NodeStatus) String

func (s NodeStatus) String() string

type Nodes

type Nodes []Node

type NotificationEntity

type NotificationEntity int

func (NotificationEntity) String

func (s NotificationEntity) String() string

type NotificationSubscription

type NotificationSubscription struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Enabled     bool   `json:"enabled"`
}

type OperatingSystem

type OperatingSystem struct {
	Name          string `bson:"name",json:"name"`
	OSVersion     string `bson:"osversion",json:"osversion"`
	KernelVersion string `bson:"kernelversion",json:"kernelversion"`
	SELinuxMode   string `bson:"selinuxmode",json:"selinuxmode"`
}

type QueryOps

type QueryOps struct {
	Sort     bool
	Batch    int
	Iter     bool
	Limit    int
	Prefetch float64
	Select   interface{}
	Skip     bool
	Distinct bool
}

type RpcRequest

type RpcRequest struct {
	RpcRequestVars    map[string]string `json:"rpcrequestvars"`
	RpcRequestData    []byte            `json:"rpcrequestdata"`
	RpcRequestContext string            `json:"rpcrequestcontext"`
}

type RpcResponse

type RpcResponse struct {
	Status RpcResponseStatus `json:"status"`
	Data   RpcResponseData   `json:"data"`
}

type RpcResponseData

type RpcResponseData struct {
	RequestId string `json:"requestid"`
	Result    []byte `json:"result"`
}

type RpcResponseStatus

type RpcResponseStatus struct {
	StatusCode    int    `json:"statuscode"`
	StatusMessage string `json:"statusmessage"`
}

type SluStatus

type SluStatus int

func (SluStatus) String

func (s SluStatus) String() string

type SnapshotSchedule

type SnapshotSchedule struct {
	Id            uuid.UUID `json:"id"`
	Recurrence    string    `json:"recurrence"`
	Interval      int       `json:"interval"`
	ExecutionTime string    `json:"execution_time"`
	Days          []string  `json:"days"`
	StartFrom     string    `json:"start_from"`
	EndBy         string    `json:"endby"`
}

type SnapshotScheduleRequest

type SnapshotScheduleRequest struct {
	Recurrence    string   `json:"recurrence"`
	Interval      int      `json:"interval"`
	ExecutionTime string   `json:"execution_time"`
	Days          []string `json:"days"`
	StartFrom     string   `json:"start_from"`
	EndBy         string   `json:"endby"`
}

type Status

type Status struct {
	Timestamp time.Time
	Message   string
}

func (Status) String

func (s Status) String() string

type Storage

type Storage struct {
	StorageId           uuid.UUID         `json:"storageid"`
	Name                string            `json:"name"`
	Type                string            `json:"type"`
	Tags                []string          `json:"tags"`
	ClusterId           uuid.UUID         `json:"clusterid"`
	Size                string            `json:"size"`
	Status              StorageStatus     `json:"status"`
	Replicas            int               `json:"replicas"`
	Profile             string            `json:"profile"`
	SnapshotsEnabled    bool              `json:"snapshots_enabled"`
	SnapshotScheduleIds []uuid.UUID       `json:"snapshot_schedule_ids"`
	QuotaEnabled        bool              `json:"quota_enabled"`
	QuotaParams         map[string]string `json:"quota_params"`
	Options             map[string]string `json:"options"`
	Usage               Utilization       `json:"usage"`
	State               string            `json:"state"`
	AlmStatus           AlarmStatus       `json:"almstatus"`
	AlmWarnCount        int               `json:"almwarncount"`
	AlmCritCount        int               `json:"almcritcount"`
	SluIds              []uuid.UUID       `json:"slus"`
}

type StorageLogicalUnit

type StorageLogicalUnit struct {
	SluId             uuid.UUID              `json:"sluid"`
	Name              string                 `json:"name"`
	Type              int                    `json:"type"`
	ClusterId         uuid.UUID              `json:"clusterid"`
	NodeId            uuid.UUID              `json:"nodeid"`
	StorageIds        []uuid.UUID            `json:"storageid"`
	StorageDeviceId   uuid.UUID              `json:"storagedeviceid"`
	StorageDeviceSize float64                `json:"storagedevicesize"`
	Status            SluStatus              `json:"status"`
	Options           map[string]interface{} `json:"options"`
	StorageProfile    string                 `json:"storageprofile"`
	State             string                 `json:"state"`
	AlmStatus         AlarmStatus            `json:"almstatus"`
	AlmWarnCount      int                    `json:"almwarncount"`
	AlmCritCount      int                    `json:"almcritcount"`
	Usage             Utilization            `json:"usage"`
}

type StorageProfile

type StorageProfile struct {
	Name     string      `json:"name"`
	Rule     DiskProfile `json:"rule"`
	Priority int         `json:"priority"`
	Default  bool        `json:"default"`
}

type StorageProviderInterface

type StorageProviderInterface interface {
	CreateCluster(req RpcRequest, resp *RpcResponse) error
}

*

  • Below generic RPC methods should be implemented by storage providers
  • to work with skyring.
  • Input parameters:
  • - req : RpcRequest instance
  • Output parameter:
  • - resp : pointer to RpcResponse instance
  • Returns:
  • - error

type StorageStatus

type StorageStatus int

func (StorageStatus) String

func (s StorageStatus) String() string

type StorageUsage

type StorageUsage struct {
	Name  string      `json:"name"`
	Usage Utilization `json:"usage"`
}

type Storages

type Storages []Storage

type System

type System struct {
	Name                      string                            `json:"name"`
	Usage                     Utilization                       `json:"usage"`
	StorageProfileUsage       map[string]map[string]interface{} `json:"storageprofileusage"`
	StorageCount              map[string]int                    `json:"storagecount"`
	SLUCount                  map[string]int                    `json:"slucount"`
	NodesCount                map[string]int                    `json:"nodescount"`
	ClustersCount             map[string]int                    `json:"clusterscount"`
	MonitoringPlugins         map[string]monitoring.Plugin      `json:"monitoringplugins"`
	ProviderMonitoringDetails map[string]map[string]interface{} `json:"providermonitoringdetails"`
	MostUsedStorages          []StorageUsage                    `json:"storageusage"`
	Utilizations              map[string]interface{}            `json:"utilizations"`
	UpdatedAt                 string                            `json:"updatedat"`
}

type TaskStatus

type TaskStatus int

func (TaskStatus) String

func (t TaskStatus) String() string

type ThresholdEvent

type ThresholdEvent struct {
	ClusterId         uuid.UUID `json:"clusterid"`
	UtilizationType   string    `json:"utilizationtype"`
	ThresholdSeverity string    `json:"thresholdseverity"`
	TimeStamp         time.Time `json:"timestamp"`
	EntityId          uuid.UUID `json:"entityid"`
	EntityName        string    `json:"entityname"`
}

type UnmanagedNode

type UnmanagedNode struct {
	Name            string `json:"name"`
	SaltFingerprint string `json:"saltfingerprint"`
}

type UnmanagedNodes

type UnmanagedNodes []UnmanagedNode

type User

type User struct {
	Username            string   `json:"username"`
	Email               string   `json:"email"`
	Hash                []byte   `json:"hash"`
	Role                string   `json:"role"`
	Groups              []string `json:"groups"`
	Type                int      `json:"type"`
	Status              bool     `json:"status"`
	FirstName           string   `json:"firstname"`
	LastName            string   `json:"lastname"`
	NotificationEnabled bool     `json:"notificationenabled"`
}

type Utilization

type Utilization struct {
	Used        int64   `json:"used"`
	Total       int64   `json:"total"`
	PercentUsed float64 `json:"percentused"`
	UpdatedAt   string  `json:"updatedat"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL