History | View | Annotate | Download (9 kB)
Implementation of NodeInfo call and result
node_info call takes hypervisors and vgs to ask for information aboutnode and returns bootid and results from hypervisors and volume groups.
Signed-off-by: Agata Murawska <agatamurawska@google.com>Reviewed-by: Iustin Pop <iustin@google.com>
Implementation of InstanceList call and result
instance_list call takes a list of hypervisors and returns a listof running instances.
Implementation of AllInstancesInfo call and result
all_instances_info call takes a list of hypervisors and returns a listof (name, memory, state, vcpus, time) - one element for eachinstance.
Infrastructure to execute RPC calls
Prepare and execute RPC call, prepare result for the call. Theseprocedures are generic in the sense that they only require theCall and Result types to be connected.We use curl library for sending http requests for RPC; as the library's...
Datatypes for haskell RPC calls
We introduce typeclasses for RPC call and result and create a typeclassthat binds the two together. For that we need to useMultiParamTypeClasses and FunctionalDependencies language pragmas, whichallow us to ensure that RPC result type can be deduced based on the...