Documentation ¶
Index ¶
- Constants
- func ActiveCMRegistry(id string)
- func AddQuots(slice []string) []string
- func ByteCountDecimal(b int64) string
- func CreateCMRegistryDb()
- func DeRegisterCMEntry(id string)
- func DeRegisterConnectionProfile(id string)
- func DeactiveAllCMRegistry()
- func DownloadFile(filepath string, url string) error
- func DownloadFileInMemory(url string) ([]byte, error)
- func DownloadViaScp(sshConfig *easyssh.MakeConfig, source string, dest string, skipJump bool) error
- func DropCMRegistryRecords()
- func DropConnectionProfileRecords()
- func EvaluateBoolValueFromString(answer string) bool
- func ExecuteDownloadFileTask(task Task)
- func ExecuteLocalCommandTask(task Task)
- func Exists(name string) bool
- func FormatJSON(b []byte) *bytes.Buffer
- func GetCMEntryID(id string) string
- func GetConnectionProfileEntryID(id string) string
- func GetHttpClient() *http.Client
- func GetPassword(flagValue string, text string) string
- func GetStringFlag(flagValue string, defaultValue string, text string) string
- func ProcessAsMap(request *http.Request) map[string]interface{}
- func ProcessAsMapFromBytes(bodyBytes []byte) map[string]interface{}
- func ProcessAsMapFromSSHResponse(sshResponse RemoteResponse) map[string]interface{}
- func ProcessRequest(request *http.Request) []byte
- func RegisterNewCMEntry(id string, hostname string, port int, protocol string, username string, ...)
- func RegisterNewConnectionProfile(id string, keyPath string, port int, username string)
- func RunLocalCommand(command string, arg ...string) (string, string, error)
- func SetProfileIDForCMEntry(cmEntryID string, profileId string)
- func SliceContains(a string, list []string) bool
- func UpdateCMEntry(id string, hostname string, port int, protocol string, username string, ...)
- func UpperAllInSlice(slice []string) []string
- func WriteCMServerEntries(cmServers []CMServer)
- func WriteConnectionProfileEntries(connectionProfiles []ConnectionProfile)
- type CMServer
- func (c CMServer) CopyToCMGateway(source string, dest string)
- func (c CMServer) CopyToRemote(source string, dest string, filteredHosts map[string]bool, gateway string, ...)
- func (c CMServer) CreateGatewayCurlGetCommand(uri string) string
- func (c CMServer) CreateGatewayCurlPostCommand(uri string, body string) string
- func (c CMServer) CreateGatewayCurlPutCommand(uri string, body string) string
- func (c CMServer) CreateGetRequest(urlSuffix string) *http.Request
- func (c CMServer) CreateInventoryFiles(targetDir string, outputFile string, cluster string, serverHostname string)
- func (c CMServer) CreatePostRequest(body bytes.Buffer, urlSuffix string) *http.Request
- func (c CMServer) CreatePutRequest(body bytes.Buffer, urlSuffix string) *http.Request
- func (c CMServer) ExecuteCMCommand(task Task, cluster string, filter Filter, roleCommand bool, ...)
- func (c CMServer) ExecuteConfigUpdate(task Task, cluster string, filter Filter, roleConfig bool)
- func (c CMServer) ExecutePlaybook(playbook Playbook, inventory *Inventory)
- func (c CMServer) ExecuteRemoteCommandTask(task Task, filteredHosts map[string]bool, inventory *Inventory)
- func (c CMServer) ExecuteSaltCommand(task Task)
- func (c CMServer) ExecuteSaltSyncCommand(task Task)
- func (c CMServer) ExecuteUploadFileTask(task Task, filteredHosts map[string]bool, inventory *Inventory)
- func (c CMServer) ExportClusterTemplate(cluster string) []byte
- func (c CMServer) GetCMUri(uriSuffix string) string
- func (c CMServer) GetDeployment() Deployment
- func (c CMServer) GetExternalAccountCategories() []string
- func (c CMServer) GetExternalAccountTypesByCategory(category string) []string
- func (c CMServer) GetExternalAccountsByType(accountType string) map[string]map[string]string
- func (c CMServer) GetFilteredHosts(filter Filter, inventory *Inventory) map[string]bool
- func (c CMServer) GetUsers() []User
- func (c CMServer) ListClusters() []Cluster
- func (c CMServer) ListHosts() []Host
- func (c CMServer) ListRoleConfigGroups(cluster string, service string, full bool) []RoleConfigGroup
- func (c CMServer) ListServiceConfigs(cluster string, service string, full bool) []ConfigItem
- func (c CMServer) ListServices(cluster string) []Service
- func (c CMServer) RunGatewayCMCommand(command string, printStdOut bool, printEmptyResponse bool) RemoteResponse
- func (c CMServer) RunRemoteHostCommand(command string, filteredHosts map[string]bool, skipJump bool, ...) map[string]RemoteResponse
- func (c CMServer) RunRolesOperation(cluster string, service string, roleNames []string, roleNameFilter string, ...) []byte
- func (c CMServer) RunSaltCommand(command string, rawCommand string, saltBinaryPathPrefix string, ...)
- func (c CMServer) RunServiceOperation(cluster string, service string, command string, verbose bool) []byte
- func (c CMServer) SyncSaltScripts(source string, target string, filter string, clear bool)
- func (c CMServer) UpdateRoleConfigs(cluster string, service string, roleType string, roleConfigGroup string, ...) []byte
- func (c CMServer) UpdateServiceConfigs(cluster string, service string, keyValueMap map[string]string, clear bool, ...) []byte
- type Cluster
- type ConfigItem
- type ConnectionProfile
- type Deployment
- type Filter
- type Host
- type HostRoleNamePair
- type IniConfiguration
- type Input
- type Inventory
- type Item
- type Items
- func (c Items) ConvertClustersResponse() []Cluster
- func (c Items) ConvertExternalAccounts() map[string]map[string]string
- func (c Items) ConvertHostsResponse() []Host
- func (c Items) ConvertRoleConfigGroupsResponse() []RoleConfigGroup
- func (c Items) ConvertRolesResponse(cluster string, service string) []Role
- func (c Items) ConvertServiceConfigResponse() []ConfigItem
- func (c Items) ConvertServicesResponse(cluster string) []Service
- func (c Items) ConvertUsersResponse() []User
- type Playbook
- type RemoteResponse
- type Role
- type RoleConfigGroup
- type Section
- type Service
- type ServiceRolesMap
- type Task
- type User
- type UserAuthRole
Constants ¶
const ( // RemoteCommand remote command type for running commands on the agent hosts RemoteCommand = "RemoteCommand" // LocalCommand local command type for running commands on localhost LocalCommand = "LocalCommand" // SaltCommand salt command type for running salt commands on the gateway SaltCommand = "SaltCommand" // SaltSyncCommand sync salt scripts command SaltSyncCommand = "SaltSyncCommand" // Download command type for downloading a file from an url Download = "Download" // Upload command type for uploading files to the agent hosts Upload = "Upload" // ServiceConfigUpdate command type for managing (update) service configuration ServiceConfigUpdate = "ServiceConfigUpdate" // RoleConfigUpdate command type for managing (update) role configuration RoleConfigUpdate = "RoleConfigUpdate" // ServiceCpmmand runs a CM service command (like start or stop) against services ServiceCpmmand = "ServiceCommand" // RoleCommand runs a CM role command (like start or stop) against roles RoleCommand = "RoleCommand" )
Variables ¶
This section is empty.
Functions ¶
func ActiveCMRegistry ¶
func ActiveCMRegistry(id string)
ActiveCMRegistry turn on active status on selected CM registry
func ByteCountDecimal ¶ added in v0.2.0
ByteCountDecimal create human readable format for bytes
func DeRegisterCMEntry ¶
func DeRegisterCMEntry(id string)
DeRegisterCMEntry remove an CM server enrty by id
func DeRegisterConnectionProfile ¶
func DeRegisterConnectionProfile(id string)
DeRegisterConnectionProfile remove a connection profile by id
func DeactiveAllCMRegistry ¶
func DeactiveAllCMRegistry()
DeactiveAllCMRegistry turn off active status on all CM registries
func DownloadFile ¶
DownloadFile download a file from an url to the local filesystem
func DownloadFileInMemory ¶ added in v0.3.0
DownloadFileInMemory download file as bytes
func DownloadViaScp ¶
DownloadViaScp downloads file from remote to local
func DropCMRegistryRecords ¶
func DropCMRegistryRecords()
DropCMRegistryRecords drop all CM server entries from cmctl database
func DropConnectionProfileRecords ¶
func DropConnectionProfileRecords()
DropConnectionProfileRecords drop all connection profile from cmctl database
func EvaluateBoolValueFromString ¶
EvaluateBoolValueFromString get a string boolean answer and evaluate as a boolean value
func ExecuteDownloadFileTask ¶ added in v0.3.0
func ExecuteDownloadFileTask(task Task)
ExecuteDownloadFileTask download a file from an url to the local filesystem
func ExecuteLocalCommandTask ¶ added in v0.3.0
func ExecuteLocalCommandTask(task Task)
ExecuteLocalCommandTask executes a local shell command
func FormatJSON ¶ added in v0.3.0
FormatJSON format json file
func GetCMEntryID ¶ added in v0.3.0
GetCMEntryID get CM server entry id if the id exists
func GetConnectionProfileEntryID ¶ added in v0.3.0
GetConnectionProfileEntryID get connection profile entry id if the id exists
func GetHttpClient ¶
GetHttpClient create HTTP client instance for CM Server
func GetPassword ¶
GetPassword trying to read a password flag value, if it does not exists ask an input from the user
func GetStringFlag ¶
GetStringFlag trying to read a flag value, if it does not exists ask an input from the user
func ProcessAsMap ¶
ProcessAsMap get map format response
func ProcessAsMapFromBytes ¶
ProcessAsMapFromBytes get JSON map from bytes
func ProcessAsMapFromSSHResponse ¶
func ProcessAsMapFromSSHResponse(sshResponse RemoteResponse) map[string]interface{}
ProcessAsMapFromSSHResponse get JSON map from CM gateway SSH response
func ProcessRequest ¶
ProcessRequest get a simple response from a REST call
func RegisterNewCMEntry ¶
func RegisterNewCMEntry(id string, hostname string, port int, protocol string, username string, password string, useGateway bool, apiVersion int)
RegisterNewCMEntry create new CM server registry entry in cmctl database
func RegisterNewConnectionProfile ¶
RegisterNewConnectionProfile create new connection profile entry in cmctl database
func RunLocalCommand ¶
RunLocalCommand run local system command
func SetProfileIDForCMEntry ¶ added in v0.3.0
SetProfileIDForCMEntry attach a connection profile to a specific CM server entry
func SliceContains ¶ added in v0.2.0
SliceContains check that a string slice contains an element or not
func UpdateCMEntry ¶
func UpdateCMEntry(id string, hostname string, port int, protocol string, username string, password string, useGateway bool, apiVersion int, connectionProfile string)
UpdateCMEntry update CM server registry entry in cmctl database
func UpperAllInSlice ¶ added in v0.3.0
UpperAllInSlice uppercase all string in a list
func WriteCMServerEntries ¶
func WriteCMServerEntries(cmServers []CMServer)
WriteCMServerEntries write CM server entries to the CM server registry json file
func WriteConnectionProfileEntries ¶
func WriteConnectionProfileEntries(connectionProfiles []ConnectionProfile)
WriteConnectionProfileEntries write connection profile entries to the connection profile registry json file
Types ¶
type CMServer ¶
type CMServer struct { Name string `json:"name"` Hostname string `json:"hostname"` Port int `json:"port"` Username string `json:"username"` Password string `json:"password"` Protocol string `json:"protocol"` Active bool `json:"active"` ConnectionProfile string `json:"profile"` UseGateway bool `json:"gateway"` APIVersion int `json:"version"` }
CMServer represents registered CM server entry details
func GetActiveCM ¶
func GetActiveCM() CMServer
GetActiveCM get the active CM server registry from cmctl database (should be only one)
func ListCMRegistryEntries ¶
func ListCMRegistryEntries() []CMServer
ListCMRegistryEntries get all CM server registries from cmctl database
func (CMServer) CopyToCMGateway ¶ added in v0.1.1
CopyToCMGateway copy local file to gateway host
func (CMServer) CopyToRemote ¶ added in v0.3.0
func (c CMServer) CopyToRemote(source string, dest string, filteredHosts map[string]bool, gateway string, inventory *Inventory)
CopyToRemote copy local file to remote host(s)
func (CMServer) CreateGatewayCurlGetCommand ¶
CreateGatewayCurlGetCommand generate a curl GET command for gateway usage
func (CMServer) CreateGatewayCurlPostCommand ¶
CreateGatewayCurlPostCommand generate a curl POST command for gateway usage
func (CMServer) CreateGatewayCurlPutCommand ¶ added in v0.3.0
CreateGatewayCurlPutCommand generate a curl PUT command for gateway usage
func (CMServer) CreateGetRequest ¶
CreateGetRequest creates an CM Server GET request
func (CMServer) CreateInventoryFiles ¶ added in v0.2.0
func (c CMServer) CreateInventoryFiles(targetDir string, outputFile string, cluster string, serverHostname string)
CreateInventoryFiles generate ansible compatible inventory files from CM deployment descriptor
func (CMServer) CreatePostRequest ¶
CreatePostRequest creates an CM Server POST request with body
func (CMServer) CreatePutRequest ¶
CreatePutRequest creates an CM Server PUT request with body
func (CMServer) ExecuteCMCommand ¶ added in v0.3.0
func (c CMServer) ExecuteCMCommand(task Task, cluster string, filter Filter, roleCommand bool, inventories []Inventory)
ExecuteCMCommand executes an CM command against services or roles
func (CMServer) ExecuteConfigUpdate ¶ added in v0.3.0
ExecuteConfigUpdate executes a configuration update against roles or services
func (CMServer) ExecutePlaybook ¶ added in v0.3.0
ExecutePlaybook runs tasks on CM hosts based on a playbook object
func (CMServer) ExecuteRemoteCommandTask ¶ added in v0.3.0
func (c CMServer) ExecuteRemoteCommandTask(task Task, filteredHosts map[string]bool, inventory *Inventory)
ExecuteRemoteCommandTask executes a remote command on filtered hosts
func (CMServer) ExecuteSaltCommand ¶
ExecuteSaltCommand execute salt command
func (CMServer) ExecuteSaltSyncCommand ¶ added in v0.3.0
ExecuteSaltSyncCommand sync salt scripts from folder
func (CMServer) ExecuteUploadFileTask ¶ added in v0.3.0
func (c CMServer) ExecuteUploadFileTask(task Task, filteredHosts map[string]bool, inventory *Inventory)
ExecuteUploadFileTask upload a file to specific (filtered) hosts
func (CMServer) ExportClusterTemplate ¶
ExportClusterTemplate exporting template for a specific cluster
func (CMServer) GetCMUri ¶
GetCMUri creates the CM uri with /api/vx/ suffix (+ /api/vx/clusters/<cluster> suffix is useCluster is enabled)
func (CMServer) GetDeployment ¶
func (c CMServer) GetDeployment() Deployment
GetDeployment get full deployement data for CM server
func (CMServer) GetExternalAccountCategories ¶ added in v0.4.0
GetExternalAccountCategories returns a list of the supported external account categories
func (CMServer) GetExternalAccountTypesByCategory ¶ added in v0.4.0
GetExternalAccountTypesByCategory returns a list of the external accounts types by category
func (CMServer) GetExternalAccountsByType ¶ added in v0.4.0
GetExternalAccountsByType gather external accounts with configs by type
func (CMServer) GetFilteredHosts ¶
GetFilteredHosts obtain specific hosts based on different filters
func (CMServer) ListClusters ¶
ListClusters get all the registered clusters
func (CMServer) ListRoleConfigGroups ¶ added in v0.3.0
func (c CMServer) ListRoleConfigGroups(cluster string, service string, full bool) []RoleConfigGroup
ListRoleConfigGroups gather role configuration groups
func (CMServer) ListServiceConfigs ¶ added in v0.3.0
func (c CMServer) ListServiceConfigs(cluster string, service string, full bool) []ConfigItem
ListServiceConfigs gather service configurations
func (CMServer) ListServices ¶
ListServices get all the registered services per cluster
func (CMServer) RunGatewayCMCommand ¶
func (c CMServer) RunGatewayCMCommand(command string, printStdOut bool, printEmptyResponse bool) RemoteResponse
RunGatewayCMCommand run command on CM CB gateway
func (CMServer) RunRemoteHostCommand ¶
func (c CMServer) RunRemoteHostCommand(command string, filteredHosts map[string]bool, skipJump bool, inventory *Inventory) map[string]RemoteResponse
RunRemoteHostCommand executes bash commands on CM hosts
func (CMServer) RunRolesOperation ¶ added in v0.2.0
func (c CMServer) RunRolesOperation(cluster string, service string, roleNames []string, roleNameFilter string, command string, verbose bool) []byte
RunRolesOperation run operation on a list of roles for a specific service
func (CMServer) RunSaltCommand ¶ added in v0.3.0
func (c CMServer) RunSaltCommand(command string, rawCommand string, saltBinaryPathPrefix string, saltBinary string)
RunSaltCommand execute a command on all minions
func (CMServer) RunServiceOperation ¶ added in v0.2.0
func (c CMServer) RunServiceOperation(cluster string, service string, command string, verbose bool) []byte
RunServiceOperation run a service operation (start / stop / restart)
func (CMServer) SyncSaltScripts ¶ added in v0.1.1
SyncSaltScripts sync salt scripts - delete/backup old scripts then upload new ones from local salt folder
type Cluster ¶
type Cluster struct { UUID string `json:"uuid,omitempty"` Name string `json:"name,omitempty"` DisplayName string `json:"displayName,omitempty"` Version string `json:"fullVersion,omitempty"` Type string `json:"clusterType,omitempty"` }
Cluster holds installed CM cluster details
type ConfigItem ¶ added in v0.3.0
type ConfigItem struct { Name string `json:"name,omitempty"` Value string `json:"value,omitempty"` DisplayName string `json:"displayName,omitempty"` Description string `json:"description,omitempty"` Sensitive bool `json:"sensitive,omitempty"` Required bool `json:"required,omitempty"` RelatedName string `json:"relatedName,omitempty"` Default string `json:"default,omitempty"` ValidationState string `json:"validationState,omitempty"` ValidationWarningsSuppressed bool `json:"validationWarningsSuppressed,omitempty"` }
ConfigItem represents a config entry
type ConnectionProfile ¶
type ConnectionProfile struct { Name string `json:"name"` KeyPath string `json:"key_path"` Port int `json:"port"` Username string `json:"username"` }
ConnectionProfile represents ssh/connection descriptions which is used to communicate with CM server and agents
func GetConnectionProfileByID ¶ added in v0.3.0
func GetConnectionProfileByID(searchID string) ConnectionProfile
GetConnectionProfileByID get the connection profile from cmctl database by id
func ListConnectionProfileEntries ¶
func ListConnectionProfileEntries() []ConnectionProfile
ListConnectionProfileEntries get all CM server registries from cmctl database
type Deployment ¶
type Deployment struct { Clusters []Cluster Services []Service Hosts []Host ClusterServiceRoleMap map[string]ServiceRolesMap }
Deployment hold full CM server deployment data
func ConvertDeploymentResponse ¶
func ConvertDeploymentResponse(responseMap map[string]interface{}) Deployment
ConvertDeploymentResponse convert map to Deployment response
type Filter ¶
type Filter struct { Hosts []string Clusters []string Services []string Roles []string Server bool }
Filter represents filter on agent hosts (by component / service / hosts)
type Host ¶
type Host struct { HostID string `json:"hostId,omitempty"` IPAddress string `json:"ipAddress,omitempty"` HostName string `json:"hostName,omitempty"` CommissionState string `json:"commissionState,omitempty"` RackID string `json:"rackId,omitempty"` ClusterName string `json:"clusterName,omitempty"` ClusterDisplayName string `json:"clusterDisplayName,omitempty"` TotalMemory string `json:"totalPhysMemBytes,omitempty"` }
Host holds host details
type HostRoleNamePair ¶ added in v0.2.0
type HostRoleNamePair struct { HostName string `json:"hostName,omitempty"` RoleName string `json:"roleName,omitempty"` }
HostRoleNamePair holds host name and role name for inventory resource
type IniConfiguration ¶ added in v0.3.0
IniConfiguration holds inventory config sections by name
func CreateIniConfiguration ¶ added in v0.3.0
func CreateIniConfiguration() *IniConfiguration
CreateIniConfiguration create new ini config object
func LoadIniFile ¶ added in v0.3.0
func LoadIniFile(fileName string) (*IniConfiguration, error)
LoadIniFile load ini configuration file locally
func (*IniConfiguration) AddSection ¶ added in v0.3.0
func (cfg *IniConfiguration) AddSection(name string) *Section
AddSection create a new section
func (*IniConfiguration) GetSection ¶ added in v0.3.0
func (cfg *IniConfiguration) GetSection(name string) *Section
GetSection gather a section by name
func (*IniConfiguration) SectionExists ¶ added in v0.3.0
func (cfg *IniConfiguration) SectionExists(sectionName string) bool
SectionExists check that a section exists with a name or not
func (*IniConfiguration) WriteIniConfiguration ¶ added in v0.3.0
func (cfg *IniConfiguration) WriteIniConfiguration(filePath string, startSectionsWith []string) error
WriteIniConfiguration create a new ini file with ini configuration object content - sections are sorted but can start with specific sections
type Input ¶ added in v0.3.0
Input represents a variable that needs to be provided by users (if default value is empty)
type Inventory ¶ added in v0.2.0
type Inventory struct { ServerAddress string `json:"server,omitempty"` ClusterName string `json:"cluster,omitempty"` Hosts []Host `json:"agents,omitempty"` ServiceRoleHostsMap map[string]map[string][]HostRoleNamePair `json:"serviceRoleHostsMap,omitempty"` ServiceHostsMap map[string][]string `json:"serviceHostsMap,omitempty"` }
Inventory holds hosts mappings for resources
func CreateInventoriesFromDeploymentsAndHosts ¶ added in v0.2.0
func CreateInventoriesFromDeploymentsAndHosts(deployment Deployment, agentHosts []Host) []Inventory
CreateInventoriesFromDeploymentsAndHosts create struct that holds hostnames by services/roles for all clusters
func CreateInventory ¶ added in v0.2.0
func CreateInventory(clusterName string, serviceRoleMap ServiceRolesMap, deployment Deployment, agentHosts []Host) Inventory
CreateInventory create struct that holds hostnames by services/roles/cluster
func ReadInventoryFromFile ¶ added in v0.3.0
ReadInventoryFromFile parse inventory file and create an inventory resource from it
func (*Inventory) EnrichInventoryWithHostsForCluster ¶ added in v0.4.0
EnrichInventoryWithHostsForCluster enrich inventory struct with hosts for a specific cluster
type Items ¶ added in v0.3.0
Items global items from CM Server rest API response
func ProcessCMItems ¶
ProcessCMItems get "items" from CM server response
func ProcessCMItemsFromBytes ¶
ProcessCMItemsFromBytes get "items" from bytes
func ProcessCMItemsFromSSHResponse ¶
func ProcessCMItemsFromSSHResponse(sshResponse RemoteResponse) Items
ProcessCMItemsFromSSHResponse get "items" from CM gateway SSH response
func (Items) ConvertClustersResponse ¶ added in v0.3.0
ConvertClustersResponse convert items response to Clusters response
func (Items) ConvertExternalAccounts ¶ added in v0.4.0
ConvertExternalAccounts convert items response to external accounts per type
func (Items) ConvertHostsResponse ¶ added in v0.3.0
ConvertHostsResponse convert items response to Hosts response
func (Items) ConvertRoleConfigGroupsResponse ¶ added in v0.3.0
func (c Items) ConvertRoleConfigGroupsResponse() []RoleConfigGroup
ConvertRoleConfigGroupsResponse convert items to role configuration groups
func (Items) ConvertRolesResponse ¶ added in v0.3.0
ConvertRolesResponse convert items response to Roles response
func (Items) ConvertServiceConfigResponse ¶ added in v0.3.0
func (c Items) ConvertServiceConfigResponse() []ConfigItem
ConvertServiceConfigResponse convert items response to config items
func (Items) ConvertServicesResponse ¶ added in v0.3.0
ConvertServicesResponse convert items response to Services response
func (Items) ConvertUsersResponse ¶ added in v0.3.0
ConvertUsersResponse convert items response to Users response
type Playbook ¶ added in v0.3.0
type Playbook struct { Name string `yaml:"name"` Description string `yaml:"description"` Tasks []Task `yaml:"tasks"` Inputs []Input `yaml:"inputs"` }
Playbook contains an array of tasks that will be executed on CM hosts
func LoadPlaybookFile ¶ added in v0.3.0
LoadPlaybookFile read a playbook yaml file and transform it to a Playbook object
type RemoteResponse ¶
RemoteResponse represents an ssh command output
type Role ¶
type Role struct { Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` HostName string `json:"hostName,omitempty"` ConfigGroup string `json:"configGroup,omitempty"` State string `json:"roleState,omitempty"` StaleConfig string `json:"configStalenessStatus,omitempty"` ComissionState string `json:"commissionState,omitempty"` ClusterName string `json:"clusterName,omitempty"` ServiceName string `json:"serviceName,omitempty"` }
Role holds role details
type RoleConfigGroup ¶ added in v0.3.0
type RoleConfigGroup struct { Name string `json:"name,omitempty"` DisplayName string `json:"displayName,omitempty"` RoleType string `json:"roleType,omitempty"` ClusterName string `json:"clusterName,omitempty"` ServiceName string `json:"serviceName,omitempty"` Base bool `json:"base,omitempty"` ConfigItems []ConfigItem `json:"items,omitempty"` }
RoleConfigGroup holds role configuration group
type Section ¶ added in v0.3.0
Section configuration sections for inventory files
func (*Section) AddSectionKeyValue ¶ added in v0.3.0
AddSectionKeyValue add new key and value for a section
func (*Section) AddSectionKeyValueStr ¶ added in v0.3.0
AddSectionKeyValueStr add new section option value (key=value format)
func (*Section) AddSectionValue ¶ added in v0.3.0
AddSectionValue add new section option
func (*Section) SectionToString ¶ added in v0.3.0
SectionToString create a section string (ini like: [section_name]key=value ... with new lines)
type Service ¶
type Service struct { Name string `json:"name,omitempty"` DisplayName string `json:"displayName,omitempty"` Type string `json:"type,omitempty"` State string `json:"serviceState,omitempty"` ClusterName string `json:"clusterName,omitempty"` StaleConfig string `json:"configStalenessStatus,omitempty"` }
Service holds service details
type ServiceRolesMap ¶
ServiceRolesMap holds service - roles map
type Task ¶ added in v0.3.0
type Task struct { Name string `yaml:"name"` Type string `yaml:"type"` Debug bool `yaml:"debug"` Command string `yaml:"command"` CMServerFilter bool `yaml:"server"` CMAgentFilter bool `yaml:"agent"` ClusterFilter string `yaml:"cluster"` HostFilter string `yaml:"hosts"` ServiceFilter string `yaml:"service"` RoleTypeFilter string `yaml:"role"` RoleNames string `yaml:"roleName"` Configs []map[string]string `yaml:"configs,omitempty"` Parameters map[string]string `yaml:"parameters,omitempty"` }
Task represents a task that can be executed on an CM hosts
type User ¶
type User struct { Name string `json:"name,omitempty"` AuthRoles []UserAuthRole `json:"authRoles,omitempty"` }
User holds user details
type UserAuthRole ¶
type UserAuthRole struct {
Name string `json:"name,omitempty"`
}
UserAuthRole holds user auth role details