Files
python-group-based-policy-c…/gbpclient/tests/unit/test_cli20_purge.py
Kent Wu 0e4c0dc8df Implement the 'gbp purge <tenant ID>' CLI
This basically follows what 'neutron purge' CLI is doing. And here is the
neutron client patch for that:

https://review.openstack.org/#/c/276541

Some special care has to be done to take care of auto_ptg/l2p/l3p created
under implicit workflow otherwise the CLI will report failures while deleting
those.

Also publish the purge() API thru gbpclient interface.

Change-Id: Ib1c515f0b66cf4b958472b8f56ba1a4e574e8431
2017-03-15 15:27:32 -07:00

28 lines
1.3 KiB
Python

# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
from neutronclient.tests.unit import test_cli20_purge
class CLITestV20Purge(test_cli20_purge.CLITestV20Purge):
def setUp(self):
super(CLITestV20Purge, self).setUp()
self.resource_types = ['policy_target', 'policy_target_group',
'l2_policy', 'l3_policy', 'external_policy',
'nat_pool', 'external_segment',
'policy_rule_set', 'policy_rule',
'policy_classifier', 'policy_action',
'network_service_policy',
'servicechain_instance', 'servicechain_spec',
'servicechain_node', 'service_profile']