Merge "Fix podmanager create and update functions"

This commit is contained in:
Jenkins 2017-07-19 00:05:53 +00:00 committed by Gerrit Code Review
commit d3053c9ab4
3 changed files with 10 additions and 4 deletions

View File

@ -46,7 +46,7 @@ class PodManager(flask_restful.Resource):
podmanagers.get_podm_by_uuid(podm_uuid))
def patch(self, podm_uuid):
values = flask.request.form.to_dict()
values = flask.request.get_json()
return utils.make_response(http_client.OK,
podmanagers.update_podm(podm_uuid, values))

View File

@ -135,8 +135,8 @@ class PodManager(ModelBaseWithTimeStamp):
'url': {
'validate': types.Text.validate
},
'auth': {
'validate': types.Text.validate
'authentication': {
'validate': types.List(types.Dict).validate
},
'status': {
'validate': types.Text.validate

View File

@ -47,7 +47,13 @@ def get_test_podmanager(**kwargs):
'uuid': kwargs.get('uuid', 'ea8e2a25-2901-438d-8157-de7ffd68d051'),
'name': kwargs.get('name', 'fake_name'),
'url': kwargs.get('url', 'fake_url'),
'auth': kwargs.get('auth', 'fake_auth'),
'authentication': [{
'auth_items': {
'password': 'fake-pass',
'username': 'fake-admin',
},
'type': 'basic',
}],
'status': kwargs.get('size', 'fake_status'),
'description': kwargs.get('description', 'fake_description'),
'location': kwargs.get('location', 'fake_location'),