Skip to content

Commit 19bab51

Browse files
author
victor73
committed
Added missing method to retrieve all aux schemas.
1 parent a41ccd8 commit 19bab51

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

osdf.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,26 @@ def get_schema(self, namespace, schema_name):
231231

232232
return schema_data
233233

234+
def get_aux_schemas(self, namespace):
235+
"""
236+
Retrieves all of the auxiliary schemas for a particular namespace.
237+
238+
Returns the parsed form of the auxiliary schemas.
239+
"""
240+
url = '/namespaces/%s/schemas/aux/' % (namespace)
241+
242+
osdf_response = self._request.get(url)
243+
244+
if osdf_response["code"] != 200:
245+
headers = osdf_response['headers']
246+
self.header_error(headers, 'retrieve', 'aux schemas')
247+
248+
aux_schema_data = json.loads( osdf_response['content'] )
249+
250+
aux_schema_data = self._byteify(aux_schema_data)
251+
252+
return aux_schema_data
253+
234254
def get_aux_schema(self, namespace, aux_schema_name):
235255
"""
236256
Retrieves an auxiliary schema

0 commit comments

Comments
 (0)