How to use list_endpoint_groups_for_project method in tempest

Best Python code snippet using tempest_python

endpoint_group.py

Source:endpoint_group.py Github

copy

Full Screen

1# Licensed under the Apache License, Version 2.0 (the "License"); you may2# not use this file except in compliance with the License. You may obtain3# a copy of the License at4#5# http://www.apache.org/licenses/LICENSE-2.06#7# Unless required by applicable law or agreed to in writing, software8# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT9# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the10# License for the specific language governing permissions and limitations11# under the License.12from oslo_log import versionutils13from oslo_policy import policy14from keystone.common.policies import base15DEPRECATED_REASON = (16 "The endpoint groups API is now aware of system scope and default roles."17)18deprecated_list_endpoint_groups = policy.DeprecatedRule(19 name=base.IDENTITY % 'list_endpoint_groups',20 check_str=base.RULE_ADMIN_REQUIRED,21 deprecated_reason=DEPRECATED_REASON,22 deprecated_since=versionutils.deprecated.TRAIN23)24deprecated_get_endpoint_group = policy.DeprecatedRule(25 name=base.IDENTITY % 'get_endpoint_group',26 check_str=base.RULE_ADMIN_REQUIRED,27 deprecated_reason=DEPRECATED_REASON,28 deprecated_since=versionutils.deprecated.TRAIN29)30deprecated_list_projects_assoc_with_endpoint_group = policy.DeprecatedRule(31 name=base.IDENTITY % 'list_projects_associated_with_endpoint_group',32 check_str=base.RULE_ADMIN_REQUIRED,33 deprecated_reason=DEPRECATED_REASON,34 deprecated_since=versionutils.deprecated.TRAIN35)36deprecated_list_endpoints_assoc_with_endpoint_group = policy.DeprecatedRule(37 name=base.IDENTITY % 'list_endpoints_associated_with_endpoint_group',38 check_str=base.RULE_ADMIN_REQUIRED,39 deprecated_reason=DEPRECATED_REASON,40 deprecated_since=versionutils.deprecated.TRAIN41)42deprecated_get_endpoint_group_in_project = policy.DeprecatedRule(43 name=base.IDENTITY % 'get_endpoint_group_in_project',44 check_str=base.RULE_ADMIN_REQUIRED,45 deprecated_reason=DEPRECATED_REASON,46 deprecated_since=versionutils.deprecated.TRAIN47)48deprecated_list_endpoint_groups_for_project = policy.DeprecatedRule(49 name=base.IDENTITY % 'list_endpoint_groups_for_project',50 check_str=base.RULE_ADMIN_REQUIRED,51 deprecated_reason=DEPRECATED_REASON,52 deprecated_since=versionutils.deprecated.TRAIN53)54deprecated_create_endpoint_group = policy.DeprecatedRule(55 name=base.IDENTITY % 'create_endpoint_group',56 check_str=base.RULE_ADMIN_REQUIRED,57 deprecated_reason=DEPRECATED_REASON,58 deprecated_since=versionutils.deprecated.TRAIN59)60deprecated_update_endpoint_group = policy.DeprecatedRule(61 name=base.IDENTITY % 'update_endpoint_group',62 check_str=base.RULE_ADMIN_REQUIRED,63 deprecated_reason=DEPRECATED_REASON,64 deprecated_since=versionutils.deprecated.TRAIN65)66deprecated_delete_endpoint_group = policy.DeprecatedRule(67 name=base.IDENTITY % 'delete_endpoint_group',68 check_str=base.RULE_ADMIN_REQUIRED,69 deprecated_reason=DEPRECATED_REASON,70 deprecated_since=versionutils.deprecated.TRAIN71)72deprecated_add_endpoint_group_to_project = policy.DeprecatedRule(73 name=base.IDENTITY % 'add_endpoint_group_to_project',74 check_str=base.RULE_ADMIN_REQUIRED,75 deprecated_reason=DEPRECATED_REASON,76 deprecated_since=versionutils.deprecated.TRAIN77)78deprecated_remove_endpoint_group_from_project = policy.DeprecatedRule(79 name=base.IDENTITY % 'remove_endpoint_group_from_project',80 check_str=base.RULE_ADMIN_REQUIRED,81 deprecated_reason=DEPRECATED_REASON,82 deprecated_since=versionutils.deprecated.TRAIN83)84group_endpoint_policies = [85 policy.DocumentedRuleDefault(86 name=base.IDENTITY % 'create_endpoint_group',87 check_str=base.SYSTEM_ADMIN,88 scope_types=['system'],89 description='Create endpoint group.',90 operations=[{'path': '/v3/OS-EP-FILTER/endpoint_groups',91 'method': 'POST'}],92 deprecated_rule=deprecated_create_endpoint_group),93 policy.DocumentedRuleDefault(94 name=base.IDENTITY % 'list_endpoint_groups',95 check_str=base.SYSTEM_READER,96 scope_types=['system'],97 description='List endpoint groups.',98 operations=[{'path': '/v3/OS-EP-FILTER/endpoint_groups',99 'method': 'GET'}],100 deprecated_rule=deprecated_list_endpoint_groups),101 policy.DocumentedRuleDefault(102 name=base.IDENTITY % 'get_endpoint_group',103 check_str=base.SYSTEM_READER,104 scope_types=['system'],105 description='Get endpoint group.',106 operations=[{'path': ('/v3/OS-EP-FILTER/endpoint_groups/'107 '{endpoint_group_id}'),108 'method': 'GET'},109 {'path': ('/v3/OS-EP-FILTER/endpoint_groups/'110 '{endpoint_group_id}'),111 'method': 'HEAD'}],112 deprecated_rule=deprecated_get_endpoint_group),113 policy.DocumentedRuleDefault(114 name=base.IDENTITY % 'update_endpoint_group',115 check_str=base.SYSTEM_ADMIN,116 scope_types=['system'],117 description='Update endpoint group.',118 operations=[{'path': ('/v3/OS-EP-FILTER/endpoint_groups/'119 '{endpoint_group_id}'),120 'method': 'PATCH'}],121 deprecated_rule=deprecated_update_endpoint_group),122 policy.DocumentedRuleDefault(123 name=base.IDENTITY % 'delete_endpoint_group',124 check_str=base.SYSTEM_ADMIN,125 scope_types=['system'],126 description='Delete endpoint group.',127 operations=[{'path': ('/v3/OS-EP-FILTER/endpoint_groups/'128 '{endpoint_group_id}'),129 'method': 'DELETE'}],130 deprecated_rule=deprecated_delete_endpoint_group),131 policy.DocumentedRuleDefault(132 name=base.IDENTITY % 'list_projects_associated_with_endpoint_group',133 check_str=base.SYSTEM_READER,134 scope_types=['system'],135 description=('List all projects associated with a specific endpoint '136 'group.'),137 operations=[{'path': ('/v3/OS-EP-FILTER/endpoint_groups/'138 '{endpoint_group_id}/projects'),139 'method': 'GET'}],140 deprecated_rule=deprecated_list_projects_assoc_with_endpoint_group),141 policy.DocumentedRuleDefault(142 name=base.IDENTITY % 'list_endpoints_associated_with_endpoint_group',143 check_str=base.SYSTEM_READER,144 scope_types=['system'],145 description='List all endpoints associated with an endpoint group.',146 operations=[{'path': ('/v3/OS-EP-FILTER/endpoint_groups/'147 '{endpoint_group_id}/endpoints'),148 'method': 'GET'}],149 deprecated_rule=deprecated_list_endpoints_assoc_with_endpoint_group),150 policy.DocumentedRuleDefault(151 name=base.IDENTITY % 'get_endpoint_group_in_project',152 check_str=base.SYSTEM_READER,153 scope_types=['system'],154 description=('Check if an endpoint group is associated with a '155 'project.'),156 operations=[{'path': ('/v3/OS-EP-FILTER/endpoint_groups/'157 '{endpoint_group_id}/projects/{project_id}'),158 'method': 'GET'},159 {'path': ('/v3/OS-EP-FILTER/endpoint_groups/'160 '{endpoint_group_id}/projects/{project_id}'),161 'method': 'HEAD'}],162 deprecated_rule=deprecated_get_endpoint_group_in_project),163 policy.DocumentedRuleDefault(164 name=base.IDENTITY % 'list_endpoint_groups_for_project',165 check_str=base.SYSTEM_READER,166 scope_types=['system'],167 description='List endpoint groups associated with a specific project.',168 operations=[{'path': ('/v3/OS-EP-FILTER/projects/{project_id}/'169 'endpoint_groups'),170 'method': 'GET'}],171 deprecated_rule=deprecated_list_endpoint_groups_for_project),172 policy.DocumentedRuleDefault(173 name=base.IDENTITY % 'add_endpoint_group_to_project',174 check_str=base.SYSTEM_ADMIN,175 scope_types=['system'],176 description='Allow a project to access an endpoint group.',177 operations=[{'path': ('/v3/OS-EP-FILTER/endpoint_groups/'178 '{endpoint_group_id}/projects/{project_id}'),179 'method': 'PUT'}],180 deprecated_rule=deprecated_add_endpoint_group_to_project),181 policy.DocumentedRuleDefault(182 name=base.IDENTITY % 'remove_endpoint_group_from_project',183 check_str=base.SYSTEM_ADMIN,184 scope_types=['system'],185 description='Remove endpoint group from project.',186 operations=[{'path': ('/v3/OS-EP-FILTER/endpoint_groups/'187 '{endpoint_group_id}/projects/{project_id}'),188 'method': 'DELETE'}],189 deprecated_rule=deprecated_remove_endpoint_group_from_project)190]191def list_rules():...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run tempest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful