diff options
author | Igor Malinovskiy <u.glide@gmail.com> | 2020-04-26 20:25:50 +0300 |
---|---|---|
committer | Michael Johnson <johnsomor@gmail.com> | 2023-02-13 20:51:32 +0000 |
commit | bc39d23ff5ff45e7669cb4be9d2c28b9242cf9d9 (patch) | |
tree | 936488d5239b9ef1a7890c06006c38ec42bd3bc9 /designateclient/functionaltests/client.py | |
parent | 483e0d16c6b357a610634ad5f7db9ab61b41d353 (diff) | |
download | python-designateclient-bc39d23ff5ff45e7669cb4be9d2c28b9242cf9d9.tar.gz |
Add shared zone commands5.2.0
Co-Authored-By: Michael Johnson <johnsomor@gmail.com>
Change-Id: Iea92371176d9126205384624a18a9097acb3daef
Partial-Bug: #1714088
Depends-On: https://review.opendev.org/#/c/726334/
Diffstat (limited to 'designateclient/functionaltests/client.py')
-rw-r--r-- | designateclient/functionaltests/client.py | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/designateclient/functionaltests/client.py b/designateclient/functionaltests/client.py index 4d1d0b0..6edf377 100644 --- a/designateclient/functionaltests/client.py +++ b/designateclient/functionaltests/client.py @@ -348,9 +348,28 @@ class BlacklistCommands(object): return self.parsed_cmd(cmd, FieldValueModel, *args, **kwargs) +class SharedZoneCommands(object): + + def shared_zone_show(self, zone_id, shared_zone_id, *args, **kwargs): + cmd = 'zone share show {0} {1}'.format(zone_id, shared_zone_id) + return self.parsed_cmd(cmd, FieldValueModel, *args, **kwargs) + + def shared_zone_list(self, zone_id, *args, **kwargs): + cmd = 'zone share list {0}'.format(zone_id) + return self.parsed_cmd(cmd, ListModel, *args, **kwargs) + + def share_zone(self, zone_id, target_project_id, *args, **kwargs): + cmd = 'zone share create {0} {1}'.format(zone_id, target_project_id) + return self.parsed_cmd(cmd, FieldValueModel, *args, **kwargs) + + def unshare_zone(self, zone_id, shared_zone_id, *args, **kwargs): + cmd = 'zone share delete {0} {1}'.format(zone_id, shared_zone_id) + return self.parsed_cmd(cmd, FieldValueModel, *args, **kwargs) + + class DesignateCLI(base.CLIClient, ZoneCommands, ZoneTransferCommands, ZoneExportCommands, ZoneImportCommands, RecordsetCommands, - TLDCommands, BlacklistCommands): + TLDCommands, BlacklistCommands, SharedZoneCommands): # instantiate this once to minimize requests to keystone _CLIENTS = None |