Skip to content

Conversation

@robhoes
Copy link

@robhoes robhoes commented Jul 7, 2016

No description provided.

@robhoes
Copy link
Author

robhoes commented Jul 7, 2016

Needs xenserver/xcp-idl#5.

@robhoes
Copy link
Author

robhoes commented Jul 8, 2016

@lindig @johnelse Could you review this please?

get ()
in
get ();
Buffer.contents buf
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function looks OK, but how about some tests? 😉 Also the module could do with a .mli

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we use a JSON library? The JSON syntax is not complicated but I don't have a lot of faith that this covers all cases. A good summary is here: http://json.org.

Copy link
Author

@robhoes robhoes Jul 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are using a JSON-RPC library to create the calls and parse the responses: ocaml-rpc. However, for the transport layer, ocaml-rpc only supports HTTP, while we agreed to use a "raw" stream socket for this. Ideally, we'd eventually upstream this into ocaml-rpc.

@robhoes robhoes force-pushed the trunk-pvs-direct branch from cf268bd to e40a491 Compare July 12, 2016 15:03
@robhoes
Copy link
Author

robhoes commented Jul 12, 2016

@johnelse Could you re-review please?

let configure_farm _ dbg config =
debug "Configuring PVS proxy for farm %s" config.farm_uuid;
let call = {Rpc.name = "configure_farm"; params = [rpc_of_t config]} in
let _ = do_call call in

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to handle any errors returned from the server here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but at this point, we don't know which errors the daemon may return yet. We will have to fill this in later.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I think this looks good then.

@robhoes robhoes merged commit dde8a63 into xenserver:trunk-pvs-direct Jul 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants