Merge "Fix Designate Zone ID lookup for real"

This commit is contained in:
Zuul 2020-01-24 07:46:00 +00:00 committed by Gerrit Code Review
commit b833f8ec2a
3 changed files with 1 additions and 9 deletions

View File

@ -39,7 +39,7 @@ class DesignateClientPlugin(client_plugin.ClientPlugin):
return isinstance(ex, exceptions.NotFound)
def get_zone_id(self, zone_id_or_name):
client = self.client(version='2')
client = self.client()
try:
zone_obj = client.zones.get(zone_id_or_name)
return zone_obj['id']

View File

@ -98,10 +98,6 @@ class DesignateRecordSet(resource.Resource):
entity = 'recordsets'
def client(self):
return super(DesignateRecordSet,
self).client(version=self.client_plugin().V2)
def handle_create(self):
args = dict((k, v) for k, v in six.iteritems(self.properties) if v)
args['type_'] = args.pop(self.TYPE)

View File

@ -105,10 +105,6 @@ class DesignateZone(resource.Resource):
entity = 'zones'
def client(self):
return super(DesignateZone,
self).client(version=self.client_plugin().V2)
def validate(self):
super(DesignateZone, self).validate()