{"id":29195471,"url":"https://github.com/paul1404/nsx-api.sh","last_synced_at":"2026-05-19T14:40:33.002Z","repository":{"id":300297668,"uuid":"1005794387","full_name":"Paul1404/nsx-api.sh","owner":"Paul1404","description":"A modern, modular, and interactive toolkit for managing VMware NSX-T via its REST API.","archived":false,"fork":false,"pushed_at":"2025-06-23T21:53:23.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-02T05:04:31.144Z","etag":null,"topics":["nsx-t","python","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Paul1404.png","metadata":{"files":{"readme":"README.md","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,"zenodo":null}},"created_at":"2025-06-20T20:43:21.000Z","updated_at":"2025-06-23T21:53:41.000Z","dependencies_parsed_at":"2025-06-20T23:22:58.255Z","dependency_job_id":null,"html_url":"https://github.com/Paul1404/nsx-api.sh","commit_stats":null,"previous_names":["paul1404/nsx-api.sh"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Paul1404/nsx-api.sh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paul1404%2Fnsx-api.sh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paul1404%2Fnsx-api.sh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paul1404%2Fnsx-api.sh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paul1404%2Fnsx-api.sh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Paul1404","download_url":"https://codeload.github.com/Paul1404/nsx-api.sh/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paul1404%2Fnsx-api.sh/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271293999,"owners_count":24734436,"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","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["nsx-t","python","rest-api"],"created_at":"2025-07-02T05:04:31.676Z","updated_at":"2026-05-19T14:40:32.972Z","avatar_url":"https://github.com/Paul1404.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NSX-T API Toolkit\n\n![image](https://github.com/user-attachments/assets/5a90f1eb-843b-49b1-bc88-31ad7985bd90)\n\n\nA modern, modular, and interactive toolkit for managing VMware NSX-T via its REST API.\n\nThe main goal of this was to make it easier to replace NSX-T self-signed Certs with your own CA-Signed Certs similiar to this guide:\n\nhttps://www.vgarethlewis.com/2021/03/23/replacing-the-vmware-nsx-t-self-signed-ssl-certificate/ -\u003e But Automated\n\n---\n\n## Project Structure\n\n```\n.\n├── Archive/           # Legacy Bash script (read-only)\n│   └── nsx-api.sh\n├── LICENSE\n├── nsx-api.py         # Main Python CLI tool\n├── pyproject.toml     # Python project metadata (for uv/pip)\n├── README.md\n└── uv.lock            # Astral UV lockfile for reproducible installs\n```\n\n---\n\n## Features\n\n- **Certificate Management**\n  - List, validate, and assign NSX-T certificates\n  - Assign certificates to the cluster VIP (fully automated)\n  - Assign certificates to individual manager nodes (UI/manual for now; API automation coming soon)\n- **Indexed Selection**\n  - Pick certificates and nodes by number—no more copy-pasting IDs or FQDNs\n- **Rich UX**\n  - Spinner/progress bar for API calls\n  - Colorful, readable tables (using [rich](https://github.com/Textualize/rich))\n  - Highlights expiring/expired and in-use certificates\n- **Enterprise-Ready**\n  - Logs to `/var/log/nsx-api.log` (with rotation, fallback to home if needed)\n  - Robust error handling, XDG config, no secrets in logs\n- **Interactive \u0026 CLI-Friendly**\n  - Menu-driven for interactive use\n  - Extensible for CLI flags and automation (roadmap)\n- **Safe**\n  - Passwords never echoed or logged\n\n---\n\n## Requirements\n\n- Python 3.8+\n- [Astral UV](https://github.com/astral-sh/uv) for dependency management\n- NSX-T 3.x or later\n\n---\n\n## Getting Started\n\n### 1. **Clone the Repo**\n\n```sh\ngit clone https://github.com/Paul1404/nsx-api.sh.git\ncd nsx-api.sh\n```\n\n### 2. **Install Astral UV (if not already installed)**\n\n```sh\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n```\nor see [Astral UV install docs](https://github.com/astral-sh/uv#installation).\n\n### 3. **Install Python Dependencies**\n\n```sh\nuv pip install -r pyproject.toml\n```\n\n### 4. **Run the Toolkit**\n\n```sh\nuv run nsx-api.py\n```\n\n---\n\n## Usage\n\n- **Interactive menu** for all major features:\n  - List certificates\n  - Validate certificates\n  - Disable CRL checking\n  - Assign certificate to cluster VIP\n  - Assign certificate to a manager node\n  - Assign certificate to **all** manager nodes (coming soon)\n  - Show current certificate assignments\n  - Raw API call for advanced users\n\n- **Config:**  \n  On first run, you’ll be prompted for NSX Manager URL, username, and password.  \n  These are stored securely in `~/.config/nsx-api/config.json` (chmod 600).\n\n---\n\n## Roadmap\n\n- [ ] **Automated manager node assignment** (API-driven, all nodes at once)\n- [ ] CLI flags for non-interactive/automation use\n- [ ] More NSX-T API helpers (segments, firewall, etc.)\n- [ ] Enhanced documentation and troubleshooting\n\n---\n\n## Legacy Bash Script\n\nThe original Bash toolkit is archived in [`Archive/nsx-api.sh`](Archive/nsx-api.sh) for reference.  \n**All new development is in Python.**\n\n---\n\n## License\n\nMIT\n\n## Disclaimer\n\nThis project is an independent, community-driven toolkit and is **not affiliated with, endorsed by, or supported by VMware, Inc.**  \nAll trademarks, product names, and company names or logos mentioned are the property of their respective owners.  \nUse at your own risk.\n\n---\n\n**Contributions and issues welcome!**  \nOpen a PR or issue for feature requests, bug reports, or feedback.\n\n---\n\n**Note:**  \nThis project uses [Astral UV](https://github.com/astral-sh/uv) for Python dependency management and reproducible installs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaul1404%2Fnsx-api.sh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaul1404%2Fnsx-api.sh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaul1404%2Fnsx-api.sh/lists"}