Remove designate support
It was broken, thus it was impossible that anyone was actually using it. We do not have a plan for v1/v2 compat support yet, and it's a hard one. SO - rather than leaving a broken thing in the tree which was not possible to use, or fixing it and then having a half-baked thing which people might actually start using, pull it out pending someone stepping up and caring about it. Change-Id: I390494fee8c6c7fb5ddde2ce47e7eb598ad5e08b
This commit is contained in:
parent
e557b6e4db
commit
9df40b00dc
|
@ -18,7 +18,6 @@ python-neutronclient>=2.3.10
|
|||
python-troveclient>=1.2.0
|
||||
python-ironicclient>=0.10.0
|
||||
python-swiftclient>=2.5.0
|
||||
python-designateclient>=1.3.0
|
||||
python-heatclient>=0.3.0
|
||||
|
||||
dogpile.cache>=0.5.3
|
||||
|
|
|
@ -647,26 +647,6 @@ class GroupUpdate(task_manager.Task):
|
|||
return client.keystone_client.groups.update(**self.args)
|
||||
|
||||
|
||||
class ZoneList(task_manager.Task):
|
||||
def main(self, client):
|
||||
return client.designate_client.domains.list()
|
||||
|
||||
|
||||
class ZoneGet(task_manager.Task):
|
||||
def main(self, client):
|
||||
return client.designate_client.domains.get(**self.args)
|
||||
|
||||
|
||||
class RecordList(task_manager.Task):
|
||||
def main(self, client):
|
||||
return client.designate_client.records.list(**self.args)
|
||||
|
||||
|
||||
class RecordGet(task_manager.Task):
|
||||
def main(self, client):
|
||||
return client.designate_client.records.get(**self.args)
|
||||
|
||||
|
||||
class RoleList(task_manager.Task):
|
||||
def main(self, client):
|
||||
return client.keystone_client.roles.list()
|
||||
|
|
|
@ -24,7 +24,6 @@ from dogpile import cache
|
|||
import requestsexceptions
|
||||
|
||||
from cinderclient.v1 import client as cinder_client
|
||||
from designateclient.v1 import Client as designate_client
|
||||
import glanceclient
|
||||
import glanceclient.exc
|
||||
from glanceclient.common import utils as glance_utils
|
||||
|
@ -219,7 +218,6 @@ class OpenStackCloud(object):
|
|||
self._keystone_session = None
|
||||
|
||||
self._cinder_client = None
|
||||
self._designate_client = None
|
||||
self._glance_client = None
|
||||
self._glance_endpoint = None
|
||||
self._heat_client = None
|
||||
|
@ -722,13 +720,6 @@ class OpenStackCloud(object):
|
|||
'network', neutron_client.Client, pass_version_arg=False)
|
||||
return self._neutron_client
|
||||
|
||||
@property
|
||||
def designate_client(self):
|
||||
if self._designate_client is None:
|
||||
self._designate_client = self._get_client(
|
||||
'dns', designate_client.Client)
|
||||
return self._designate_client
|
||||
|
||||
def create_stack(
|
||||
self, name,
|
||||
template_file=None, template_url=None,
|
||||
|
@ -987,14 +978,6 @@ class OpenStackCloud(object):
|
|||
floating_ips = self.list_floating_ips()
|
||||
return _utils._filter_list(floating_ips, id, filters)
|
||||
|
||||
def search_zones(self, name_or_id=None, filters=None):
|
||||
zones = self.list_zones()
|
||||
return _utils._filter_list(zones, name_or_id, filters)
|
||||
|
||||
def _search_records(self, zone_id, name_or_id=None, filters=None):
|
||||
records = self._list_records(zone_id=zone_id)
|
||||
return _utils._filter_list(records, name_or_id, filters)
|
||||
|
||||
def search_stacks(self, name_or_id=None, filters=None):
|
||||
"""Search Heat stacks.
|
||||
|
||||
|
@ -1295,26 +1278,6 @@ class OpenStackCloud(object):
|
|||
raise OpenStackCloudException(
|
||||
"error fetching floating IPs list: {msg}".format(msg=str(e)))
|
||||
|
||||
def list_zones(self):
|
||||
"""List all available DNS zones.
|
||||
|
||||
:returns: A list of zone dicts.
|
||||
|
||||
"""
|
||||
try:
|
||||
return self.manager.submitTask(_tasks.ZoneList())
|
||||
except Exception as e:
|
||||
raise OpenStackCloudException(
|
||||
"Error fetching zone list: %s" % e)
|
||||
|
||||
def _list_records(self, zone_id):
|
||||
# TODO(mordred) switch domain= to zone= after the Big Rename
|
||||
try:
|
||||
return self.manager.submitTask(_tasks.RecordList(domain=zone_id))
|
||||
except Exception as e:
|
||||
raise OpenStackCloudException(
|
||||
"Error fetching record list: %s" % e)
|
||||
|
||||
def use_external_network(self):
|
||||
return self._use_external_network
|
||||
|
||||
|
@ -1623,32 +1586,6 @@ class OpenStackCloud(object):
|
|||
"""
|
||||
return _utils._get_entity(self.search_floating_ips, id, filters)
|
||||
|
||||
def get_zone(self, name_or_id, filters=None):
|
||||
"""Get a DNS zone by name or ID.
|
||||
|
||||
:param name_or_id: Name or ID of the DNS zone.
|
||||
:param dict filters:
|
||||
A dictionary of meta data to use for further filtering. Elements
|
||||
of this dictionary may, themselves, be dictionaries. Example::
|
||||
|
||||
{
|
||||
'last_name': 'Smith',
|
||||
'other': {
|
||||
'gender': 'Female'
|
||||
}
|
||||
}
|
||||
|
||||
:returns: A zone dict or None if no matching DNS zone is
|
||||
found.
|
||||
|
||||
"""
|
||||
return _utils._get_entity(self.search_zones, name_or_id, filters)
|
||||
|
||||
def _get_record(self, zone_id, name_or_id, filters=None):
|
||||
f = lambda name_or_id, filters: self._search_records(
|
||||
zone_id, name_or_id, filters)
|
||||
return _utils._get_entity(f, name_or_id, filters)
|
||||
|
||||
def get_stack(self, name_or_id, filters=None):
|
||||
"""Get exactly one Heat stack.
|
||||
|
||||
|
|
|
@ -384,22 +384,6 @@ class TestShade(base.TestCase):
|
|||
self.assertRaises(exc.OpenStackCloudException,
|
||||
self.cloud.list_networks)
|
||||
|
||||
@mock.patch.object(shade.OpenStackCloud, 'list_zones')
|
||||
def test_get_zone(self, mock_search):
|
||||
zone1 = dict(id='123', name='mickey')
|
||||
mock_search.return_value = [zone1]
|
||||
r = self.cloud.get_zone('mickey')
|
||||
self.assertIsNotNone(r)
|
||||
self.assertDictEqual(zone1, r)
|
||||
|
||||
@mock.patch.object(shade.OpenStackCloud, '_list_records')
|
||||
def test_get_record(self, mock_search):
|
||||
record1 = dict(id='123', name='mickey', domain_id='mickey.domain')
|
||||
mock_search.return_value = [record1]
|
||||
r = self.cloud._get_record('mickey.domain', 'mickey')
|
||||
self.assertIsNotNone(r)
|
||||
self.assertDictEqual(record1, r)
|
||||
|
||||
@mock.patch.object(shade._tasks.ServerList, 'main')
|
||||
def test_list_servers(self, mock_serverlist):
|
||||
'''This test verifies that calling list_servers results in a call
|
||||
|
|
Loading…
Reference in New Issue