desc
stringlengths 3
26.7k
| decl
stringlengths 11
7.89k
| bodies
stringlengths 8
553k
|
---|---|---|
'Initial provisioning, no IP assigned'
| def test_query_instance_init(self):
| reply = (200, {'state': 'provisioning'})
with patch.object(joyent, 'show_instance', return_value=reply):
result = joyent.query_instance(self.vm_)
self.assertTrue(joyent.__utils__['cloud.fire_event'].called_once())
self.assertEqual(result, None)
|
'IP address assigned but not yet ready'
| def test_query_instance_has_ip(self):
| reply = (200, {'primaryIp': '1.1.1.1', 'state': 'provisioning'})
with patch.object(joyent, 'show_instance', return_value=reply):
result = joyent.query_instance(self.vm_)
self.assertTrue(joyent.__utils__['cloud.fire_event'].called_once())
self.assertEqual(result, None)
|
'IP address assigned, and VM is ready'
| def test_query_instance_ready(self):
| reply = (200, {'primaryIp': '1.1.1.1', 'state': 'running'})
with patch.object(joyent, 'show_instance', return_value=reply):
result = joyent.query_instance(self.vm_)
self.assertTrue(joyent.__utils__['cloud.fire_event'].called_once())
self.assertEqual(result, '1.1.1.1')
|
'Tests that a SaltCloudSystemExit error is raised when trying to call
avail_images with --action or -a.'
| def test_avail_images_action(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.avail_images, 'action')
|
'Tests that a SaltCloudSystemExit is raised when trying to call avail_locations
with --action or -a.'
| def test_avail_locations_action(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.avail_locations, 'action')
|
'Tests that a SaltCloudSystemExit is raised when trying to call avail_sizes
with --action or -a.'
| def test_avail_sizes_action(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.avail_sizes, 'action')
|
'Tests that avail_sizes returns an empty dictionary.'
| def test_avail_sizes(self):
| self.assertEqual(opennebula.avail_sizes(call='foo'), {})
|
'Tests that a SaltCloudSystemExit is raised when trying to call list_clusters
with --action or -a.'
| def test_list_clusters_action(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.list_clusters, 'action')
|
'Tests that a SaltCloudSystemExit is raised when trying to call list_datastores
with --action or -a.'
| def test_list_datastores_action(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.list_datastores, 'action')
|
'Tests that a SaltCloudSystemExit is raised when trying to call list_datastores
with --action or -a.'
| def test_list_hosts_action(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.list_hosts, 'action')
|
'Tests that a SaltCloudSystemExit is raised when trying to call list_nodes
with --action or -a.'
| def test_list_nodes_action(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.list_nodes, 'action')
|
'Tests that a SaltCloudSystemExit is raised when trying to call list_nodes_full
with --action or -a.'
| def test_list_nodes_full_action(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.list_nodes_full, 'action')
|
'Tests that a SaltCloudSystemExit is raised when trying to call list_nodes_full
with --action or -a.'
| def test_list_nodes_select_action(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.list_nodes_select, 'action')
|
'Tests that a SaltCloudSystemExit is raised when trying to call
list_security_groups with --action or -a.'
| def test_list_security_groups_action(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.list_security_groups, 'action')
|
'Tests that a SaltCloudSystemExit is raised when trying to call list_templates
with --action or -a.'
| def test_list_templates_action(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.list_templates, 'action')
|
'Tests that a SaltCloudSystemExit is raised when trying to call list_vns
with --action or -a.'
| def test_list_vns_action(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.list_vns, 'action')
|
'Tests that a SaltCloudSystemExit is raised when trying to call reboot
with anything other that --action or -a.'
| def test_reboot_error(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.reboot, 'my-vm', 'foo')
|
'Tests that a SaltCloudSystemExit is raised when trying to call start
with anything other that --action or -a.'
| def test_start_error(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.start, 'my-vm', 'foo')
|
'Tests that a SaltCloudSystemExit is raised when trying to call stop
with anything other that --action or -a.'
| def test_stop_error(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.stop, 'my-vm', 'foo')
|
'Tests that a SaltCloudSystemExit is raised when trying to call
get_cluster_id with --action or -a.'
| def test_get_cluster_id_action(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.get_cluster_id, call='action')
|
'Tests that a SaltCloudSystemExit is raised when no name is provided.'
| def test_get_cluster_id_no_name(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.get_cluster_id, None, call='foo')
|
'Tests that a SaltCloudSystemExit is raised when no name is provided.'
| def test_get_cluster_id_not_found(self):
| with patch('salt.cloud.clouds.opennebula.list_clusters', MagicMock(return_value={'foo': {'id': 'bar'}})):
self.assertRaises(SaltCloudSystemExit, opennebula.get_cluster_id, kwargs={'name': 'test'}, call='function')
|
'Tests that the function returns successfully.'
| def test_get_cluster_id_success(self):
| with patch('salt.cloud.clouds.opennebula.list_clusters', MagicMock(return_value={'test-cluster': {'id': '100'}})):
mock_id = '100'
mock_kwargs = {'name': 'test-cluster'}
self.assertEqual(opennebula.get_cluster_id(mock_kwargs, 'foo'), mock_id)
|
'Tests that a SaltCloudSystemExit is raised when trying to call
get_datastore_id with --action or -a.'
| def test_get_datastore_id_action(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.get_datastore_id, call='action')
|
'Tests that a SaltCloudSystemExit is raised when no name is provided.'
| def test_get_datastore_id_no_name(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.get_datastore_id, None, call='foo')
|
'Tests that a SaltCloudSystemExit is raised when no name is provided.'
| def test_get_datastore_id_not_found(self):
| with patch('salt.cloud.clouds.opennebula.list_datastores', MagicMock(return_value={'test-datastore': {'id': '100'}})):
self.assertRaises(SaltCloudSystemExit, opennebula.get_datastore_id, kwargs={'name': 'test'}, call='function')
|
'Tests that the function returns successfully.'
| def test_get_datastore_id_success(self):
| with patch('salt.cloud.clouds.opennebula.list_datastores', MagicMock(return_value={'test-datastore': {'id': '100'}})):
mock_id = '100'
mock_kwargs = {'name': 'test-datastore'}
self.assertEqual(opennebula.get_datastore_id(mock_kwargs, 'foo'), mock_id)
|
'Tests that a SaltCloudSystemExit is raised when trying to call
get_host_id with --action or -a.'
| def test_get_host_id_action(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.get_host_id, call='action')
|
'Tests that a SaltCloudSystemExit is raised when no name is provided.'
| def test_get_host_id_no_name(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.get_host_id, None, call='foo')
|
'Tests that a SaltCloudSystemExit is raised when no name is provided.'
| def test_get_host_id_not_found(self):
| with patch('salt.cloud.clouds.opennebula.avail_locations', MagicMock(return_value={'test-host': {'id': '100'}})):
self.assertRaises(SaltCloudSystemExit, opennebula.get_host_id, kwargs={'name': 'test'}, call='function')
|
'Tests that the function returns successfully.'
| def test_get_host_id_success(self):
| with patch('salt.cloud.clouds.opennebula.avail_locations', MagicMock(return_value={'test-host': {'id': '100'}})):
mock_id = '100'
mock_kwargs = {'name': 'test-host'}
self.assertEqual(opennebula.get_host_id(mock_kwargs, 'foo'), mock_id)
|
'Tests that a SaltCloudNotFound is raised when the image doesn\'t exist.'
| def test_get_image_not_found(self):
| with patch('salt.cloud.clouds.opennebula.avail_images', MagicMock(return_value={})):
with patch('salt.config.get_cloud_config_value', MagicMock(return_value='foo')):
self.assertRaises(SaltCloudNotFound, opennebula.get_image, 'my-vm')
|
'Tests that the image is returned successfully.'
| def test_get_image_success(self):
| with patch('salt.cloud.clouds.opennebula.avail_images', MagicMock(return_value={'my-vm': {'name': 'my-vm', 'id': 0}})):
with patch('salt.config.get_cloud_config_value', MagicMock(return_value='my-vm')):
self.assertEqual(opennebula.get_image('my-vm'), 0)
|
'Tests that a SaltCloudSystemExit is raised when trying to call
get_image_id with --action or -a.'
| def test_get_image_id_action(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.get_image_id, call='action')
|
'Tests that a SaltCloudSystemExit is raised when no name is provided.'
| def test_get_image_id_no_name(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.get_image_id, None, call='foo')
|
'Tests that a SaltCloudSystemExit is raised when no name is provided.'
| def test_get_image_id_not_found(self):
| with patch('salt.cloud.clouds.opennebula.avail_images', MagicMock(return_value={'test-image': {'id': '100'}})):
self.assertRaises(SaltCloudSystemExit, opennebula.get_image_id, kwargs={'name': 'test'}, call='function')
|
'Tests that the function returns successfully.'
| def test_get_image_id_success(self):
| with patch('salt.cloud.clouds.opennebula.avail_images', MagicMock(return_value={'test-image': {'id': '100'}})):
mock_id = '100'
mock_kwargs = {'name': 'test-image'}
self.assertEqual(opennebula.get_image_id(mock_kwargs, 'foo'), mock_id)
|
'Tests that a SaltCloudNotFound is raised when the location doesn\'t exist.'
| def test_get_location_not_found(self):
| with patch('salt.cloud.clouds.opennebula.avail_locations', MagicMock(return_value={})):
with patch('salt.config.get_cloud_config_value', MagicMock(return_value='foo')):
self.assertRaises(SaltCloudNotFound, opennebula.get_location, 'my-vm')
|
'Tests that the image is returned successfully.'
| def test_get_location_success(self):
| with patch('salt.cloud.clouds.opennebula.avail_locations', MagicMock(return_value={'my-host': {'name': 'my-host', 'id': 0}})):
with patch('salt.config.get_cloud_config_value', MagicMock(return_value='my-host')):
self.assertEqual(opennebula.get_location('my-host'), 0)
|
'Tests that a SaltCloudSystemExit is raised when trying to call
get_host_id with --action or -a.'
| def test_get_secgroup_id_action(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.get_secgroup_id, call='action')
|
'Tests that a SaltCloudSystemExit is raised when no name is provided.'
| def test_get_secgroup_id_no_name(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.get_secgroup_id, None, call='foo')
|
'Tests that a SaltCloudSystemExit is raised when no name is provided.'
| def test_get_secgroup_id_not_found(self):
| with patch('salt.cloud.clouds.opennebula.list_security_groups', MagicMock(return_value={'test-security-group': {'id': '100'}})):
self.assertRaises(SaltCloudSystemExit, opennebula.get_secgroup_id, kwargs={'name': 'test'}, call='function')
|
'Tests that the function returns successfully.'
| def test_get_secgroup_id_success(self):
| with patch('salt.cloud.clouds.opennebula.list_security_groups', MagicMock(return_value={'test-secgroup': {'id': '100'}})):
mock_id = '100'
mock_kwargs = {'name': 'test-secgroup'}
self.assertEqual(opennebula.get_secgroup_id(mock_kwargs, 'foo'), mock_id)
|
'Tests that a SaltCloudSystemExit is raised when trying to call
get_template_id with --action or -a.'
| def test_get_template_id_action(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.get_template_id, call='action')
|
'Tests that a SaltCloudSystemExit is raised when no name is provided.'
| def test_get_template_id_no_name(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.get_template_id, None, call='foo')
|
'Tests that a SaltCloudSystemExit is raised when no name is provided.'
| def test_get_template_id_not_found(self):
| with patch('salt.cloud.clouds.opennebula.list_templates', MagicMock(return_value={'test-template': {'id': '100'}})):
self.assertRaises(SaltCloudSystemExit, opennebula.get_template_id, kwargs={'name': 'test'}, call='function')
|
'Tests that the function returns successfully.'
| def test_get_template_id_success(self):
| with patch('salt.cloud.clouds.opennebula.list_templates', MagicMock(return_value={'test-template': {'id': '100'}})):
mock_id = '100'
mock_kwargs = {'name': 'test-template'}
self.assertEqual(opennebula.get_template_id(mock_kwargs, 'foo'), mock_id)
|
'Tests that a SaltCloudSystemExit is raised when trying to call
get_vm_id with --action or -a.'
| def test_get_vm_id_action(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.get_vm_id, call='action')
|
'Tests that a SaltCloudSystemExit is raised when no name is provided.'
| def test_get_vm_id_no_name(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.get_vm_id, None, call='foo')
|
'Tests that a SaltCloudSystemExit is raised when no name is provided.'
| def test_get_vm_id_not_found(self):
| with patch('salt.cloud.clouds.opennebula.list_nodes', MagicMock(return_value={'test-vm': {'id': '100'}})):
self.assertRaises(SaltCloudSystemExit, opennebula.get_vm_id, kwargs={'name': 'test'}, call='function')
|
'Tests that the function returns successfully.'
| def test_get_vm_id_success(self):
| with patch('salt.cloud.clouds.opennebula.list_nodes', MagicMock(return_value={'test-vm': {'id': '100'}})):
mock_id = '100'
mock_kwargs = {'name': 'test-vm'}
self.assertEqual(opennebula.get_vm_id(mock_kwargs, 'foo'), mock_id)
|
'Tests that a SaltCloudSystemExit is raised when trying to call
get_vn_id with --action or -a.'
| def test_get_vn_id_action(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.get_vn_id, call='action')
|
'Tests that a SaltCloudSystemExit is raised when no name is provided.'
| def test_get_vn_id_no_name(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.get_vn_id, None, call='foo')
|
'Tests that a SaltCloudSystemExit is raised when no name is provided.'
| def test_get_vn_id_not_found(self):
| with patch('salt.cloud.clouds.opennebula.list_vns', MagicMock(return_value={'test-vn': {'id': '100'}})):
self.assertRaises(SaltCloudSystemExit, opennebula.get_vn_id, kwargs={'name': 'test'}, call='function')
|
'Tests that the function returns successfully.'
| def test_get_vn_id_success(self):
| with patch('salt.cloud.clouds.opennebula.list_vns', MagicMock(return_value={'test-vn': {'id': '100'}})):
mock_id = '100'
mock_kwargs = {'name': 'test-vn'}
self.assertEqual(opennebula.get_vn_id(mock_kwargs, 'foo'), mock_id)
|
'Tests that a SaltCloudSystemExit is raised when --function or -f is provided.'
| def test_destroy_function_error(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.destroy, 'my-vm', 'function')
|
'Tests that a SaltCloudSystemExit is raised when something other than
--function or -f is provided.'
| def test_image_allocate_function_error(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.image_allocate, 'foo')
|
'Tests that a SaltCloudSystemExit is raised when a neither a datastore_id
nor a datastore_name is provided.'
| def test_image_allocate_no_name_or_datastore_id(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.image_allocate, 'function')
|
'Tests that a SaltCloudSystemExit is raised when neither the path nor data args
are provided.'
| def test_image_allocate_no_path_or_data(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.image_allocate, 'function', kwargs={'datastore_id': '5'})
|
'Tests that a SaltCloudSystemExit is raised when something other than
--function or -f is provided.'
| def test_image_clone_function_error(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.image_clone, 'foo')
|
'Tests that a SaltCloudSystemExit is raised when a name isn\'t provided.'
| def test_image_clone_no_name(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.image_clone, 'function')
|
'Tests that a SaltCloudSystemExit is raised when neither the image_id nor
the image_name args are provided.'
| def test_image_clone_no_image_id_or_image_name(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.image_clone, 'function', kwargs={'name': 'test'})
|
'Tests that image_clone returns successfully'
| @skipIf(True, 'Need to figure out how to mock calls to the O.N. API first.')
def test_image_clone_success(self):
| with patch('image.clone', MagicMock(return_value=[True, 11, 0])):
name = 'test-image'
expected = {'action': 'image.clone', 'cloned': 'True', 'cloned_image_id': '11', 'cloned_image_name': name, 'error_code': '0'}
ret = opennebula.image_clone('function', kwargs={'name': name, 'image_id': 1})
self.assertEqual(expected, ret)
|
'Tests that a SaltCloudSystemExit is raised when something other than
--function or -f is provided.'
| def test_image_delete_function_error(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.image_delete, 'foo')
|
'Tests that a SaltCloudSystemExit is raised when a neither an image_id
nor a name is provided.'
| def test_image_delete_no_name_or_image_id(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.image_delete, 'function')
|
'Tests that a SaltCloudSystemExit is raised when something other than
--function or -f is provided.'
| def test_image_info_function_error(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.image_info, 'foo')
|
'Tests that a SaltCloudSystemExit is raised when a neither an image_id
nor a name is provided.'
| def test_image_info_no_image_id_or_image_name(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.image_info, 'function')
|
'Tests that a SaltCloudSystemExit is raised when something other than
--function or -f is provided.'
| def test_image_persist_function_error(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.image_persistent, 'foo')
|
'Tests that a SaltCloudSystemExit is raised when the persist kwarg is missing.'
| def test_image_persist_no_persist(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.image_persistent, 'function')
|
'Tests that a SaltCloudSystemExit is raised when a neither an image_id
nor a name is provided.'
| def test_image_persist_no_name_or_image_id(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.image_delete, 'function', kwargs={'persist': False})
|
'Tests that a SaltCloudSystemExit is raised when something other than
--function or -f is provided.'
| def test_image_snapshot_delete_function_error(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.image_snapshot_delete, call='foo')
|
'Tests that a SaltCloudSystemExit is raised when the snapshot_id kwarg is
missing.'
| def test_image_snapshot_delete_no_snapshot_id(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.image_snapshot_delete, call='function', kwargs=None)
|
'Tests that a SaltCloudSystemExit is raised when the image_id and image_name
kwargs are missing.'
| def test_image_snapshot_delete_no_image_name_or_image_id(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.image_snapshot_delete, call='function', kwargs={'snapshot_id': 0})
|
'Tests that a SaltCloudSystemExit is raised when something other than
--function or -f is provided.'
| def test_image_snapshot_revert_function_error(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.image_snapshot_revert, call='foo')
|
'Tests that a SaltCloudSystemExit is raised when the snapshot_id kwarg is
missing.'
| def test_image_snapshot_revert_no_snapshot_id(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.image_snapshot_revert, call='function', kwargs=None)
|
'Tests that a SaltCloudSystemExit is raised when the image_id and image_name
kwargs are missing.'
| def test_image_snapshot_revert_no_image_name_or_image_id(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.image_snapshot_revert, call='function', kwargs={'snapshot_id': 0})
|
'Tests that a SaltCloudSystemExit is raised when something other than
--function or -f is provided.'
| def test_image_snapshot_flatten_function_error(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.image_snapshot_flatten, call='foo')
|
'Tests that a SaltCloudSystemExit is raised when the snapshot_id kwarg is
missing.'
| def test_image_snapshot_flatten_no_snapshot_id(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.image_snapshot_flatten, call='function', kwargs=None)
|
'Tests that a SaltCloudSystemExit is raised when the image_id and image_name
kwargs are missing.'
| def test_image_snapshot_flatten_no_image_name_or_image_id(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.image_snapshot_flatten, call='function', kwargs={'snapshot_id': 0})
|
'Tests that a SaltCloudSystemExit is raised when something other than
--function or -f is provided.'
| def test_image_update_function_error(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.image_update, 'foo')
|
'Tests that a SaltCloudSystemExit is raised when the update_type kwarg is
missing.'
| def test_image_update_no_update_type(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.image_update, 'function')
|
'Tests that a SaltCloudSystemExit is raised when the update_type kwarg is
not a valid value.'
| def test_image_update_bad_update_type_value(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.image_update, 'function', kwargs={'update_type': 'foo'})
|
'Tests that a SaltCloudSystemExit is raised when the image_id and image_name
kwargs are missing.'
| def test_image_update_no_image_id_or_image_name(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.image_update, 'function', kwargs={'update_type': 'merge'})
|
'Tests that a SaltCloudSystemExit is raised when the data and path
kwargs are missing.'
| def test_image_update_no_data_or_path(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.image_update, 'function', kwargs={'update_type': 'merge', 'image_id': '0'})
|
'Tests that a SaltCloudSystemExit is raised when something other than
--action or -a is provided.'
| def test_show_instance_action_error(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.show_instance, VM_NAME, call='foo')
|
'Tests that the node was found successfully.'
| def test_show_instance_success(self):
| with patch('salt.cloud.clouds.opennebula._get_node', MagicMock(return_value={'my-vm': {'name': 'my-vm', 'id': 0}})):
ret = {'my-vm': {'name': 'my-vm', 'id': 0}}
self.assertEqual(opennebula.show_instance('my-vm', call='action'), ret)
|
'Tests that a SaltCloudSystemExit is raised when something other than
--function or -f is provided.'
| def test_secgroup_allocate_function_error(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.secgroup_allocate, 'foo')
|
'Tests that a SaltCloudSystemExit is raised when the data and path
kwargs are missing.'
| def test_secgroup_allocate_no_data_or_path(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.secgroup_allocate, 'function')
|
'Tests that a SaltCloudSystemExit is raised when something other than
--function or -f is provided.'
| def test_secgroup_clone_function_error(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.secgroup_clone, 'foo')
|
'Tests that a SaltCloudSystemExit is raised when the name kwarg is
missing.'
| def test_secgroup_clone_no_name(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.secgroup_clone, 'function')
|
'Tests that a SaltCloudSystemExit is raised when the secgroup_id and
secgroup_name kwargs are missing.'
| def test_secgroup_clone_no_secgroup_id_or_secgroup_name(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.secgroup_clone, 'function', kwargs={'name': 'test'})
|
'Tests that a SaltCloudSystemExit is raised when something other than
--function or -f is provided.'
| def test_secgroup_delete_function_error(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.secgroup_delete, 'foo')
|
'Tests that a SaltCloudSystemExit is raised when the secgroup_id and
name kwargs are missing.'
| def test_secgroup_delete_no_secgroup_id_or_name(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.secgroup_clone, 'function')
|
'Tests that a SaltCloudSystemExit is raised when something other than
--function or -f is provided.'
| def test_secgroup_info_function_error(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.secgroup_info, 'foo')
|
'Tests that a SaltCloudSystemExit is raised when the secgroup_id and
name kwargs are missing.'
| def test_secgroup_info_no_secgroup_id_or_name(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.secgroup_info, 'function')
|
'Tests that a SaltCloudSystemExit is raised when something other than
--function or -f is provided.'
| def test_secgroup_update_function_error(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.secgroup_update, 'foo')
|
'Tests that a SaltCloudSystemExit is raised when the update_type arg is
missing.'
| def test_secgroup_update_no_update_type(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.secgroup_update, 'function')
|
'Tests that a SaltCloudSystemExit is raised when the update_type contains
an invalid value.'
| def test_secgroup_update_bad_update_type_value(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.secgroup_update, 'function', kwargs={'update_type': 'foo'})
|
'Tests that a SaltCloudSystemExit is raised when the secgroup_id and
secgroup_name kwargs are missing.'
| def test_secgroup_update_no_secgroup_id_or_secgroup_name(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.secgroup_update, 'function', kwargs={'update_type': 'merge'})
|
'Tests that a SaltCloudSystemExit is raised when the data and
path kwargs are missing.'
| def test_secgroup_update_no_data_or_path(self):
| self.assertRaises(SaltCloudSystemExit, opennebula.secgroup_update, 'function', kwargs={'update_type': 'merge', 'secgroup_id': '0'})
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.