- Jan 29, 2013
-
-
Helga Velroyen authored
This adds the fields 'inst_cnt' and 'inst_list' to the Haskell implementation of the network queries. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Helga Velroyen authored
So far, a couple of helper function for the network queries resided in Config.hs. I figured it makes more sense to move them to Query/Network.hs, since they are very tailored to that purpose. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
- Jan 25, 2013
-
-
Helga Velroyen authored
This adds more fields to the network queries: - group_cnt, free_count, reserved_count, and map Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
* devel-2.7: kvm: fix bug while fetching -device list Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Commit 3d942d8b broke instance migration (“self._cmd” was set to None). This patch fixes that issue, refactors “MigrateInstance” for testing and adds those tests. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Guido Trotter authored
_GetKVMOutput expects the command to succeed, but unfortunately on some versions of kvm "-device ?" will output a correct list of devices, while exiting with an error code. To fix this we accept failure in that case (note that this doesn't change the situation when this command is not supported, as in that case the output will still not contain the correct string). This patch also updates the docstring, adding the parameter types and description. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
Test functions for retrieving instance and node information. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
Test stopping an instance, and ensure the configuration file still exists after an instance couldn't be stopped. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
Test starting an instance in normal mode, in paused mode, and in case of failure. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
Check whether doing so raises an exception. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
Test success and failure. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
Test whether any existing configuration file named after the instance is removed from Xen's “auto” directory. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
There are two separate Xen hypervisors (HVM and PVM), as well as two different Xen commands (xl and xm). This already provides four different combinations and future changes might bring even more. For this reason the test classes for the Xen hypervisor are not defined manually, but rather generated at module load time. Doing so makes it possible to keep using the standard unit test infrastructure provided by the “unittest” module. Using “super”, which we try to avoid in other places, is necessary to call functions provided by other classes. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
Test error handling while writing Xen configuration files. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
This tests “unknown” values of “constants.XEN_CMD”. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
Instead of using the “XEN_CMD” constant in multiple places, that is now all in a single place and can easily be changed for unit tests (through a parameter given to the constructor). Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
* devel-2.7: hv_xen: Remove config after shutdown was successful Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
- Jan 24, 2013
-
-
Helga Velroyen authored
This way, it is easier to make it call the haskell implementation of the network queries. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Helga Velroyen authored
This is the beginning of the implementation of network queries. This includes establishing all infrastructure to run the network queries and implement querying of some simpler fields and the node group listing. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Helga Velroyen authored
When displaying query results of type Maybe, one could use the function rsMaybe. Unfortunately, this function maps 'Nothing' values to RSNoData which gets displayed as '?' in the list of query results. These semantics do not fit if the result is of a Maybe type, because it is an optional field, because in this case 'Nothing' is not an error (like for example the consequence of an RPC error), but a legitimate result and as such should be displayed as '-' in the result list. For this purpose, this patch introduces another version of rsMaybe, which is called rsMaybeUnavail to be used for optional fields. For consistency, rsMaybe gets renamed to rsMaybeNoData. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Helga Velroyen authored
For network queries to work, we need to extend the general config type to include all available networks. Additionally, we add UUIDs to the network type itself. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Helga Velroyen authored
Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Michael Hanselmann authored
If stopping an instance failed, the configuration would already be gone and other operations depending on it (e.g. migration) would no longer work. With this patch the configuration file is only removed once the instance was succesfully stopped or destroyed. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Michele Tartara <mtartara@google.com>
-
Michael Hanselmann authored
Instead of calling _WriteConfigFileStatic from both derived classes, those now only return the content (minus the “do not edit” header). The configuration is then written by the base class, XenHypervisor. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
Unit tests will have to specify a custom Xen configuration directory (a temporary directory). To this end “hv_xen.XenHypervisor” and its two derived classes are modified to have fewer static and class methods. A new private attribute for the configuration directory is also added (to be used in test code). Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
The “_GetConfigFileDiskData” function is moved to module level and cleaned up (module-level constants for letters and file I/O drivers). Until now only 24 disks would be supported (e.g. “sda” to “sdx”), when the Latin alphabet actually has 26 characters. Now all 26 letters would be available for use (“constants.MAX_DISKS” is still 16). Newly added unit tests provide complete coverage for “_GetConfigFileDiskData”. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
Refactor and add tests for getting node (Domain-0) information. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
This patch refactors “_RunXmList” and adds some tests. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
* devel-2.7: hv_*: Always return from Verify, style fixes _VerifyErrors()._Error() and _ErrorIf() are now consistent Handle the result of QueryGroups() correctly Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Bernardo Dal Seno <bdalseno@google.com>
-
Michael Hanselmann authored
Change all “Verify” methods in hypervisor abstractions to explicitely return None if no problem was detected. Remove punctuation from error messages. Update docstrings with “@return” and some small mistakes. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Helga Velroyen authored
When creating a network, so far no size constraints were checked. We now limit the size of a network to a /30 or bigger, although tecnically, the ipaddr library supports even /32 networks. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Helga Velroyen authored
This adds a script for the QA of 'gnt-network'. So far it covers adding/removing and connecting/disconnecting networks. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Helga Velroyen authored
The additional comma makes this file invalid JSON. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Jan 23, 2013
-
-
Michael Hanselmann authored
These will be used in unittests. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Bernardo Dal Seno authored
_Error() didn't contain the logic for demoting errors to warnings and for marking an operation as failed. Now _ErrorIf() is just a minimal wrapper for _Error(). Unit tests included. Signed-off-by:
Bernardo Dal Seno <bdalseno@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
* master: Handle the result of QueryGroups() correctly Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Dimitris Aragiorgis authored
If no group is given for the “gnt-network connect“/“… disconnect” commands, the client uses the result of “QueryGroups()” which is a list of lists. Use “itertools.chain()” to handle the return value correctly. Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Dimitris Aragiorgis <dimara@grnet.gr> Reviewed-by:
Michael Hanselmann <hansmi@google.com> (cherry picked from commit af3aea48)
-
Dimitris Aragiorgis authored
If no group is given for the “gnt-network connect“/“… disconnect” commands, the client uses the result of “QueryGroups()” which is a list of lists. Use “itertools.chain()” to handle the return value correctly. Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Dimitris Aragiorgis <dimara@grnet.gr> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
Michael Hanselmann authored
In _ReadConfigFile, the filename should be prepared outside the try/except block. Fixes bad code formatting, too. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Helga Velroyen <helgav@google.com>
-