Documentation ¶
Index ¶
- Constants
- Variables
- func ActiveFunctions(appliances []openapi.Appliance) map[string]bool
- func AppendUniqueAppliance(appliances []openapi.Appliance, appliance openapi.Appliance) []openapi.Appliance
- func AppendUniqueApplianceStats(stats []openapi.StatsAppliancesListAllOfData, ...) []openapi.StatsAppliancesListAllOfData
- func ApplianceStats(a *openapi.Appliance, stats *openapi.StatsAppliancesList) (*openapi.StatsAppliancesListAllOfData, error)
- func AutoscalingGateways(appliances []openapi.Appliance) (*openapi.Appliance, []openapi.Appliance)
- func BackupPrompt(appliances []openapi.Appliance, preSelected []openapi.Appliance) ([]openapi.Appliance, error)
- func CheckApplianceVersionsDisallowed(currentVersion, targetVersion *version.Version) error
- func CheckNeedsMultiControllerUpgrade(stats *openapi.StatsAppliancesList, ...) ([]openapi.Appliance, error)
- func CleanupBackup(opts *BackupOpts, IDs map[string]string) error
- func CompareVersionsAndBuildNumber(x, y *version.Version) (int, error)
- func DownloadDockerBundles(ctx context.Context, p *tui.Progress, client *http.Client, path string, ...) (*os.File, error)
- func FilterActivated(appliances []openapi.Appliance) (active []openapi.Appliance, inactive []openapi.Appliance)
- func FilterApplianceStats(stats []openapi.StatsAppliancesListAllOfData, ...) ([]openapi.StatsAppliancesListAllOfData, []openapi.StatsAppliancesListAllOfData, ...)
- func FilterAppliances(appliances []openapi.Appliance, filter map[string]map[string]string, ...) ([]openapi.Appliance, []openapi.Appliance, error)
- func FilterAvailable(appliances []openapi.Appliance, stats []openapi.StatsAppliancesListAllOfData) ([]openapi.Appliance, []openapi.Appliance, error)
- func FindCurrentController(appliances []openapi.Appliance, hostname string) (*openapi.Appliance, error)
- func FindPrimaryController(appliances []openapi.Appliance, hostname string, validate bool) (*openapi.Appliance, error)
- func GenerateApplianceWithStats(activeFunctions []string, ...) (openapi.Appliance, openapi.StatsAppliancesListAllOfData, ...)
- func GetActiveFunctions(appliance openapi.Appliance) []string
- func GetApplianceVersion(appliance openapi.Appliance, stats openapi.StatsAppliancesList) (*version.Version, error)
- func GroupByFunctions(appliances []openapi.Appliance) map[string][]openapi.Appliance
- func HasDiffVersions(stats []openapi.StatsAppliancesListAllOfData) (bool, map[string]string)
- func HasLowDiskSpace(stats []openapi.StatsAppliancesListAllOfData) []openapi.StatsAppliancesListAllOfData
- func IsMajorUpgrade(current, next *version.Version) bool
- func IsMinorUpgrade(current, next *version.Version) bool
- func IsOnAppliance() bool
- func IsPatchUpgrade(current, next *version.Version) bool
- func NeedsMultiControllerUpgrade(upgradeStatuses map[string]UpgradeStatusResult, ...) (bool, error)
- func ParseVersionFromZip(filename string) (*version.Version, error)
- func ParseVersionString(input string) (*version.Version, error)
- func PerformBackup(cmd *cobra.Command, args []string, opts *BackupOpts) (map[string]string, error)
- func PrepareBackup(opts *BackupOpts) error
- func PrettyBytes(v float64) string
- func PrintDiskSpaceWarningMessage(out io.Writer, stats []openapi.StatsAppliancesListAllOfData, apiVersion int)
- func PromptSelect(ctx context.Context, a *Appliance, filter map[string]map[string]string, ...) (string, error)
- func PromptSelectAll(ctx context.Context, a *Appliance, filter map[string]map[string]string, ...) (string, error)
- func ShowAutoscalingWarningMessage(templateAppliance *openapi.Appliance, gateways []openapi.Appliance) (string, error)
- func StatsActiveFunctions(s openapi.StatsAppliancesListAllOfData) string
- func StatsIsOnline(s openapi.StatsAppliancesListAllOfData) bool
- func ValidateHostname(controller openapi.Appliance, hostname string) error
- type Appliance
- func (a *Appliance) ApplianceSwitchPartition(ctx context.Context, id string) error
- func (a *Appliance) DeleteFile(ctx context.Context, filename string) error
- func (a *Appliance) DeprecatedStats(ctx context.Context, filter map[string]map[string]string, orderBy []string, ...) (*openapi.StatsAppliancesList, *http.Response, error)
- func (a *Appliance) DisableController(ctx context.Context, id string, appliance openapi.Appliance) error
- func (a *Appliance) DisableMaintenanceMode(ctx context.Context, id string) (string, error)
- func (a *Appliance) EnableController(ctx context.Context, id string, appliance openapi.Appliance) error
- func (a *Appliance) EnableMaintenanceMode(ctx context.Context, id string) (string, error)
- func (a *Appliance) FileStatus(ctx context.Context, filename string) (*openapi.File, error)
- func (a *Appliance) ForceDisableControllers(ctx context.Context, disable []openapi.Appliance) (*openapi.AppliancesForceDisableControllersPost200Response, string, error)
- func (a *Appliance) Get(ctx context.Context, applianceID string) (*openapi.Appliance, error)
- func (a *Appliance) List(ctx context.Context, filter map[string]map[string]string, orderBy []string, ...) ([]openapi.Appliance, error)
- func (a *Appliance) ListFiles(ctx context.Context, orderBy []string, descending bool) ([]openapi.File, error)
- func (a *Appliance) PrepareFileOn(ctx context.Context, filename, id string, devKeyring bool) (string, error)
- func (a *Appliance) RepartitionIPAllocations(ctx context.Context) (string, error)
- func (a *Appliance) UpdateAppliance(ctx context.Context, id string, appliance openapi.Appliance) error
- func (a *Appliance) UpdateMaintenanceMode(ctx context.Context, id string, value bool) (string, error)
- func (a *Appliance) UpgradeCancel(ctx context.Context, applianceID string) error
- func (a *Appliance) UpgradeComplete(ctx context.Context, id string, SwitchPartition bool) error
- func (a *Appliance) UpgradeStatus(ctx context.Context, applianceID string) (*openapi.AppliancesIdUpgradeDelete200Response, error)
- func (a *Appliance) UpgradeStatusMap(ctx context.Context, appliances []openapi.Appliance) (map[string]UpgradeStatusResult, error)
- func (a *Appliance) UpgradeStatusRetry(ctx context.Context, applianceID string) (*openapi.AppliancesIdUpgradeDelete200Response, error)
- func (a *Appliance) UpgradeSwitchPartition(ctx context.Context, id string) error
- func (a *Appliance) UploadFile(ctx context.Context, r io.Reader, headers map[string]string) error
- func (a *Appliance) UploadToController(ctx context.Context, url, filename string) error
- func (a *Appliance) ZTPStatus(ctx context.Context) (*openapi.ZtpStatus, error)
- func (a *Appliance) ZTPUpdateNotify(ctx context.Context) (*openapi.ZtpVersionStatus, error)
- type ApplianceStatus
- type BackupOpts
- type CalledAs
- type CollectiveTestStruct
- func (cts *CollectiveTestStruct) GenerateStubs(appliances []openapi.Appliance, ...) []httpmock.Stub
- func (cts *CollectiveTestStruct) GetAppliance(name string) *openapi.Appliance
- func (cts *CollectiveTestStruct) GetAppliances() []openapi.Appliance
- func (cts *CollectiveTestStruct) GetUpgradeStatusMap() map[string]UpgradeStatusResult
- type DockerManifest
- type ImageJSON
- type IsPrimaryUpgrade
- type ManifestConfig
- type SkipUpgrade
- type UpgradePlan
- func (up *UpgradePlan) AddBackups(applianceIds []string) error
- func (up *UpgradePlan) AddInactiveAppliances(appliances []openapi.Appliance)
- func (up *UpgradePlan) AddOfflineAppliances(appliances []openapi.Appliance)
- func (up *UpgradePlan) GetPrimaryController() *openapi.Appliance
- func (up *UpgradePlan) HasDiffVersions(newStats []openapi.StatsAppliancesListAllOfData) (bool, map[string]string)
- func (up *UpgradePlan) NothingToUpgrade() bool
- func (up *UpgradePlan) PrintPostCompleteSummary(out io.Writer, stats []openapi.StatsAppliancesListAllOfData) error
- func (up *UpgradePlan) PrintPreCompleteSummary(out io.Writer) error
- func (up *UpgradePlan) Validate() error
- type UpgradeStatus
- type UpgradeStatusResult
- type WaitForApplianceStatus
- type WaitForUpgradeStatus
Constants ¶
const ( //lint:file-ignore U1000 All available upgrade statuses UpgradeStatusIdle = "idle" UpgradeStatusStarted = "started" UpgradeStatusDownloading = "downloading" UpgradeStatusVerifying = "verifying" UpgradeStatusReady = "ready" UpgradeStatusInstalling = "installing" UpgradeStatusSuccess = "success" UpgradeStatusFailed = "failed" FileReady = "Ready" FileFailed = "Failed" )
const ( IsLower = -1 IsEqual = 0 IsGreater = 1 )
const ( MajorVersion = uint8(4) MinorVersion = uint8(2) PatchVersion = uint8(1) )
const ( FunctionController = "Controller" FunctionGateway = "Gateway" FunctionPortal = "Portal" FunctionConnector = "Connector" FunctionLogServer = "LogServer" FunctionLogForwarder = "LogForwarder" FilterDelimiter = "&" )
const ( TestAppliancePrimary = "primary" TestApplianceUnpreparedPrimary = "primary-unprepared" TestApplianceSecondary = "secondary" TestApplianceController3 = "controller3" TestApplianceControllerOffline = "controller4" TestApplianceControllerNotPrepared = "controller5" TestApplianceController2NotPrepared = "controller7" TestApplianceControllerMismatch = "controller6" TestApplianceControllerGatewayPrimary = "controller-gateway-primary" TestApplianceGatewayA1 = "gatewayA1" TestApplianceGatewayA2 = "gatewayA2" TestApplianceGatewayA3 = "gatewayA3" TestApplianceGatewayB1 = "gatewayB1" TestApplianceGatewayB2 = "gatewayB2" TestApplianceGatewayB3 = "gatewayB3" TestApplianceGatewayC1 = "gatewayC1" TestApplianceGatewayC2 = "gatewayC2" TestApplianceLogForwarderA1 = "logforwarderA1" TestApplianceLogForwarderA2 = "logforwarderA2" TestApplianceLogForwarderB1 = "logforwarderB1" TestApplianceLogForwarderB2 = "logforwarderB2" TestApplianceLogForwarderC1 = "logforwarderC1" TestApplianceLogForwarderC2 = "logforwarderC2" TestAppliancePortalA1 = "portalA1" TestApplianceConnectorA1 = "connectorA1" TestApplianceLogServer = "logserver" TestApplianceControllerGatewayA1 = "controller-gatewayA1" TestApplianceControllerGatewayB1 = "controller-gatewayB1" TestSiteA = "SiteA" TestSiteB = "SiteB" TestSiteC = "SiteC" )
const ( PrimaryUpgrade IsPrimaryUpgrade = "IsPrimaryUpgrade" Caller CalledAs = "calledAs" )
Variables ¶
var ( ErrNeedsAllControllerUpgrade = errors.New("all controllers need to be prepared when doing a major or minor version upgrade.") ErrControllerVersionMismatch = errors.New("all controllers need to be prepared with the same version when doing a major or minor version upgrade.") )
var ( PreSetApplianceNames = []string{TestAppliancePrimary, TestApplianceSecondary, TestApplianceController3, TestApplianceControllerOffline, TestApplianceControllerNotPrepared, TestApplianceController2NotPrepared, TestApplianceControllerMismatch, TestApplianceGatewayA1, TestApplianceGatewayA2, TestApplianceGatewayA3, TestApplianceGatewayB1, TestApplianceGatewayB2, TestApplianceGatewayB3, TestApplianceGatewayC1, TestApplianceGatewayC2, TestApplianceLogForwarderA1, TestApplianceLogForwarderA2, TestAppliancePortalA1, TestApplianceConnectorA1, TestApplianceLogServer, TestApplianceControllerGatewayA1, TestApplianceControllerGatewayB1, TestApplianceControllerGatewayPrimary} InitialTestStats *openapi.StatsAppliancesList = openapi.NewStatsAppliancesListWithDefaults() UpgradedTestStats *openapi.StatsAppliancesList = openapi.NewStatsAppliancesListWithDefaults() )
var ( ErrSkipReasonNotPrepared = errors.New("appliance is not prepared for upgrade") ErrSkipReasonOffline = errors.New("appliance is offline") ErrSkipReasonInactive = errors.New("appliance is inactive") ErrSkipReasonFiltered = errors.New("filtered using the '--include' and/or '--exclude' flag") ErrSkipReasonAlreadyPrepared = errors.New("appliance is already prepared for upgrade with a higher or equal version") ErrSkipReasonUnsupportedUpgradePath = errors.New("unsupported upgrade path") ErrSkipReasonAlreadySameVersion = errors.New("appliance is already running a version higher or equal to the prepare version") ErrNoApplianceStats = errors.New("failed to find appliance stats") ErrVersionParse = errors.New("failed to parse current appliance version") ErrNothingToUpgrade = errors.New("No appliances are ready to upgrade. Please run 'upgrade prepare' before trying to complete an upgrade") )
var (
DefaultBackupDestination = filesystem.BackupDir()
)
var DefaultCommandFilter = map[string]map[string]string{
"include": {},
"exclude": {},
}
var ( DefaultResponder = func(callback func(rw http.ResponseWriter, req *http.Request, count int)) http.HandlerFunc { count := 0 return func(w http.ResponseWriter, r *http.Request) { callback(w, r, count) } } )
var StatReady = []string{
statControllerReady,
statSingleControllerReady,
statMultiControllerReady,
statApplianceReady,
}
var StatusNotBusy = []string{
statusHealthy,
statusWarning,
statusError,
statusNotAvailable,
statusOffline,
}
Functions ¶
func ActiveFunctions ¶
ActiveFunctions returns a map of all active functions in the appliances.
func AppendUniqueAppliance ¶
func AppendUniqueApplianceStats ¶
func AppendUniqueApplianceStats(stats []openapi.StatsAppliancesListAllOfData, stat openapi.StatsAppliancesListAllOfData) []openapi.StatsAppliancesListAllOfData
func ApplianceStats ¶
func ApplianceStats(a *openapi.Appliance, stats *openapi.StatsAppliancesList) (*openapi.StatsAppliancesListAllOfData, error)
func AutoscalingGateways ¶
AutoscalingGateways return the template appliance and all gateways
func BackupPrompt ¶
func CheckApplianceVersionsDisallowed ¶
func CheckApplianceVersionsDisallowed(currentVersion, targetVersion *version.Version) error
func CheckNeedsMultiControllerUpgrade ¶
func CheckNeedsMultiControllerUpgrade(stats *openapi.StatsAppliancesList, upgradeStatusMap map[string]UpgradeStatusResult, appliances []openapi.Appliance) ([]openapi.Appliance, error)
func CleanupBackup ¶
func CleanupBackup(opts *BackupOpts, IDs map[string]string) error
func CompareVersionsAndBuildNumber ¶
CompareVersionsAndBuildNumber compares two versions and returns the result with an integer representation -1 if y is lower than x 0 if versions match 1 if y is greater than x
func DownloadDockerBundles ¶
func FilterActivated ¶
func FilterApplianceStats ¶
func FilterApplianceStats(stats []openapi.StatsAppliancesListAllOfData, filter map[string]map[string]string, orderBy []string, descending bool) ([]openapi.StatsAppliancesListAllOfData, []openapi.StatsAppliancesListAllOfData, error)
func FilterAppliances ¶
func FilterAvailable ¶
func FilterAvailable(appliances []openapi.Appliance, stats []openapi.StatsAppliancesListAllOfData) ([]openapi.Appliance, []openapi.Appliance, error)
FilterAvailable return lists of online, offline, errors that will be used during upgrade
func FindCurrentController ¶
func FindPrimaryController ¶
func FindPrimaryController(appliances []openapi.Appliance, hostname string, validate bool) (*openapi.Appliance, error)
FindPrimaryController The given hostname should match one of the Controller's actual admin hostname. Hostnames should be compared in a case insensitive way.
func GenerateApplianceWithStats ¶
func GenerateApplianceWithStats(activeFunctions []string, name, hostname, currentVersion, targetVersion, status, upgradeStatus string, online bool, site, siteName string) (openapi.Appliance, openapi.StatsAppliancesListAllOfData, openapi.StatsAppliancesListAllOfData)
func GetActiveFunctions ¶
func GetApplianceVersion ¶
func GetApplianceVersion(appliance openapi.Appliance, stats openapi.StatsAppliancesList) (*version.Version, error)
func GroupByFunctions ¶
GroupByFunctions group appliances by function
func HasDiffVersions ¶
func HasDiffVersions(stats []openapi.StatsAppliancesListAllOfData) (bool, map[string]string)
func HasLowDiskSpace ¶
func HasLowDiskSpace(stats []openapi.StatsAppliancesListAllOfData) []openapi.StatsAppliancesListAllOfData
func IsMajorUpgrade ¶
func IsMajorUpgrade(current, next *version.Version) bool
func IsMinorUpgrade ¶
func IsMinorUpgrade(current, next *version.Version) bool
func IsOnAppliance ¶
func IsOnAppliance() bool
func IsPatchUpgrade ¶
func IsPatchUpgrade(current, next *version.Version) bool
func NeedsMultiControllerUpgrade ¶
func NeedsMultiControllerUpgrade(upgradeStatuses map[string]UpgradeStatusResult, initialStatData []openapi.StatsAppliancesListAllOfData, all, preparing []openapi.Appliance, majorOrMinor bool) (bool, error)
func ParseVersionFromZip ¶
func ParseVersionString ¶
ParseVersionString tries to determine appliance version based on the input filename, It assumes the file is has the standard naming convention of appgate-5.4.4-26245-release.img.zip where 5.4.4 is the semver of the appliance.
func PerformBackup ¶
func PrepareBackup ¶
func PrepareBackup(opts *BackupOpts) error
func PrettyBytes ¶
func PrintDiskSpaceWarningMessage ¶
func PrintDiskSpaceWarningMessage(out io.Writer, stats []openapi.StatsAppliancesListAllOfData, apiVersion int)
func PromptSelect ¶
func PromptSelect(ctx context.Context, a *Appliance, filter map[string]map[string]string, orderBy []string, descending bool) (string, error)
PromptSelect from online appliances
func PromptSelectAll ¶
func PromptSelectAll(ctx context.Context, a *Appliance, filter map[string]map[string]string, orderBy []string, descending bool) (string, error)
PromptSelectAll from all appliances, offline and online
func StatsActiveFunctions ¶
func StatsActiveFunctions(s openapi.StatsAppliancesListAllOfData) string
func StatsIsOnline ¶
func StatsIsOnline(s openapi.StatsAppliancesListAllOfData) bool
StatsIsOnline will return true if the Controller reports the appliance to be online in a valid status
Types ¶
type Appliance ¶
type Appliance struct { APIClient *openapi.APIClient HTTPClient *http.Client Token string UpgradeStatusWorker WaitForUpgradeStatus ApplianceStats WaitForApplianceStatus }
Appliance is a wrapper around the APIClient for common functions around the appliance API that will be used within several commands.
func (*Appliance) ApplianceSwitchPartition ¶
func (*Appliance) DeleteFile ¶
DeleteFile Delete a File from the current Controller.
func (*Appliance) DeprecatedStats ¶
func (*Appliance) DisableController ¶
func (*Appliance) DisableMaintenanceMode ¶
func (*Appliance) EnableController ¶
func (*Appliance) EnableMaintenanceMode ¶
func (*Appliance) FileStatus ¶
FileStatus Get the status of a File uploaded to the current Controller.
func (*Appliance) ForceDisableControllers ¶
func (*Appliance) List ¶
func (a *Appliance) List(ctx context.Context, filter map[string]map[string]string, orderBy []string, descending bool) ([]openapi.Appliance, error)
List from the Collective Filter is applied in app after getting all the appliances because the auto generated API screws up the 'filterBy' command
func (*Appliance) PrepareFileOn ¶
func (*Appliance) RepartitionIPAllocations ¶
func (*Appliance) UpdateAppliance ¶
func (*Appliance) UpdateMaintenanceMode ¶
func (*Appliance) UpgradeCancel ¶
func (*Appliance) UpgradeComplete ¶
func (*Appliance) UpgradeStatus ¶
func (*Appliance) UpgradeStatusMap ¶
func (a *Appliance) UpgradeStatusMap(ctx context.Context, appliances []openapi.Appliance) (map[string]UpgradeStatusResult, error)
UpgradeStatusMap return a map with appliance.id, UpgradeStatusResult
func (*Appliance) UpgradeStatusRetry ¶
func (*Appliance) UpgradeSwitchPartition ¶
func (*Appliance) UploadFile ¶
UploadFile directly to the current Controller. Note that the File is stored only on the current Controller, not synced between Controllers.
func (*Appliance) UploadToController ¶
func (*Appliance) ZTPUpdateNotify ¶
type ApplianceStatus ¶
type ApplianceStatus struct {
Appliance *Appliance
}
func (*ApplianceStatus) WaitForApplianceState ¶
type BackupOpts ¶
type BackupOpts struct { Config *configuration.Config Appliance func(*configuration.Config) (*Appliance, error) Out io.Writer SpinnerOut func() io.Writer Destination string With []string AllFlag bool PrimaryFlag bool CurrentFlag bool NoInteractive bool FilterFlag map[string]map[string]string OrderBy []string Descending bool Quiet bool CiMode bool }
type CollectiveTestStruct ¶
type CollectiveTestStruct struct { Appliances map[string]openapi.Appliance Stats *openapi.StatsAppliancesList UpgradedStats *openapi.StatsAppliancesList }
func GenerateCollective ¶
func GenerateCollective(t *testing.T, hostname, from, to string, appliances []string) *CollectiveTestStruct
func (*CollectiveTestStruct) GenerateStubs ¶
func (cts *CollectiveTestStruct) GenerateStubs(appliances []openapi.Appliance, stats, upgradedStats openapi.StatsAppliancesList) []httpmock.Stub
func (*CollectiveTestStruct) GetAppliance ¶
func (cts *CollectiveTestStruct) GetAppliance(name string) *openapi.Appliance
func (*CollectiveTestStruct) GetAppliances ¶
func (cts *CollectiveTestStruct) GetAppliances() []openapi.Appliance
func (*CollectiveTestStruct) GetUpgradeStatusMap ¶
func (cts *CollectiveTestStruct) GetUpgradeStatusMap() map[string]UpgradeStatusResult
type DockerManifest ¶
type DockerManifest struct { SchemaVersion int MediaType string Config ManifestConfig Layers []ManifestConfig }
type IsPrimaryUpgrade ¶
type IsPrimaryUpgrade string
type ManifestConfig ¶
type SkipUpgrade ¶
func CheckVersions ¶
func CheckVersions(ctx context.Context, stats openapi.StatsAppliancesList, appliances []openapi.Appliance, v *version.Version) ([]openapi.Appliance, []SkipUpgrade)
CheckVersions will check if appliance versions are equal to the version being uploaded on all appliances Returns a slice of appliances that are not equal, a slice of appliances that have the same version and an error
func (SkipUpgrade) Error ¶
func (su SkipUpgrade) Error() string
type UpgradePlan ¶
type UpgradePlan struct { PrimaryController *openapi.Appliance Controllers []openapi.Appliance LogForwardersAndServers []openapi.Appliance Batches [][]openapi.Appliance Skipping []SkipUpgrade BackupIds []string // contains filtered or unexported fields }
func NewUpgradePlan ¶
func NewUpgradePlan( appliances []openapi.Appliance, stats *openapi.StatsAppliancesList, upgradeStatusMap map[string]UpgradeStatusResult, adminHostname string, filter map[string]map[string]string, orderBy []string, descending bool, maxUnavailable int, ) (*UpgradePlan, error)
func (*UpgradePlan) AddBackups ¶
func (up *UpgradePlan) AddBackups(applianceIds []string) error
func (*UpgradePlan) AddInactiveAppliances ¶
func (up *UpgradePlan) AddInactiveAppliances(appliances []openapi.Appliance)
func (*UpgradePlan) AddOfflineAppliances ¶
func (up *UpgradePlan) AddOfflineAppliances(appliances []openapi.Appliance)
func (*UpgradePlan) GetPrimaryController ¶
func (up *UpgradePlan) GetPrimaryController() *openapi.Appliance
func (*UpgradePlan) HasDiffVersions ¶
func (up *UpgradePlan) HasDiffVersions(newStats []openapi.StatsAppliancesListAllOfData) (bool, map[string]string)
func (*UpgradePlan) NothingToUpgrade ¶
func (up *UpgradePlan) NothingToUpgrade() bool
func (*UpgradePlan) PrintPostCompleteSummary ¶
func (up *UpgradePlan) PrintPostCompleteSummary(out io.Writer, stats []openapi.StatsAppliancesListAllOfData) error
func (*UpgradePlan) PrintPreCompleteSummary ¶
func (up *UpgradePlan) PrintPreCompleteSummary(out io.Writer) error
func (*UpgradePlan) Validate ¶
func (up *UpgradePlan) Validate() error
type UpgradeStatus ¶
type UpgradeStatus struct {
Appliance *Appliance
}
type UpgradeStatusResult ¶
type UpgradeStatusResult struct {
Status, Details, Name string
}
type WaitForApplianceStatus ¶
type WaitForApplianceStatus interface { WaitForApplianceState(ctx context.Context, appliance openapi.Appliance, want []string, tracker *tui.Tracker) error // WaitForStatus tries appliance stats until the appliance has want status or it reaches the timeout WaitForApplianceStatus(ctx context.Context, appliance openapi.Appliance, want []string, tracker *tui.Tracker) error }
type WaitForUpgradeStatus ¶
type WaitForUpgradeStatus interface { // WaitForUpgradeStatus does exponential backoff retries on upgrade status until it reaches a desiredStatuses and reports it to current <- string WaitForUpgradeStatus(ctx context.Context, appliance openapi.Appliance, desiredStatuses []string, undesiredStatuses []string, tracker *tui.Tracker) error }