- Jan 30, 2013
-
-
Helga Velroyen authored
Make _UnlockedLookupNetwork() raise OpPrereqError (instead of returning None) in case it does not find the requested network. Remove useless and duplicate code such as: if net_uuid is None: raise... Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Helga Velroyen authored
Until now if one disconnects a network with --no-conflicts-check and then remove it, there is a possibility to leave instances with NICs referencing non-existing networks. This causes network queries, instance removal and modification to fail. This patch allows a network to be disconnected from a nodegroup, only if instances residing in the nodegroup do not have NICs attached to the network. Otherwise OpPrereqError is raised. The --no-conflicts-check option is removed from the gnt-network disconnect command as well. Signed-off-by:
Dimitris Aragiorgis <dimara@grnet.gr> Reviewed-by:
Helga Velroyen <helgav@google.com>
-
Michael Hanselmann authored
Split retrieving supported features into a dedicated function which can be mocked. Tests are added for both “_ProbeTapVnetHdr” and “_GetTunFeatures”. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
* devel-2.7: hv_kvm: Original error message, keyword parameter CLI.hs: fix double spaces in option help strings Add new NIC parameter to man page of 'gnt-instance' Fix spelling issue in hroller.rst Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
Michael Hanselmann authored
- Include original error message when creating TAP interface failed - Pass keyword parameter as such Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jan 29, 2013
-
-
Michael Hanselmann authored
Add two tests for hypervisor constants. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Dato Simó authored
Some help strings with continuation backslashes ('\') were providing a space both before and after the backslash, resulting in double spaces in help output. Provide it only after the backslash, which fixes the issue and is consistent with the rest of the file. Signed-off-by:
Dato Simó <dato@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
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>
-
Helga Velroyen authored
According to doc/design-network.rst, there is a new NIC parameter 'network', which can be used to link an instance to a network. This was so far undocumented in the man page of 'gnt-instance'. Signed-off-by:
Helga Velroyen <helgav@google.com> Reviewed-by:
Guido Trotter <ultrotter@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>
-
Benjamin Kerensa authored
'explicitly' was spelled the wrong way Signed-off-by:
Benjamin Kerensa <bkerensa@ubuntu.com> Signed-off-by:
Guido Trotter <ultrotter@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>
-