- Sep 27, 2012
-
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Sep 26, 2012
-
-
Agata Murawska authored
This patch implements single instance info call - somewhat similar to all_instances_info, except we give a specific instance name. Current implementation of reading the InstanceInfo value is somewhat counter-intuitive because when we query a node on thich there is no instance with such name, this is not considered an error - but it does produce an empty answer. Therefore the resulting type is optional. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
instance_info and all_instances_info calls had different per-instance return types, this commit fixes the mismatch. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
For storage_list call, the result type depends on the call parameters. Therefore, we have to add call as an argument for rpcResultFill - and by extension, to the typeclass. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
Implementation of node version query. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
Added support for NodeInfo RPC call as source of data for node query. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
We make use of the parameter added in the previous patch and add option to add live parameters to the query. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
The tests we currently have assume, that all the data required for running the query is available - once we add live data, this will no longer be the case. This patch adds boolean parameter to query function, which tells it whether to ignore live parameters gathering. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
Simple conversion for queries that use live fields gathered from RPC calls. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
This is a helper function that gets the JSON encoding of the first element of the list (if possible). Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
This patch creates ResultT, a monad transformation used later in RPC <-> query integration. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
This adds tests similar to those used for node query. For now the prop_queryGroup_noUnknown is disabled and commented out, as it is fasifiable with ndparams and ipolicy. It may be removed or fixed later on. Also, prop_queryGrooup_types has one less property checked - it is not the case that number of result rows should be equal to number of nodes. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
Implementation of nodegroup queries in Haskell. This is not yet complete as we are missing merged disk parameters and option want_diskparams is not implemented. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
For some results in nodegroup queries we need agregation similar to one that is done for nodes. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
Previous version of RPC calls implementation in Haskell did not take into account that the actual result type for queries is a list, not a dictionary. This patch aims at fixing the problem "for now" - it is not a pretty solution, but it does work. Note that parsing of the result is now split into two parts - first, we check if server's aswer is positive, then if it is, we procede with decoding the actual result. Values and order of some fields in the result type were changed to reflect actual order of arguments from server responses. AllInstancesInfo call was particularly tricky, because it returns a dictionary where keys are instance names - and the response from a given node is correct if all the instances were deserialized, not just some. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
This was repeated a lot, so we should abstract this into a type. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
Curl error messages are self contained and don't need "error" prefix; added RpcResult Error which will be used once proper deserialization of rpc response is in place. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
We now have Hypervisor type in Objects, might just as well use it. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
I assumed this was a copy-paste+forgetting to change the header comment. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Agata Murawska authored
This patch adds missing Path entry and uses it in Rpc. It was not in place before due to different build settings - i.e. if curl was disabled, there were no problems. Signed-off-by:
Agata Murawska <agatamurawska@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This patch ties together the previous commits, by extending build-bash-completion to call all htools scripts and get their completion information, then use that to build fake cli_options representing them and finally generate the bash completion information. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This patch adds support for a --help-completion option, which will display the defined options and their completion information, in a format designed to be parsed easily from Python, for integration into build-bash-completion. The alternative would have been to duplicate the build-bash-completion functionality on the Haskell side, but that would have been lots of duplication for not enough gain (since that is only run at build time). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
Iustin Pop authored
This is a quite boring patch, just adding annotation information to all existing options. Some of the annotations are not very good; but we don't have support for more precise completion in build-bash-completion, so this is good enough. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
Iustin Pop authored
This can be used for either option or argument completion (although OptComplNone doesn't make sense for an argument :). Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
Iustin Pop authored
Currently, we test and require that each individual program (hbal, etc.) defines/supports the generic options (currently --help and --version). Even with the test, this is not optimal, since it requires changes in many places whenever we modify the list of generic options, hence we move these out of the individual programs and into the generic CLI handling code. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
Iustin Pop authored
The global cluster score is less interesting than individual group scores, for multi-group allocation purposes. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Iustin Pop authored
This will make it easier to add new parameters. Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Agata Murawska <agatamurawska@google.com>
-
- Sep 25, 2012
-
-
Michael Hanselmann authored
- pathutils: Prepend node-specific prefix path - RPC: Use virtual paths (see vcluster.py) - SSH: Pass environment variables, use destination's node directory when copying files using scp, use GANETI_HOSTNAME to determine hostname Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
As requested by René Nussbaumer. Hopefully things are more clear now. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
René Nussbaumer <rn@google.com>
-
Michael Hanselmann authored
Given the number of settings that need to be controlled a plain bash script was a better choice over shelltestrunner. Just a few completions are attempted, but among them should be the most critical ones (e.g. “gnt-instance add --node …”. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
They were never run. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
In older versions of GNU Bash extended patterns, such as “@(…)”, are only available with the “extglob” shell option. As pointed out in [1] and [2], “extglob” must be enabled while parsing the code. Therefore the flag must be enabled at the beginning of the script and be reset to its original value at the end as to not interfere with other code on shell initialization. [1] http://unix.stackexchange.com/questions/45957 [2] http://mywiki.wooledge.org/glob Reported by Sascha Lucas. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
This reverts commit 94014b63. Turns out I misunderstood the “extglob” shell option. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
- Sep 24, 2012
-
-
René Nussbaumer authored
This is straightforward. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
René Nussbaumer authored
This patch adds the Logical Unit for the instance multi allocation opcode. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
René Nussbaumer authored
Skeleton for the multi-allocation opcode Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
René Nussbaumer authored
We've some work which we need to do for the multi allocation request as well, so lets refactor it to separate functions. _ComputeNics is kinda ugly, as it reserves the MAC. I added a TODO to think more about how we factor this behaviour out. Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
René Nussbaumer authored
This test covers the bug fixes found in the previous two patches Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
René Nussbaumer authored
Signed-off-by:
René Nussbaumer <rn@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-