libcloud.test.compute package¶
Submodules¶
libcloud.test.compute.test_abiquo module¶
Abiquo Test Suite
- class libcloud.test.compute.test_abiquo.AbiquoMockHttp(*args, **kwargs)[source]¶
Bases: libcloud.test.MockHttpTestCase
Mock the functionallity of the remote Abiquo API.
- fixture_tag = 'default'¶
- fixtures = <libcloud.test.file_fixtures.ComputeFileFixtures object at 0x7f7a79bcae50>¶
- class libcloud.test.compute.test_abiquo.AbiquoNodeDriverTest(methodName='runTest')[source]¶
Bases: unittest.case.TestCase, libcloud.test.compute.TestCaseMixin
Abiquo Node Driver test suite
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- test_create_group_location_does_not_exist()[source]¶
Test ‘create_node’ with an unexistent location.
Defines a ‘fake’ location and tries to create a node into it.
- test_create_node_no_image_raise_exception()[source]¶
Test ‘create_node’ without image.
Test the ‘create_node’ function without ‘image’ parameter raises an Exception
- test_create_node_specify_wrong_image()[source]¶
Test image compatibility.
Some locations only can handle a group of images, not all of them. Test you can not create a node with incompatible image-location.
- test_create_node_specify_wrong_location()[source]¶
Test you can not create a node with wrong location.
- test_destroy_deployed_group_failed()[source]¶
Test ‘ex_destroy_group’ fails.
Test driver handles correctly when, for some reason, the asynchronous job fails.
- test_destroy_group_invalid_state()[source]¶
Test ‘ex_destroy_group’ invalid state.
Test the Driver raises an exception when the group is in invalid temporal state.
- test_destroy_node_allocation_state()[source]¶
Test the ‘destroy_node’ invalid state.
Try to destroy a node when the node is not running.
- test_destroy_node_response()[source]¶
‘destroy_node’ basic test.
Override the destroy to return a different node available to be undeployed. (by default it returns an already undeployed node, for test creation).
- test_destroy_node_response_failed()[source]¶
‘destroy_node’ asynchronous error.
Test that the driver handles correctly when, for some reason, the ‘destroy’ job fails.
- test_forbidden_controlled()[source]¶
Test the Forbidden Exception is Controlled.
Test, through the ‘list_images’ method, that a ‘403 Forbidden’ raises an ‘ForbidenError’ instead of the ‘MalformedUrlException’
- test_handle_other_errors_such_as_not_found()[source]¶
Test common ‘logical’ exceptions are controlled.
Test that common exception (normally 404-Not Found and 409-Conflict), that return an XMLResponse with the explanation of the errors are controlled.
- test_run_node_failed()[source]¶
Test ‘ex_run_node’ fails.
Test driver handles correctly when, for some reason, the asynchronous job fails.
- test_run_node_invalid_state()[source]¶
Test ‘ex_run_node’ invalid state.
Test the Driver raises an exception when try to run a node that is in invalid state to run.
Test the Unauthorized Exception is Controlled.
Test, through the ‘login’ method, that a ‘401 Unauthorized’ raises a ‘InvalidCredsError’ instead of the ‘MalformedUrlException’
libcloud.test.compute.test_base module¶
- class libcloud.test.compute.test_base.BaseTests(methodName='runTest')[source]¶
Bases: unittest.case.TestCase
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
libcloud.test.compute.test_bluebox module¶
libcloud.test.compute.test_brightbox module¶
libcloud.test.compute.test_cloudframes module¶
libcloud.test.compute.test_cloudsigma_v1_0 module¶
- class libcloud.test.compute.test_cloudsigma_v1_0.CloudSigmaAPI10BaseTestCase[source]¶
Bases: object
- driver_klass¶
alias of CloudSigmaZrhNodeDriver
- driver_kwargs = {}¶
- should_list_locations = False¶
- class libcloud.test.compute.test_cloudsigma_v1_0.CloudSigmaAPI10DirectTestCase(methodName='runTest')[source]¶
Bases: libcloud.test.compute.test_cloudsigma_v1_0.CloudSigmaAPI10BaseTestCase, unittest.case.TestCase
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- driver_args = ('foo', 'bar')¶
- driver_klass¶
alias of CloudSigmaZrhNodeDriver
- driver_kwargs = {}¶
- class libcloud.test.compute.test_cloudsigma_v1_0.CloudSigmaAPI10IndiretTestCase(methodName='runTest')[source]¶
Bases: libcloud.test.compute.test_cloudsigma_v1_0.CloudSigmaAPI10BaseTestCase, unittest.case.TestCase
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- driver_args = ('foo', 'bar')¶
- driver_klass¶
alias of CloudSigmaNodeDriver
- driver_kwargs = {'api_version': '1.0'}¶
- class libcloud.test.compute.test_cloudsigma_v1_0.CloudSigmaHttp(host, port, *args, **kwargs)[source]¶
Bases: libcloud.test.MockHttp
- fixtures = <libcloud.test.file_fixtures.ComputeFileFixtures object at 0x7f7a7bed6450>¶
libcloud.test.compute.test_cloudsigma_v2_0 module¶
- class libcloud.test.compute.test_cloudsigma_v2_0.CloudSigmaAPI20DirectTestCase(methodName='runTest')[source]¶
Bases: libcloud.test.compute.test_cloudsigma_v2_0.CloudSigmaAPI20BaseTestCase, unittest.case.TestCase
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- driver_args = ('foo', 'bar')¶
- driver_klass¶
alias of CloudSigma_2_0_NodeDriver
- driver_kwargs = {}¶
- class libcloud.test.compute.test_cloudsigma_v2_0.CloudSigmaAPI20IndirectTestCase(methodName='runTest')[source]¶
Bases: libcloud.test.compute.test_cloudsigma_v2_0.CloudSigmaAPI20BaseTestCase, unittest.case.TestCase
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- driver_args = ('foo', 'bar')¶
- driver_klass¶
alias of CloudSigmaNodeDriver
- driver_kwargs = {'api_version': '2.0'}¶
- class libcloud.test.compute.test_cloudsigma_v2_0.CloudSigmaMockHttp(*args, **kwargs)[source]¶
Bases: libcloud.test.MockHttpTestCase
- fixtures = <libcloud.test.file_fixtures.ComputeFileFixtures object at 0x7f7a799b1210>¶
libcloud.test.compute.test_cloudstack module¶
- class libcloud.test.compute.test_cloudstack.CloudStackCommonTestCase[source]¶
Bases: libcloud.test.compute.TestCaseMixin
- driver_klass¶
alias of CloudStackNodeDriver
- test_create_volume_no_noncustomized_offering_with_size()[source]¶
If the sizes of disk offerings are not configurable and there are no disk offerings with the requested size, an exception should be thrown.
- class libcloud.test.compute.test_cloudstack.CloudStackMockHttp(*args, **kwargs)[source]¶
Bases: libcloud.test.MockHttpTestCase
- fixture_tag = 'default'¶
- fixtures = <libcloud.test.file_fixtures.ComputeFileFixtures object at 0x7f7a7900cbd0>¶
- class libcloud.test.compute.test_cloudstack.CloudStackTestCase(methodName='runTest')[source]¶
Bases: libcloud.test.compute.test_cloudstack.CloudStackCommonTestCase, unittest.case.TestCase
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
libcloud.test.compute.test_deployment module¶
libcloud.test.compute.test_digitalocean module¶
libcloud.test.compute.test_dreamhost module¶
libcloud.test.compute.test_ec2 module¶
libcloud.test.compute.test_ecp module¶
libcloud.test.compute.test_elasticstack module¶
- class libcloud.test.compute.test_elasticstack.ElasticHostsTestCase(methodName='runTest')[source]¶
Bases: libcloud.test.compute.test_elasticstack.ElasticStackTestCase, unittest.case.TestCase
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- class libcloud.test.compute.test_elasticstack.ElasticStackMockHttp(host, port, *args, **kwargs)[source]¶
Bases: libcloud.test.MockHttp
- fixtures = <libcloud.test.file_fixtures.ComputeFileFixtures object at 0x7f7a794fa0d0>¶
- class libcloud.test.compute.test_elasticstack.ElasticStackTestCase[source]¶
Bases: object
- setUp()[source]¶
ElasticStack.type = Provider.ELASTICHOSTS ElasticStack.api_name = ‘elastichosts’
ElasticStackBaseConnection.host = ‘test.com’ ElasticStack.connectionCls.conn_classes = (None,
ElasticStackMockHttp)ElasticStack._standard_drives = ElasticHosts._standard_drives
self.driver = ElasticStack(‘foo’, ‘bar’)
- class libcloud.test.compute.test_elasticstack.ServerLoveTestCase(methodName='runTest')[source]¶
Bases: libcloud.test.compute.test_elasticstack.ElasticStackTestCase, unittest.case.TestCase
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- class libcloud.test.compute.test_elasticstack.SkaliCloudTestCase(methodName='runTest')[source]¶
Bases: libcloud.test.compute.test_elasticstack.ElasticStackTestCase, unittest.case.TestCase
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
libcloud.test.compute.test_exoscale module¶
- class libcloud.test.compute.test_exoscale.ExoscaleNodeDriverTestCase(methodName='runTest')[source]¶
Bases: libcloud.test.compute.test_cloudstack.CloudStackCommonTestCase, unittest.case.TestCase
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- driver_klass¶
alias of ExoscaleNodeDriver
libcloud.test.compute.test_gandi module¶
libcloud.test.compute.test_gce module¶
libcloud.test.compute.test_gogrid module¶
- class libcloud.test.compute.test_gogrid.GoGridMockHttp(host, port, *args, **kwargs)[source]¶
Bases: libcloud.test.MockHttp
- fixtures = <libcloud.test.file_fixtures.ComputeFileFixtures object at 0x7f7a7b872550>¶
- class libcloud.test.compute.test_gogrid.GoGridTests(methodName='runTest')[source]¶
Bases: unittest.case.TestCase, libcloud.test.compute.TestCaseMixin
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
libcloud.test.compute.test_gridspot module¶
libcloud.test.compute.test_hostvirtual module¶
libcloud.test.compute.test_ibm_sce module¶
libcloud.test.compute.test_ikoula module¶
- class libcloud.test.compute.test_ikoula.IkoulaNodeDriverTestCase(methodName='runTest')[source]¶
Bases: libcloud.test.compute.test_cloudstack.CloudStackCommonTestCase, unittest.case.TestCase
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- driver_klass¶
alias of IkoulaNodeDriver
libcloud.test.compute.test_joyent module¶
libcloud.test.compute.test_ktucloud module¶
- class libcloud.test.compute.test_ktucloud.KTUCloudNodeDriverTest(methodName='runTest')[source]¶
Bases: unittest.case.TestCase, libcloud.test.compute.TestCaseMixin
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- class libcloud.test.compute.test_ktucloud.KTUCloudStackMockHttp(*args, **kwargs)[source]¶
Bases: libcloud.test.MockHttpTestCase
- fixture_tag = 'default'¶
- fixtures = <libcloud.test.file_fixtures.ComputeFileFixtures object at 0x7f7a799b1910>¶
libcloud.test.compute.test_linode module¶
- class libcloud.test.compute.test_linode.LinodeMockHttp(host, port, *args, **kwargs)[source]¶
Bases: libcloud.test.MockHttp
- fixtures = <libcloud.test.file_fixtures.ComputeFileFixtures object at 0x7f7a78f99c90>¶
- class libcloud.test.compute.test_linode.LinodeTest(methodName='runTest')[source]¶
Bases: unittest.case.TestCase, libcloud.test.compute.TestCaseMixin
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
libcloud.test.compute.test_nephoscale module¶
- class libcloud.test.compute.test_nephoscale.NephoScaleTest(methodName='runTest')[source]¶
Bases: unittest.case.TestCase, libcloud.test.compute.TestCaseMixin
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.
- class libcloud.test.compute.test_nephoscale.NephoscaleMockHttp(host, port, *args, **kwargs)[source]¶
Bases: libcloud.test.MockHttp
- fixtures = <libcloud.test.file_fixtures.ComputeFileFixtures object at 0x7f7a794fa150>¶
libcloud.test.compute.test_opennebula module¶
libcloud.test.compute.test_openstack module¶
libcloud.test.compute.test_opsource module¶
libcloud.test.compute.test_profitbricks module¶
libcloud.test.compute.test_rackspace module¶
libcloud.test.compute.test_rimuhosting module¶
- class libcloud.test.compute.test_rimuhosting.RimuHostingMockHttp(host, port, *args, **kwargs)[source]¶
Bases: libcloud.test.MockHttp
- fixtures = <libcloud.test.file_fixtures.ComputeFileFixtures object at 0x7f7a7a4a1e10>¶
- class libcloud.test.compute.test_rimuhosting.RimuHostingTest(methodName='runTest')[source]¶
Bases: unittest.case.TestCase, libcloud.test.compute.TestCaseMixin
Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.