diff --git a/neutron/conf/policies/agent.py b/neutron/conf/policies/agent.py index a4279b688b6..e96ab412c65 100644 --- a/neutron/conf/policies/agent.py +++ b/neutron/conf/policies/agent.py @@ -25,7 +25,7 @@ DEPRECATION_REASON = ( rules = [ policy.DocumentedRuleDefault( name='get_agent', - check_str=base.SYSTEM_READER, + check_str=base.ADMIN, description='Get an agent', operations=[ { @@ -46,7 +46,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='update_agent', - check_str=base.SYSTEM_ADMIN, + check_str=base.ADMIN, description='Update an agent', operations=[ { @@ -63,7 +63,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='delete_agent', - check_str=base.SYSTEM_ADMIN, + check_str=base.ADMIN, description='Delete an agent', operations=[ { @@ -80,7 +80,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='create_dhcp-network', - check_str=base.SYSTEM_ADMIN, + check_str=base.ADMIN, description='Add a network to a DHCP agent', operations=[ { @@ -97,7 +97,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='get_dhcp-networks', - check_str=base.SYSTEM_READER, + check_str=base.ADMIN, description='List networks on a DHCP agent', operations=[ { @@ -114,7 +114,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='delete_dhcp-network', - check_str=base.SYSTEM_ADMIN, + check_str=base.ADMIN, description='Remove a network from a DHCP agent', operations=[ { @@ -131,7 +131,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='create_l3-router', - check_str=base.SYSTEM_ADMIN, + check_str=base.ADMIN, description='Add a router to an L3 agent', operations=[ { @@ -148,7 +148,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='get_l3-routers', - check_str=base.SYSTEM_READER, + check_str=base.ADMIN, description='List routers on an L3 agent', operations=[ { @@ -165,7 +165,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='delete_l3-router', - check_str=base.SYSTEM_ADMIN, + check_str=base.ADMIN, description='Remove a router from an L3 agent', operations=[ { @@ -182,7 +182,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='get_dhcp-agents', - check_str=base.SYSTEM_READER, + check_str=base.ADMIN, description='List DHCP agents hosting a network', operations=[ { @@ -199,7 +199,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='get_l3-agents', - check_str=base.SYSTEM_READER, + check_str=base.ADMIN, description='List L3 agents hosting a router', operations=[ { diff --git a/neutron/conf/policies/availability_zone.py b/neutron/conf/policies/availability_zone.py index cd2a57c83af..7a5431c14d2 100644 --- a/neutron/conf/policies/availability_zone.py +++ b/neutron/conf/policies/availability_zone.py @@ -22,7 +22,7 @@ DEPRECATION_REASON = ( rules = [ policy.DocumentedRuleDefault( name='get_availability_zone', - check_str=base.SYSTEM_READER, + check_str=base.ADMIN, description='List availability zones', operations=[ { diff --git a/neutron/conf/policies/base.py b/neutron/conf/policies/base.py index 836a1b5ba65..18364380811 100644 --- a/neutron/conf/policies/base.py +++ b/neutron/conf/policies/base.py @@ -33,26 +33,33 @@ RULE_ADMIN_OR_NET_OWNER_OR_ADVSVC = policy_or(RULE_ADMIN_OR_NET_OWNER, RULE_ADVSVC) RULE_ADMIN_OR_PARENT_OWNER = 'rule:admin_or_ext_parent_owner' +# For completion of the phase 1 +# https://governance.openstack.org/tc/goals/selected/consistent-and-secure-rbac.html#phase-1 +# there is now ADMIN role +ADMIN = "rule:admin_only" # Generic policy check string for system administrators. These are the people # who need the highest level of authorization to operate the deployment. # They're allowed to create, read, update, or delete any system-specific # resource. They can also operate on project-specific resources where # applicable (e.g., removing networks or routers) -SYSTEM_ADMIN = 'role:admin and system_scope:all' +SYSTEM_ADMIN = 'role:admin' + +# SYSTEM_MEMBER and SYSTEM_READER roles aren't really used as for now, they +# will be after completion of whole Secure-RBAC goal # Generic policy check string for system users who don't require all the # authorization that system administrators typically have. This persona, or # check string, typically isn't used by default, but it's existence it useful # in the event a deployment wants to offload some administrative action from # system administrator to system members -SYSTEM_MEMBER = 'role:member and system_scope:all' +SYSTEM_MEMBER = 'role:member' # Generic policy check string for read-only access to system-level resources. # This persona is useful for someone who needs access for auditing or even # support. These users are also able to view project-specific resources where # applicable (e.g., listing all networks in the deployment, regardless of the # project they belong to). -SYSTEM_READER = 'role:reader and system_scope:all' +SYSTEM_READER = 'role:reader' # This check string is reserved for actions that require the highest level of # authorization on a project or resources within the project (e.g., setting the @@ -73,10 +80,8 @@ PROJECT_READER = 'role:reader and project_id:%(project_id)s' # protecting APIs designed to operate with multiple scopes (e.g., a system # administrator should be able to delete any router in the deployment, a # project member should only be able to delete routers in their project). -SYSTEM_ADMIN_OR_PROJECT_MEMBER = ( - '(' + SYSTEM_ADMIN + ') or (' + PROJECT_MEMBER + ')') -SYSTEM_OR_PROJECT_READER = ( - '(' + SYSTEM_READER + ') or (' + PROJECT_READER + ')') +ADMIN_OR_PROJECT_READER = ( + '(' + ADMIN + ') or (' + PROJECT_READER + ')') # Additional rules needed in Neutron RULE_NET_OWNER = 'rule:network_owner' diff --git a/neutron/conf/policies/flavor.py b/neutron/conf/policies/flavor.py index 6867009d965..e33f6802a32 100644 --- a/neutron/conf/policies/flavor.py +++ b/neutron/conf/policies/flavor.py @@ -30,7 +30,7 @@ DEPRECATION_REASON = ( rules = [ policy.DocumentedRuleDefault( name='create_flavor', - check_str=base.SYSTEM_ADMIN, + check_str=base.ADMIN, description='Create a flavor', operations=[ { @@ -47,7 +47,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='get_flavor', - check_str=base.SYSTEM_OR_PROJECT_READER, + check_str=base.ADMIN_OR_PROJECT_READER, description='Get a flavor', operations=[ { @@ -68,7 +68,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='update_flavor', - check_str=base.SYSTEM_ADMIN, + check_str=base.ADMIN, description='Update a flavor', operations=[ { @@ -85,7 +85,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='delete_flavor', - check_str=base.SYSTEM_ADMIN, + check_str=base.ADMIN, description='Delete a flavor', operations=[ { @@ -103,7 +103,7 @@ rules = [ policy.DocumentedRuleDefault( name='create_service_profile', - check_str=base.SYSTEM_ADMIN, + check_str=base.ADMIN, description='Create a service profile', operations=[ { @@ -120,7 +120,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='get_service_profile', - check_str=base.SYSTEM_READER, + check_str=base.ADMIN, description='Get a service profile', operations=[ { @@ -141,7 +141,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='update_service_profile', - check_str=base.SYSTEM_ADMIN, + check_str=base.ADMIN, description='Update a service profile', operations=[ { @@ -158,7 +158,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='delete_service_profile', - check_str=base.SYSTEM_ADMIN, + check_str=base.ADMIN, description='Delete a service profile', operations=[ { @@ -176,7 +176,7 @@ rules = [ policy.RuleDefault( name='get_flavor_service_profile', - check_str=base.SYSTEM_OR_PROJECT_READER, + check_str=base.ADMIN_OR_PROJECT_READER, description=( 'Get a flavor associated with a given service profiles. ' 'There is no corresponding GET operations in API currently. ' @@ -191,7 +191,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='create_flavor_service_profile', - check_str=base.SYSTEM_ADMIN, + check_str=base.ADMIN, description='Associate a flavor with a service profile', operations=[ { @@ -208,7 +208,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='delete_flavor_service_profile', - check_str=base.SYSTEM_ADMIN, + check_str=base.ADMIN, description='Disassociate a flavor with a service profile', operations=[ { diff --git a/neutron/conf/policies/logging.py b/neutron/conf/policies/logging.py index ef8409493ad..b9ba4325cf8 100644 --- a/neutron/conf/policies/logging.py +++ b/neutron/conf/policies/logging.py @@ -27,7 +27,7 @@ RESOURCE_PATH = '/log/logs/{id}' rules = [ policy.DocumentedRuleDefault( name='get_loggable_resource', - check_str=base.SYSTEM_READER, + check_str=base.ADMIN, scope_types=['system'], description='Get loggable resources', operations=[ @@ -44,7 +44,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='create_log', - check_str=base.SYSTEM_ADMIN, + check_str=base.ADMIN, scope_types=['system'], description='Create a network log', operations=[ @@ -61,7 +61,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='get_log', - check_str=base.SYSTEM_READER, + check_str=base.ADMIN, scope_types=['system'], description='Get a network log', operations=[ @@ -82,7 +82,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='update_log', - check_str=base.SYSTEM_ADMIN, + check_str=base.ADMIN, scope_types=['system'], description='Update a network log', operations=[ @@ -99,7 +99,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='delete_log', - check_str=base.SYSTEM_ADMIN, + check_str=base.ADMIN, scope_types=['system'], description='Delete a network log', operations=[ diff --git a/neutron/conf/policies/network_ip_availability.py b/neutron/conf/policies/network_ip_availability.py index c65aa0d4153..2c14b14ca67 100644 --- a/neutron/conf/policies/network_ip_availability.py +++ b/neutron/conf/policies/network_ip_availability.py @@ -23,7 +23,7 @@ The network IP availability API now support system scope and default roles. rules = [ policy.DocumentedRuleDefault( name='get_network_ip_availability', - check_str=base.SYSTEM_READER, + check_str=base.ADMIN, scope_types=['system'], description='Get network IP availability', operations=[ diff --git a/neutron/conf/policies/network_segment_range.py b/neutron/conf/policies/network_segment_range.py index 6ef2ea65a21..77d1dfaad83 100644 --- a/neutron/conf/policies/network_segment_range.py +++ b/neutron/conf/policies/network_segment_range.py @@ -29,7 +29,7 @@ RESOURCE_PATH = '/network_segment_ranges/{id}' rules = [ policy.DocumentedRuleDefault( name='create_network_segment_range', - check_str=base.SYSTEM_ADMIN, + check_str=base.ADMIN, scope_types=['system'], description='Create a network segment range', operations=[ @@ -46,7 +46,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='get_network_segment_range', - check_str=base.SYSTEM_READER, + check_str=base.ADMIN, scope_types=['system'], description='Get a network segment range', operations=[ @@ -67,7 +67,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='update_network_segment_range', - check_str=base.SYSTEM_ADMIN, + check_str=base.ADMIN, scope_types=['system'], description='Update a network segment range', operations=[ @@ -84,7 +84,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='delete_network_segment_range', - check_str=base.SYSTEM_ADMIN, + check_str=base.ADMIN, scope_types=['system'], description='Delete a network segment range', operations=[ diff --git a/neutron/conf/policies/qos.py b/neutron/conf/policies/qos.py index 05586b38fcc..9a0dae0ac69 100644 --- a/neutron/conf/policies/qos.py +++ b/neutron/conf/policies/qos.py @@ -96,12 +96,7 @@ rules = [ policy.DocumentedRuleDefault( name='get_rule_type', - # NOTE: we are using role:admin instead of PROJECT_ADMIN here because - # rule_type resource don't belongs to any project so using - # PROJECT_ADMIN as check string would cause enforcement error - check_str=base.policy_or( - "role:admin", - base.SYSTEM_READER), + check_str=base.ADMIN, scope_types=['system', 'project'], description='Get available QoS rule types', operations=[ diff --git a/neutron/conf/policies/quotas.py b/neutron/conf/policies/quotas.py index 9a35af29d94..15ad30de0a1 100644 --- a/neutron/conf/policies/quotas.py +++ b/neutron/conf/policies/quotas.py @@ -27,7 +27,7 @@ RESOURCE_PATH = '/quota/{id}' rules = [ policy.DocumentedRuleDefault( name='get_quota', - check_str=base.SYSTEM_READER, + check_str=base.ADMIN, scope_types=['system'], description='Get a resource quota', operations=[ @@ -48,7 +48,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='update_quota', - check_str=base.SYSTEM_ADMIN, + check_str=base.ADMIN, scope_types=['system'], description='Update a resource quota', operations=[ @@ -65,7 +65,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='delete_quota', - check_str=base.SYSTEM_ADMIN, + check_str=base.ADMIN, scope_types=['system'], description='Delete a resource quota', operations=[ diff --git a/neutron/conf/policies/segment.py b/neutron/conf/policies/segment.py index 3c77bd659fb..de0182a254f 100644 --- a/neutron/conf/policies/segment.py +++ b/neutron/conf/policies/segment.py @@ -25,7 +25,7 @@ RESOURCE_PATH = '/segments/{id}' rules = [ policy.DocumentedRuleDefault( name='create_segment', - check_str=base.SYSTEM_ADMIN, + check_str=base.ADMIN, scope_types=['system'], description='Create a segment', operations=[ @@ -42,7 +42,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='get_segment', - check_str=base.SYSTEM_READER, + check_str=base.ADMIN, scope_types=['system'], description='Get a segment', operations=[ @@ -63,7 +63,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='update_segment', - check_str=base.SYSTEM_ADMIN, + check_str=base.ADMIN, scope_types=['system'], description='Update a segment', operations=[ @@ -80,7 +80,7 @@ rules = [ ), policy.DocumentedRuleDefault( name='delete_segment', - check_str=base.SYSTEM_ADMIN, + check_str=base.ADMIN, scope_types=['system'], description='Delete a segment', operations=[ diff --git a/neutron/conf/policies/service_type.py b/neutron/conf/policies/service_type.py index a701241ef19..1f6b41bbfd5 100644 --- a/neutron/conf/policies/service_type.py +++ b/neutron/conf/policies/service_type.py @@ -22,7 +22,7 @@ DEPRECATION_REASON = ( rules = [ policy.DocumentedRuleDefault( name='get_service_provider', - # NOTE: it can't be SYSTEM_OR_PROJECT_READER constant from the base + # NOTE: it can't be ADMIN_OR_PROJECT_READER constant from the base # module because that is using "project_id" in the check string and the # service_provider resource don't belongs to any project thus such # check string would fail enforcment. diff --git a/neutron/tests/unit/conf/policies/test_address_group.py b/neutron/tests/unit/conf/policies/test_address_group.py index b431db4f43b..b4e2dc01e57 100644 --- a/neutron/tests/unit/conf/policies/test_address_group.py +++ b/neutron/tests/unit/conf/policies/test_address_group.py @@ -47,6 +47,8 @@ class SystemAdminTests(AddressGroupAPITestCase): class SystemMemberTests(SystemAdminTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberTests, self).setUp() self.context = self.system_member_ctx @@ -54,6 +56,8 @@ class SystemMemberTests(SystemAdminTests): class SystemReaderTests(SystemMemberTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderTests, self).setUp() self.context = self.system_reader_ctx diff --git a/neutron/tests/unit/conf/policies/test_address_scope.py b/neutron/tests/unit/conf/policies/test_address_scope.py index 009195029fd..3feca6e1828 100644 --- a/neutron/tests/unit/conf/policies/test_address_scope.py +++ b/neutron/tests/unit/conf/policies/test_address_scope.py @@ -97,6 +97,8 @@ class SystemAdminTests(AddressScopeAPITestCase): class SystemMemberTests(SystemAdminTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberTests, self).setUp() self.context = self.system_member_ctx @@ -104,6 +106,8 @@ class SystemMemberTests(SystemAdminTests): class SystemReaderTests(SystemMemberTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderTests, self).setUp() self.context = self.system_reader_ctx diff --git a/neutron/tests/unit/conf/policies/test_agent.py b/neutron/tests/unit/conf/policies/test_agent.py index a6857a8f70f..fd681ba0c29 100644 --- a/neutron/tests/unit/conf/policies/test_agent.py +++ b/neutron/tests/unit/conf/policies/test_agent.py @@ -92,6 +92,8 @@ class SystemAdminTests(AgentAPITestCase): class SystemMemberTests(SystemAdminTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberTests, self).setUp() self.context = self.system_member_ctx @@ -135,6 +137,8 @@ class SystemMemberTests(SystemAdminTests): class SystemReaderTests(SystemMemberTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderTests, self).setUp() self.context = self.system_reader_ctx diff --git a/neutron/tests/unit/conf/policies/test_auto_allocated_topology.py b/neutron/tests/unit/conf/policies/test_auto_allocated_topology.py index 56643f44e37..bb56154d7b8 100644 --- a/neutron/tests/unit/conf/policies/test_auto_allocated_topology.py +++ b/neutron/tests/unit/conf/policies/test_auto_allocated_topology.py @@ -65,6 +65,8 @@ class SystemAdminTests(AutoAllocatedTopologyAPITestCase): class SystemMemberTests(AutoAllocatedTopologyAPITestCase): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberTests, self).setUp() self.context = self.system_member_ctx @@ -84,6 +86,8 @@ class SystemMemberTests(AutoAllocatedTopologyAPITestCase): class SystemReaderTests(SystemMemberTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderTests, self).setUp() self.context = self.system_reader_ctx diff --git a/neutron/tests/unit/conf/policies/test_availability_zone.py b/neutron/tests/unit/conf/policies/test_availability_zone.py index 696a571579d..7cc74a91e0a 100644 --- a/neutron/tests/unit/conf/policies/test_availability_zone.py +++ b/neutron/tests/unit/conf/policies/test_availability_zone.py @@ -25,13 +25,58 @@ class AvailabilityZoneAPITestCase(base.PolicyBaseTestCase): super(AvailabilityZoneAPITestCase, self).setUp() self.target = {} - def test_system_reader_can_get_availability_zone(self): - self.assertTrue( - policy.enforce(self.system_reader_ctx, "get_availability_zone", - self.target)) - def test_project_reader_can_not_get_availability_zone(self): +class SystemAdminTests(AvailabilityZoneAPITestCase): + + def setUp(self): + super(SystemAdminTests, self).setUp() + self.context = self.system_admin_ctx + + def test_get_availability_zone(self): + self.assertTrue( + policy.enforce(self.context, "get_availability_zone", self.target)) + + +class SystemMemberTests(SystemAdminTests): + + def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") + super(SystemMemberTests, self).setUp() + self.context = self.system_member_ctx + + +class SystemReaderTests(SystemMemberTests): + + def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") + super(SystemReaderTests, self).setUp() + self.context = self.system_reader_ctx + + +class ProjectAdminTests(AvailabilityZoneAPITestCase): + + def setUp(self): + super(ProjectAdminTests, self).setUp() + self.context = self.project_admin_ctx + + def test_get_availability_zone(self): self.assertRaises( base_policy.InvalidScope, policy.enforce, - self.project_reader_ctx, "get_availability_zone", self.target) + self.context, "get_availability_zone", self.target) + + +class ProjectMemberTests(ProjectAdminTests): + + def setUp(self): + super(ProjectMemberTests, self).setUp() + self.context = self.project_member_ctx + + +class ProjectReaderTests(ProjectMemberTests): + + def setUp(self): + super(ProjectReaderTests, self).setUp() + self.context = self.project_reader_ctx diff --git a/neutron/tests/unit/conf/policies/test_flavor.py b/neutron/tests/unit/conf/policies/test_flavor.py index 98236e7465a..b4086684b48 100644 --- a/neutron/tests/unit/conf/policies/test_flavor.py +++ b/neutron/tests/unit/conf/policies/test_flavor.py @@ -84,6 +84,8 @@ class SystemAdminTests(FlavorAPITestCase): class SystemMemberTests(FlavorAPITestCase): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberTests, self).setUp() self.context = self.system_member_ctx @@ -149,6 +151,8 @@ class SystemMemberTests(FlavorAPITestCase): class SystemReaderTests(SystemMemberTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderTests, self).setUp() self.context = self.system_reader_ctx diff --git a/neutron/tests/unit/conf/policies/test_floatingip.py b/neutron/tests/unit/conf/policies/test_floatingip.py index 7c0d18ebfd6..7c4626565c2 100644 --- a/neutron/tests/unit/conf/policies/test_floatingip.py +++ b/neutron/tests/unit/conf/policies/test_floatingip.py @@ -93,6 +93,8 @@ class SystemAdminTests(FloatingIPAPITestCase): class SystemMemberTests(SystemAdminTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberTests, self).setUp() self.context = self.system_member_ctx @@ -100,6 +102,8 @@ class SystemMemberTests(SystemAdminTests): class SystemReaderTests(SystemMemberTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderTests, self).setUp() self.context = self.system_reader_ctx diff --git a/neutron/tests/unit/conf/policies/test_floatingip_pools.py b/neutron/tests/unit/conf/policies/test_floatingip_pools.py index 0c35aeec6e1..fdda54afbfc 100644 --- a/neutron/tests/unit/conf/policies/test_floatingip_pools.py +++ b/neutron/tests/unit/conf/policies/test_floatingip_pools.py @@ -42,6 +42,8 @@ class SystemAdminTests(FloatingipPoolsAPITestCase): class SystemMemberTests(SystemAdminTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberTests, self).setUp() self.context = self.system_member_ctx @@ -49,6 +51,8 @@ class SystemMemberTests(SystemAdminTests): class SystemReaderTests(SystemAdminTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderTests, self).setUp() self.context = self.system_reader_ctx diff --git a/neutron/tests/unit/conf/policies/test_floatingip_port_forwarding.py b/neutron/tests/unit/conf/policies/test_floatingip_port_forwarding.py index 56193e70e52..3e4ab91aeb8 100644 --- a/neutron/tests/unit/conf/policies/test_floatingip_port_forwarding.py +++ b/neutron/tests/unit/conf/policies/test_floatingip_port_forwarding.py @@ -104,6 +104,8 @@ class SystemAdminTests(FloatingipPortForwardingAPITestCase): class SystemMemberTests(SystemAdminTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberTests, self).setUp() self.context = self.system_member_ctx @@ -111,6 +113,8 @@ class SystemMemberTests(SystemAdminTests): class SystemReaderTests(SystemMemberTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderTests, self).setUp() self.context = self.system_reader_ctx diff --git a/neutron/tests/unit/conf/policies/test_l3_conntrack_helper.py b/neutron/tests/unit/conf/policies/test_l3_conntrack_helper.py index 77f84d79e7d..13d3325cdf2 100644 --- a/neutron/tests/unit/conf/policies/test_l3_conntrack_helper.py +++ b/neutron/tests/unit/conf/policies/test_l3_conntrack_helper.py @@ -96,6 +96,8 @@ class SystemAdminTests(L3ConntrackHelperAPITestCase): class SystemMemberTests(SystemAdminTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberTests, self).setUp() self.context = self.system_member_ctx @@ -103,6 +105,8 @@ class SystemMemberTests(SystemAdminTests): class SystemReaderTests(SystemMemberTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderTests, self).setUp() self.context = self.system_reader_ctx diff --git a/neutron/tests/unit/conf/policies/test_local_ip.py b/neutron/tests/unit/conf/policies/test_local_ip.py index d9968297921..905ff86d470 100644 --- a/neutron/tests/unit/conf/policies/test_local_ip.py +++ b/neutron/tests/unit/conf/policies/test_local_ip.py @@ -61,6 +61,8 @@ class SystemAdminTests(LocalIPAPITestCase): class SystemMemberTests(SystemAdminTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberTests, self).setUp() self.context = self.system_member_ctx @@ -68,6 +70,8 @@ class SystemMemberTests(SystemAdminTests): class SystemReaderTests(SystemMemberTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderTests, self).setUp() self.context = self.system_reader_ctx diff --git a/neutron/tests/unit/conf/policies/test_local_ip_association.py b/neutron/tests/unit/conf/policies/test_local_ip_association.py index e3fd50c1abf..0b79c0cee33 100644 --- a/neutron/tests/unit/conf/policies/test_local_ip_association.py +++ b/neutron/tests/unit/conf/policies/test_local_ip_association.py @@ -92,6 +92,8 @@ class SystemAdminTests(LocalIPAssociationAPITestCase): class SystemMemberTests(SystemAdminTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberTests, self).setUp() self.context = self.system_member_ctx @@ -99,6 +101,8 @@ class SystemMemberTests(SystemAdminTests): class SystemReaderTests(SystemMemberTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderTests, self).setUp() self.context = self.system_reader_ctx diff --git a/neutron/tests/unit/conf/policies/test_logging.py b/neutron/tests/unit/conf/policies/test_logging.py index 2185339884b..4e575ba48f4 100644 --- a/neutron/tests/unit/conf/policies/test_logging.py +++ b/neutron/tests/unit/conf/policies/test_logging.py @@ -56,6 +56,8 @@ class SystemAdminTests(LoggingAPITestCase): class SystemMemberTests(LoggingAPITestCase): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberTests, self).setUp() self.context = self.system_member_ctx @@ -86,6 +88,8 @@ class SystemMemberTests(LoggingAPITestCase): class SystemReaderTests(SystemMemberTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderTests, self).setUp() self.context = self.system_reader_ctx diff --git a/neutron/tests/unit/conf/policies/test_metering.py b/neutron/tests/unit/conf/policies/test_metering.py index df53a3fca9b..cf51144f944 100644 --- a/neutron/tests/unit/conf/policies/test_metering.py +++ b/neutron/tests/unit/conf/policies/test_metering.py @@ -97,6 +97,8 @@ class SystemAdminTests(MeteringAPITestCase): class SystemMemberTests(SystemAdminTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberTests, self).setUp() self.context = self.system_member_ctx @@ -104,6 +106,8 @@ class SystemMemberTests(SystemAdminTests): class SystemReaderTests(SystemMemberTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderTests, self).setUp() self.context = self.system_reader_ctx diff --git a/neutron/tests/unit/conf/policies/test_ndp_proxy.py b/neutron/tests/unit/conf/policies/test_ndp_proxy.py index 63f51fab27f..d987c1d02e0 100644 --- a/neutron/tests/unit/conf/policies/test_ndp_proxy.py +++ b/neutron/tests/unit/conf/policies/test_ndp_proxy.py @@ -77,6 +77,8 @@ class SystemAdminTests(NDPProxyAPITestCase): class SystemMemberTests(SystemAdminTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberTests, self).setUp() self.context = self.system_member_ctx @@ -84,6 +86,8 @@ class SystemMemberTests(SystemAdminTests): class SystemReaderTests(SystemMemberTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderTests, self).setUp() self.context = self.system_reader_ctx diff --git a/neutron/tests/unit/conf/policies/test_network.py b/neutron/tests/unit/conf/policies/test_network.py index e3557ded8a1..7ab18200b2a 100644 --- a/neutron/tests/unit/conf/policies/test_network.py +++ b/neutron/tests/unit/conf/policies/test_network.py @@ -303,6 +303,8 @@ class SystemAdminTests(NetworkAPITestCase): class SystemMemberTests(SystemAdminTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberTests, self).setUp() self.context = self.system_member_ctx @@ -310,6 +312,8 @@ class SystemMemberTests(SystemAdminTests): class SystemReaderTests(SystemMemberTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderTests, self).setUp() self.context = self.system_reader_ctx diff --git a/neutron/tests/unit/conf/policies/test_network_ip_availability.py b/neutron/tests/unit/conf/policies/test_network_ip_availability.py index f303a9479fa..d216fa1ab47 100644 --- a/neutron/tests/unit/conf/policies/test_network_ip_availability.py +++ b/neutron/tests/unit/conf/policies/test_network_ip_availability.py @@ -41,6 +41,8 @@ class SystemAdminTests(NetworkIPAvailabilityAPITestCase): class SystemMemberTests(SystemAdminTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberTests, self).setUp() self.context = self.system_member_ctx @@ -48,6 +50,8 @@ class SystemMemberTests(SystemAdminTests): class SystemReaderTests(SystemMemberTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderTests, self).setUp() self.context = self.system_member_ctx diff --git a/neutron/tests/unit/conf/policies/test_network_segment_range.py b/neutron/tests/unit/conf/policies/test_network_segment_range.py index ac023401a91..8bd96e09180 100644 --- a/neutron/tests/unit/conf/policies/test_network_segment_range.py +++ b/neutron/tests/unit/conf/policies/test_network_segment_range.py @@ -56,6 +56,8 @@ class SystemAdminTests(NetworkSegmentRangeAPITestCase): class SystemMemberTests(SystemAdminTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberTests, self).setUp() self.context = self.system_member_ctx @@ -81,6 +83,8 @@ class SystemMemberTests(SystemAdminTests): class SystemReaderTests(SystemMemberTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderTests, self).setUp() self.context = self.system_reader_ctx diff --git a/neutron/tests/unit/conf/policies/test_port.py b/neutron/tests/unit/conf/policies/test_port.py index cc1acc1270f..934e71166f1 100644 --- a/neutron/tests/unit/conf/policies/test_port.py +++ b/neutron/tests/unit/conf/policies/test_port.py @@ -410,6 +410,8 @@ class SystemAdminTests(PortAPITestCase): class SystemMemberTests(SystemAdminTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberTests, self).setUp() self.context = self.system_member_ctx @@ -417,6 +419,8 @@ class SystemMemberTests(SystemAdminTests): class SystemReaderTests(SystemMemberTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderTests, self).setUp() self.context = self.system_reader_ctx diff --git a/neutron/tests/unit/conf/policies/test_qos.py b/neutron/tests/unit/conf/policies/test_qos.py index bc2b79e05aa..393ac4b23e4 100644 --- a/neutron/tests/unit/conf/policies/test_qos.py +++ b/neutron/tests/unit/conf/policies/test_qos.py @@ -72,6 +72,8 @@ class SystemAdminQosPolicyTests(QosPolicyAPITestCase): class SystemMemberQosPolicyTests(SystemAdminQosPolicyTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberQosPolicyTests, self).setUp() self.context = self.system_member_ctx @@ -79,6 +81,8 @@ class SystemMemberQosPolicyTests(SystemAdminQosPolicyTests): class SystemReaderQosPolicyTests(SystemMemberQosPolicyTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderQosPolicyTests, self).setUp() self.context = self.system_reader_ctx @@ -177,6 +181,8 @@ class SystemAdminQosRuleTypeTests(QosRuleTypeAPITestCase): class SystemMemberQosRuleTypeTests(SystemAdminQosRuleTypeTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberQosRuleTypeTests, self).setUp() self.context = self.system_member_ctx @@ -184,6 +190,8 @@ class SystemMemberQosRuleTypeTests(SystemAdminQosRuleTypeTests): class SystemReaderQosRuleTypeTests(SystemMemberQosRuleTypeTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderQosRuleTypeTests, self).setUp() self.context = self.system_reader_ctx @@ -337,6 +345,8 @@ class SystemMemberQosBandwidthLimitRuleTests( SystemAdminQosBandwidthLimitRuleTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberQosBandwidthLimitRuleTests, self).setUp() self.context = self.system_member_ctx @@ -345,6 +355,8 @@ class SystemReaderQosBandwidthLimitRuleTests( SystemMemberQosBandwidthLimitRuleTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderQosBandwidthLimitRuleTests, self).setUp() self.context = self.system_reader_ctx @@ -603,6 +615,8 @@ class SystemAdminQosDSCPMarkingRuleTests(QosRulesAPITestCase): class SystemMemberQosDSCPMarkingRuleTests(SystemAdminQosDSCPMarkingRuleTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberQosDSCPMarkingRuleTests, self).setUp() self.context = self.system_member_ctx @@ -610,6 +624,8 @@ class SystemMemberQosDSCPMarkingRuleTests(SystemAdminQosDSCPMarkingRuleTests): class SystemReaderQosDSCPMarkingRuleTests(SystemMemberQosDSCPMarkingRuleTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderQosDSCPMarkingRuleTests, self).setUp() self.context = self.system_reader_ctx @@ -869,6 +885,8 @@ class SystemMemberQosMinimumBandwidthRuleTests( SystemAdminQosMinimumBandwidthRuleTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberQosMinimumBandwidthRuleTests, self).setUp() self.context = self.system_member_ctx @@ -877,6 +895,8 @@ class SystemReaderQosMinimumBandwidthRuleTests( SystemMemberQosMinimumBandwidthRuleTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderQosMinimumBandwidthRuleTests, self).setUp() self.context = self.system_reader_ctx @@ -1136,6 +1156,8 @@ class SystemMemberQosMinimumPacketRateRuleTests( SystemAdminQosMinimumPacketRateRuleTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberQosMinimumPacketRateRuleTests, self).setUp() self.context = self.system_member_ctx @@ -1144,6 +1166,8 @@ class SystemReaderQosMinimumPacketRateRuleTests( SystemMemberQosMinimumPacketRateRuleTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderQosMinimumPacketRateRuleTests, self).setUp() self.context = self.system_reader_ctx diff --git a/neutron/tests/unit/conf/policies/test_quotas.py b/neutron/tests/unit/conf/policies/test_quotas.py index 1b8b958a9b1..d1d7561fe8d 100644 --- a/neutron/tests/unit/conf/policies/test_quotas.py +++ b/neutron/tests/unit/conf/policies/test_quotas.py @@ -55,6 +55,8 @@ class SystemAdminTests(QuoatsAPITestCase): class SystemMemberTests(SystemAdminTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberTests, self).setUp() self.context = self.system_member_ctx @@ -82,6 +84,8 @@ class SystemMemberTests(SystemAdminTests): class SystemReaderTests(SystemMemberTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderTests, self).setUp() self.context = self.system_reader_ctx diff --git a/neutron/tests/unit/conf/policies/test_rbac.py b/neutron/tests/unit/conf/policies/test_rbac.py index 45e7ae071c4..30df8acd046 100644 --- a/neutron/tests/unit/conf/policies/test_rbac.py +++ b/neutron/tests/unit/conf/policies/test_rbac.py @@ -107,6 +107,8 @@ class SystemAdminTests(RbacAPITestCase): class SystemMemberTests(SystemAdminTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberTests, self).setUp() self.context = self.system_member_ctx @@ -114,6 +116,8 @@ class SystemMemberTests(SystemAdminTests): class SystemReaderTests(SystemMemberTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderTests, self).setUp() self.context = self.system_reader_ctx diff --git a/neutron/tests/unit/conf/policies/test_router.py b/neutron/tests/unit/conf/policies/test_router.py index d9a42070792..2805dab7421 100644 --- a/neutron/tests/unit/conf/policies/test_router.py +++ b/neutron/tests/unit/conf/policies/test_router.py @@ -258,6 +258,8 @@ class SystemAdminTests(RouterAPITestCase): class SystemMemberTests(SystemAdminTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberTests, self).setUp() self.context = self.system_member_ctx @@ -265,6 +267,8 @@ class SystemMemberTests(SystemAdminTests): class SystemReaderTests(SystemMemberTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderTests, self).setUp() self.context = self.system_reader_ctx @@ -741,6 +745,8 @@ class SystemAdminExtrarouteTests(ExtrarouteAPITestCase): class SystemMemberExtrarouteTests(SystemAdminExtrarouteTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberExtrarouteTests, self).setUp() self.context = self.system_member_ctx @@ -748,6 +754,8 @@ class SystemMemberExtrarouteTests(SystemAdminExtrarouteTests): class SystemReaderExtrarouteTests(SystemMemberExtrarouteTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderExtrarouteTests, self).setUp() self.context = self.system_reader_ctx diff --git a/neutron/tests/unit/conf/policies/test_security_group.py b/neutron/tests/unit/conf/policies/test_security_group.py index 530a02670d4..3c78cbe44f5 100644 --- a/neutron/tests/unit/conf/policies/test_security_group.py +++ b/neutron/tests/unit/conf/policies/test_security_group.py @@ -80,6 +80,8 @@ class SystemAdminSecurityGroupTests(SecurityGroupAPITestCase): class SystemMemberSecurityGroupTests(SystemAdminSecurityGroupTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberSecurityGroupTests, self).setUp() self.context = self.system_member_ctx @@ -87,6 +89,8 @@ class SystemMemberSecurityGroupTests(SystemAdminSecurityGroupTests): class SystemReaderSecurityGroupTests(SystemMemberSecurityGroupTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderSecurityGroupTests, self).setUp() self.context = self.system_reader_ctx @@ -238,6 +242,8 @@ class SystemAdminSecurityGroupRuleTests(SecurityGroupRuleAPITestCase): class SystemMemberSecurityGroupRuleTests(SystemAdminSecurityGroupRuleTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberSecurityGroupRuleTests, self).setUp() self.context = self.system_member_ctx @@ -245,6 +251,8 @@ class SystemMemberSecurityGroupRuleTests(SystemAdminSecurityGroupRuleTests): class SystemReaderSecurityGroupRuleTests(SystemMemberSecurityGroupRuleTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderSecurityGroupRuleTests, self).setUp() self.context = self.system_reader_ctx diff --git a/neutron/tests/unit/conf/policies/test_segment.py b/neutron/tests/unit/conf/policies/test_segment.py index 9ad1a1d4d50..c53fe363ccc 100644 --- a/neutron/tests/unit/conf/policies/test_segment.py +++ b/neutron/tests/unit/conf/policies/test_segment.py @@ -52,6 +52,8 @@ class SystemAdminTests(SegmentAPITestCase): class SystemMemberTests(SystemAdminTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberTests, self).setUp() self.context = self.system_member_ctx @@ -77,6 +79,8 @@ class SystemMemberTests(SystemAdminTests): class SystemReaderTests(SystemMemberTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderTests, self).setUp() self.context = self.system_reader_ctx diff --git a/neutron/tests/unit/conf/policies/test_service_type.py b/neutron/tests/unit/conf/policies/test_service_type.py index 989fa7ed17c..c8e87ae7808 100644 --- a/neutron/tests/unit/conf/policies/test_service_type.py +++ b/neutron/tests/unit/conf/policies/test_service_type.py @@ -38,6 +38,8 @@ class SystemAdminTests(ServiceTypeAPITestCase): class SystemMemberTests(SystemAdminTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberTests, self).setUp() self.context = self.system_member_ctx @@ -45,16 +47,22 @@ class SystemMemberTests(SystemAdminTests): class SystemReaderTests(SystemMemberTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderTests, self).setUp() self.context = self.system_reader_ctx -class ProjectAdminTests(SystemAdminTests): +class ProjectAdminTests(ServiceTypeAPITestCase): def setUp(self): super(ProjectAdminTests, self).setUp() self.context = self.project_admin_ctx + def test_get_service_provider(self): + self.assertTrue( + policy.enforce(self.context, 'get_service_provider', self.target)) + class ProjectMemberTests(ProjectAdminTests): diff --git a/neutron/tests/unit/conf/policies/test_subnet.py b/neutron/tests/unit/conf/policies/test_subnet.py index 81b3bfc4b1c..6a1b3a360f9 100644 --- a/neutron/tests/unit/conf/policies/test_subnet.py +++ b/neutron/tests/unit/conf/policies/test_subnet.py @@ -147,6 +147,8 @@ class SystemAdminTests(SubnetAPITestCase): class SystemMemberTests(SystemAdminTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberTests, self).setUp() self.context = self.system_member_ctx @@ -154,6 +156,8 @@ class SystemMemberTests(SystemAdminTests): class SystemReaderTests(SystemMemberTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderTests, self).setUp() self.context = self.system_reader_ctx diff --git a/neutron/tests/unit/conf/policies/test_subnetpool.py b/neutron/tests/unit/conf/policies/test_subnetpool.py index f6fc11ca07a..e4224452a27 100644 --- a/neutron/tests/unit/conf/policies/test_subnetpool.py +++ b/neutron/tests/unit/conf/policies/test_subnetpool.py @@ -137,6 +137,8 @@ class SystemAdminTests(SubnetpoolAPITestCase): class SystemMemberTests(SystemAdminTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberTests, self).setUp() self.context = self.system_member_ctx @@ -144,6 +146,8 @@ class SystemMemberTests(SystemAdminTests): class SystemReaderTests(SystemMemberTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderTests, self).setUp() self.context = self.system_reader_ctx diff --git a/neutron/tests/unit/conf/policies/test_trunk.py b/neutron/tests/unit/conf/policies/test_trunk.py index 5f3e72d6ea0..23f642f0fb2 100644 --- a/neutron/tests/unit/conf/policies/test_trunk.py +++ b/neutron/tests/unit/conf/policies/test_trunk.py @@ -107,6 +107,8 @@ class SystemAdminTests(TrunkAPITestCase): class SystemMemberTests(SystemAdminTests): def setUp(self): + self.skipTest("SYSTEM_MEMBER persona isn't supported in phase1 of the " + "community goal") super(SystemMemberTests, self).setUp() self.context = self.system_member_ctx @@ -114,6 +116,8 @@ class SystemMemberTests(SystemAdminTests): class SystemReaderTests(SystemMemberTests): def setUp(self): + self.skipTest("SYSTEM_READER persona isn't supported in phase1 of the " + "community goal") super(SystemReaderTests, self).setUp() self.context = self.system_reader_ctx