EXPERIMENT UNDER HEAVY REFACTORING
Rust binding for OpenNebula API
Early POC inspired of:
And here is the XML-RPC documentation for OpenNebula 6.6
This package has to be installled (required by crate reqwest):
sudo apt install libssl-dev
- user (partial)
- virtual machine (partial)
Let's suppose we're implementing the User
resource:
- Add two sub-controllers structures (
UserController
andUsersController
), then bind them to the main controller via a method for each (respectivelyUsers(id)
andUsers()
) For theUser
resource, define a structure and basic methods via:define_resource!(User);
. This will allow to work with the user structure returned by one of theinfo
methods. - Add more attributes getters in implementing traits with default methods, for instance:
impl GetGroup for XXX {}
andimpl GetOwner for XXX {}
impl GetPermissions for XXX {}
Previously check if they are required: for instance anUser
resource shouldn't implementOwner
because it doesn't haveUID
andUNAME
fields in it's XML representation. - Implement resource methods binding them the right user controller.
For more, see the architecture document.