Example #1
0
def step_obtain_list_ge_nids(context):
    __logger__.info("Obtaining the list of Generic Enabler NIDs")

    context.value = dict()

    BIN_PATH = __getbinpath__(context)

    if context.table is not None:
        for row in __dataset_utils__.prepare_data(context.table):
            if 'type_value' in row.headings and row['type_value'] != 'False':
                type = row['type_value']

                command = BIN_PATH + ' --type {}'.format(type)

                context.value[type] = cmd(command).replace('\n', '').replace('\r', '').replace(" ", "")
                context.type = type
            elif 'wikitext' in row.headings:
                command = BIN_PATH + ' --wikitext'

                context.value['wikitext'] = cmd(command).replace('\n', '').replace('\r', '').replace(" ", "")
Example #2
0
def step_impl_execute_with_options(context):
    BIN_PATH = __getbinpath__(context)

    if context.table is not None:
        for row in __dataset_utils__.prepare_data(context.table):
            if 'option_value' in row.headings:
                option = row['option_value']

                __logger__.info("Execute the getnid.py with the option: {}".format(option))

                command = BIN_PATH + ' {}'.format(option)

                context.result = cmd(command)
Example #3
0
def step_obtain_list_ge_nids(context):
    __logger__.info("Obtaining the list of Generic Enabler NIDs")

    context.value = dict()

    BIN_PATH = __getbinpath__(context)

    if context.table is not None:
        for row in __dataset_utils__.prepare_data(context.table):
            if 'type_value' in row.headings and row['type_value'] != 'False':
                type = row['type_value']

                command = BIN_PATH + ' --type {}'.format(type)

                context.value[type] = cmd(command).replace('\n', '').replace(
                    '\r', '').replace(" ", "")
                context.type = type
            elif 'wikitext' in row.headings:
                command = BIN_PATH + ' --wikitext'

                context.value['wikitext'] = cmd(command).replace(
                    '\n', '').replace('\r', '').replace(" ", "")
Example #4
0
def step_impl_execute_with_options(context):
    BIN_PATH = __getbinpath__(context)

    if context.table is not None:
        for row in __dataset_utils__.prepare_data(context.table):
            if 'option_value' in row.headings:
                option = row['option_value']

                __logger__.info(
                    "Execute the getnid.py with the option: {}".format(option))

                command = BIN_PATH + ' {}'.format(option)

                context.result = cmd(command)