Module Expr Str Import alias Import alias Import alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict decorator_list FunctionDef arguments args NameParam defaults body Print Str Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad AttributeLoad NameLoad attr Index Str body Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str Print Str Assign AttributeStore NameLoad attr Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str handlers ExceptHandler type TupleLoad NameLoad NameLoad body Print Str Raise While NameLoad body Assign NameStore NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr If NameLoad body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Print Str Print NameLoad Continue Assign NameStore ListLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore NameLoad body If CompareNotIn NameLoad Call AttributeLoad NameLoad attr body Print Call AttributeLoad Str attr NameLoad Assign NameStore NameLoad If NameLoad body Continue Assign NameStore SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index AttributeLoad NameLoad attr If CompareNotIn NameLoad AttributeLoad NameLoad attr body Assign NameStore Dict AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Str orelse If CompareEq NameLoad Str body Assign NameStore BinOpAdd AttributeLoad NameLoad attr NameLoad orelse Assign NameStore BinOpAdd AttributeLoad NameLoad attr NameLoad TryExcept body Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Dict AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler body Assign NameStore Dict AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Str With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str While UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr If CompareIn NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr body Print BinOpAdd BinOpAdd Str NameLoad Str orelse Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str While UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr body Assign TupleStore NameStore NameStore NameStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr If CompareIn NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr ListLoad NameLoad NameLoad NameLoad NameLoad orelse Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad ListLoad ListLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index Str Assign TupleStore NameStore NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index Str Assign TupleStore NameStore NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Assign NameStore SubscriptLoad NameLoad Index Str If CompareNotIn NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr body Return Call AttributeLoad NameLoad attr ListLoad TupleLoad Return Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list decorator_list
N/A N/A 
    A mock module for api test, this basically duplicates some
    actions of the Moirai module
 N/A json N/A os N/A ApiConstants MockMoirai N/A object N/A N/A 
        Mock moirai class
     __init__ N/A N/A self input_queue event_queue api_config N/A N/A N/A N/A self atropos_data_queue input_queue N/A N/A self atropos_event_queue event_queue N/A N/A self api_config api_config N/A N/A self event_map N/A N/A N/A self service_map N/A N/A start_moirai N/A N/A self N/A N/A N/A Starting fifo N/A N/A N/A self api_fifo_read N/A api_fifo_read N/A N/A self N/A N/A N/A 
            A thread which keeps reading an input fifo,
            specified in the api configs, each line it reads is expected to
            be a json string encoding a dict of the form
            {
                FIFO_ENDPOINT_KEY: fifo_endpoint,
                COMMAND_ID_KEY: command_id,
                COMMAND_KEY: command,
                ARGS_KEY: args,
                METHOD_KEY: method
            }
            fifo_endpoint - Input FIFO to api server
            command_id - the sequence id of the command
            command - the api command called (command along with method should
                                              map to a unique function in
                                              moirai class)
            args - arugments for the command
            method - api method name (GET/PUT/POST)

            Args:
                None
            Return:
                None
            Raise:
                IOError/OSError - Unable to open input FIFO
         N/A N/A N/A N/A N/A N/A N/A os path exists N/A N/A self api_config N/A moirai_input_fifo N/A N/A N/A N/A os mkfifo N/A N/A self api_config N/A moirai_input_fifo N/A 
API FIFO open for read
 N/A N/A self fifo_fd N/A open N/A N/A self api_config N/A moirai_input_fifo N/A N/A N/A N/A IOError OSError N/A N/A [Error] Unable to read api input FIFO N/A N/A True N/A N/A skip_iteration_flag False N/A request_json N/A N/A N/A self fifo_fd readline N/A request_json N/A N/A N/A N/A request_map N/A N/A json loads request_json N/A N/A N/A ValueError N/A N/A [Error] Recieved non json object, skipping N/A request_json N/A N/A required_keys N/A N/A ApiConstants FIFO_ENDPOINT_KEY N/A ApiConstants COMMAND_ID_KEY N/A ApiConstants COMMAND_KEY N/A ApiConstants ARGS_KEY N/A ApiConstants METHOD_KEY N/A arr_key required_keys N/A N/A N/A arr_key N/A N/A request_map keys N/A N/A N/A N/A [Error] Malformed message missing {} format arr_key N/A skip_iteration_flag True N/A skip_iteration_flag N/A N/A N/A fifo_endpoint N/A request_map N/A N/A ApiConstants FIFO_ENDPOINT_KEY N/A command_id N/A request_map N/A N/A ApiConstants COMMAND_ID_KEY N/A command N/A request_map N/A N/A ApiConstants COMMAND_KEY N/A args N/A request_map N/A N/A ApiConstants ARGS_KEY N/A method N/A request_map N/A N/A ApiConstants METHOD_KEY N/A N/A command N/A ApiConstants API_COMMANDS N/A N/A output_msg N/A N/A ApiConstants COMMAND_ID_KEY N/A ApiConstants COMMAND_OUTPUT_KEY command_id No such command found N/A N/A N/A method GET N/A N/A moirai_function N/A N/A ApiConstants MOIRAI_GET_COMMAND_PREFIX command N/A N/A moirai_function N/A N/A ApiConstants MOIRAI_OTHER_COMMAND_PREFIX command N/A N/A N/A command_handler N/A getattr self moirai_function N/A command_output N/A command_handler args N/A output_msg N/A N/A ApiConstants COMMAND_ID_KEY N/A ApiConstants COMMAND_OUTPUT_KEY command_id command_output N/A N/A N/A N/A output_msg N/A N/A ApiConstants COMMAND_ID_KEY N/A ApiConstants COMMAND_OUTPUT_KEY command_id Unexpected error in moirai N/A N/A open fifo_endpoint w output_fd N/A N/A N/A N/A output_fd write N/A N/A json dumps output_msg N/A update_service_map N/A N/A self N/A N/A N/A 
            Creates/Update the service map dictionary with items for
            each of the service entry in the input queue
            Args:
                None
            Return:
                None
            Raise:
                None
         N/A N/A N/A N/A N/A self atropos_data_queue empty N/A N/A N/A service servers plan N/A N/A N/A self atropos_data_queue get N/A N/A service N/A N/A N/A self service_map keys N/A N/A N/A N/A Duplicate service entry for  service . Skipping the new entry!!! N/A N/A N/A N/A self service_map N/A service N/A servers plan N/A update_event_map N/A N/A self N/A N/A N/A 
            Creates/Update the event map dictionary with items for
            each of the service entry in the event queue
            Args:
                None
            Return:
                None
            Raise:
                None
         N/A N/A N/A N/A N/A self atropos_event_queue empty N/A N/A N/A service failure_name trigger_time node_name trigger_status N/A N/A N/A self atropos_event_queue get N/A N/A service N/A N/A N/A self event_map keys N/A N/A N/A N/A N/A N/A self event_map N/A service append N/A failure_name trigger_time node_name trigger_status N/A N/A N/A N/A self event_map N/A service N/A N/A failure_name trigger_time node_name trigger_status N/A api_get_list N/A N/A self args N/A N/A N/A 
            Get the list of services being tested by simoorg
            (defined by the fate books)
            Args:
                args - expects an empty dictionary
            Returns:
                a list of services encoded as a json string
            Raise:
                None
         N/A N/A N/A self update_service_map N/A N/A N/A json dumps N/A N/A N/A self service_map keys N/A api_get_plan N/A N/A self args N/A N/A N/A 
            Get the plan used by atropos for a specific service
            (Generated by the scheduler)
            Args:
                args - expects a dictionary containing a key for service_name
            Returns:
                plan encoded as a json string
            Raise:
                None
         N/A N/A N/A self update_service_map N/A service_name N/A args N/A service_name N/A N/A servers plan N/A N/A self service_map N/A service_name N/A N/A N/A json dumps plan N/A api_get_servers N/A N/A self args N/A N/A N/A 
            Get the servers present in the service
            (Generated by the topology)
            Args:
                args - expects a dictionary containing a key for service_name
            Returns:
                server list encoded as a json string
            Raise:
                None

         N/A N/A N/A self update_service_map N/A service_name N/A args N/A service_name N/A N/A servers plan N/A N/A self service_map N/A service_name N/A N/A N/A json dumps servers N/A api_get_events N/A N/A self args N/A N/A N/A 
            Get the status of all the events already executed by atropos
            An event is a tuple containing the elements
            (service name, event name, trigger_time,
             target of the event, Event status)
            Here event name is the failure name if it was a failure event
            for revert events it is failure name + '-revert'

            Args:
                args - expects a dictionary containing a key for service_name
            Returns:
                event list encoded as a json string
            Raise:
                None
         N/A N/A N/A self update_event_map N/A service_name N/A args N/A service_name N/A N/A service_name N/A N/A N/A self event_map keys N/A N/A N/A N/A json dumps N/A N/A N/A N/A N/A json dumps N/A N/A self event_map N/A service_name N/A N/A