diff --git a/glanceclient/exc.py b/glanceclient/exc.py index be0e0011..aa373245 100644 --- a/glanceclient/exc.py +++ b/glanceclient/exc.py @@ -33,11 +33,6 @@ class EndpointNotFound(Exception): pass -class SchemaNotFound(KeyError): - """Could not find schema""" - pass - - class InvalidEndpoint(ValueError): """The provided endpoint could not be used""" pass diff --git a/glanceclient/v2/schemas.py b/glanceclient/v2/schemas.py index 6e178d28..79a48878 100644 --- a/glanceclient/v2/schemas.py +++ b/glanceclient/v2/schemas.py @@ -15,8 +15,6 @@ import copy -from glanceclient import exc - class SchemaProperty(object): def __init__(self, name, **kwargs): @@ -51,13 +49,6 @@ class Controller(object): self.http_client = http_client def get(self, schema_name): - uri = self._find_schema_uri(schema_name) + uri = '/v2/schemas/%s' % schema_name _, raw_schema = self.http_client.json_request('GET', uri) return Schema(raw_schema) - - def _find_schema_uri(self, schema_name): - _, schema_index = self.http_client.json_request('GET', '/v2/schemas') - try: - return schema_index[schema_name] - except KeyError: - raise exc.SchemaNotFound(schema_name)