{"id":25456091,"url":"https://github.com/3cf173ba/conquers","last_synced_at":"2025-05-16T17:33:54.451Z","repository":{"id":206792906,"uuid":"717706405","full_name":"3cf173ba/conquers","owner":"3cf173ba","description":"A tool to CONfigure and QUERy network Switches","archived":false,"fork":false,"pushed_at":"2024-03-28T22:42:34.000Z","size":2885,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-18T01:33:34.345Z","etag":null,"topics":["cisco","huawei","netmiko","network","network-switch","networking","paramiko","python","switch"],"latest_commit_sha":null,"homepage":"https://aaamendes.github.io/conquers/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/3cf173ba.png","metadata":{"files":{"readme":"Readme.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-12T10:25:26.000Z","updated_at":"2024-06-11T18:57:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"81963f2e-cbfd-4e5a-bd42-9bd4a4a4925b","html_url":"https://github.com/3cf173ba/conquers","commit_stats":null,"previous_names":["medecaj/conquers","aaamendes/conquers","3cf173ba/conquers"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3cf173ba%2Fconquers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3cf173ba%2Fconquers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3cf173ba%2Fconquers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3cf173ba%2Fconquers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/3cf173ba","download_url":"https://codeload.github.com/3cf173ba/conquers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254576550,"owners_count":22094397,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cisco","huawei","netmiko","network","network-switch","networking","paramiko","python","switch"],"created_at":"2025-02-18T01:28:56.314Z","updated_at":"2025-05-16T17:33:54.376Z","avatar_url":"https://github.com/3cf173ba.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. image:: https://cdn.amendes.me/conquers/logo.svg\n   :width: 144\n   :alt: conquers logo\n\nconquers\n=========\n\n**conquers** (CONfigure and QUERy network Switches) is a python \nprogram to do what its name implies.\n\nIt makes use of the python `netmiko \u003chttps://github.com/ktbyers/netmiko\u003e`_\nlibrary to do its work.\n\nThe full documentation with video example can be found here `medecaj.github.io/conquers/\n\u003chttps://medecaj.github.io/conquers/\u003e`_.\n\n\n.. raw:: html\n\n    \u003cimg\n    src=\"https://github.com/medecaj/ghcdn/blob/main/conquers/teaser.gif?raw=true\" style=\"width:100%\"\n    alt=\"conquers teaser\"\u003e\n\n\nUsage\n=====\n\nInstallation\n------------\n\nClone the repository like so:\n\n.. code-block:: console\n\n    $ git clone https://github.com/medecaj/conquers\n\nTo use *conquers*, first install its requirements using pip:\n\n.. code-block:: console\n\n    $ cd conquers\n    $ python3 -m pip install -r requirements.txt\n\n\nOptions\n-------\n\n.. code-block:: console\n\n\t\t$ ./conquers.py --help\n\t\tusage: conquers.py [-h] [--add-credentials] [--credentials CREDENTIALS] [--config CONFIG] [-m MASTERKEY] [-d DEVICE_TYPE] [-p PUBLIC_KEY]\n\t\t\n\t\tconquers v0.1\n\t\t\n\t\toptions:\n\t\t  -h, --help            show this help message and exit\n\t\t  --add-credentials     Add entry to credentials. Specify credentials file with --credentials, the default is ~/.conquers/credentials\n\t\t  --credentials CREDENTIALS\n\t\t                        Path to credentials file. Default is ~/.conquers/credentials\n\t\t  --config CONFIG       Path to configuration file. Default is ~/.conquers/config.yaml\n\t\t  -m MASTERKEY, --masterkey MASTERKEY\n\t\t                        Path to file containing the master key\n\t\t  -d DEVICE_TYPE, --device-type DEVICE_TYPE\n\t\t                        Like cisco_ios or huawei.\n\t\t  -p PUBLIC_KEY, --public-key PUBLIC_KEY\n\t\t                        Converts public key to format specified with -d.\n\n\nConfiguration\n-------------\n\n*conquers* uses a configuration file to make use of its features. It must be in\n``.yaml`` format. Here is ``config.yaml.example`` from the\n`repository \u003chttps://github.com/medecaj/conquers/\u003e`_:\n\n.. code-block:: yaml\n\n\n        ---\n        # vim: se ft=yaml:\n        # filename: config.yaml.example\n        ################################################################################\n        ###########    COMMANDS    #####################################################\n        ################################################################################\n        # There are three types of commands:\n        #     - commands before configuration (cmds_before -\u003e list)\n        #     - configuration commands (conf_cmds -\u003e list)\n        #     - commands after configuration (cmds_after -\u003e list)\n        #\n        # cmds_before and cmds_after are usually show commands.\n        # One exception would be a command to make the configuration persistent like\n        #     - write memory\n        # Commands like that belong in cmds_after at the end.\n        #\n        # All configuration commands belong in **conf_cmds** and do not work in the\n        # other sections.\n        #\n        # For large command sets you can specify a path to a file containing\n        # commands, one per line:\n        #     - cmds_before_file -\u003e string\n        #     - conf_cmds_file -\u003e string\n        #     - cmds_after_file -\u003e string\n        #\n        # Find some EXAMPLES below.\n        #\n        # IMPORTANT:\n        # ----------\n        # Commands from e.g. cmds_before and cmds_after will be\n        # combined where commands cmds_before_file will be added after cmds_before.\n        #\n        # EXPECTS:\n        # --------\n        # With a special syntax you can react to interactions.\n        #\n        # The string after # is a string that you expect to be contained in the\n        # question. The string after the colon will be sent as an answer.\n        # Multiple expects are possible, each one is terminated with a semicolon.\n        # Example:\n        # cmds_after:\n        #   - \"copy scp://server.com//var/www/file.bin flash:#username:yes;#filename:yes;\"\n        \n        ################################################################################\n        #############    DEFAULTS    ###################################################\n        ################################################################################\n        defaults:                                     # Is not a group name\n          # Forks per group\n          forks: 5\n          device_type: \"huawei\"\n          connection_timeout: 5                       # Default is 10\n          read_timeout: 5                             # Default is 10\n          # List of report types. CAN ONLY BE SET HERE.\n          report_types:\n          # Possible types are json, yaml and html\n          # and can only be set in defaults.\n          # report.\u003ctype\u003e will be created in ~/.conquers.\n            - html                                    # (fancy, recommended for humans)\n            - yaml\n            # For type json you can specify the indentation with\n            #     :\u003cnumber\u003e (default:4)\n            - json:2\n          # If set to false, a yaml report is shown in the console per host.\n          # EXCEPTIONS AND ERRORS ARE ALWAYS SHOWN IN THE CONSOLE.\n          silent: false\n        \n        ################################################################################\n        #############    GROUPS    #####################################################\n        ################################################################################\n        # ----------- EXAMPLE GROUP cisco ----------------------------------------------\n        # Demostrates overriding settings and the defining of hosts.\n        cisco:                                        # Group name\n          silent: true                                # Overrides default\n          device_type: \"cisco_ios\"                    # Overrides default\n          forks: 10                                   # Overrides default\n          #   config_mode \n          # and \n          #   exit_config_mode\n          # are optional and not needed for device_type \"cisco_ios\" and are shown here\n          # merely for demonstration.\n          # Sould you encounter problems with configuration commands where it's not\n          # possible to enter the configuration mode, try these settings with the\n          # corresponding commands for your device to enter and exit configuration mode.\n          config_mode: \"conf t\"                       # Enter conf (cisco_ios)\n          exit_config_mode: \"end\"                     # Exit conf mode (cisco_ios)\n          cmds_after:\n            - \"show run | include username\"\n          ###########    HOSTS    ######################################################\n          hosts:\n            - cs-access1:\n                silent: false                         # Overrides group setting\n            - cs-access2:                             # A colon is mandatory after host\n        \n        # ----------- EXAMPLE GROUP firmware_upgrade -----------------------------------\n        # Example for a group where the hosts get a new firmware.\n        # Demonstrates special syntax for interactions.\n        firmware_upgrade:                             # Group name\n          device_type: \"cisco_ios\"\n          silent: true\n          cmds_after:\n            # The string after # is what you expect, the string after the colon will\n            # be sent as an answer. A semicolon terminates the expression, multiple\n            # expects are possible.\n            - \"copy scp://someserver.com//var/www/some.file flash:#username:yes;#filename:yes;\"\n          hosts:\n            - cisco-core-1:\n            - cisco-core-2:\n              # different file only for cisco-core-2\n              cmds_after:                             # Overrides group setting\n                - \"copy scp://diff.com//var/www/diff.file flash:#username:yes;#filename:yes;\"\n            - cisco-core-3:\n            - cisco-core-4:\n        \n        # ----------- EXAMPLE GROUP logging --------------------------------------------\n        # In this example, the complete configuration will be logged to\n        # the specified log file.\n        # With **log_file** the OUTPUT of every command will be logged.\n        logging:\n          device_type: \"cisco_ios\"\n          silent: true\n          cmds_before:\n            - \"show run\"\n          hosts:\n            - cisco-core-1:\n                log_file: \"~/path/file.log\"\n            - cisco-core-2:\n                log_file: \"/path/to/file.log\"\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3cf173ba%2Fconquers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F3cf173ba%2Fconquers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3cf173ba%2Fconquers/lists"}