{ "info": { "author": "Jose Bogar\u00edn", "author_email": "jbogarin@altus.cr", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "Intended Audience :: Telecommunications Industry", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: System", "Topic :: System :: Networking", "Topic :: Utilities" ], "description": "=============\ndnacentercli\n=============\n\n*Command Line Interface for Cisco DNA Center APIs.*\n\n-------------------------------------------------------------------------------\n\n**dnacentercli** is a CLI built for working with the DNA Center APIs.\n\nInstallation\n============\n\nTo install dnacentercli, you will need to have python and pip installed. \nAfter you can enter the following command:\n\n.. code-block:: bash\n\n $ pip install dnacentercli\n\n\nThe project has a few dependencies:\n\n- `click`_ >= 7.0\n- `dnacentersdk`_ >= 1.3.0.post2\n\n**Note**: dnacentercli works starting from **python 3**\n\nWhat is DNA Center?\n===================\n\n \"A better way to control your network. Cisco DNA Center is the network management and command center for Cisco DNA, your intent-based network for the enterprise.\"\n\nVisit the official `DNA Center`_ website for more information.\n\n\nUsage\n======\n\nThe DNA Center CLI depends and actively uses the `DNA Center SDK`_. \nThey, however, have some differences in their usage.\n\n\nAPI Version\n------------\n\nCisco DNA Center SDK wraps DNA Center APIs (versions: 1.2.10 and 1.3.0),\nusing the version parameter to control which API version to use.\n\nDNA Center CLI does it by separating the versions by the `--dna-version` or `-v` option.\n\n\nAuthenticate\n-------------\n\nDNA Center SDK creates a DNACenterAPI \"Connection Object\" defaults to pulling from environment variables and config values.\nThe same happens for the DNA Center CLI.\n\nYou can ask for help using ``--help`` and see the list of options and commands available on your selected version:\n\n.. code-block:: bash\n\n $ dnacentercli -v '1.2.10' --help \n\n\n**Note:**\n\nTo avoid getting errors like the following:\n\n::\n\n > HTTPSConnectionPool(host='128.107.71.199', port=443): \n Max retries exceeded with url: /dna/system/api/v1/auth/token (Caused by SSLError\n (SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate\n verify failed: self signed certificate in certificate chain (_ssl.c:1076)')))\n\n\nInclude the verify option and set it to False: ``--verify False``\n\n\nAccess to DNA Center APIs\n--------------------------\n\nYou need to authenticate for accessing other DNA Center APIs, such as Clients, Networks or PnP.\n\nYou can ask for specific API help using ``--help`` after the previous command options, which will list the endpoints (as commands):\n\n.. code-block:: bash\n\n $ dnacentercli -v '1.2.10' --base_url https://128.107.71.199:443 --verify False networks --help\n\n\nMaking API Calls\n----------------\n\nEach DNA Center SDK API Call parameter is a DNA Center CLI option.\n\nThe following call using the dnacentersdk\n\n.. code-block:: python\n\n from dnacentersdk import DNACenterAPI\n api = DNACenterAPI(username=\"devnetuser\",\n password=\"Cisco123!\",\n base_url=\"https://sandboxdnac2.cisco.com:443\",\n version='1.2.10',\n verify=True)\n\n api.networks.get_overall_network_healt(timestamp='1568008500000', headers={'__runsync': True})\n\nis the same as \n\n.. code-block:: bash\n\n $ dnacentercli -v '1.2.10' --username devnetuser --password Cisco123! \\\n > --base_url https://sandboxdnac2.cisco.com:443 --verify True \\\n > networks get-overall-network-health \\\n > --timestamp \"1568008500000\" --headers '{\"__runsync\": true}'\n\n\n**Note:** \n\nThere are differences across platforms about JSON strings.\n\nOn \\*nix based systems and command lines, the following is a valid JSON string representation:\n\n.. code-block:: bash\n\n $ dnacentercli -v '1.2.10' networks get-overall-network-health \\\n --timestamp \"1568008500000\" --headers '{\"__runsync\": true}'\n\nOn Windows and its command lines, the following is the valid JSON string representation:\n\n\n.. code-block:: bash\n\n dnacentercli -v '1.2.10' networks get-overall-network-health ^\n --timestamp \"1568008500000\" --headers '{\\\"__runsync\\\": true}'\n\nBe careful.\n\n\nMultiple Options\n----------------\n\nThere are some cases where the parameter type is a list. To record all the values, you have to provide the parameter multiple times.\n\nFor example:\n\n.. code-block:: bash\n\n $ dnacentercli -v '1.2.10' devices add-device --ipaddress '10.20.10.1' --ipaddress '10.30.10.1'\n\n\nBell\n------\n\nTo activate the beep when the spinner finishes (or the API call ends), add the ``--beep`` option to your API Call.\nThe ``--beep`` option is a boolean flag if present is on otherwise is off.\n\n\nPretty Print\n------------\n\nTo pretty-print the JSON response add the option ``-pp`` or ``--pretty_print`` INTEGER to your API Call, where the INTEGER is the indentation.\n\nBoth the debug and the JSON response of the API call are streamed to the Standard Output (stdout).\n\nFor example:\n\n.. code-block:: bash\n\n $ dnacentercli -v '1.2.10' devices get-device-list --family 'Unified AP' --hostname 'T1-9' -pp 2\n {\n \"response\": [\n {\n \"apManagerInterfaceIp\": \"10.10.20.51\",\n \"associatedWlcIp\": \"10.10.20.51\",\n \"bootDateTime\": null,\n \"collectionInterval\": \"NA\",\n \"collectionStatus\": \"Managed\",\n \"errorCode\": \"null\",\n \"errorDescription\": null,\n \"family\": \"Unified AP\",\n \"hostname\": \"T1-9\",\n ...\n \"memorySize\": \"NA\",\n \"platformId\": \"AIR-AP1141N-A-K9\",\n \"reachabilityFailureReason\": \"NA\",\n \"reachabilityStatus\": \"Reachable\",\n \"role\": \"ACCESS\",\n \"roleSource\": \"AUTO\",\n \"serialNumber\": \"1140K0009\",\n ...\n \"snmpContact\": \"\",\n \"snmpLocation\": \"default-location\",\n \"softwareType\": null,\n ...\n \"tagCount\": \"0\",\n \"tunnelUdpPort\": \"16666\",\n \"type\": \"Cisco 1140 Unified Access Point\",\n \"upTime\": \"195days 11:11:32.270\",\n \"waasDeviceMode\": null\n }\n ],\n \"version\": \"1.0\"\n }\n\n\nExceptions\n----------\n\nAll DNA Center SDK exceptions are streamed to the Standard Error (stderr).\nBefore exiting the program, it will print the traceback (limited to 1 element), the exception name and its description.\n\n\n*Copyright (c) 2019 Cisco and/or its affiliates.*\n\n.. _dnacentersdk: https://dnacentersdk.readthedocs.io/\n.. _click: https://click.palletsprojects.com/\n.. _DNA Center SDK: https://github.com/cisco-en-programmability/dnacentersdk\n.. _DNA Center: https://www.cisco.com/c/en/us/products/cloud-systems-management/dna-center/index.html\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "https://pypi.python.org/pypi/dnacentercli", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cisco-en-programmability/dnacentercli", "keywords": "cisco dna dnacenter python api sdk", "license": "MIT; Copyright (c) 2019 Cisco Systems, Inc.", "maintainer": "", "maintainer_email": "", "name": "dnacentercli", "package_url": "https://pypi.org/project/dnacentercli/", "platform": "", "project_url": "https://pypi.org/project/dnacentercli/", "project_urls": { "Download": "https://pypi.python.org/pypi/dnacentercli", "Homepage": "https://github.com/cisco-en-programmability/dnacentercli" }, "release_url": "https://pypi.org/project/dnacentercli/0.0.6/", "requires_dist": [ "future", "Click (>=7.0)", "dnacentersdk (>=1.3.0.post2)" ], "requires_python": "", "summary": "Community-developed Python CLI companion for the DNA Center SDK", "version": "0.0.6" }, "last_serial": 5956420, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "b7dfc2811c753f92d040ef0860aeb54e", "sha256": "8ea0d4b327f472acb722819de567435267e35b4366d68c0b7772f86aa33e2fac" }, "downloads": -1, "filename": "dnacentercli-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "b7dfc2811c753f92d040ef0860aeb54e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 97224, "upload_time": "2019-10-02T00:02:35", "url": "https://files.pythonhosted.org/packages/6f/49/dae21ae34c72bcb6a350462b96a068bbff736ba791a8f5849f2e177c5712/dnacentercli-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "55960da00938563868d850dbef98c971", "sha256": "9cbb6acc4b4ebec925532ed137a6f24965926c58d2c66fc810190015f4bcccee" }, "downloads": -1, "filename": "dnacentercli-0.0.1.tar.gz", "has_sig": false, "md5_digest": "55960da00938563868d850dbef98c971", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 73284, "upload_time": "2019-10-02T00:02:38", "url": "https://files.pythonhosted.org/packages/35/2d/137f832eae86447ece52ef8b759d0e2d1052a6b7ed79f489c536e925171a/dnacentercli-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "1ac5b37903533805d2df20d36ac318a8", "sha256": "02e46cae4d82fbb7e3695e2d835f084c7e3597a2438e2f550c18febf550ff79c" }, "downloads": -1, "filename": "dnacentercli-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "1ac5b37903533805d2df20d36ac318a8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 100010, "upload_time": "2019-10-03T00:31:39", "url": "https://files.pythonhosted.org/packages/b7/56/41244172ff89d78a844cc1faf4a04306203de29f8178cbc591abfa5c8b06/dnacentercli-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "18c0c4d4a3864ec9d1c4403dc71c39fb", "sha256": "c4d2ba15c980197c6765eefb1d930ae93a759e18bad24b6ddc1dd1f3fbbb7180" }, "downloads": -1, "filename": "dnacentercli-0.0.2.tar.gz", "has_sig": false, "md5_digest": "18c0c4d4a3864ec9d1c4403dc71c39fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 221780, "upload_time": "2019-10-03T00:31:41", "url": "https://files.pythonhosted.org/packages/35/fd/d4bc747d24ba263a4f59ca9d9c08f97a4795fc9d7d3883e9d3025333b014/dnacentercli-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "5b93914a422fbe1fdb132bdb9f527be2", "sha256": "677d3072c2995e7b423f3e71e5e7b65227e9d90951571067fcdc24a96b690451" }, "downloads": -1, "filename": "dnacentercli-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "5b93914a422fbe1fdb132bdb9f527be2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 100000, "upload_time": "2019-10-03T19:27:08", "url": "https://files.pythonhosted.org/packages/df/8c/86d920ead519a92975d34447b74221707e02231146f8445efdac409eafcd/dnacentercli-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4f00f463549c25b368421741f3845c8e", "sha256": "9ae1be7b56c4029c472a8af869e702e94a7f49d91bff3d9bfc0e37c145a7b8ed" }, "downloads": -1, "filename": "dnacentercli-0.0.3.tar.gz", "has_sig": false, "md5_digest": "4f00f463549c25b368421741f3845c8e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 221862, "upload_time": "2019-10-03T19:27:12", "url": "https://files.pythonhosted.org/packages/9c/ad/7c95de462ae51e18e68bf024d3b7f58f7bfa7bcd20f16d2e21b57b050bf7/dnacentercli-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "37df428f5d2723c9c615071f3214adb9", "sha256": "e50354c87157ef72db5e7579f254601bf386980a9ff33c1611d04d8b0e553a50" }, "downloads": -1, "filename": "dnacentercli-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "37df428f5d2723c9c615071f3214adb9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 100867, "upload_time": "2019-10-08T18:55:24", "url": "https://files.pythonhosted.org/packages/cb/49/97ecca8849556aefaf4898df91894530c9c2e6a144044ea7d64acdcc617b/dnacentercli-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9861f1dfe72d756cd2e45d7822ba1f30", "sha256": "7616340bfcc713691710c8647ac56505b6ec23295a915db6ce98c51b1f2f8e6a" }, "downloads": -1, "filename": "dnacentercli-0.0.4.tar.gz", "has_sig": false, "md5_digest": "9861f1dfe72d756cd2e45d7822ba1f30", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 224678, "upload_time": "2019-10-08T18:55:27", "url": "https://files.pythonhosted.org/packages/0f/29/47b14fcad4b5637a3eba4e1aee55915a62b430c5d8436938d956f40abf9c/dnacentercli-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "891e733dec8b66206b51dff3c0adf878", "sha256": "0edb0b7b6f49321038898cfbe4b40c29044dd3c48012ce05dc37792dee3d39fa" }, "downloads": -1, "filename": "dnacentercli-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "891e733dec8b66206b51dff3c0adf878", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 101073, "upload_time": "2019-10-08T19:39:16", "url": "https://files.pythonhosted.org/packages/a1/5c/5ef82d8e693fadd38177f613d249cc2a2c8d12174e742cbd57fddf1d43d1/dnacentercli-0.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e7fd1e0cb9664736d90f164bb6252eee", "sha256": "0fd610d89221c429ba3d5053b18cdc575fb51c11160bf7efbc5ef3e8f81cd985" }, "downloads": -1, "filename": "dnacentercli-0.0.5.tar.gz", "has_sig": false, "md5_digest": "e7fd1e0cb9664736d90f164bb6252eee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 224944, "upload_time": "2019-10-08T19:39:19", "url": "https://files.pythonhosted.org/packages/aa/03/2c60b92199c9b13b09b9cbdd771c9bc42cffad117c2441b7c0266dc1a953/dnacentercli-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "1942c7361859bbaca9d24d6567f8616d", "sha256": "c18d3d13f57d12a0bec32f9fbad5236f182a136230914839e59e9b2a9ef82c22" }, "downloads": -1, "filename": "dnacentercli-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "1942c7361859bbaca9d24d6567f8616d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 102125, "upload_time": "2019-10-10T19:14:47", "url": "https://files.pythonhosted.org/packages/b2/c2/3311f7fcb465c89745947aebe147e80e2aea5949ede12a38ad5e525a0450/dnacentercli-0.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3fbcdc2e7ba11e7df787f38419742a9e", "sha256": "2aff9fe1190841b84dc3faf72d406ab0884f622a7e41bbd1e69d9d16fbfaacaa" }, "downloads": -1, "filename": "dnacentercli-0.0.6.tar.gz", "has_sig": false, "md5_digest": "3fbcdc2e7ba11e7df787f38419742a9e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 226067, "upload_time": "2019-10-10T19:14:51", "url": "https://files.pythonhosted.org/packages/b1/e4/449d1a95aacc5e748c3fc8eec8bead46fdd355346138200c35409a32ad77/dnacentercli-0.0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1942c7361859bbaca9d24d6567f8616d", "sha256": "c18d3d13f57d12a0bec32f9fbad5236f182a136230914839e59e9b2a9ef82c22" }, "downloads": -1, "filename": "dnacentercli-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "1942c7361859bbaca9d24d6567f8616d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 102125, "upload_time": "2019-10-10T19:14:47", "url": "https://files.pythonhosted.org/packages/b2/c2/3311f7fcb465c89745947aebe147e80e2aea5949ede12a38ad5e525a0450/dnacentercli-0.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3fbcdc2e7ba11e7df787f38419742a9e", "sha256": "2aff9fe1190841b84dc3faf72d406ab0884f622a7e41bbd1e69d9d16fbfaacaa" }, "downloads": -1, "filename": "dnacentercli-0.0.6.tar.gz", "has_sig": false, "md5_digest": "3fbcdc2e7ba11e7df787f38419742a9e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 226067, "upload_time": "2019-10-10T19:14:51", "url": "https://files.pythonhosted.org/packages/b1/e4/449d1a95aacc5e748c3fc8eec8bead46fdd355346138200c35409a32ad77/dnacentercli-0.0.6.tar.gz" } ] }