X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=api%2F__init__.py;h=3235022326e7002e3d4e320424287a79b641bcf4;hb=db951243d3d036fa7989bbd388e869eb89b247e8;hp=dda12aa07e0957217d8f8b95f25c303836871316;hpb=0d18f9d3299480cb43e6b335180e5cbdb58505c3;p=yardstick.git diff --git a/api/__init__.py b/api/__init__.py index dda12aa07..323502232 100644 --- a/api/__init__.py +++ b/api/__init__.py @@ -34,18 +34,18 @@ class ApiResource(Resource): except KeyError: pass - LOG.debug('Input args is: action: %s, args: %s', action, args) + args.update({k: v for k, v in request.form.items()}) return action, args def _get_args(self): args = common_utils.translate_to_str(request.args) - LOG.debug('Input args is: args: %s', args) return args - def _dispatch_post(self): + def _dispatch_post(self, **kwargs): action, args = self._post_args() + args.update(kwargs) return self._dispatch(args, action) def _dispatch(self, args, action): @@ -57,9 +57,9 @@ class ApiResource(Resource): class Url(object): - def __init__(self, url, endpoint): + def __init__(self, url, target): super(Url, self).__init__() self.url = url - self.endpoint = endpoint + self.target = target common_utils.import_modules_from_package("api.resources")