compute.security_groups package

Submodules

compute.security_groups.base module

class BaseSecurityGroupsTest(*args, **kwargs)[source]

Bases: BaseV2ComputeTest

compute.security_groups.test_security_group_rules module

class SecurityGroupRulesTestJSON(*args, **kwargs)[source]

Bases: BaseSecurityGroupsTest

Test security group rules API

Test security group rules API with compute microversion less than 2.36.

test_security_group_rules_create()[source]

Test idempotent id: 850795d7-d4d3-4e55-b527-a774c0123d3a

Test creating security group rules

test_security_group_rules_create_with_optional_cidr()[source]

Test idempotent id: 7a01873e-3c38-4f30-80be-31a043cfe2fd

Test creating security group rules with optional field cidr

test_security_group_rules_create_with_optional_group_id()[source]

Test idempotent id: 7f5d2899-7705-4d4b-8458-4505188ffab6

Test creating security group rules with optional field group id

test_security_group_rules_delete_when_peer_group_deleted()[source]

Test idempotent id: fc5c5acf-2091-43a6-a6ae-e42760e9ffaf

Test security group rule gets deleted when peer group is deleted

test_security_group_rules_list()[source]

Test idempotent id: a6154130-5a55-4850-8be4-5e9e796dbf17

Test listing security group rules

compute.security_groups.test_security_group_rules_negative module

class SecurityGroupRulesNegativeTestJSON(*args, **kwargs)[source]

Bases: BaseSecurityGroupsTest

Negative tests of security group rules API

Negative tests of security group rules API with compute microversion less than 2.36.

test_create_security_group_rule_duplicate()[source]

Test idempotent id: 8bd56d02-3ffa-4d67-9933-b6b9a01d6089

Test creating duplicate security group rule should fail

test_create_security_group_rule_with_invalid_from_port()[source]

Test idempotent id: 12bbc875-1045-4f7a-be46-751277baedb9

Test creating security group rule with invalid from_port

Negative test: Creation of security group rule should fail with invalid from_port.

test_create_security_group_rule_with_invalid_id()[source]

Test idempotent id: 2244d7e4-adb7-4ecb-9930-2d77e123ce4f

Test creating security group rule with invalid parent group id

Negative test: Creation of security group rule should fail with parent group id which is not integer.

test_create_security_group_rule_with_invalid_ip_protocol()[source]

Test idempotent id: 84c81249-9f6e-439c-9bbf-cbb0d2cddbdf

Test creating security group rule with invalid ip protocol

Negative test: Creation of security group rule should fail with invalid ip_protocol.

test_create_security_group_rule_with_invalid_port_range()[source]

Test idempotent id: 00296fa9-0576-496a-ae15-fbab843189e0

Test creating security group rule with invalid port range

Negative test: Creation of security group rule should fail with invalid port range.

test_create_security_group_rule_with_invalid_to_port()[source]

Test idempotent id: ff88804d-144f-45d1-bf59-dd155838a43a

Test creating security group rule with invalid to_port

Negative test: Creation of security group rule should fail with invalid to_port.

test_create_security_group_rule_with_non_existent_id()[source]

Test idempotent id: 1d507e98-7951-469b-82c3-23f1e6b8c254

Test creating security group rule with non existent parent group

Negative test: Creation of security group rule should fail with non existent parent group id.

test_delete_security_group_rule_with_non_existent_id()[source]

Test idempotent id: 56fddcca-dbb8-4494-a0db-96e9f869527c

Test deleting non existent security group rule should fail

compute.security_groups.test_security_groups module

class SecurityGroupsTestJSON(*args, **kwargs)[source]

Bases: BaseSecurityGroupsTest

Test security groups API with compute microversion less than 2.36

test_list_security_groups_by_server()[source]

Test idempotent id: 79517d60-535a-438f-af3d-e6feab1cbea7

Test listing security groups by server

Create security groups and add them to a server, then list security groups by server, the added security groups should be in the list.

test_security_group_create_get_delete()[source]

Test idempotent id: ecc0da4a-2117-48af-91af-993cca39a615

Test create/get/delete security group

Security group should be created, fetched and deleted with char space between name along with leading and trailing spaces.

test_security_groups_create_list_delete()[source]

Test idempotent id: eb2b087d-633d-4d0d-a7bd-9e6ba35b32de

Test create/list/delete security groups

Positive test: Should return the list of security groups.

test_server_security_groups()[source]

Test idempotent id: fe4abc0d-83f5-4c50-ad11-57a1127297a2

Test adding security groups to a server

Checks that security groups may be added and linked to a server and not deleted if the server is active.

test_update_security_groups()[source]

Test idempotent id: 7d4e1d3c-3209-4d6d-b020-986304ebad1f

Test updating security group name and description

compute.security_groups.test_security_groups_negative module

class SecurityGroupsNegativeTestJSON(*args, **kwargs)[source]

Bases: BaseSecurityGroupsTest

Negative tests of security groups API

Negative tests of security groups API with compute microversion less than 2.36.

test_delete_nonexistent_security_group()[source]

Test idempotent id: 6727c00b-214c-4f9e-9a52-017ac3e98411

Test deleting non existent security group should fail

test_delete_security_group_without_passing_id()[source]

Test idempotent id: 1438f330-8fa4-4aeb-8a94-37c250106d7f

Test deleting security group passing empty group id should fail

test_delete_the_default_security_group()[source]

Test idempotent id: 36a1629f-c6da-4a26-b8b8-55e7e5d5cd58

Test deleting “default” security group should fail

test_security_group_create_with_duplicate_name()[source]

Test idempotent id: 9fdb4abc-6b66-4b27-b89c-eb215a956168

Test creating security group with duplicate name should fail

test_security_group_create_with_invalid_group_description()[source]

Test idempotent id: 777b6f14-aca9-4758-9e84-38783cfa58bc

Test creating security group with invalid group description

Negative test: Security group should not be created with description longer than 255 chars. Empty description is allowed by the API reference, however.

test_security_group_create_with_invalid_group_name()[source]

Test idempotent id: 1759c3cb-b0fc-44b7-86ce-c99236be911d

Test creating security group with invalid group name should fail

Negative test: Security group should not be created with group name as an empty string, or group name with white spaces, or group name with chars more than 255.

test_security_group_get_nonexistent_group()[source]

Test idempotent id: 673eaec1-9b3e-48ed-bdf1-2786c1b9661c

Test getting non existent security group details should fail

test_update_non_existent_security_group()[source]

Test idempotent id: 27edee9c-873d-4da6-a68a-3c256efebe8f

Test updating a non existent security group should fail

test_update_security_group_with_invalid_sg_des()[source]

Test idempotent id: 97d12b1c-a610-4194-93f1-ba859e718b45

Test updating security group to invalid description should fail

test_update_security_group_with_invalid_sg_id()[source]

Test idempotent id: 00579617-fe04-4e1c-9d08-ca7467d2e34b

Test updating security group with invalid group id should fail

test_update_security_group_with_invalid_sg_name()[source]

Test idempotent id: cda8d8b4-59f8-4087-821d-20cf5a03b3b1

Test updating security group to invalid group name should fail

Module contents