Name | nexus-pcv JSON |
Version |
0.2.1
JSON |
| download |
home_page | https://github.com/netascode/nexus-pcv |
Summary | A CLI tool to perform a pre-change validation on Nexus Dashboard Insights or Network Assurance Engine. |
upload_time | 2025-01-22 00:16:44 |
maintainer | Daniel Schmidt |
docs_url | None |
author | Daniel Schmidt |
requires_python | <4.0,>=3.8 |
license | LICENSE |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
[](https://github.com/netascode/nexus-pcv/actions/workflows/test.yml)

# nexus-pcv
A CLI tool to perform a pre-change validation on Nexus Dashboard Insights. It can either work with provided JSON file(s) or a `terraform plan` output from a [Nexus as Code](https://cisco.com/go/nexusascode) project. It waits for the analysis to complete and evaluates the results.
```
$ nexus-pcv -h
Usage: nexus-pcv [OPTIONS]
A CLI tool to perform a pre-change validation on Nexus Dashboard Insights.
Options:
--version Show the version and exit.
-v, --verbosity LVL Either CRITICAL, ERROR, WARNING, INFO or DEBUG.
-i, --hostname-ip TEXT ND hostname or IP (required, env:
PCV_HOSTNAME_IP).
-u, --username TEXT ND username (required, env: PCV_USERNAME).
-p, --password TEXT ND password (required, env: PCV_PASSWORD).
-d, --domain TEXT ND login domain (optional, default: 'local', env:
PCV_DOMAIN).
-g, --group TEXT NDI insights group name (optional, default:
'default', env: PCV_GROUP).
-s, --site TEXT NDI site or fabric name (required, env:
PCV_SITE).
-n, --name TEXT NDI pre-change validation name (optional, env:
PCV_NAME).
--suppress-events TEXT NDI comma-separated list of events to suppress
(optional, default: 'APP_EPG_NOT_DEPLOYED,APP_EPG
_HAS_NO_CONTRACT_IN_ENFORCED_VRF', env:
PCV_SUPPRESS_EVENTS).
--timeout INTEGER NDI pre-change validation timeout in minutes
(optional, default: 15, env: PCV_TIMEOUT).
-f, --file FILE NDI proposed change JSON file (optional, env:
PCV_FILE).
-t, --nac-tf-plan FILE NDI proposed change Terraform plan output
(optional, env: PCV_NAC_TF_PLAN).
-o, --output-summary FILE NDI summary of new events/anomalies written to a
file (optional, env: PCV_OUTPUT_SUMMARY).
-r, --output-url FILE NDI link (URL) to pre-change validation results
written to a file (optional, env:
PCV_OUTPUT_URL).
-h, --help Show this message and exit.
```
## Installation
Python 3.7+ is required to install `nexus-pcv`. Don't have Python 3.7 or later? See [Python 3 Installation & Setup Guide](https://realpython.com/installing-python/).
`nexus-pcv` can be installed in a virtual environment using `pip`:
```
pip install nexus-pcv
```
## CI/CD Integration
The tool can easily be integrated with CI/CD workflows. Arguments can either be provided via command line or environment variables. The tool will exit with a non-zero exit code in case of an error or non-suppressed events being discovered during the pre-change analysis. The `--output-summary` and `--output-url` arguments can be used to write a summary and/or a link (URL) to a file, which can then be embedded into notifications (e.g., Webex).
## *Nexus as Code* Integration
*Nexus as Code* allows users to instantiate network fabrics in minutes using an easy to use, opinionated data model. More information about *Nexus as Code* can be found [here](https://cisco.com/go/nexusascode). A planned change can be validated before applying it to a production environment by running a `terraform plan` operation first and then providing the output to `nexus-pcv` to trigger a pre-change validation.
```
export PCV_HOSTNAME_IP=10.1.1.1
export PCV_USERNAME=admin
export PCV_PASSWORD=Cisco123
export PCV_GROUP=LAB
export PCV_SITE=LAB1
terraform plan -out=plan.tfplan
terraform show -json plan.tfplan > plan.json
nexus-pcv --name "PCV1" --nac-tf-plan plan.json
```
Raw data
{
"_id": null,
"home_page": "https://github.com/netascode/nexus-pcv",
"name": "nexus-pcv",
"maintainer": "Daniel Schmidt",
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": "danischm@cisco.com",
"keywords": null,
"author": "Daniel Schmidt",
"author_email": "danischm@cisco.com",
"download_url": "https://files.pythonhosted.org/packages/13/84/c87869af1ef0e21fa9d9330920ae2926277ae9649a963d6d7913895ff0ea/nexus_pcv-0.2.1.tar.gz",
"platform": null,
"description": "[](https://github.com/netascode/nexus-pcv/actions/workflows/test.yml)\n\n\n# nexus-pcv\n\nA CLI tool to perform a pre-change validation on Nexus Dashboard Insights. It can either work with provided JSON file(s) or a `terraform plan` output from a [Nexus as Code](https://cisco.com/go/nexusascode) project. It waits for the analysis to complete and evaluates the results.\n\n```\n$ nexus-pcv -h\nUsage: nexus-pcv [OPTIONS]\n\n A CLI tool to perform a pre-change validation on Nexus Dashboard Insights.\n\nOptions:\n --version Show the version and exit.\n -v, --verbosity LVL Either CRITICAL, ERROR, WARNING, INFO or DEBUG.\n -i, --hostname-ip TEXT ND hostname or IP (required, env:\n PCV_HOSTNAME_IP).\n -u, --username TEXT ND username (required, env: PCV_USERNAME).\n -p, --password TEXT ND password (required, env: PCV_PASSWORD).\n -d, --domain TEXT ND login domain (optional, default: 'local', env:\n PCV_DOMAIN).\n -g, --group TEXT NDI insights group name (optional, default:\n 'default', env: PCV_GROUP).\n -s, --site TEXT NDI site or fabric name (required, env:\n PCV_SITE).\n -n, --name TEXT NDI pre-change validation name (optional, env:\n PCV_NAME).\n --suppress-events TEXT NDI comma-separated list of events to suppress\n (optional, default: 'APP_EPG_NOT_DEPLOYED,APP_EPG\n _HAS_NO_CONTRACT_IN_ENFORCED_VRF', env:\n PCV_SUPPRESS_EVENTS).\n --timeout INTEGER NDI pre-change validation timeout in minutes\n (optional, default: 15, env: PCV_TIMEOUT).\n -f, --file FILE NDI proposed change JSON file (optional, env:\n PCV_FILE).\n -t, --nac-tf-plan FILE NDI proposed change Terraform plan output\n (optional, env: PCV_NAC_TF_PLAN).\n -o, --output-summary FILE NDI summary of new events/anomalies written to a\n file (optional, env: PCV_OUTPUT_SUMMARY).\n -r, --output-url FILE NDI link (URL) to pre-change validation results\n written to a file (optional, env:\n PCV_OUTPUT_URL).\n -h, --help Show this message and exit.\n```\n\n## Installation\n\nPython 3.7+ is required to install `nexus-pcv`. Don't have Python 3.7 or later? See [Python 3 Installation & Setup Guide](https://realpython.com/installing-python/).\n\n`nexus-pcv` can be installed in a virtual environment using `pip`:\n\n```\npip install nexus-pcv\n```\n\n## CI/CD Integration\n\nThe tool can easily be integrated with CI/CD workflows. Arguments can either be provided via command line or environment variables. The tool will exit with a non-zero exit code in case of an error or non-suppressed events being discovered during the pre-change analysis. The `--output-summary` and `--output-url` arguments can be used to write a summary and/or a link (URL) to a file, which can then be embedded into notifications (e.g., Webex).\n\n## *Nexus as Code* Integration\n\n*Nexus as Code* allows users to instantiate network fabrics in minutes using an easy to use, opinionated data model. More information about *Nexus as Code* can be found [here](https://cisco.com/go/nexusascode). A planned change can be validated before applying it to a production environment by running a `terraform plan` operation first and then providing the output to `nexus-pcv` to trigger a pre-change validation.\n\n```\nexport PCV_HOSTNAME_IP=10.1.1.1\nexport PCV_USERNAME=admin\nexport PCV_PASSWORD=Cisco123\nexport PCV_GROUP=LAB\nexport PCV_SITE=LAB1\nterraform plan -out=plan.tfplan\nterraform show -json plan.tfplan > plan.json\nnexus-pcv --name \"PCV1\" --nac-tf-plan plan.json\n```\n",
"bugtrack_url": null,
"license": "LICENSE",
"summary": "A CLI tool to perform a pre-change validation on Nexus Dashboard Insights or Network Assurance Engine.",
"version": "0.2.1",
"project_urls": {
"Documentation": "https://github.com/netascode/nexus-pcv",
"Homepage": "https://github.com/netascode/nexus-pcv",
"Repository": "https://github.com/netascode/nexus-pcv"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0e7fe9b4db4fcd763f0871dd48382c35559db2d2946bc9465855aa82886ab690",
"md5": "0ed28c2fe56e6875b4b995ef695d4928",
"sha256": "796110fd8590d40192281e74eebccbfd655386d2b1666c2b2b58920e74c3d5ac"
},
"downloads": -1,
"filename": "nexus_pcv-0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0ed28c2fe56e6875b4b995ef695d4928",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 18805,
"upload_time": "2025-01-22T00:16:43",
"upload_time_iso_8601": "2025-01-22T00:16:43.309437Z",
"url": "https://files.pythonhosted.org/packages/0e/7f/e9b4db4fcd763f0871dd48382c35559db2d2946bc9465855aa82886ab690/nexus_pcv-0.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1384c87869af1ef0e21fa9d9330920ae2926277ae9649a963d6d7913895ff0ea",
"md5": "9bad2ac46791e982cf69a392311ad362",
"sha256": "7c824afbd8863ecc2e88c69057d50150730efe75775956bd877625137eb14651"
},
"downloads": -1,
"filename": "nexus_pcv-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "9bad2ac46791e982cf69a392311ad362",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 16539,
"upload_time": "2025-01-22T00:16:44",
"upload_time_iso_8601": "2025-01-22T00:16:44.767881Z",
"url": "https://files.pythonhosted.org/packages/13/84/c87869af1ef0e21fa9d9330920ae2926277ae9649a963d6d7913895ff0ea/nexus_pcv-0.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-22 00:16:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "netascode",
"github_project": "nexus-pcv",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "nexus-pcv"
}