Fix podmanager create and update functions
update podmanager functionality is not working, as request value is not passed properly to the controller, this patch fixes the same. And also, podmanager DB model , auth property is not get stored because of incorrect name and validate type , which is also fixed in this patch. Change-Id: I0f735b79f444563d522c3443eeeec46152fcc875 Closes-Bug: #1695820
This commit is contained in:
parent
577474c9c0
commit
c407fc64e3
@ -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))
|
||||
|
||||
|
@ -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
|
||||
|
@ -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'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user