|
17 | 17 | * under the License. |
18 | 18 | */ |
19 | 19 |
|
| 20 | +export interface CommandRequest { |
| 21 | + clusterCommand?: ClusterCommandReq |
| 22 | + clusterId?: number |
| 23 | + command: Command |
| 24 | + commandLevel: CommandLevel |
| 25 | + componentCommands?: ComponentCommandReq[] |
| 26 | + customCommand?: string |
| 27 | + hostCommands?: HostCommandReq[] |
| 28 | + serviceCommands?: ServiceCommandReq[] |
| 29 | + [property: string]: any |
| 30 | +} |
| 31 | + |
| 32 | +export interface ClusterCommandReq { |
| 33 | + desc?: string |
| 34 | + displayName: string |
| 35 | + hosts: HostReq[] |
| 36 | + name: string |
| 37 | + rootDir?: string |
| 38 | + type: number |
| 39 | + userGroup?: string |
| 40 | + [property: string]: any |
| 41 | +} |
| 42 | + |
| 43 | +export interface HostReq { |
| 44 | + agentDir?: string |
| 45 | + authType?: number | string |
| 46 | + clusterId?: number |
| 47 | + desc?: string |
| 48 | + grpcPort?: number |
| 49 | + hostnames?: string[] |
| 50 | + sshKeyFilename?: string |
| 51 | + sshKeyPassword?: string |
| 52 | + sshKeyString?: string |
| 53 | + sshPassword?: string |
| 54 | + sshPort?: number |
| 55 | + sshUser?: string |
| 56 | + [property: string]: any |
| 57 | +} |
| 58 | + |
| 59 | +export enum Command { |
| 60 | + Add = 'Add', |
| 61 | + Check = 'Check', |
| 62 | + Configure = 'Configure', |
| 63 | + Custom = 'Custom', |
| 64 | + Init = 'Init', |
| 65 | + Prepare = 'Prepare', |
| 66 | + Restart = 'Restart', |
| 67 | + Start = 'Start', |
| 68 | + Status = 'Status', |
| 69 | + Stop = 'Stop' |
| 70 | +} |
| 71 | + |
| 72 | +export enum CommandLevel { |
| 73 | + Cluster = 'cluster', |
| 74 | + Component = 'component', |
| 75 | + Host = 'host', |
| 76 | + Service = 'service' |
| 77 | +} |
| 78 | + |
| 79 | +export interface ComponentCommandReq { |
| 80 | + componentName: string |
| 81 | + hostnames: string[] |
| 82 | + [property: string]: any |
| 83 | +} |
| 84 | + |
| 85 | +export interface HostCommandReq { |
| 86 | + agentDir?: string |
| 87 | + authType?: number |
| 88 | + clusterId?: number |
| 89 | + desc?: string |
| 90 | + grpcPort?: number |
| 91 | + hostnames?: string[] |
| 92 | + sshKeyFilename?: string |
| 93 | + sshKeyPassword?: string |
| 94 | + sshKeyString?: string |
| 95 | + sshPassword?: string |
| 96 | + sshPort?: number |
| 97 | + sshUser?: string |
| 98 | + [property: string]: any |
| 99 | +} |
| 100 | + |
| 101 | +export interface ServiceCommandReq { |
| 102 | + componentHosts: ComponentHostReq[] |
| 103 | + configs: ServiceConfigReq[] |
| 104 | + serviceName: string |
| 105 | + [property: string]: any |
| 106 | +} |
| 107 | + |
| 108 | +export interface ComponentHostReq { |
| 109 | + componentName: string |
| 110 | + hostnames: string[] |
| 111 | + [property: string]: any |
| 112 | +} |
| 113 | + |
| 114 | +export interface ServiceConfigReq { |
| 115 | + id?: number |
| 116 | + name?: string |
| 117 | + properties?: PropertyReq[] |
| 118 | + [property: string]: any |
| 119 | +} |
| 120 | + |
| 121 | +export interface PropertyReq { |
| 122 | + attrs?: AttrsReq |
| 123 | + desc?: string |
| 124 | + displayName?: string |
| 125 | + name: string |
| 126 | + value?: string |
| 127 | + [property: string]: any |
| 128 | +} |
| 129 | + |
| 130 | +export interface AttrsReq { |
| 131 | + type?: string |
| 132 | + [property: string]: any |
| 133 | +} |
| 134 | + |
20 | 135 | export interface CommandVO { |
21 | | - id: number |
22 | | - state: string |
| 136 | + id?: number |
| 137 | + state?: string |
| 138 | + [property: string]: any |
23 | 139 | } |
0 commit comments