Skip to content

Commit

Permalink
CP-49647 use URI for cli_operations
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Lindig <[email protected]>
  • Loading branch information
Christian Lindig authored and lindig committed Jun 4, 2024
1 parent 23cab04 commit 1c4f3a9
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions ocaml/xapi-cli-server/cli_operations.ml
Original file line number Diff line number Diff line change
Expand Up @@ -6713,13 +6713,20 @@ let pool_dump_db fd _printer rpc session_id params =
let pool = List.hd (Client.Pool.get_all ~rpc ~session_id) in
let master = Client.Pool.get_master ~rpc ~session_id ~self:pool in
let master_address =
Http.Url.maybe_wrap_IPv6_literal
(Client.Host.get_address ~rpc ~session_id ~self:master)
Client.Host.get_address ~rpc ~session_id ~self:master
in
let uri =
Printf.sprintf "https://%s%s?session_id=%s&task_id=%s" master_address
Constants.pool_xml_db_sync (Ref.string_of session_id)
(Ref.string_of task_id)
Uri.(
make ~scheme:"https" ~host:master_address
~path:Constants.pool_xml_db_sync
~query:
[
("session_id", [Ref.string_of session_id])
; ("task_id", [Ref.string_of task_id])
]
()
|> to_string
)
in
debug "%s" uri ;
HttpGet (filename, uri)
Expand Down

0 comments on commit 1c4f3a9

Please sign in to comment.