diff options
author | Thomas Duval <thomas.duval@orange.com> | 2017-11-30 11:33:57 +0100 |
---|---|---|
committer | Thomas Duval <thomas.duval@orange.com> | 2017-11-30 11:33:57 +0100 |
commit | 31bb43b52fe591509033f6e38e758ae0ae6f507f (patch) | |
tree | 877883dc6b043f97caecba793350661098e05d49 /moonv4/moon_manager | |
parent | f8ec5183b6448a30a5e1155eab652fdd3678ea5e (diff) |
Fix a bug in manager API
Change-Id: Iaac09a9d2852cbc45784168240be821bc3eadd6e
Diffstat (limited to 'moonv4/moon_manager')
-rw-r--r-- | moonv4/moon_manager/moon_manager/api/generic.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/moonv4/moon_manager/moon_manager/api/generic.py b/moonv4/moon_manager/moon_manager/api/generic.py index ac4f8f1e..9ff285c8 100644 --- a/moonv4/moon_manager/moon_manager/api/generic.py +++ b/moonv4/moon_manager/moon_manager/api/generic.py @@ -107,18 +107,18 @@ class API(Resource): api_desc = dict() for api_name in api_list: api_desc[api_name] = {} - group_api_obj = eval("moon_interface.api.{}".format(api_name)) + group_api_obj = eval("moon_manager.api.{}".format(api_name)) api_desc[api_name]["description"] = group_api_obj.__doc__ if "__version__" in dir(group_api_obj): api_desc[api_name]["version"] = group_api_obj.__version__ object_list = list(filter(lambda x: "__" not in x, dir(group_api_obj))) - for obj in map(lambda x: eval("moon_interface.api.{}.{}".format(api_name, x)), object_list): + for obj in map(lambda x: eval("moon_manager.api.{}.{}".format(api_name, x)), object_list): if "__urls__" in dir(obj): api_desc[api_name][obj.__name__] = dict() api_desc[api_name][obj.__name__]["urls"] = obj.__urls__ api_desc[api_name][obj.__name__]["methods"] = dict() for _method in filter(lambda x: x in __methods, dir(obj)): - docstring = eval("moon_interface.api.{}.{}.{}.__doc__".format(api_name, obj.__name__, _method)) + docstring = eval("moon_manager.api.{}.{}.{}.__doc__".format(api_name, obj.__name__, _method)) api_desc[api_name][obj.__name__]["methods"][_method] = docstring api_desc[api_name][obj.__name__]["description"] = str(obj.__doc__) if group_id in api_desc: |