Skip to content

Commit e742eee

Browse files
l-trottapquentin
authored andcommitted
Fixing nodes info response (#4636)
* fix node info res * Update specification/nodes/info/types.ts Co-authored-by: Quentin Pradet <[email protected]> * address review --------- Co-authored-by: Quentin Pradet <[email protected]> (cherry picked from commit 36e78a1)
1 parent f7184f0 commit e742eee

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

specification/nodes/info/types.ts

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* under the License.
1818
*/
1919

20-
import { ByteSize, Name, VersionString } from '@_types/common'
20+
import { ByteSize, Name, VersionNumber, VersionString } from '@_types/common'
2121
import { Host, Ip, TransportAddress } from '@_types/Networking'
2222
import { NodeRoles } from '@_types/Node'
2323
import { integer, long } from '@_types/Numeric'
@@ -26,6 +26,7 @@ import { Duration, DurationValue, EpochTime, UnitMillis } from '@_types/Time'
2626
import { IndexRouting } from '@indices/_types/IndexRouting'
2727
import { AdditionalProperties } from '@spec_utils/behaviors'
2828
import { Dictionary } from '@spec_utils/Dictionary'
29+
import { Stringified } from '@spec_utils/Stringified'
2930
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
3031

3132
export class NodeInfo {
@@ -34,15 +35,16 @@ export class NodeInfo {
3435
/** Short hash of the last git commit in this release. */
3536
build_hash: string
3637
build_type: string
38+
component_versions: Dictionary<Name, integer>
3739
/** The node’s host name. */
3840
host: Host
3941
http?: NodeInfoHttp
42+
index_version: VersionNumber
4043
/** The node’s IP address. */
4144
ip: Ip
4245
jvm?: NodeJvmInfo
4346
/** The node's name */
4447
name: Name
45-
network?: NodeInfoNetwork
4648
os?: NodeOperatingSystemInfo
4749
plugins?: PluginStats[]
4850
process?: NodeProcessInfo
@@ -59,11 +61,19 @@ export class NodeInfo {
5961
transport?: NodeInfoTransport
6062
/** Host and port where transport HTTP connections are accepted. */
6163
transport_address: TransportAddress
64+
transport_version: VersionNumber
65+
6266
/** Elasticsearch version running on this node. */
6367
version: VersionString
6468
modules?: PluginStats[]
6569
ingest?: NodeInfoIngest
6670
aggregations?: Dictionary<string, NodeInfoAggregation>
71+
remote_cluster_server?: RemoveClusterServer
72+
}
73+
74+
export class RemoveClusterServer {
75+
bound_address: TransportAddress[]
76+
publish_address: TransportAddress
6777
}
6878

6979
export class NodeInfoSettings {
@@ -133,7 +143,7 @@ export class NodeInfoSettingsCluster {
133143
name: Name
134144
routing?: IndexRouting
135145
election: NodeInfoSettingsClusterElection
136-
initial_master_nodes?: string[]
146+
initial_master_nodes?: string[] | string
137147
/**
138148
* @availability stack since=7.16.0
139149
* @availability serverless
@@ -176,7 +186,7 @@ export class NodeInfoRepositoriesUrl {
176186
export class NodeInfoDiscover
177187
implements AdditionalProperties<string, UserDefinedValue>
178188
{
179-
seed_hosts?: string[]
189+
seed_hosts?: string[] | string
180190
type?: string
181191
seed_providers?: string[]
182192
}
@@ -209,6 +219,11 @@ export class NodeInfoSettingsTransport {
209219
type: NodeInfoSettingsTransportType
210220
'type.default'?: string // TODO this clashes with NodeInfoSettingsTransportType
211221
features?: NodeInfoSettingsTransportFeatures
222+
/**
223+
* Only used in unit tests
224+
* @availability stack visibility=private
225+
* */
226+
ignore_deserialization_errors?: Stringified<boolean>
212227
}
213228

214229
/** @shortcut_property default */
@@ -333,17 +348,6 @@ export class NodeInfoMemory {
333348
total_in_bytes: long
334349
}
335350

336-
export class NodeInfoNetwork {
337-
primary_interface: NodeInfoNetworkInterface
338-
refresh_interval: integer
339-
}
340-
341-
export class NodeInfoNetworkInterface {
342-
address: string
343-
mac_address: string
344-
name: Name
345-
}
346-
347351
export class NodeInfoOSCPU {
348352
cache_size: string
349353
cache_size_in_bytes: integer
@@ -371,7 +375,6 @@ export class NodeJvmInfo {
371375
vm_name: Name
372376
vm_vendor: string
373377
vm_version: VersionString
374-
/** @aliases bundled_jdk */
375378
using_bundled_jdk: boolean
376379
using_compressed_ordinary_object_pointers?: boolean | string
377380
input_arguments: string[]

0 commit comments

Comments
 (0)