Daniel Mellado | 3c0aeab | 2016-01-29 11:30:25 +0000 | [diff] [blame] | 1 | # Copyright 2015 |
| 2 | # All Rights Reserved. |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 5 | # not use this file except in compliance with the License. You may obtain |
| 6 | # a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 12 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 13 | # License for the specific language governing permissions and limitations |
| 14 | # under the License. |
| 15 | |
| 16 | |
| 17 | import os |
| 18 | |
Takashi Kajinami | bc8970f | 2025-07-16 22:41:07 +0900 | [diff] [blame] | 19 | from tempest import config |
Daniel Mellado | 3c0aeab | 2016-01-29 11:30:25 +0000 | [diff] [blame] | 20 | from tempest.test_discover import plugins |
| 21 | |
Takashi Kajinami | bc8970f | 2025-07-16 22:41:07 +0900 | [diff] [blame] | 22 | from neutron_tempest_plugin import config as neutron_config |
| 23 | |
Ihar Hrachyshka | e3b612c | 2016-04-18 23:47:33 +0200 | [diff] [blame] | 24 | |
Daniel Mellado | 3c0aeab | 2016-01-29 11:30:25 +0000 | [diff] [blame] | 25 | class NeutronTempestPlugin(plugins.TempestPlugin): |
| 26 | def load_tests(self): |
Ihar Hrachyshka | e3b612c | 2016-04-18 23:47:33 +0200 | [diff] [blame] | 27 | base_path = os.path.split(os.path.dirname( |
Chandan Kumar | 667d3d3 | 2017-09-22 12:24:06 +0530 | [diff] [blame] | 28 | os.path.abspath(__file__)))[0] |
| 29 | test_dir = "neutron_tempest_plugin" |
Daniel Mellado | 3c0aeab | 2016-01-29 11:30:25 +0000 | [diff] [blame] | 30 | full_test_dir = os.path.join(base_path, test_dir) |
| 31 | return full_test_dir, base_path |
| 32 | |
| 33 | def register_opts(self, conf): |
Takashi Kajinami | bc8970f | 2025-07-16 22:41:07 +0900 | [diff] [blame] | 34 | config.register_opt_group(conf, neutron_config.neutron_group, |
| 35 | neutron_config.NeutronPluginOptions) |
| 36 | config.register_opt_group(conf, neutron_config.bgpvpn_group, |
| 37 | neutron_config.BgpvpnGroup) |
| 38 | config.register_opt_group(conf, neutron_config.fwaas_group, |
| 39 | neutron_config.FwaasGroup) |
| 40 | config.register_opt_group(conf, neutron_config.taas_group, |
| 41 | neutron_config.TaasGroup) |
| 42 | config.register_opt_group(conf, neutron_config.dynamic_routing_group, |
| 43 | neutron_config.DynamicRoutingGroup) |
| 44 | config.register_opt_group(conf, neutron_config.dns_feature_group, |
| 45 | neutron_config.DnsFeatureGroup) |
Daniel Mellado | 3c0aeab | 2016-01-29 11:30:25 +0000 | [diff] [blame] | 46 | |
| 47 | def get_opt_lists(self): |
Takashi Kajinami | bc8970f | 2025-07-16 22:41:07 +0900 | [diff] [blame] | 48 | return [ |
| 49 | (neutron_config.neutron_group.name, |
| 50 | neutron_config.NeutronPluginOptions), |
| 51 | (neutron_config.bgpvpn_group.name, |
| 52 | neutron_config.BgpvpnGroup), |
| 53 | (neutron_config.fwaas_group.name, |
| 54 | neutron_config.FwaasGroup), |
| 55 | (neutron_config.taas_group.name, |
| 56 | neutron_config.TaasGroup), |
| 57 | (neutron_config.dynamic_routing_group.name, |
| 58 | neutron_config.DynamicRoutingGroup), |
| 59 | (neutron_config.dns_feature_group.name, |
| 60 | neutron_config.DnsFeatureGroup) |
| 61 | ] |