Fix warlock model creation

Commands like glance md-namespace-show <namespace> fail because
of a breaking change in warlock 1.3.0's model creation factory
method.

Warlock introduced a new kwarg 'resolver' in model_factory method
but changed its position with the 'base_class' kwarg. Since we
were calling the model_factory method with positional arg, this
broke the model creation.

Closes-Bug: #1596573

Change-Id: Ic7821f4fdb1b752e0c7ed2bc486299a06bf485c1
This commit is contained in:
Sabari Kumar Murugesan
2016-07-06 18:02:28 -07:00
parent f2c02830f6
commit d7db97c926
5 changed files with 19 additions and 12 deletions
+2 -1
View File
@@ -35,7 +35,8 @@ class Controller(object):
@utils.memoized_property
def model(self):
schema = self.schema_client.get('task')
return warlock.model_factory(schema.raw(), schemas.SchemaBasedModel)
return warlock.model_factory(schema.raw(),
base_class=schemas.SchemaBasedModel)
def list(self, **kwargs):
"""Retrieve a listing of Task objects.