UNPKG

@hashgraph/solo

Version:

An opinionated CLI tool to deploy and manage private Hedera Networks.

107 lines (106 loc) 5.67 kB
/** * SPDX-License-Identifier: Apache-2.0 */ import { type RemoteConfigManager } from '../../core/config/remote/remote_config_manager.js'; import { ConsensusNodeStates } from '../../core/config/remote/enumerations.js'; import { type Lease } from '../../core/lease/lease.js'; import { type BaseCommand, type CommandHandlers } from '../base.js'; import { type ListrTask } from 'listr2'; import { type CommandFlag } from '../../types/flag_types.js'; import { type ConsensusNode } from '../../core/model/consensus_node.js'; export declare class NodeCommandHandlers implements CommandHandlers { private readonly accountManager; private readonly configManager; private readonly platformInstaller; private readonly logger; private readonly k8Factory; private readonly tasks; private readonly leaseManager; readonly remoteConfigManager: RemoteConfigManager; contexts: string[]; consensusNodes: ConsensusNode[]; getConfig: (configName: string, flags: CommandFlag[], extraProperties?: string[]) => object; private prepareChartPath; readonly parent: BaseCommand; constructor(opts: any); static readonly ADD_CONTEXT_FILE = "node-add.json"; static readonly DELETE_CONTEXT_FILE = "node-delete.json"; static readonly UPDATE_CONTEXT_FILE = "node-update.json"; static readonly UPGRADE_CONTEXT_FILE = "node-upgrade.json"; private init; /** ******** Task Lists **********/ deletePrepareTaskList(argv: any, lease: Lease): (ListrTask<any, any, any> | import("../../core/task.js").Task)[]; deleteSubmitTransactionsTaskList(argv: any): import("../../core/task.js").Task[]; deleteExecuteTaskList(argv: any): import("../../core/task.js").Task[]; addPrepareTasks(argv: any, lease: Lease): import("../../core/task.js").Task[]; addSubmitTransactionsTasks(argv: any): import("../../core/task.js").Task[]; addExecuteTasks(argv: any): import("../../core/task.js").Task[]; updatePrepareTasks(argv: any, lease: Lease): (ListrTask<any, any, any> | import("../../core/task.js").Task)[]; updateSubmitTransactionsTasks(argv: any): import("../../core/task.js").Task[]; updateExecuteTasks(argv: any): import("../../core/task.js").Task[]; upgradePrepareTasks(argv: any, lease: Lease): (ListrTask<any, any, any> | import("../../core/task.js").Task)[]; upgradeSubmitTransactionsTasks(argv: any): import("../../core/task.js").Task[]; upgradeExecuteTasks(argv: any): import("../../core/task.js").Task[]; /** ******** Handlers **********/ prepareUpgrade(argv: any): Promise<boolean>; freezeUpgrade(argv: any): Promise<boolean>; downloadGeneratedFiles(argv: any): Promise<boolean>; update(argv: any): Promise<boolean>; updatePrepare(argv: any): Promise<boolean>; updateSubmitTransactions(argv: any): Promise<boolean>; updateExecute(argv: any): Promise<boolean>; upgradePrepare(argv: any): Promise<boolean>; upgradeSubmitTransactions(argv: any): Promise<boolean>; upgradeExecute(argv: any): Promise<boolean>; upgrade(argv: any): Promise<boolean>; delete(argv: any): Promise<boolean>; deletePrepare(argv: any): Promise<boolean>; deleteSubmitTransactions(argv: any): Promise<boolean>; deleteExecute(argv: any): Promise<boolean>; add(argv: any): Promise<boolean>; addPrepare(argv: any): Promise<boolean>; addSubmitTransactions(argv: any): Promise<boolean>; addExecute(argv: any): Promise<boolean>; logs(argv: any): Promise<boolean>; states(argv: any): Promise<boolean>; refresh(argv: any): Promise<boolean>; keys(argv: any): Promise<boolean>; stop(argv: any): Promise<boolean>; start(argv: any): Promise<boolean>; setup(argv: any): Promise<boolean>; /** Removes the consensus node, envoy and haproxy components from remote config. */ removeNodeAndProxies(): ListrTask<any, any, any>; /** * Changes the state from all consensus nodes components in remote config. * * @param state - to which to change the consensus node component */ changeAllNodeStates(state: ConsensusNodeStates): ListrTask<any, any, any>; /** * Creates tasks to validate that each node state is either one of the accepted states or not one of the excluded. * * @param acceptedStates - the state at which the nodes can be, not matching any of the states throws an error * @param excludedStates - the state at which the nodes can't be, matching any of the states throws an error */ validateAllNodeStates({ acceptedStates, excludedStates, }: { acceptedStates?: ConsensusNodeStates[]; excludedStates?: ConsensusNodeStates[]; }): ListrTask<any, any, any>; /** * Creates tasks to validate that specific node state is either one of the accepted states or not one of the excluded. * * @param acceptedStates - the state at which the node can be, not matching any of the states throws an error * @param excludedStates - the state at which the node can't be, matching any of the states throws an error */ validateSingleNodeState({ acceptedStates, excludedStates, }: { acceptedStates?: ConsensusNodeStates[]; excludedStates?: ConsensusNodeStates[]; }): ListrTask<any, any, any>; /** * @param nodeAlias - the alias of the node whose state to validate * @param components - the component data wrapper * @param acceptedStates - the state at which the node can be, not matching any of the states throws an error * @param excludedStates - the state at which the node can't be, matching any of the states throws an error */ private validateNodeState; }