Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PPX memory interface #163

Merged
merged 2 commits into from
Jul 12, 2017
Merged

PPX memory interface #163

merged 2 commits into from
Jul 12, 2017

Conversation

jonludlam
Copy link
Collaborator

Requires PRs in squeezed and xenopsd. This is the first interface to be changed, others are to come.

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
@coveralls
Copy link

Coverage Status

Coverage remained the same at 47.16% when pulling 0c8c773 on jonludlam:ppx2 into 2d55a0e on xapi-project:master.


let service_name = "memory"
let queue_name = Xcp_service.common_prefix ^ service_name
let json_path = "/var/xapi/memory.json"
let xml_path = "/var/xapi/memory"

type reservation_id = string
type reservation_id =
string [@@doc [
Copy link
Collaborator

Choose a reason for hiding this comment

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

With documentation generation? 🎉


let description = Interface.{
name = "Memory";
namespace = None;
Copy link
Collaborator

Choose a reason for hiding this comment

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

What would be the effect of Some "something" here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It just changes the wire-name of the API call

@robhoes
Copy link
Member

robhoes commented Jul 3, 2017

The revolution is about to begin!

Copy link
Collaborator

@mseri mseri left a comment

Choose a reason for hiding this comment

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

This PR could be linked as "Tutorial".

I have a question, though. Would this allow to use namespaces in the API? (I am thinking about not having to move types out of the module as for https://github.com/xapi-project/xcp-idl/blob/vgpu-migration/gpumon/gpumon_interface.ml#L28-L31)

@mseri
Copy link
Collaborator

mseri commented Jul 3, 2017

@jonludlam
Copy link
Collaborator Author

@mseri: You can certainly return different error types from different API calls - is that what you're after?

@mseri
Copy link
Collaborator

mseri commented Jul 3, 2017

Kind of. In that case I wanted to make sure that only apis in the Nvidia module could return the nvidia specific errors, but I also wanted to define them inside the Nvidia module and not at toplevel and this could not be done (to avoid accumulating NvmlError, AMDError, IntelError, ...)

@jonludlam
Copy link
Collaborator Author

Yes, you can declare those error types within the submodules.

@mseri mseri merged commit 48dc1c4 into xapi-project:master Jul 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants