Documentation ¶
Index ¶
- Constants
- Variables
- func AddProjectChangeActions(projectId string, actions ...ActionDescriptor) error
- func AddRollBackChangeActions(projectId string, actions ...ActionDescriptor) error
- func AutoFixInfrastructureInstances(infrastructure model.Infrastructure) error
- func BoolToString(input bool) string
- func CmdParseOption(key string, options []SubCommandHelper) (string, int, error)
- func CopyStructure(origin interface{}, target interface{}) bool
- func CorrectInput(input string) string
- func DefineDestroyActivityFromCreateOne(activity tasks.ActivityCouple) tasks.ActivityCouple
- func DefineRebuildOfWholeInfrastructure(activities []tasks.ActivityCouple, excludedIds []string) []tasks.ActivityCouple
- func DeleteActionIndex(projectId string) error
- func DeleteInfrastructureLogFiles(projectId string, infraId string, elementId string) error
- func DeleteInfrastructureLogs(log model.LogStorage) error
- func DeleteInfrastructureLogsById(projectId string, infraId string, elementId string) error
- func DeleteProjectActionChanges(projectId string) error
- func DeleteProjectRollBackIndex(projectId string) error
- func DeleteProjectRollBackSegment(projectId string, index RollBackSegmentIndex) error
- func DeleteRollbackIndex(projectId string) error
- func DeleteRollbackSegment(projectId string, rollbackIndex RollBackSegmentIndex) error
- func DescribeInstallation(installation *model.Installation, instanceName string, padding string) error
- func DescribeInstance(infrastructure model.Infrastructure, instance model.LocalInstance, ...) error
- func DestroyInstance(infrastructure model.Infrastructure, instance model.LocalInstance, ...) error
- func DisableInstance(infrastructure model.Infrastructure, instance model.LocalInstance, ...) error
- func EnableInstance(infrastructure model.Infrastructure, instance model.LocalInstance, ...) error
- func ExecuteInfrastructureActions(infrastructure model.Infrastructure, ...) []error
- func ExistInstance(infrastructure model.Infrastructure, instance model.LocalInstance, ...) (procedures.MachineState, error)
- func ExtractInstallations(Infrastructure *model.Infrastructure, instance model.LocalInstance, ...) []*model.Installation
- func ExtractStructureValue(origin interface{}, field string) interface{}
- func FilterCreationBasedOnProjectActions(actions ProjectActionIndex, activities []tasks.ActivityCouple) ([]string, []tasks.ActivityCouple)
- func FilterForExistAndNotRunningState(infrastructure model.Infrastructure, state procedures.MachineState) ([]string, error)
- func FilterForExistAndRunningState(infrastructure model.Infrastructure, state procedures.MachineState) ([]string, error)
- func FilterForExistState(infrastructure model.Infrastructure) ([]string, error)
- func FindInfrastructureCloudInstance(Infrastructure model.Infrastructure, InstanceId string, InstanceName string) (model.CloudInstance, error)
- func FindInfrastructureInstance(Infrastructure model.Infrastructure, InstanceId string, InstanceName string) (model.LocalInstance, error)
- func FixInfrastructureElementValue(Infrastructure *model.Infrastructure, instanceId string, ipAddress string, ...) bool
- func FixInfrastructureIntallationLogs(Infrastructure *model.Infrastructure, planId string, log string) bool
- func GetBoolean(input string) bool
- func GetDefault(value interface{}, nilVal interface{}, dafaultVal interface{}) interface{}
- func GetInteger(input string, defaultValue int) int
- func InfrastructureToProject(infrastructure model.Infrastructure, projectName string) (model.Project, error)
- func IsActionIndexLocked(index ProjectActionIndex) bool
- func IsActivitySelected(activity tasks.ActivityCouple, id string) bool
- func IsLogFileLocked(index model.LogStorage, logIndex int) bool
- func IsLogLocked(index model.LogStorage) bool
- func IsRollBackIndexLocked(index RollBackIndex) bool
- func IsRollBackSegmentLocked(index RollBackSegment) bool
- func IsRollBackSegmentLockedById(projectId string, index RollBackSegmentIndex) bool
- func LoadInfrastructureLogFiles(log model.LogStorage) error
- func LoadInfrastructureLogs(projectId string, infraId string, elementId string) (model.LogStorage, error)
- func LockActionIndex(index ProjectActionIndex) bool
- func LockLog(index model.LogStorage) bool
- func LockLogFile(index model.LogStorage, logIndex int) bool
- func LockRollBackIndex(index RollBackIndex) bool
- func LockRollBackSegment(index RollBackSegment) bool
- func LockRollBackSegmentById(projectId string, index RollBackSegmentIndex) bool
- func MigrateProjectActionsToRollbackSegments(actions ProjectActionIndex) error
- func NewUUIDString() string
- func PrintCommandHelper(command string, subCommand string, recoverHelpersFunc func() []CommandHelper)
- func ProjectToInfrastructure(project model.Project) (model.Infrastructure, error)
- func RecreateInstance(infrastructure model.Infrastructure, instance model.LocalInstance, ...) error
- func RemoveInfrastructureInstanceById(Infrastructure *model.Infrastructure, InstanceId string) error
- func RemoveProjectMachineById(Infrastructure *model.Project, InstanceId string) error
- func RestartInstance(infrastructure model.Infrastructure, instance model.LocalInstance, ...) error
- func SaveInfrastructureLogs(log model.LogStorage) error
- func SaveProjectActionIndex(index ProjectActionIndex) error
- func SaveRollbackIndex(index RollBackIndex) error
- func SaveRollbackSegment(index RollBackSegment) error
- func StartInstance(infrastructure model.Infrastructure, instance model.LocalInstance, ...) error
- func StopInstance(infrastructure model.Infrastructure, instance model.LocalInstance, ...) error
- func UnlockActionIndex(index ProjectActionIndex) bool
- func UnlockLog(index model.LogStorage) bool
- func UnlockLogFile(index model.LogStorage, logIndex int) bool
- func UnlockRollBackIndex(index RollBackIndex) bool
- func UnlockRollBackSegment(index RollBackSegment) bool
- func UnlockRollBackSegmentById(projectId string, index RollBackSegmentIndex) bool
- func UpdateIndexWithInfrastructure(infrastructure model.Infrastructure) error
- func UpdateIndexWithProject(project model.Project) error
- func UpdateIndexWithProjectStates(project model.Project, active bool, synced bool) error
- func UpdateIndexWithProjectsDescriptor(project model.ProjectsDescriptor, addDescriptor bool) error
- type ActionDescriptor
- type ActionStorage
- type CmdArguments
- type CmdElementType
- type CmdParser
- type CmdRequest
- func (request *CmdRequest) AlterInfra(recoverHelpersFunc func() []CommandHelper) (Response, error)
- func (request *CmdRequest) AlterProject(recoverHelpersFunc func() []CommandHelper) (Response, error)
- func (request *CmdRequest) BackupInfra(recoverHelpersFunc func() []CommandHelper) (Response, error)
- func (request *CmdRequest) BuildProject(recoverHelpersFunc func() []CommandHelper) (Response, error)
- func (request *CmdRequest) CheckInfra(recoverHelpersFunc func() []CommandHelper) bool
- func (request *CmdRequest) CheckProject(recoverHelpersFunc func() []CommandHelper) bool
- func (request *CmdRequest) CreateInfra(recoverHelpersFunc func() []CommandHelper) (Response, error)
- func (request *CmdRequest) CreateProject(recoverHelpersFunc func() []CommandHelper) (Response, error)
- func (request *CmdRequest) DeleteInfra(recoverHelpersFunc func() []CommandHelper) (Response, error)
- func (request *CmdRequest) DeleteProject(recoverHelpersFunc func() []CommandHelper) (Response, error)
- func (request *CmdRequest) ExportProject(recoverHelpersFunc func() []CommandHelper) (Response, error)
- func (request *CmdRequest) ImportProject(recoverHelpersFunc func() []CommandHelper) (Response, error)
- func (request *CmdRequest) InfoProject(recoverHelpersFunc func() []CommandHelper) (Response, error)
- func (request *CmdRequest) ListInfras(recoverHelpersFunc func() []CommandHelper) (Response, error)
- func (request *CmdRequest) ListProjects(recoverHelpersFunc func() []CommandHelper) (Response, error)
- func (request *CmdRequest) RecoverInfra(recoverHelpersFunc func() []CommandHelper) (Response, error)
- func (request *CmdRequest) RestartInfra(recoverHelpersFunc func() []CommandHelper) (Response, error)
- func (request *CmdRequest) StartInfra(recoverHelpersFunc func() []CommandHelper) (Response, error)
- func (request *CmdRequest) StatusInfra(recoverHelpersFunc func() []CommandHelper) (Response, error)
- func (request *CmdRequest) StatusProject(recoverHelpersFunc func() []CommandHelper) (Response, error)
- func (request *CmdRequest) StopInfra(recoverHelpersFunc func() []CommandHelper) (Response, error)
- type CmdRequestType
- type CmdSubRequestType
- type CommandHelper
- type CompressorData
- type DomainReference
- type ExportImportCloudMachines
- type ExportImportDomains
- type ExportImportLocalMachines
- type ExportImportNetwork
- type ExportImportPlans
- type HelperOption
- type IFaceLogStorage
- type IFaceProjectActionIndex
- type IFaceRollBackIndex
- type IFaceRollBackSegment
- type InfrastructureActions
- type InfrastructureLogsInfo
- func (info *InfrastructureLogsInfo) Delete() error
- func (info *InfrastructureLogsInfo) DeleteLogFile() error
- func (info *InfrastructureLogsInfo) Exists() bool
- func (info *InfrastructureLogsInfo) Export(prettify bool) ([]byte, error)
- func (info *InfrastructureLogsInfo) Import(file string, format string) error
- func (info *InfrastructureLogsInfo) Read() error
- func (info *InfrastructureLogsInfo) ReadLogFiles() error
- func (info *InfrastructureLogsInfo) SaveLogFile() error
- func (info *InfrastructureLogsInfo) Write() error
- type NetworkReference
- type ProjectActionIndex
- func (element *ProjectActionIndex) Import(file string, format string) error
- func (element *ProjectActionIndex) Load(file string) error
- func (element *ProjectActionIndex) PostImport() error
- func (element *ProjectActionIndex) Save(file string) error
- func (element *ProjectActionIndex) Validate() []error
- type ProjectActionIndexInfo
- func (info *ProjectActionIndexInfo) Delete() error
- func (info *ProjectActionIndexInfo) Export(prettify bool) ([]byte, error)
- func (info *ProjectActionIndexInfo) Import(file string, format string) error
- func (info *ProjectActionIndexInfo) Read() error
- func (info *ProjectActionIndexInfo) Write() error
- type ProjectActions
- type ProjectRollbackIndexInfo
- func (info *ProjectRollbackIndexInfo) Delete() error
- func (info *ProjectRollbackIndexInfo) Export(prettify bool) ([]byte, error)
- func (info *ProjectRollbackIndexInfo) Import(file string, format string) error
- func (info *ProjectRollbackIndexInfo) Read() error
- func (info *ProjectRollbackIndexInfo) Write() error
- type ProjectRollbackSegmentInfo
- func (info *ProjectRollbackSegmentInfo) Delete() error
- func (info *ProjectRollbackSegmentInfo) Export(prettify bool) ([]byte, error)
- func (info *ProjectRollbackSegmentInfo) Import(file string, format string) error
- func (info *ProjectRollbackSegmentInfo) Read() error
- func (info *ProjectRollbackSegmentInfo) Write() error
- type Response
- type RollBackIndex
- type RollBackSegment
- type RollBackSegmentIndex
- type SegmentIndexNature
- type SubCommandHelper
Constants ¶
const MAX_LINES_IN_LOG = 2000
const MAX_SEGMENT_SIZE int = 1000
const MachineReadOperationTimeout = 900
Variables ¶
var CmdElementTypeDescriptors []string = []string{
"No Element",
"Local Machine",
"Cloud Machine",
"Installation Plan",
"Network",
"Domain",
"Project",
}
var CmdRequestDescriptors []string = []string{
"No Command",
"Start Infrastructure",
"Stop Infrastructure",
"Restart Infrastructure",
"Destroy Infrastructure",
"Backup Infrastructure",
"Recover Infrastructure",
"Infrastructure Status",
"List Infrastructures",
"List Projects",
"Project Status",
"Import Project",
"Export Project",
"Define Project",
"BuildC Project",
"Delete Project",
"Alter Project",
"Describe Project",
}
var CmdSubRequestDescriptors []string = []string{
"No Sub-Command",
"Create",
"Remove",
"Modify",
"Close",
"Open",
"List",
"Detail",
"Start",
"Stop",
"Disable",
"Enable",
"Status",
"Recreate",
"Destroy",
"Autofix",
}
var FixInfrastructureElementMutex sync.Mutex
var InstallationPlanSample model.InstallationPlan = model.InstallationPlan{ Id: "", Environment: model.KubernetesEnv, IsCloud: false, MachineId: NewUUIDString(), MainCommandRef: "https://github.com/myrepo/something/mycommand.git", MainCommandSet: model.AnsibleCmdSet, ProvisionCommandRef: "https://site.to.my.commands/something/mycommand.tgz", ProvisionCommandSet: model.HelmCmdSet, Role: model.MasterRole, Type: model.HostDeployment, }
var InstallationPlanSample2 model.InstallationPlan = model.InstallationPlan{ Id: "", Environment: model.CattleEnv, IsCloud: true, MachineId: NewUUIDString(), MainCommandRef: "https://github.com/myrepo/something/mycommand.git", MainCommandSet: model.AnsibleCmdSet, ProvisionCommandRef: "https://site.to.my.commands/something/mycommand.tgz", ProvisionCommandSet: model.VirtKubeCmdSet, Role: model.StandAloneRole, Type: model.MachineDeployment, }
var SegmentIndexSize int = 30
Functions ¶
func AddProjectChangeActions ¶
func AddProjectChangeActions(projectId string, actions ...ActionDescriptor) error
func AddRollBackChangeActions ¶
func AddRollBackChangeActions(projectId string, actions ...ActionDescriptor) error
func AutoFixInfrastructureInstances ¶
func AutoFixInfrastructureInstances(infrastructure model.Infrastructure) error
func BoolToString ¶
func CmdParseOption ¶
func CmdParseOption(key string, options []SubCommandHelper) (string, int, error)
func CopyStructure ¶
func CopyStructure(origin interface{}, target interface{}) bool
func CorrectInput ¶
func DefineDestroyActivityFromCreateOne ¶
func DefineDestroyActivityFromCreateOne(activity tasks.ActivityCouple) tasks.ActivityCouple
func DefineRebuildOfWholeInfrastructure ¶
func DefineRebuildOfWholeInfrastructure(activities []tasks.ActivityCouple, excludedIds []string) []tasks.ActivityCouple
func DeleteActionIndex ¶
func DeleteInfrastructureLogs ¶
func DeleteInfrastructureLogs(log model.LogStorage) error
func DeleteProjectRollBackSegment ¶
func DeleteProjectRollBackSegment(projectId string, index RollBackSegmentIndex) error
func DeleteRollbackIndex ¶
func DeleteRollbackSegment ¶
func DeleteRollbackSegment(projectId string, rollbackIndex RollBackSegmentIndex) error
func DescribeInstallation ¶
func DescribeInstallation(installation *model.Installation, instanceName string, padding string) error
func DescribeInstance ¶
func DescribeInstance(infrastructure model.Infrastructure, instance model.LocalInstance, cloudInstance model.CloudInstance, isCloud bool, instanceState procedures.MachineState) error
func DestroyInstance ¶
func DestroyInstance(infrastructure model.Infrastructure, instance model.LocalInstance, cloudInstance model.CloudInstance, isCloud bool, instanceState procedures.MachineState, descriptor model.ProjectsDescriptor) error
func DisableInstance ¶
func DisableInstance(infrastructure model.Infrastructure, instance model.LocalInstance, cloudInstance model.CloudInstance, isCloud bool, instanceState procedures.MachineState, descriptor model.ProjectsDescriptor) error
func EnableInstance ¶
func EnableInstance(infrastructure model.Infrastructure, instance model.LocalInstance, cloudInstance model.CloudInstance, isCloud bool) error
func ExecuteInfrastructureActions ¶
func ExecuteInfrastructureActions(infrastructure model.Infrastructure, infrastructureActionCouples []tasks.ActivityCouple, NumThreads int, postTaskCallback func(task tasks.SchedulerTask)) []error
func ExistInstance ¶
func ExistInstance(infrastructure model.Infrastructure, instance model.LocalInstance, cInstance model.CloudInstance, isCloud bool, instanceId string) (procedures.MachineState, error)
func ExtractInstallations ¶
func ExtractInstallations(Infrastructure *model.Infrastructure, instance model.LocalInstance, cloudInstance model.CloudInstance, isCloud bool) []*model.Installation
func ExtractStructureValue ¶
func ExtractStructureValue(origin interface{}, field string) interface{}
func FilterCreationBasedOnProjectActions ¶
func FilterCreationBasedOnProjectActions(actions ProjectActionIndex, activities []tasks.ActivityCouple) ([]string, []tasks.ActivityCouple)
func FilterForExistAndNotRunningState ¶
func FilterForExistAndNotRunningState(infrastructure model.Infrastructure, state procedures.MachineState) ([]string, error)
func FilterForExistAndRunningState ¶
func FilterForExistAndRunningState(infrastructure model.Infrastructure, state procedures.MachineState) ([]string, error)
func FilterForExistState ¶
func FilterForExistState(infrastructure model.Infrastructure) ([]string, error)
func FindInfrastructureCloudInstance ¶
func FindInfrastructureCloudInstance(Infrastructure model.Infrastructure, InstanceId string, InstanceName string) (model.CloudInstance, error)
func FindInfrastructureInstance ¶
func FindInfrastructureInstance(Infrastructure model.Infrastructure, InstanceId string, InstanceName string) (model.LocalInstance, error)
func FixInfrastructureIntallationLogs ¶
func FixInfrastructureIntallationLogs(Infrastructure *model.Infrastructure, planId string, log string) bool
func GetBoolean ¶
func GetDefault ¶
func GetDefault(value interface{}, nilVal interface{}, dafaultVal interface{}) interface{}
func GetInteger ¶
func InfrastructureToProject ¶
func IsActionIndexLocked ¶
func IsActionIndexLocked(index ProjectActionIndex) bool
func IsActivitySelected ¶
func IsActivitySelected(activity tasks.ActivityCouple, id string) bool
func IsLogFileLocked ¶
func IsLogFileLocked(index model.LogStorage, logIndex int) bool
func IsLogLocked ¶
func IsLogLocked(index model.LogStorage) bool
func IsRollBackIndexLocked ¶
func IsRollBackIndexLocked(index RollBackIndex) bool
func IsRollBackSegmentLocked ¶
func IsRollBackSegmentLocked(index RollBackSegment) bool
func IsRollBackSegmentLockedById ¶
func IsRollBackSegmentLockedById(projectId string, index RollBackSegmentIndex) bool
func LoadInfrastructureLogFiles ¶
func LoadInfrastructureLogFiles(log model.LogStorage) error
func LoadInfrastructureLogs ¶
func LockActionIndex ¶
func LockActionIndex(index ProjectActionIndex) bool
func LockLog ¶
func LockLog(index model.LogStorage) bool
func LockLogFile ¶
func LockLogFile(index model.LogStorage, logIndex int) bool
func LockRollBackIndex ¶
func LockRollBackIndex(index RollBackIndex) bool
func LockRollBackSegment ¶
func LockRollBackSegment(index RollBackSegment) bool
func LockRollBackSegmentById ¶
func LockRollBackSegmentById(projectId string, index RollBackSegmentIndex) bool
func MigrateProjectActionsToRollbackSegments ¶
func MigrateProjectActionsToRollbackSegments(actions ProjectActionIndex) error
func NewUUIDString ¶
func NewUUIDString() string
func PrintCommandHelper ¶
func PrintCommandHelper(command string, subCommand string, recoverHelpersFunc func() []CommandHelper)
func ProjectToInfrastructure ¶
func ProjectToInfrastructure(project model.Project) (model.Infrastructure, error)
func RecreateInstance ¶
func RecreateInstance(infrastructure model.Infrastructure, instance model.LocalInstance, cloudInstance model.CloudInstance, isCloud bool, instanceState procedures.MachineState, descriptor model.ProjectsDescriptor) error
func RemoveInfrastructureInstanceById ¶
func RemoveInfrastructureInstanceById(Infrastructure *model.Infrastructure, InstanceId string) error
func RestartInstance ¶
func RestartInstance(infrastructure model.Infrastructure, instance model.LocalInstance, cloudInstance model.CloudInstance, isCloud bool, instanceState procedures.MachineState) error
func SaveInfrastructureLogs ¶
func SaveInfrastructureLogs(log model.LogStorage) error
func SaveProjectActionIndex ¶
func SaveProjectActionIndex(index ProjectActionIndex) error
func SaveRollbackIndex ¶
func SaveRollbackIndex(index RollBackIndex) error
func SaveRollbackSegment ¶
func SaveRollbackSegment(index RollBackSegment) error
func StartInstance ¶
func StartInstance(infrastructure model.Infrastructure, instance model.LocalInstance, cloudInstance model.CloudInstance, isCloud bool, instanceState procedures.MachineState) error
func StopInstance ¶
func StopInstance(infrastructure model.Infrastructure, instance model.LocalInstance, cloudInstance model.CloudInstance, isCloud bool, instanceState procedures.MachineState) error
func UnlockActionIndex ¶
func UnlockActionIndex(index ProjectActionIndex) bool
func UnlockLog ¶
func UnlockLog(index model.LogStorage) bool
func UnlockLogFile ¶
func UnlockLogFile(index model.LogStorage, logIndex int) bool
func UnlockRollBackIndex ¶
func UnlockRollBackIndex(index RollBackIndex) bool
func UnlockRollBackSegment ¶
func UnlockRollBackSegment(index RollBackSegment) bool
func UnlockRollBackSegmentById ¶
func UnlockRollBackSegmentById(projectId string, index RollBackSegmentIndex) bool
func UpdateIndexWithInfrastructure ¶
func UpdateIndexWithInfrastructure(infrastructure model.Infrastructure) error
func UpdateIndexWithProject ¶
func UpdateIndexWithProjectsDescriptor ¶
func UpdateIndexWithProjectsDescriptor(project model.ProjectsDescriptor, addDescriptor bool) error
Types ¶
type ActionDescriptor ¶
type ActionDescriptor struct { Id string `json:"Id" xml:"Id" mandatory:"yes" descr:"Action Unique Identifier" type:"text"` RelatedId string `json:"RelatedId" xml:"RelatedId" mandatory:"yes" descr:"Action Unique Identifier" type:"text"` Request CmdRequestType `json:"Request" xml:"Request" mandatory:"yes" descr:"Request Code" type:"int"` SubRequest CmdSubRequestType `json:"SubRequest" xml:"SubRequest" mandatory:"yes" descr:"Sub-Request Code" type:"int"` ElementType CmdElementType `json:"ElementType" xml:"ElementType" mandatory:"yes" descr:"Elemrnt Type Code" type:"int"` ElementId string `json:"ElementId" xml:"ElementId" mandatory:"yes" descr:"Element Unique Identifier" type:"text"` ElementName string `json:"ElementName" xml:"ElementName" mandatory:"yes" descr:"Element Name" type:"text"` JSONImage string `json:"JSONImage" xml:"JSONImage" mandatory:"yes" descr:"Element JSON image" type:"text"` FullProject bool `json:"FullProject" xml:"FullProject" mandatory:"yes" descr:"Describe if action infear on all project" type:"boolean"` DropAction bool `json:"DropAction" xml:"DropAction" mandatory:"yes" descr:"Describe if action Drops Elements" type:"boolean"` Date time.Time `json:"Date" xml:"Date" mandatory:"yes" descr:"Specific Action Date" type:"text"` }
func (*ActionDescriptor) Import ¶
func (element *ActionDescriptor) Import(file string, format string) error
func (*ActionDescriptor) Load ¶
func (element *ActionDescriptor) Load(file string) error
func (*ActionDescriptor) PostImport ¶
func (element *ActionDescriptor) PostImport() error
func (*ActionDescriptor) Save ¶
func (element *ActionDescriptor) Save(file string) error
func (*ActionDescriptor) Validate ¶
func (element *ActionDescriptor) Validate() []error
type ActionStorage ¶
type ActionStorage struct { Id string `json:"Id" xml:"Id" mandatory:"yes" descr:"Rollback Descriptor Unique Identifier" type:"text"` Action ActionDescriptor `json:"Action" xml:"Action" mandatory:"yes" descr:"Specific Action" type:"text"` Date time.Time `json:"Date" xml:"Date" mandatory:"yes" descr:"Specific Action Rollback registration Date" type:"datetime"` }
Describe Action Storage, contains
Id (string) Indexes Unique Identifier
Action (Action) Specific Action
Date (time.Time) Action Store/Update Date
type CmdArguments ¶
type CmdArguments struct { Cmd string CmdType CmdRequestType SubCmd string SubCmdType CmdSubRequestType SubCmdHelpType CmdRequestType Element CmdElementType Options [][]string Helper CommandHelper }
func ParseCommandArguments ¶
func ParseCommandArguments(args []string, recoverHelpersFunc func() []CommandHelper) (*CmdArguments, error)
func (*CmdArguments) Parse ¶
func (ArgCmd *CmdArguments) Parse(args []string, recoverHelpersFunc func() []CommandHelper) bool
type CmdElementType ¶
type CmdElementType int
const ( NoElement CmdElementType = iota LMachine CLMachine SPlan SNetwork SDomain SProject )
func CmdParseElement ¶
func CmdParseElement(value string) (CmdElementType, error)
type CmdRequest ¶
type CmdRequest struct { TypeStr string Type CmdRequestType SubTypeStr string SubType CmdSubRequestType HelpType CmdRequestType Element CmdElementType Arguments *CmdArguments }
func ParseCommandLine ¶
func ParseCommandLine(args []string, recoverHelpersFunc func() []CommandHelper) (CmdRequest, error)
func (*CmdRequest) AlterInfra ¶
func (request *CmdRequest) AlterInfra(recoverHelpersFunc func() []CommandHelper) (Response, error)
func (*CmdRequest) AlterProject ¶
func (request *CmdRequest) AlterProject(recoverHelpersFunc func() []CommandHelper) (Response, error)
func (*CmdRequest) BackupInfra ¶
func (request *CmdRequest) BackupInfra(recoverHelpersFunc func() []CommandHelper) (Response, error)
func (*CmdRequest) BuildProject ¶
func (request *CmdRequest) BuildProject(recoverHelpersFunc func() []CommandHelper) (Response, error)
func (*CmdRequest) CheckInfra ¶
func (request *CmdRequest) CheckInfra(recoverHelpersFunc func() []CommandHelper) bool
func (*CmdRequest) CheckProject ¶
func (request *CmdRequest) CheckProject(recoverHelpersFunc func() []CommandHelper) bool
func (*CmdRequest) CreateInfra ¶
func (request *CmdRequest) CreateInfra(recoverHelpersFunc func() []CommandHelper) (Response, error)
func (*CmdRequest) CreateProject ¶
func (request *CmdRequest) CreateProject(recoverHelpersFunc func() []CommandHelper) (Response, error)
func (*CmdRequest) DeleteInfra ¶
func (request *CmdRequest) DeleteInfra(recoverHelpersFunc func() []CommandHelper) (Response, error)
func (*CmdRequest) DeleteProject ¶
func (request *CmdRequest) DeleteProject(recoverHelpersFunc func() []CommandHelper) (Response, error)
func (*CmdRequest) ExportProject ¶
func (request *CmdRequest) ExportProject(recoverHelpersFunc func() []CommandHelper) (Response, error)
func (*CmdRequest) ImportProject ¶
func (request *CmdRequest) ImportProject(recoverHelpersFunc func() []CommandHelper) (Response, error)
func (*CmdRequest) InfoProject ¶
func (request *CmdRequest) InfoProject(recoverHelpersFunc func() []CommandHelper) (Response, error)
func (*CmdRequest) ListInfras ¶
func (request *CmdRequest) ListInfras(recoverHelpersFunc func() []CommandHelper) (Response, error)
func (*CmdRequest) ListProjects ¶
func (request *CmdRequest) ListProjects(recoverHelpersFunc func() []CommandHelper) (Response, error)
func (*CmdRequest) RecoverInfra ¶
func (request *CmdRequest) RecoverInfra(recoverHelpersFunc func() []CommandHelper) (Response, error)
func (*CmdRequest) RestartInfra ¶
func (request *CmdRequest) RestartInfra(recoverHelpersFunc func() []CommandHelper) (Response, error)
func (*CmdRequest) StartInfra ¶
func (request *CmdRequest) StartInfra(recoverHelpersFunc func() []CommandHelper) (Response, error)
func (*CmdRequest) StatusInfra ¶
func (request *CmdRequest) StatusInfra(recoverHelpersFunc func() []CommandHelper) (Response, error)
func (*CmdRequest) StatusProject ¶
func (request *CmdRequest) StatusProject(recoverHelpersFunc func() []CommandHelper) (Response, error)
func (*CmdRequest) StopInfra ¶
func (request *CmdRequest) StopInfra(recoverHelpersFunc func() []CommandHelper) (Response, error)
type CmdRequestType ¶
type CmdRequestType int
const ( NoCommand CmdRequestType = iota StartInfrastructure StopInfrastructure RestartInfrastructure DestroyInfrastructure AlterInfrastructure BackupInfrastructure RecoverInfrastructure ListInfrastructure ListInfrastructures ListConfigs StatusConfig ImportConfig ExportConfig DefineConfig BuildConfig DeleteConfig AlterConfig InfoConfig )
type CmdSubRequestType ¶
type CmdSubRequestType int
const ( NoSubCommand CmdSubRequestType = iota Create Remove Alter Close Open List Detail Start Stop Restart Disable Enable Status Recreate Destroy AutoFix )
type CommandHelper ¶
type CommandHelper struct { Command string `json:"Command" xml:"Command" mandatory:"yes" descr:"Required Command" type:"text"` Name string `json:"Name" xml:"Name" mandatory:"yes" descr:"Command Name" type:"text"` Description string `json:"Description" xml:"Description" mandatory:"yes" descr:"Required Command" type:"text"` CmdType CmdRequestType `json:"CmdType" xml:"CmdType" mandatory:"yes" descr:"Required Command" type:"integer"` LineHelp string `json:"LineHelp" xml:"LineHelp" mandatory:"yes" descr:"Required Command" type:"text"` SubCommands []SubCommandHelper `json:"SubCommands" xml:"SubCommands" mandatory:"yes" descr:"Required Command" type:"list of SubCommandHelper objects"` SubCmdTypes []CmdSubRequestType `json:"SubCmdTypes" xml:"SubCmdTypes" mandatory:"yes" descr:"Required Command" type:"integer list"` SubCmdHelperTypes []CmdRequestType `json:"SubCmdHelperTypes" xml:"SubCmdHelperTypes" mandatory:"yes" descr:"Required Command" type:"integer list"` Options []HelperOption `json:"Options" xml:"Options" mandatory:"yes" descr:"Required Command" type:"tlist of HelperOption objects"` }
Describe Command Helper options, contains
Command (string) Execution Command Text
Name (string) Logical Command Name
Description (string) Command Full Description
CmdType (CmdRequestType) Dimension of disk root (in GB)
LineHelp (string) Command Line Helper Text
SubCommands ([][]string) Sub Commands Descriptors
SubCmdTypes ([]CmdSubRequestType) Sub Commands Types list
SubCmdHelperTypes ([]CmdRequestType) Main Helper Available Commands List
Options ([][]string) Command Line Options
func RecoverCommandHelper ¶
func RecoverCommandHelper(helpCommand string, recoverHelpersFunc func() []CommandHelper) CommandHelper
func (*CommandHelper) HasOption ¶
func (Helper *CommandHelper) HasOption(value string) bool
type CompressorData ¶
type DomainReference ¶
type ExportImportCloudMachines ¶
type ExportImportCloudMachines struct { Network NetworkReference Machines []model.CloudMachine }
var ImportCloudMachineSample ExportImportCloudMachines = ExportImportCloudMachines{ Network: NetworkReference{ DomainId: NewUUIDString(), DomainName: vmio.DomainSample.Name, NetworkId: NewUUIDString(), NetworkName: vmio.NetworkSample.Name, }, Machines: []model.CloudMachine{ vmio.CloudMachineSample, vmio.CloudMachineSample, }, }
func UserImportCloudMachines ¶
func UserImportCloudMachines(File string, Format string) ([]ExportImportCloudMachines, error)
type ExportImportDomains ¶
type ExportImportDomains struct {
Domains []model.MachineDomain
}
var ImportDomainSample ExportImportDomains = ExportImportDomains{ Domains: []model.MachineDomain{ vmio.DomainSample, vmio.DomainSample, }, }
func UserImportDomains ¶
func UserImportDomains(File string, Format string) (ExportImportDomains, error)
type ExportImportLocalMachines ¶
type ExportImportLocalMachines struct { Network NetworkReference Machines []model.LocalMachine }
var ImportLocalMachineSample ExportImportLocalMachines = ExportImportLocalMachines{ Network: NetworkReference{ DomainId: NewUUIDString(), DomainName: vmio.DomainSample.Name, NetworkId: NewUUIDString(), NetworkName: vmio.NetworkSample.Name, }, Machines: []model.LocalMachine{ vmio.MachineSample, vmio.MachineSample, }, }
func UserImportLocalMachines ¶
func UserImportLocalMachines(File string, Format string) ([]ExportImportLocalMachines, error)
type ExportImportNetwork ¶
type ExportImportNetwork struct { Domain DomainReference Networks []model.MachineNetwork }
var ImportNetworkSample ExportImportNetwork = ExportImportNetwork{ Domain: DomainReference{ DomainId: NewUUIDString(), DomainName: vmio.DomainSample.Name, }, Networks: []model.MachineNetwork{ vmio.NetworkSample, vmio.NetworkSample, }, }
func UserImportNetworks ¶
func UserImportNetworks(File string, Format string) ([]ExportImportNetwork, error)
type ExportImportPlans ¶
type ExportImportPlans struct { Network NetworkReference Plans []model.InstallationPlan }
var ImportPlansSample ExportImportPlans = ExportImportPlans{ Network: NetworkReference{ DomainId: NewUUIDString(), DomainName: vmio.DomainSample.Name, NetworkId: NewUUIDString(), NetworkName: vmio.NetworkSample.Name, }, Plans: []model.InstallationPlan{ InstallationPlanSample, InstallationPlanSample2, }, }
func UserImportPlans ¶
func UserImportPlans(File string, Format string) ([]ExportImportPlans, error)
type HelperOption ¶
type HelperOption struct { Option string `json:"Option" xml:"Option" mandatory:"yes" descr:"Defined Option" type:"text"` Short string `json:"Short" xml:"Short" mandatory:"no" descr:"Defined Short Option" type:"text"` Type string `json:"Type" xml:"Type" mandatory:"yes" descr:"Defined Option Type Desription" type:"text"` Description string `json:"Description" xml:"Description" mandatory:"yes" descr:"Defined Option Desription" type:"text"` Mandatory bool `json:"Mandatory" xml:"Mandatory" mandatory:"yes" descr:"Describe a Mandatory option" type:"boolean"` }
func (*HelperOption) Equals ¶
func (Option *HelperOption) Equals(option HelperOption) bool
func (*HelperOption) Match ¶
func (Option *HelperOption) Match(value string) bool
type IFaceLogStorage ¶
type IFaceLogStorage model.LogStorage
func (*IFaceLogStorage) WaitForLogFileUnlock ¶
func (iFace *IFaceLogStorage) WaitForLogFileUnlock(logIndex int)
func (*IFaceLogStorage) WaitForUnlock ¶
func (iFace *IFaceLogStorage) WaitForUnlock()
type IFaceProjectActionIndex ¶
type IFaceProjectActionIndex ProjectActionIndex
func (*IFaceProjectActionIndex) WaitForUnlock ¶
func (iFace *IFaceProjectActionIndex) WaitForUnlock()
type IFaceRollBackIndex ¶
type IFaceRollBackIndex RollBackIndex
func (*IFaceRollBackIndex) WaitForUnlock ¶
func (iFace *IFaceRollBackIndex) WaitForUnlock()
type IFaceRollBackSegment ¶
type IFaceRollBackSegment RollBackSegment
func (*IFaceRollBackSegment) WaitForUnlock ¶
func (iFace *IFaceRollBackSegment) WaitForUnlock()
type InfrastructureActions ¶
type InfrastructureActions interface { CheckInfra(recoverHelpersFunc func() []CommandHelper) bool CreateInfra(recoverHelpersFunc func() []CommandHelper) (Response, error) AlterInfra(recoverHelpersFunc func() []CommandHelper) (Response, error) DeleteInfra(recoverHelpersFunc func() []CommandHelper) (Response, error) StartInfra(recoverHelpersFunc func() []CommandHelper) (Response, error) StopInfra(recoverHelpersFunc func() []CommandHelper) (Response, error) RestartInfra(recoverHelpersFunc func() []CommandHelper) (Response, error) ListInfras(recoverHelpersFunc func() []CommandHelper) (Response, error) StatusInfra(recoverHelpersFunc func() []CommandHelper) (Response, error) BackupInfra(recoverHelpersFunc func() []CommandHelper) (Response, error) RecoverInfra(recoverHelpersFunc func() []CommandHelper) (Response, error) }
type InfrastructureLogsInfo ¶
type InfrastructureLogsInfo struct { Format string Logs model.LogStorage }
func (*InfrastructureLogsInfo) Delete ¶
func (info *InfrastructureLogsInfo) Delete() error
func (*InfrastructureLogsInfo) DeleteLogFile ¶
func (info *InfrastructureLogsInfo) DeleteLogFile() error
func (*InfrastructureLogsInfo) Exists ¶
func (info *InfrastructureLogsInfo) Exists() bool
func (*InfrastructureLogsInfo) Export ¶
func (info *InfrastructureLogsInfo) Export(prettify bool) ([]byte, error)
func (*InfrastructureLogsInfo) Import ¶
func (info *InfrastructureLogsInfo) Import(file string, format string) error
func (*InfrastructureLogsInfo) Read ¶
func (info *InfrastructureLogsInfo) Read() error
func (*InfrastructureLogsInfo) ReadLogFiles ¶
func (info *InfrastructureLogsInfo) ReadLogFiles() error
func (*InfrastructureLogsInfo) SaveLogFile ¶
func (info *InfrastructureLogsInfo) SaveLogFile() error
func (*InfrastructureLogsInfo) Write ¶
func (info *InfrastructureLogsInfo) Write() error
type NetworkReference ¶
type ProjectActionIndex ¶
type ProjectActionIndex struct { Id string `json:"Id" xml:"Id" mandatory:"yes" descr:"Action Index Unique Identifier" type:"text"` ProjectId string `json:"ProjectId" xml:"ProjectId" mandatory:"yes" descr:"Project Unique Identifier" type:"text"` Actions []ActionDescriptor `json:"Actions" xml:"Actions" mandatory:"yes" descr:"Project Actions, indexed in VMKube" type:"object ActionDescriptor list"` }
Describe Project Action Index, contains
Id (string) Indexes Unique Identifier
Actions ([]ActionDescriptor) Projects ActionDescriptor in VMKube Project
func LoadProjectActionChanges ¶
func LoadProjectActionChanges(projectId string) (ProjectActionIndex, error)
func LoadProjectActionIndex ¶
func LoadProjectActionIndex(projectId string) (ProjectActionIndex, error)
func (*ProjectActionIndex) Import ¶
func (element *ProjectActionIndex) Import(file string, format string) error
func (*ProjectActionIndex) Load ¶
func (element *ProjectActionIndex) Load(file string) error
func (*ProjectActionIndex) PostImport ¶
func (element *ProjectActionIndex) PostImport() error
func (*ProjectActionIndex) Save ¶
func (element *ProjectActionIndex) Save(file string) error
func (*ProjectActionIndex) Validate ¶
func (element *ProjectActionIndex) Validate() []error
type ProjectActionIndexInfo ¶
type ProjectActionIndexInfo struct { Format string Index ProjectActionIndex }
func (*ProjectActionIndexInfo) Delete ¶
func (info *ProjectActionIndexInfo) Delete() error
func (*ProjectActionIndexInfo) Export ¶
func (info *ProjectActionIndexInfo) Export(prettify bool) ([]byte, error)
func (*ProjectActionIndexInfo) Import ¶
func (info *ProjectActionIndexInfo) Import(file string, format string) error
func (*ProjectActionIndexInfo) Read ¶
func (info *ProjectActionIndexInfo) Read() error
func (*ProjectActionIndexInfo) Write ¶
func (info *ProjectActionIndexInfo) Write() error
type ProjectActions ¶
type ProjectActions interface { CheckProject(recoverHelpersFunc func() []CommandHelper) bool CreateProject(recoverHelpersFunc func() []CommandHelper) (Response, error) AlterProject(recoverHelpersFunc func() []CommandHelper) (Response, error) InfoProject(recoverHelpersFunc func() []CommandHelper) (Response, error) DeleteProject(recoverHelpersFunc func() []CommandHelper) (Response, error) ListProjects(recoverHelpersFunc func() []CommandHelper) (Response, error) StatusProject(recoverHelpersFunc func() []CommandHelper) (Response, error) BuildProject(recoverHelpersFunc func() []CommandHelper) (Response, error) ImportProject(recoverHelpersFunc func() []CommandHelper) (Response, error) ExportProject(recoverHelpersFunc func() []CommandHelper) (Response, error) }
type ProjectRollbackIndexInfo ¶
type ProjectRollbackIndexInfo struct { Format string Index RollBackIndex }
func (*ProjectRollbackIndexInfo) Delete ¶
func (info *ProjectRollbackIndexInfo) Delete() error
func (*ProjectRollbackIndexInfo) Export ¶
func (info *ProjectRollbackIndexInfo) Export(prettify bool) ([]byte, error)
func (*ProjectRollbackIndexInfo) Import ¶
func (info *ProjectRollbackIndexInfo) Import(file string, format string) error
func (*ProjectRollbackIndexInfo) Read ¶
func (info *ProjectRollbackIndexInfo) Read() error
func (*ProjectRollbackIndexInfo) Write ¶
func (info *ProjectRollbackIndexInfo) Write() error
type ProjectRollbackSegmentInfo ¶
type ProjectRollbackSegmentInfo struct { Format string Index RollBackSegment }
func (*ProjectRollbackSegmentInfo) Delete ¶
func (info *ProjectRollbackSegmentInfo) Delete() error
func (*ProjectRollbackSegmentInfo) Export ¶
func (info *ProjectRollbackSegmentInfo) Export(prettify bool) ([]byte, error)
func (*ProjectRollbackSegmentInfo) Import ¶
func (info *ProjectRollbackSegmentInfo) Import(file string, format string) error
func (*ProjectRollbackSegmentInfo) Read ¶
func (info *ProjectRollbackSegmentInfo) Read() error
func (*ProjectRollbackSegmentInfo) Write ¶
func (info *ProjectRollbackSegmentInfo) Write() error
type RollBackIndex ¶
type RollBackIndex struct { Id string `json:"Id" xml:"Id" mandatory:"yes" descr:"Action Index Unique Identifier" type:"text"` ProjectId string `json:"ProjectId" xml:"ProjectId" mandatory:"yes" descr:"Project Unique Identifier" type:"text"` IndexList []RollBackSegmentIndex `json:"IndexList" xml:"IndexList" mandatory:"yes" descr:"Rollback Segments Index list" type:"object RollBackSegmentIndex list"` }
Describe Projects Index, contains
Id (string) Indexes Unique Identifier
Projects ([]ProjectsDescriptor) Projects indexed in VMKube
func LoadProjectRollBackIndex ¶
func LoadProjectRollBackIndex(projectId string) (RollBackIndex, error)
func LoadRollbackIndex ¶
func LoadRollbackIndex(projectId string) (RollBackIndex, error)
func (*RollBackIndex) Import ¶
func (element *RollBackIndex) Import(file string, format string) error
func (*RollBackIndex) Load ¶
func (element *RollBackIndex) Load(file string) error
func (*RollBackIndex) PostImport ¶
func (element *RollBackIndex) PostImport() error
func (*RollBackIndex) Save ¶
func (element *RollBackIndex) Save(file string) error
func (*RollBackIndex) Validate ¶
func (element *RollBackIndex) Validate() []error
type RollBackSegment ¶
type RollBackSegment struct { Id string `json:"Id" xml:"Id" mandatory:"yes" descr:"Action Index Unique Identifier" type:"text"` ProjectId string `json:"ProjectId" xml:"ProjectId" mandatory:"yes" descr:"Project Unique Identifier" type:"text"` Storage []ActionStorage `json:"Storage" xml:"Storage" mandatory:"yes" descr:"Project Storage list" type:"object ActionStorage list"` Index RollBackSegmentIndex `json:"Index" xml:"Index" mandatory:"yes" descr:"Rollback Segment Index" type:"object RollBackSegmentIndex list"` Size int `` /* 135-byte string literal not displayed */ }
Describe RollBack Segment, contains
Id (string) Indexes Unique Identifier
Projects ([]ActionStorage) Projects indexed in VMKube
func LoadProjectRollBackSegment ¶
func LoadProjectRollBackSegment(projectId string, index RollBackSegmentIndex) (RollBackSegment, error)
func LoadRollbackSegment ¶
func LoadRollbackSegment(projectId string, rollbackIndex RollBackSegmentIndex) (RollBackSegment, error)
func (*RollBackSegment) Import ¶
func (element *RollBackSegment) Import(file string, format string) error
func (*RollBackSegment) Load ¶
func (element *RollBackSegment) Load(file string) error
func (*RollBackSegment) PostImport ¶
func (element *RollBackSegment) PostImport() error
func (*RollBackSegment) Save ¶
func (element *RollBackSegment) Save(file string) error
func (*RollBackSegment) Validate ¶
func (element *RollBackSegment) Validate() []error
type RollBackSegmentIndex ¶
type RollBackSegmentIndex struct { Id string `json:"Id" xml:"Id" mandatory:"yes" descr:"Action Index Unique Identifier" type:"text"` Index utils.Index `json:"Index" xml:"Index" mandatory:"yes" descr:"Project Rollback Segment Index" type:"string"` }
Describe Projects Index, contains
Id (string) Indexes Unique Identifier
Index (utils.Index) Projects indexed in VMKube
func (*RollBackSegmentIndex) Before ¶
func (element *RollBackSegmentIndex) Before(segmentIndex RollBackSegmentIndex) bool
func (*RollBackSegmentIndex) New ¶
func (element *RollBackSegmentIndex) New()
func (*RollBackSegmentIndex) NewNextFrom ¶
func (element *RollBackSegmentIndex) NewNextFrom(previousIndex utils.Index)
func (*RollBackSegmentIndex) NewPreviousFrom ¶
func (element *RollBackSegmentIndex) NewPreviousFrom(nextIndex utils.Index)
type SegmentIndexNature ¶
type SegmentIndexNature interface { New() NewNextFrom(previousIndex utils.Index) NewPreviousFrom(nextIndex utils.Index) Before(segmentIndex RollBackSegmentIndex) }