-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Adding LXD tables #6249
Adding LXD tables #6249
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great!
The only nitpick I have is moving the Status
es to the newer APIs using ::success()
and ::failure()
.
Also, just a note that ptree
reading/parsing is quite slow compared to RapidJSON. If folks find they need this information faster (save some memory and CPU), consider refactoring. The RapidJSON and our JSON
wrapper APIs are a bit more confusing and prone to error compared to ptree
so let's only do that if we need it.
local::stream_protocol::endpoint ep(FLAGS_lxd_socket); | ||
local::stream_protocol::iostream stream(ep); | ||
if (!stream) { | ||
return Status( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update these to the new Status::failure
pattern?
This has been loosely based on the dockerApi implementation. |
This is a collection of 9 LXD tables, which list information about LXD setup, images and containers.
Example queries: