def execute_action(self, action, params):
        if action == 'start':
            try:
                self.start(params['job_id'], params['current_tag'])
            except freezer_api_exc.BadDataFormat:
                raise
            except Exception as e:
                raise freezer_api_exc.FreezerAPIException(e)
        elif action == 'end':
            try:
                self.end(params['job_id'], params['result'])
            except freezer_api_exc.BadDataFormat:
                raise
            except Exception as e:
                raise freezer_api_exc.FreezerAPIException(e)
        else:
            raise freezer_api_exc.MethodNotImplemented("Bad Action Method")
dataset/ETHPy150Open openstack/freezer-api/freezer_api/api/v1/sessions.py/Session.execute_action/original