Skip to content

Commit 9624328

Browse files
committed
CP-53724 Add xe CLI commands for setting and querying Dom0 SSH auto mode
Updated `records.ml` file to support `host-param-set/get/list` and `pool-param-set/get/list` for ssh-auto-mode. Signed-off-by: Lunfan Zhang <[email protected]>
1 parent 65792b5 commit 9624328

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

ocaml/xapi-cli-server/records.ml

+18
Original file line numberDiff line numberDiff line change
@@ -1584,6 +1584,17 @@ let pool_record rpc session_id pool =
15841584
~value:(safe_i64_of_string "console-idle-timeout" value)
15851585
)
15861586
()
1587+
; make_field ~name:"ssh-auto-mode"
1588+
~get:(fun () ->
1589+
get_consistent_field_or_default ~rpc ~session_id
1590+
~getter:Client.Host.get_ssh_auto_mode ~transform:string_of_bool
1591+
~default:inconsistent
1592+
)
1593+
~set:(fun value ->
1594+
Client.Pool.set_ssh_auto_mode ~rpc ~session_id ~self:pool
1595+
~value:(safe_bool_of_string "ssh-auto-mode" value)
1596+
)
1597+
()
15871598
]
15881599
}
15891600

@@ -3375,6 +3386,13 @@ let host_record rpc session_id host =
33753386
~value:(safe_i64_of_string "console-idle-timeout" value)
33763387
)
33773388
()
3389+
; make_field ~name:"ssh-auto-mode"
3390+
~get:(fun () -> string_of_bool (x ()).API.host_ssh_auto_mode)
3391+
~set:(fun value ->
3392+
Client.Host.set_ssh_auto_mode ~rpc ~session_id ~self:host
3393+
~value:(safe_bool_of_string "ssh-auto-mode" value)
3394+
)
3395+
()
33783396
]
33793397
}
33803398

0 commit comments

Comments
 (0)