Skip to content

Commit b180ec2

Browse files
Merge pull request #4806 from jameshensmancitrix/private/jameshen/host_https_only
CP-40752 Added CLI functionality for pool level setter and getter (https_only)
2 parents 04a58e5 + 6745398 commit b180ec2

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

ocaml/xapi-cli-server/records.ml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,6 +1430,20 @@ let pool_record rpc session_id pool =
14301430
; make_field ~name:"repository-proxy-username"
14311431
~get:(fun () -> (x ()).API.pool_repository_proxy_username)
14321432
()
1433+
; make_field ~name:"https-only"
1434+
~get:(fun () ->
1435+
Client.Host.get_all ~rpc ~session_id
1436+
|> List.map (fun h ->
1437+
Client.Host.get_https_only ~rpc ~session_id ~self:h
1438+
)
1439+
|> List.fold_left ( && ) true
1440+
|> string_of_bool
1441+
)
1442+
~set:(fun s ->
1443+
Client.Pool.set_https_only ~rpc ~session_id ~self:pool
1444+
~value:(Stdlib.bool_of_string s)
1445+
)
1446+
()
14331447
]
14341448
}
14351449

0 commit comments

Comments
 (0)