Name | vetr-summarizer JSON |
Version |
0.3.2
JSON |
| download |
home_page | None |
Summary | A Python package for visualizing ACI vetR JSON data |
upload_time | 2024-09-07 17:51:03 |
maintainer | None |
docs_url | None |
author | None |
requires_python | <4,>=3.9.0 |
license | MIT License Copyright (c) 2024 Osama Abbas Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
cisco
aci
automation
vetr-collector
devnet
datacenter
summarizer
json
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
[![published](https://static.production.devnetcloud.com/codeexchange/assets/images/devnet-published.svg)](https://developer.cisco.com/codeexchange/github/repo/Tes3awy/vetr-summarizer)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/vetr-summarizer)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat-square&labelColor=ef8336)](https://pycqa.github.io/isort/)
![PyPI - License](https://img.shields.io/pypi/l/vetr-summarizer)
![PyPI - Version](https://img.shields.io/pypi/v/vetr-summarizer)
![PyPI - Status](https://img.shields.io/pypi/status/vetr-summarizer)
![Pepy Total Downlods](https://img.shields.io/pepy/dt/vetr-summarizer)
![Commit Activity](https://img.shields.io/github/commit-activity/m/Tes3awy/vetr-summarizer/main?logo=github)
[![Say Thanks!](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/Tes3awy)
# vetR Summarizer
A Python package for visualizing ACI vetR JSON data from [vetr-collector](https://github.com/brightpuddle/vetr-collector)
## Table of Contents
1. [What is vetR Summarizer?](#what-is-vetr-summarizer)
2. [Objective](#objective)
3. [How it Works](#how-it-works)
4. [Installation](#installation)
5. [Usage](#usage)
6. [Use Case](#use-case)
![ACI](https://github.com/Tes3awy/vetr-summarizer/raw/main/assets/aci.jpg)
## What is vetR Summarizer?
This tool summarizes data from any APIC collected by [vetr-collector](https://github.com/brightpuddle/vetr-collector).
## Objective
This tool processes data collected by [vetr-collector](https://github.com/brightpuddle/vetr-collector) for the ACI health check and displays it in a pretty HTML tabluar format. This tool can also be run from any computer having `aci-vetr-data` collected from any APIC.
The `aci-vetr-data` directory you get from `vetr-collector v3.3.0` includes **91** raw JSON files.
```bash
$ ls aci-vetr-data
apPlugin.json
bgpRRNodePEp.json
configRsRemotePath.json
coopPol.json
ctxClassCnt.json
datetimeNtpProv.json
datetimePol.json
epControlP.json
epIpAgingP.json
epLoopProtectP.json
...
<output_truncated>
```
_A sample preview of the output HTML_
![Preview](https://github.com/Tes3awy/vetr-summarizer/raw/main/assets/preview.jpg)
## How it works
This tool visualizes data collection for the ACI health check from [vetr-collector](https://github.com/brightpuddle/vetr-collector).
Once the analysis is complete, the tool creates a `vetr-summary.html` file. This file displays the raw JSON data in a [DataTable](https://datatables.net/) tabular format. DataTable adds the ability to easily search for properties in concern.
Almost all [MOs](https://www.cisco.com/c/en/us/td/docs/switches/datacenter/aci/apic/sw/policy-model-guide/b-Cisco-ACI-Policy-Model-Guide.html#id_107445__d54e1142) include unnecessary configuration properties. Some of these properties: `extMngdBy`, `childAction`, `userdom`, etc. These unnecessary properties (key-value pairs) are excluded from the report for a neater representation of the output in the HTML file.
> _All excluded keys can be found in [`config/excluded_keys`](https://github.com/Tes3awy/vetr-summarizer/tree/main/src/vetr_summarizer/config) file._ You can also customize these keys-to-exclude according to your own case. _An empty excluded\_keys file will not exclude any keys_.
> Raw JSON files with empty `imdata` and `totalCount` equal to `0` are not presented in the HTML `vetr-summary.html` summary report.
## Installation
Install from PyPi
> System-wide
```bash
$ pip install --user vetr-summarizer
```
> Virtual Environment
```bash
$ python3 -m venv .venv
$ source .venv/bin/activate .
(.venv)$ pip install vetr-summarizer
```
## Usage
> Both keyword arguments are optional. _Currently `html` is the only supported output format_.
```bash
$ vetr-summarizer --help
usage: vetr-summarizer [-h] [-f {html}] [-x EXCLUDED_KEYS_FILE] [-v] directory
Process and summarize aci-vetr-data JSON files into HTML reports.
positional arguments:
directory A path to the directory containing the JSON files.
options:
-h, --help show this help message and exit
-f {html}, --format {html}
Output format (default: html)
-x EXCLUDED_KEYS_FILE, --excluded-keys-file EXCLUDED_KEYS_FILE
File with keys to exclude from raw JSON files. (default: excluded_keys)
-v, --version show program's version number and exit
Thanks for using vetr-summarizer! :)
```
```bash
$ vetr-summarizer "/path/to/aci-vetr-data"
HTML output is written to /path/to/vetr-summary.html
```
> With custom excluded keys
```bash
$ vetr-summarizer -x custom_excluded_keys "/path/to/aci-vetr-data"
HTML output is written to /path/to/vetr-summary.html
```
## Use Case
I was once going through the Cisco Community and found a [question](https://community.cisco.com/t5/application-centric-infrastructure/vetr-zip-logs/td-p/4804529), what is actually vetr zip logs?
![Question](https://github.com/Tes3awy/vetr-summarizer/raw/main/assets/q.jpg)
So, I decided to try `vetr-collector` on an environment. But, I got to open each raw JSON file to check whether it has objects and was time-consuming going through all the files. So, I made this package to summarize the output from `vetr-collector` in a pretty HTML tabular format.
## Author
[Osama Abbas](https://www.linkedin.com/in/oabbas/)
## Contributions
As there is always a room for imporovment, you are welcome to contribute to `vetr-summarizer`.
Raw data
{
"_id": null,
"home_page": null,
"name": "vetr-summarizer",
"maintainer": null,
"docs_url": null,
"requires_python": "<4,>=3.9.0",
"maintainer_email": "Osama Abbas <oabbas2512@gmail.com>",
"keywords": "Cisco, ACI, automation, vetr-collector, devnet, datacenter, summarizer, JSON",
"author": null,
"author_email": "Osama Abbas <oabbas2512@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/17/16/e9f4d8c350c39601bb1c4cb2f6b6d3989686168217e3950fcff272a78140/vetr_summarizer-0.3.2.tar.gz",
"platform": "any",
"description": "[![published](https://static.production.devnetcloud.com/codeexchange/assets/images/devnet-published.svg)](https://developer.cisco.com/codeexchange/github/repo/Tes3awy/vetr-summarizer)\r\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/vetr-summarizer)\r\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)\r\n[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat-square&labelColor=ef8336)](https://pycqa.github.io/isort/)\r\n![PyPI - License](https://img.shields.io/pypi/l/vetr-summarizer)\r\n![PyPI - Version](https://img.shields.io/pypi/v/vetr-summarizer)\r\n![PyPI - Status](https://img.shields.io/pypi/status/vetr-summarizer)\r\n![Pepy Total Downlods](https://img.shields.io/pepy/dt/vetr-summarizer)\r\n![Commit Activity](https://img.shields.io/github/commit-activity/m/Tes3awy/vetr-summarizer/main?logo=github)\r\n[![Say Thanks!](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/Tes3awy)\r\n\r\n# vetR Summarizer\r\n\r\nA Python package for visualizing ACI vetR JSON data from [vetr-collector](https://github.com/brightpuddle/vetr-collector)\r\n\r\n## Table of Contents\r\n\r\n1. [What is vetR Summarizer?](#what-is-vetr-summarizer)\r\n2. [Objective](#objective)\r\n3. [How it Works](#how-it-works)\r\n4. [Installation](#installation)\r\n5. [Usage](#usage)\r\n6. [Use Case](#use-case)\r\n\r\n![ACI](https://github.com/Tes3awy/vetr-summarizer/raw/main/assets/aci.jpg)\r\n\r\n## What is vetR Summarizer?\r\n\r\nThis tool summarizes data from any APIC collected by [vetr-collector](https://github.com/brightpuddle/vetr-collector).\r\n\r\n## Objective\r\n\r\nThis tool processes data collected by [vetr-collector](https://github.com/brightpuddle/vetr-collector) for the ACI health check and displays it in a pretty HTML tabluar format. This tool can also be run from any computer having `aci-vetr-data` collected from any APIC.\r\n\r\nThe `aci-vetr-data` directory you get from `vetr-collector v3.3.0` includes **91** raw JSON files.\r\n\r\n```bash\r\n$ ls aci-vetr-data\r\napPlugin.json\r\nbgpRRNodePEp.json\r\nconfigRsRemotePath.json\r\ncoopPol.json\r\nctxClassCnt.json\r\ndatetimeNtpProv.json\r\ndatetimePol.json\r\nepControlP.json\r\nepIpAgingP.json\r\nepLoopProtectP.json\r\n...\r\n<output_truncated>\r\n```\r\n\r\n_A sample preview of the output HTML_\r\n\r\n![Preview](https://github.com/Tes3awy/vetr-summarizer/raw/main/assets/preview.jpg)\r\n\r\n## How it works\r\n\r\nThis tool visualizes data collection for the ACI health check from [vetr-collector](https://github.com/brightpuddle/vetr-collector).\r\n\r\nOnce the analysis is complete, the tool creates a `vetr-summary.html` file. This file displays the raw JSON data in a [DataTable](https://datatables.net/) tabular format. DataTable adds the ability to easily search for properties in concern.\r\n\r\nAlmost all [MOs](https://www.cisco.com/c/en/us/td/docs/switches/datacenter/aci/apic/sw/policy-model-guide/b-Cisco-ACI-Policy-Model-Guide.html#id_107445__d54e1142) include unnecessary configuration properties. Some of these properties: `extMngdBy`, `childAction`, `userdom`, etc. These unnecessary properties (key-value pairs) are excluded from the report for a neater representation of the output in the HTML file. \r\n\r\n> _All excluded keys can be found in [`config/excluded_keys`](https://github.com/Tes3awy/vetr-summarizer/tree/main/src/vetr_summarizer/config) file._ You can also customize these keys-to-exclude according to your own case. _An empty excluded\\_keys file will not exclude any keys_.\r\n\r\n> Raw JSON files with empty `imdata` and `totalCount` equal to `0` are not presented in the HTML `vetr-summary.html` summary report.\r\n\r\n## Installation\r\n\r\nInstall from PyPi\r\n\r\n> System-wide\r\n\r\n```bash\r\n$ pip install --user vetr-summarizer\r\n```\r\n\r\n> Virtual Environment\r\n\r\n```bash\r\n$ python3 -m venv .venv\r\n$ source .venv/bin/activate .\r\n(.venv)$ pip install vetr-summarizer\r\n```\r\n\r\n## Usage\r\n\r\n> Both keyword arguments are optional. _Currently `html` is the only supported output format_.\r\n\r\n```bash\r\n$ vetr-summarizer --help\r\nusage: vetr-summarizer [-h] [-f {html}] [-x EXCLUDED_KEYS_FILE] [-v] directory\r\n\r\nProcess and summarize aci-vetr-data JSON files into HTML reports.\r\n\r\npositional arguments:\r\n directory A path to the directory containing the JSON files.\r\n\r\noptions:\r\n -h, --help show this help message and exit\r\n -f {html}, --format {html}\r\n Output format (default: html)\r\n -x EXCLUDED_KEYS_FILE, --excluded-keys-file EXCLUDED_KEYS_FILE\r\n File with keys to exclude from raw JSON files. (default: excluded_keys)\r\n -v, --version show program's version number and exit\r\n\r\nThanks for using vetr-summarizer! :)\r\n```\r\n\r\n```bash\r\n$ vetr-summarizer \"/path/to/aci-vetr-data\"\r\n\r\nHTML output is written to /path/to/vetr-summary.html\r\n```\r\n\r\n> With custom excluded keys\r\n\r\n```bash\r\n$ vetr-summarizer -x custom_excluded_keys \"/path/to/aci-vetr-data\"\r\n\r\nHTML output is written to /path/to/vetr-summary.html\r\n```\r\n\r\n## Use Case\r\n\r\nI was once going through the Cisco Community and found a [question](https://community.cisco.com/t5/application-centric-infrastructure/vetr-zip-logs/td-p/4804529), what is actually vetr zip logs? \r\n\r\n![Question](https://github.com/Tes3awy/vetr-summarizer/raw/main/assets/q.jpg)\r\n\r\nSo, I decided to try `vetr-collector` on an environment. But, I got to open each raw JSON file to check whether it has objects and was time-consuming going through all the files. So, I made this package to summarize the output from `vetr-collector` in a pretty HTML tabular format.\r\n\r\n## Author\r\n\r\n[Osama Abbas](https://www.linkedin.com/in/oabbas/)\r\n\r\n## Contributions\r\n\r\nAs there is always a room for imporovment, you are welcome to contribute to `vetr-summarizer`.\r\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Osama Abbas Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "A Python package for visualizing ACI vetR JSON data",
"version": "0.3.2",
"project_urls": {
"Changelog": "https://github.com/Tes3awy/vetr-summarizer/blob/main/CHANGELOG.md",
"Homepage": "https://github.com/Tes3awy/vetr-summarizer",
"Issues": "https://github.com/Tes3awy/vetr-summarizer/issues",
"Repository": "https://github.com/Tes3awy/vetr-summarizer",
"Say Thanks!": "https://saythanks.io/to/Tes3awy"
},
"split_keywords": [
"cisco",
" aci",
" automation",
" vetr-collector",
" devnet",
" datacenter",
" summarizer",
" json"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "86caf31a383e8bbbb309c6629ffb73aeb0dd4c680b4a5b716f4743c8694051ce",
"md5": "58eee1bc4ace20eecf3bc8bfadc09b7c",
"sha256": "1e84ca4c82f6821ae626c56e4caf892f88eda03a5e36edac941ca413a2636f31"
},
"downloads": -1,
"filename": "vetr_summarizer-0.3.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "58eee1bc4ace20eecf3bc8bfadc09b7c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.9.0",
"size": 16024,
"upload_time": "2024-09-07T17:51:01",
"upload_time_iso_8601": "2024-09-07T17:51:01.670531Z",
"url": "https://files.pythonhosted.org/packages/86/ca/f31a383e8bbbb309c6629ffb73aeb0dd4c680b4a5b716f4743c8694051ce/vetr_summarizer-0.3.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1716e9f4d8c350c39601bb1c4cb2f6b6d3989686168217e3950fcff272a78140",
"md5": "940a9f4a49cf26ac8ab2ff0059488df5",
"sha256": "cd7abe53ea92f153f7790d964c58cb6d6994c7fad177987cb600904aad1dd5d5"
},
"downloads": -1,
"filename": "vetr_summarizer-0.3.2.tar.gz",
"has_sig": false,
"md5_digest": "940a9f4a49cf26ac8ab2ff0059488df5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.9.0",
"size": 13717,
"upload_time": "2024-09-07T17:51:03",
"upload_time_iso_8601": "2024-09-07T17:51:03.115399Z",
"url": "https://files.pythonhosted.org/packages/17/16/e9f4d8c350c39601bb1c4cb2f6b6d3989686168217e3950fcff272a78140/vetr_summarizer-0.3.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-07 17:51:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Tes3awy",
"github_project": "vetr-summarizer",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "vetr-summarizer"
}