def get(self, ws_id, parent_id, vnf_id): """Get a specific function Gets a specific function information by its id""" if get_parent(request) is Category.project: functions = functionsimpl.get_function_project(ws_id, parent_id, vnf_id) return prepare_response(functions) # TODO implement for catalog and platform if get_parent(request) is Category.catalogue: functions = catalogue_servicesimpl.get_in_catalogue(ws_id, parent_id, vnf_id, True) return prepare_response(functions) # TODO implement for catalog and platform return prepare_response("not yet implemented")
def get(self, ws_id, parent_id, vnf_id): """ Publish function to private Publishes the function to the workspace wide catalogue :param ws_id: :param parent_id: :param vnf_id: :return: """ function = functionsimpl.get_function_project(ws_id, parent_id, vnf_id) publish_private_nsfs(ws_id, function["descriptor"], True) return prepare_response( {"message": "Function {} was published to private catalogue".format(function['descriptor']['name'])}, 201)
def get(self, ws_id, parent_id, vnf_id): """Get a specific function Gets a specific function information by its id""" if get_parent(request) is Category.project: functions = functionsimpl.get_function_project( ws_id, parent_id, vnf_id) return prepare_response(functions) # TODO implement for catalog and platform if get_parent(request) is Category.catalogue: functions = catalogue_servicesimpl.get_in_catalogue( ws_id, parent_id, vnf_id, True) return prepare_response(functions) # TODO implement for catalog and platform return prepare_response("not yet implemented")
def get(self, ws_id, parent_id, vnf_id): """ Publish function to private Publishes the function to the workspace wide catalogue :param ws_id: :param parent_id: :param vnf_id: :return: """ function = functionsimpl.get_function_project(ws_id, parent_id, vnf_id) publish_private_nsfs(ws_id, function["descriptor"], True) return prepare_response( { "message": "Function {} was published to private catalogue".format( function['descriptor']['name']) }, 201)
def get(self, ws_id, project_id, vnf_id): """Get a specific function Gets a specific function information by its id""" functions = functionsimpl.get_function_project(ws_id, project_id, vnf_id) return prepare_response(functions)