Clean FloatingIPDNS resource
create() and get() are not needed here : - it's not the role of the resource to call 'create'. - 'get' is here to refresh the resource. There's no mean to retrieve for sure the resource (get by IP address *or* by name only). Change-Id: I97f4c26264b4abd0c1c8cdd91acc23ab6d6d008e
This commit is contained in:
parent
b99d66d3ad
commit
ee4696aaa1
|
@ -32,17 +32,6 @@ class FloatingIPDNS(base.Resource):
|
|||
def delete(self):
|
||||
self.manager.delete_entry(self.name, self.zone)
|
||||
|
||||
def create(self):
|
||||
self.manager.create_entry(self.zone, self.name,
|
||||
self.ip, self.dns_type)
|
||||
|
||||
def get(self):
|
||||
entries = self.manager.get_entries(self.zone, self.ip, self.name)
|
||||
if entries:
|
||||
return entries[0]
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
class FloatingIPDNSManager(base.ManagerWithFind):
|
||||
resource_class = FloatingIPDNS
|
||||
|
|
Loading…
Reference in New Issue