diff options
author | Erik Olof Gunnar Andersson <eandersson@blizzard.com> | 2019-09-10 19:45:29 -0700 |
---|---|---|
committer | Erik Olof Gunnar Andersson <eandersson@blizzard.com> | 2019-09-10 20:53:25 -0700 |
commit | 093d8d7170cbf6ef8c7a7c0ff2a4dcd7ecd6361b (patch) | |
tree | aaa453be6cf3df5cf18937694059911329163bf3 /designateclient/utils.py | |
parent | 5c9bbbfac8f03be416b268798045b5814c3fbe06 (diff) | |
download | python-designateclient-3.0.0.tar.gz |
The v1 has officially been removed from Designate since
the Queens release, and was deperecated long before that.
Change-Id: Ic5b44761ff939e2b319924af87849b3a79f9cb07
Diffstat (limited to 'designateclient/utils.py')
-rw-r--r-- | designateclient/utils.py | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/designateclient/utils.py b/designateclient/utils.py index d526fd8..cf1ddce 100644 --- a/designateclient/utils.py +++ b/designateclient/utils.py @@ -14,47 +14,18 @@ # License for the specific language governing permissions and limitations # under the License. -import os import uuid -from oslo_serialization import jsonutils - from debtcollector import removals from keystoneauth1 import adapter from keystoneauth1.identity import generic from keystoneauth1 import session as ks_session from keystoneauth1 import token_endpoint -import pkg_resources import six from designateclient import exceptions -def resource_string(*args, **kwargs): - if len(args) == 0: - raise ValueError() - - package = kwargs.pop('package', None) - - if not package: - package = 'designateclient' - - resource_path = os.path.join('resources', *args) - - if not pkg_resources.resource_exists(package, resource_path): - raise exceptions.ResourceNotFound('Could not find the requested ' - 'resource: %s' % resource_path) - - return pkg_resources.resource_string(package, resource_path) - - -def load_schema(version, name, package=None): - schema_string = resource_string('schemas', version, '%s.json' % name, - package=package) - - return jsonutils.loads(schema_string) - - def get_item_properties(item, fields, mixed_case_fields=[], formatters={}): """Return a tuple containing the item properties. |