def parse_commands(module, warnings):
    commands = transform_commands(module)

    for item in list(commands):
        if module.check_mode:
            if item['command'].startswith('conf'):
                warnings.append(
                    'only non-config commands are supported when using check mode, not '
                    'executing %s' % item['command'])
                commands.remove(item)
    return commands
def parse_commands(module, warnings):
    commands = transform_commands(module)

    if module.check_mode:
        for item in list(commands):
            if not item['command'].startswith('show'):
                warnings.append(
                    'Only show commands are supported when using check mode, not '
                    'executing %s' % item['command'])
                commands.remove(item)

    return commands