{ "info": { "author": "abaumeister", "author_email": "abaumeister@paloaltonetworks.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "![skilletcli_icon](.github/icon.png)\n# SkilletCLI\n[![Build Status](https://travis-ci.org/adambaumeister/skilletcli.svg?branch=master)](https://travis-ci.org/adambaumeister/skilletcli)\n![coverage](.github/cov.svg)\n## Overview\nThis utility provides a command line interface to Palo Alto \"skillets\", \ncurated configuration templates designed to be imported into firewalls or Panorama.\n\n## Installation\n### Pre-requisites\nTo use skilletcli, a Git client must be installed.\n\n[Binaries for windows/OSX can be found here](https://git-scm.com/)\n\nLinux users can use their preferred package manager.\n\n### Getting the code\n**windows**\n\n[Download the latest release from the releases page.](https://github.com/adambaumeister/skilletcli/releases)\n\n**mac**\n```bash\ncommand -v git ; if [[ $? != 0 ]] ; then echo \"Git not installed.\" ; else curl -L https://github.com/adambaumeister/skilletcli/releases/latest/download/skilletcli -o skilletcli ; chmod +x skilletcli ; fi\n```\nNote for mac users: Skilletcli is built on macOS 10.14. Newer/older builds may not be compatible and in that case, you need to run\nfrom source.\n\n**linux**\n```bash\ncommand -v git ; if [[ $? != 0 ]] ; then echo \"Git not installed.\" ; else curl -L https://github.com/adambaumeister/skilletcli/releases/latest/download/skilletcli -o skilletcli ; chmod +x skilletcli ; fi\n```\n\n### Preparing the environment\nSkilletCLI requires a variable file to be populated before use.\n\nThis file is used to template various snippets with environment specific information.\nBy default, this file is named config_variables.yaml, and it is retrieved from the current directory (_./config_variables.yml_)\n\n[click here to see a complete example, populated with default values](config_variables.yaml)\n\nIf this file is not specified or is missing/unavailable, defaults will be used. \n\n## Usage\n### Overview of skillet layout\nSkilletCLI returns a structure like the below:\n\nSkillet Collection/Skillets/Snippet stacks/Snippet\n\nA skillet collection is a group of skillets associated with a type, such as PANOS or PANORAMA. \nA snippet stack is a collection of snippets that have a specific use case.\n\nBy default, SkilletCLI will use the device type of the target firewall to determine which skillet type to use, and \n\"snippets\" for the snippet stack to use.\n\n### Basic usage\n*list all available snippets, skillets, and skillet collections*\n```bash\nskilletcli\n```\nThis command lists all the available snippets.\n\n*push a snippet to a device*\n```bash\nskilletcli address\n```\nThis will push a single snippet \"address\" to the device, prompting for all login settings.\n\n*push multiple snippets*\n```bash\nskilletcli address tag external_list\n```\nSame as the above except push multiple snippets in the one command. As many snippets as is required \ncan be pushed like this.\n\n### Key storage\nAPIkeys can be stored locally to avoid the use of environment variables for command line flags.\n\nThe keystore can be enabled by passing the flag --enable_keystore when running any skcli command. If authentication is sucessful, the generated API key\nwill be stored in $HOME/.skcli.json.\n\nAfter the keystore has been enabled once, the flag does not need to be re-specified on subsequent runs.\n```\n# Enable the keystore\nskilletcli --enable_keystore \n```\n```\n# Clear the keystore \nskilletcli --clear_keystore\n```\n### Environment variables\nSkilletCLI allows you to use environment variables instead of an interactive prompt.\n\nThe variables are:\n* SKCLI_USERNAME\n* SKCLI_PASSWORD\n* SKCLI_ADDRESS\n\n### Experimental: HTTP-based skillet retrieval\nSkillets will eventually be hosted centrally, via a publicly accessible API.\nIf you retrieve skillets this way, you do _not_ need a Git client.\n\n**At the moment, this functionality is still in dev, so use at your own risk.**\n\nTo leverage this functionality add the flags --repotype and --repopath, as below.\n```bash\nskilletcli --repotype api --repopath https://skillet-deploy.appspot.com\n```\n\n\n## Developing SkilletCLI\nContributing to SkilletCLI requires Python 3.6+ installed on your machine.\n\nAfter it is installed, it's recommended to create a virtual environment so the code is standalone.\n\n```bash\npython3 -m venv venv\n# Windows\nvenv/scripts/activate\n# *nix\nsource venv/scripts/activate\n```\n\nClone the code and install the module requirements.\n\n```bash\ngit clone https://github.com/adambaumeister/skilletcli.git\ncd skilletcli\npip install -r requirements.txt\n```\n\nYou are now ready to make your changes!\n\n### Testing\nTesting of skilletcli is broken up into two logical processes\n1. Unit testing, or the testing of standalone functions\n2. Integration testing, or the testing of functions against real PANOS devices\n\nAll testing is initatiated using *pytest*. \n```bash\npytest\n```\n\nBy default, only unit tests will be run. To run integration testing, you must specify the standard\nSKCLI environment variables (address, username, password) of the device to test against\nas well as an additional env var: *SKCLI_DEVICE_TEST*. \nAfter setting up the environment, simply run *pytest* as normal.\n\nPytest is run automatically as part of CI using TravisCI whenever changes are detected to Master. CI only runs unit tests.\n\n### Test Coverage\nAfter updating skcli, you can rerun the coverage tests and update the little icon using the below.\n```bash\ncoverage run --omit ./venv* -m pytest\ncoverage-badge -o .github/cov.svg\n```\n\n### Packaging\nBinary packaging is done using pyinstaller, managed by Travis. Packaging occurs on the publish of a release\n(tag) on the master branch. \n\nPypi distribution is also handled via Travis on each tagged release. \n\nManual pypi packaging:\n```bash\npip install setuptools wheel\npip install twine\npython setup.py bdist bdist_wheel\ntwine upload --repository-url https://test.pypi.org/legacy/ dist/*\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/adambaumeister/skilletcli/releases/latest/download/skilletcli.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/adambaumeister/skilletcli", "keywords": "", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "skilletcli", "package_url": "https://pypi.org/project/skilletcli/", "platform": "", "project_url": "https://pypi.org/project/skilletcli/", "project_urls": { "Download": "https://github.com/adambaumeister/skilletcli/releases/latest/download/skilletcli.tar.gz", "Homepage": "https://github.com/adambaumeister/skilletcli" }, "release_url": "https://pypi.org/project/skilletcli/2.0.0/", "requires_dist": null, "requires_python": "", "summary": "Packages and CLI tools for interacting with hosted Skillets.", "version": "2.0.0" }, "last_serial": 5860527, "releases": { "1.9.6": [ { "comment_text": "", "digests": { "md5": "f03d00f676e0a010224ceef866c12613", "sha256": "f5f3d1fdc7cc7a2bc48a96d3e743b9f46a2bc7305ba60648049342973e247b01" }, "downloads": -1, "filename": "skilletcli-1.9.6.tar.gz", "has_sig": false, "md5_digest": "f03d00f676e0a010224ceef866c12613", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15541, "upload_time": "2019-08-28T04:46:37", "url": "https://files.pythonhosted.org/packages/09/b6/867a86c9737707c40f67937397367ffe4e0fd41b7b0b49056dc3e50d24d2/skilletcli-1.9.6.tar.gz" } ], "1.9.9": [ { "comment_text": "", "digests": { "md5": "f6a2c11564619adf9a98d22e67de7c80", "sha256": "a3682fb68f4ff3a6999d9f30305608fd4a3441205b085460c1822c450270a99a" }, "downloads": -1, "filename": "skilletcli-1.9.9.tar.gz", "has_sig": false, "md5_digest": "f6a2c11564619adf9a98d22e67de7c80", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16441, "upload_time": "2019-09-09T04:41:22", "url": "https://files.pythonhosted.org/packages/1c/47/391fc0194ff99b1a4ba107a939554cbbb7f2a1f141741a4ce65b16a71ab9/skilletcli-1.9.9.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "260ab7fbc247e0f199acb9024f8dfbf1", "sha256": "c3488c2048262ec55f173bfcd2d9877ea11d2f47cf3a7a9c0bfc7847cffd81d4" }, "downloads": -1, "filename": "skilletcli-2.0.0.tar.gz", "has_sig": false, "md5_digest": "260ab7fbc247e0f199acb9024f8dfbf1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17129, "upload_time": "2019-09-20T07:24:20", "url": "https://files.pythonhosted.org/packages/b8/b2/2a529001b2db4977c19d5760329de71696e54cbace33ba0b615f0406b146/skilletcli-2.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "260ab7fbc247e0f199acb9024f8dfbf1", "sha256": "c3488c2048262ec55f173bfcd2d9877ea11d2f47cf3a7a9c0bfc7847cffd81d4" }, "downloads": -1, "filename": "skilletcli-2.0.0.tar.gz", "has_sig": false, "md5_digest": "260ab7fbc247e0f199acb9024f8dfbf1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17129, "upload_time": "2019-09-20T07:24:20", "url": "https://files.pythonhosted.org/packages/b8/b2/2a529001b2db4977c19d5760329de71696e54cbace33ba0b615f0406b146/skilletcli-2.0.0.tar.gz" } ] }