@@ -1335,6 +1335,13 @@ let create_params =
1335
1335
; param_release= numbered_release " 25.21.0"
1336
1336
; param_default= Some (VInt Constants. default_console_idle_timeout)
1337
1337
}
1338
+ ; {
1339
+ param_type= Bool
1340
+ ; param_name= " ssh_auto_mode"
1341
+ ; param_doc= " True if SSH auto mode is enabled for the host"
1342
+ ; param_release= numbered_release " 25.26.0-next"
1343
+ ; param_default= Some (VBool Constants. default_ssh_auto_mode)
1344
+ }
1338
1345
]
1339
1346
1340
1347
let create =
@@ -1350,8 +1357,8 @@ let create =
1350
1357
; ( Changed
1351
1358
, " 25.21.0"
1352
1359
, " Added --ssh_enabled --ssh_enabled_timeout --ssh_expiry \
1353
- --console_idle_timeout options to allow them to be configured for \
1354
- new host"
1360
+ --console_idle_timeout --ssh_auto_mode options to allow them to be \
1361
+ configured for new host"
1355
1362
)
1356
1363
]
1357
1364
~versioned_params: create_params ~doc: " Create a new host record"
@@ -2440,6 +2447,21 @@ let set_console_idle_timeout =
2440
2447
]
2441
2448
~allowed_roles: _R_POOL_ADMIN ()
2442
2449
2450
+ let set_ssh_auto_mode =
2451
+ call ~name: " set_ssh_auto_mode" ~lifecycle: []
2452
+ ~doc: " Set the SSH auto mode for the host"
2453
+ ~params:
2454
+ [
2455
+ (Ref _host, " self" , " The host" )
2456
+ ; ( Bool
2457
+ , " value"
2458
+ , " The SSH auto mode for the host,when set to true, SSH to normally be \
2459
+ disabled and SSH to be enabled only in case of emergency e.g., xapi \
2460
+ is down"
2461
+ )
2462
+ ]
2463
+ ~allowed_roles: _R_POOL_ADMIN ()
2464
+
2443
2465
let latest_synced_updates_applied_state =
2444
2466
Enum
2445
2467
( " latest_synced_updates_applied_state"
@@ -2601,6 +2623,7 @@ let t =
2601
2623
; disable_ssh
2602
2624
; set_ssh_enabled_timeout
2603
2625
; set_console_idle_timeout
2626
+ ; set_ssh_auto_mode
2604
2627
]
2605
2628
~contents:
2606
2629
([
@@ -3056,6 +3079,10 @@ let t =
3056
3079
" console_idle_timeout"
3057
3080
" The timeout in seconds after which idle console will be \
3058
3081
automatically terminated (0 means never)"
3082
+ ; field ~qualifier: DynamicRO ~lifecycle: [] ~ty: Bool
3083
+ ~default_value: (Some (VBool Constants. default_ssh_auto_mode))
3084
+ " ssh_auto_mode"
3085
+ " Reflects whether SSH auto mode is enabled for the host"
3059
3086
]
3060
3087
)
3061
3088
()
0 commit comments