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
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