def _exec_remove_entry(self, quintet): try: path_identifier = utils.deserialize_path_identifier(quintet) del core.overseer.path_preference_table._table[path_identifier] return utils.create_response("") except KeyError: return make_error("No such entry in path preference table")
def _exec_set_entry(self, quintet, option): try: path_identifier = utils.deserialize_path_identifier(quintet) core.overseer.path_preference_table._table[path_identifier] = ApiHandler.OPTIONS[option] return utils.create_response("") except KeyError: return make_error("No such entry in path preference table")
def _exec_get_entry(self, quintet): try: path_identifier = utils.deserialize_path_identifier(quintet) entry = core.overseer.path_preference_table._table[path_identifier] return utils.create_response(ApiHandler.REVERSED_OPTIONS[entry]) except KeyError: return make_error("No such entry in path preference table")
def _exec_set_entry(self, quintet, option): try: path_identifier = utils.deserialize_path_identifier(quintet) core.overseer.path_preference_table._table[ path_identifier] = ApiHandler.OPTIONS[option] return utils.create_response("") except KeyError: return make_error("No such entry in path preference table")