X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FNBI.git;a=blobdiff_plain;f=osm_nbi%2Fengine.py;h=cb274145e62eade1f40b8713c83bd158c16072b5;hp=1bc9171c0d8740e02ca6644ec41cb82a0274523c;hb=5758955b7b394517ff5caf5506a4400cdc5aa372;hpb=4568a372eb5a204e04d917213de03ec51f9110c1 diff --git a/osm_nbi/engine.py b/osm_nbi/engine.py index 1bc9171..cb27414 100644 --- a/osm_nbi/engine.py +++ b/osm_nbi/engine.py @@ -288,25 +288,22 @@ class Engine(object): :return: The list, it can be empty if no one match the filter_q. """ if topic not in self.map_topic: - raise EngineException( - "Unknown topic {}!!!".format(topic), HTTPStatus.INTERNAL_SERVER_ERROR - ) + raise EngineException("Unknown topic {}!!!".format(topic), HTTPStatus.INTERNAL_SERVER_ERROR) return self.map_topic[topic].list(session, filter_q, api_req) - def get_item(self, session, topic, _id, api_req=False): + def get_item(self, session, topic, _id, filter_q=None, api_req=False): """ Get complete information on an item :param session: contains the used login username and working project :param topic: it can be: users, projects, vnfds, nsds, :param _id: server id of the item + :param filter_q: other arguments :param api_req: True if this call is serving an external API request. False if serving internal request. :return: dictionary, raise exception if not found. """ if topic not in self.map_topic: - raise EngineException( - "Unknown topic {}!!!".format(topic), HTTPStatus.INTERNAL_SERVER_ERROR - ) - return self.map_topic[topic].show(session, _id, api_req) + raise EngineException("Unknown topic {}!!!".format(topic), HTTPStatus.INTERNAL_SERVER_ERROR) + return self.map_topic[topic].show(session, _id, filter_q, api_req) def get_file(self, session, topic, _id, path=None, accept_header=None): """