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>¶
-
-
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.
-
setUp
()¶ Set up the driver with the main user
-
test_create_group_location_does_not_exist
()¶ 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
()¶ Test ‘create_node’ without image.
Test the ‘create_node’ function without ‘image’ parameter raises an Exception
-
test_create_node_specify_group_name
()¶ Test ‘create_node’ into a concrete group.
-
test_create_node_specify_location
()¶ Test you can create a node specifying the location.
-
test_create_node_specify_wrong_image
()¶ 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
()¶ Test you can not create a node with wrong location.
-
test_destroy_deployed_group
()¶ Test ‘ex_destroy_group’ when there are machines running.
-
test_destroy_deployed_group_failed
()¶ Test ‘ex_destroy_group’ fails.
Test driver handles correctly when, for some reason, the asynchronous job fails.
-
test_destroy_group_invalid_state
()¶ 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
()¶ Test the ‘destroy_node’ invalid state.
Try to destroy a node when the node is not running.
-
test_destroy_node_response
()¶ ‘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
()¶ ‘destroy_node’ asynchronous error.
Test that the driver handles correctly when, for some reason, the ‘destroy’ job fails.
-
test_destroy_not_deployed_group
()¶ Test ‘ex_destroy_group’ when group is not deployed.
-
test_ex_create_and_delete_empty_group
()¶ Test the creation and deletion of an empty group.
-
test_forbidden_controlled
()¶ Test the Forbidden Exception is Controlled.
Test, through the ‘list_images’ method, that a ‘403 Forbidden’ raises an ‘ForbidenError’ instead of the ‘MalformedUrlException’
-
test_get_href
()¶
-
test_handle_other_errors_such_as_not_found
()¶ 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_list_locations_response
()¶
-
test_run_node
()¶ Test ‘ex_run_node’ feature.
-
test_run_node_failed
()¶ Test ‘ex_run_node’ fails.
Test driver handles correctly when, for some reason, the asynchronous job fails.
-
test_run_node_invalid_state
()¶ 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_auroracompute module¶
-
class
libcloud.test.compute.test_auroracompute.
AuroraComputeNodeDriverTestCase
(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
AuroraComputeNodeDriver
-
libcloud.test.compute.test_azure module¶
-
class
libcloud.test.compute.test_azure.
AzureMockHttp
(host, port, *args, **kwargs)[source]¶ Bases:
libcloud.test.MockHttp
-
fixtures
= <libcloud.test.file_fixtures.ComputeFileFixtures object>¶
-
-
class
libcloud.test.compute.test_azure.
AzureNodeDriverTests
(*args, **kwargs)[source]¶ Bases:
libcloud.test.LibcloudTestCase
-
KEY_FILE
= '/home/docs/checkouts/readthedocs.org/user_builds/libcloud/checkouts/v0.20.1/libcloud/test/compute/fixtures/azure/libcloud.pem'¶
-
SUBSCRIPTION_ID
= '3761b98b-673d-526c-8d55-fee918758e6e'¶
-
setUp
()¶
-
test_create_node_and_deployment_one_node
()¶
-
test_create_node_and_deployment_second_node
()¶
-
test_create_node_and_deployment_second_node_307_response
()¶
-
test_destroy_node_fail_node_does_not_exist
()¶
-
test_destroy_node_success_cloud_service_not_found
()¶
-
test_destroy_node_success_multiple_nodes_in_cloud_service
()¶
-
test_destroy_node_success_single_node_in_cloud_service
()¶
-
test_ex_create_cloud_service
()¶
-
test_ex_create_cloud_service_service_exists
()¶
-
test_ex_create_storage_service
()¶
-
test_ex_create_storage_service_service_exists
()¶
-
test_ex_destroy_cloud_service
()¶
-
test_ex_destroy_cloud_service_service_does_not_exist
()¶
-
test_ex_destroy_storage_service
()¶
-
test_ex_destroy_storage_service_service_does_not_exist
()¶
-
test_images_returned_successfully
()¶
-
test_images_returned_successfully_filter_by_location
()¶
-
test_list_nodes_returned_no_cloud_service
()¶
-
test_list_nodes_returned_no_deployments
()¶
-
test_list_nodes_returned_successfully
()¶
-
test_locations_returned_successfully
()¶
-
test_restart_node_fail_no_cloud_service
()¶
-
test_restart_node_fail_no_deployment
()¶
-
test_restart_node_fail_node_not_found
()¶
-
test_restart_node_success
()¶
-
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.
-
test_base_connection_key
()¶
-
test_base_connection_timeout
()¶
-
test_base_connection_userkey
()¶
-
test_base_node
()¶
-
test_base_node_driver
()¶
-
test_base_node_image
()¶
-
test_base_node_size
()¶
-
test_base_response
()¶
-
test_base_storage_volume
()¶
-
-
class
libcloud.test.compute.test_base.
TestValidateAuth
(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.
-
test_get_auth_default_no_feature
()¶
-
test_get_auth_default_password
()¶
-
test_get_auth_default_ssh_key
()¶
-
test_get_auth_generates_password_but_given_nonsense
()¶
-
test_get_auth_no_features_but_given_nonsense
()¶
-
test_get_auth_password
()¶
-
test_get_auth_password_but_given_ssh_key
()¶
-
test_get_auth_ssh
()¶
-
test_get_auth_ssh_but_given_password
()¶
-
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>¶
-
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>¶
-
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>¶
-
-
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_v1 module¶
libcloud.test.compute.test_digitalocean_v2 module¶
libcloud.test.compute.test_dimensiondata 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.
-
setUp
()¶
-
test_invalid_region
()¶
-
test_multiple_drivers_with_different_regions
()¶
-
-
class
libcloud.test.compute.test_elasticstack.
ElasticStackMockHttp
(host, port, *args, **kwargs)[source]¶ Bases:
libcloud.test.MockHttp
-
fixtures
= <libcloud.test.file_fixtures.ComputeFileFixtures object>¶
-
-
class
libcloud.test.compute.test_elasticstack.
ElasticStackTestCase
[source]¶ Bases:
object
-
setUp
()¶ 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’)
-
test_create_node
()¶
-
test_destroy_node
()¶
-
test_ex_set_node_configuration
()¶
-
test_ex_set_node_configuration_invalid_keys
()¶
-
test_invalid_creds
()¶
-
test_list_images
()¶
-
test_list_nodes
()¶
-
test_list_offline_node
()¶
-
test_list_sizes
()¶
-
test_malformed_response
()¶
-
test_parse_error
()¶
-
test_reboot_node
()¶
-
-
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.
-
setUp
()¶
-
-
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.
-
setUp
()¶
-
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>¶
-
-
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.
-
setUp
()¶
-
test_create_node
()¶
-
test_destroy_node
()¶
-
test_ex_edit_image
()¶
-
test_ex_edit_node
()¶
-
test_ex_list_ips
()¶
-
test_ex_save_image
()¶
-
test_get_state_invalid
()¶
-
test_invalid_creds
()¶
-
test_list_images
()¶
-
test_list_locations
()¶
-
test_list_nodes
()¶
-
test_malformed_reply
()¶
-
test_node_creation_without_free_public_ips
()¶
-
test_reboot_node
()¶
-
test_reboot_node_not_successful
()¶
-
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.
-
setUp
()¶
-
test_create_node_delayed_failure
()¶
-
test_create_node_immediate_failure
()¶
-
test_list_images_available
()¶
-
test_list_images_no_images_available
()¶
-
test_list_sizes_available
()¶
-
test_list_sizes_nodisk
()¶
-
-
class
libcloud.test.compute.test_ktucloud.
KTUCloudStackMockHttp
(*args, **kwargs)[source]¶ Bases:
libcloud.test.MockHttpTestCase
-
fixture_tag
= 'default'¶
-
fixtures
= <libcloud.test.file_fixtures.ComputeFileFixtures object>¶
-
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>¶
-
-
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.
-
setUp
()¶
-
test_create_node_password_auth
()¶
-
test_create_node_response
()¶
-
test_create_node_ssh_key_auth
()¶
-
test_destroy_node
()¶
-
test_destroy_volume
()¶
-
test_ex_create_volume
()¶
-
test_ex_list_volumes
()¶
-
test_list_images
()¶
-
test_list_nodes
()¶
-
test_list_sizes
()¶
-
test_reboot_node
()¶
-
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.
-
setUp
()¶
-
test_create_node
()¶
-
test_create_node_no_name
()¶
-
test_delete_password_keys
()¶
-
test_delete_ssh_keys
()¶
-
test_destroy_node
()¶
-
test_list_images
()¶
-
test_list_keys
()¶
-
test_list_locations
()¶
-
test_list_nodes
()¶
-
test_list_password_keys
()¶
-
test_list_sizes
()¶
-
test_list_ssh_keys
()¶
-
test_reboot_node
()¶
-
test_rename_node
()¶
-
test_start_node
()¶
-
test_stop_node
()¶
-
-
class
libcloud.test.compute.test_nephoscale.
NephoscaleMockHttp
(host, port, *args, **kwargs)[source]¶ Bases:
libcloud.test.MockHttp
-
fixtures
= <libcloud.test.file_fixtures.ComputeFileFixtures object>¶
-
libcloud.test.compute.test_onapp module¶
libcloud.test.compute.test_opennebula module¶
libcloud.test.compute.test_openstack module¶
libcloud.test.compute.test_opsource module¶
libcloud.test.compute.test_packet module¶
-
class
libcloud.test.compute.test_packet.
PacketMockHttp
(host, port, *args, **kwargs)[source]¶ Bases:
libcloud.test.MockHttp
-
fixtures
= <libcloud.test.file_fixtures.ComputeFileFixtures object>¶
-
-
class
libcloud.test.compute.test_packet.
PacketTest
(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_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>¶
-
-
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.
-
setUp
()¶
-
test_create_node
()¶
-
test_destroy_node
()¶
-
test_list_images
()¶
-
test_list_nodes
()¶
-
test_list_sizes
()¶
-
test_reboot_node
()¶
-