cloudnetdraw


Namecloudnetdraw JSON
Version 0.1.4 PyPI version JSON
download
home_pageNone
SummaryAzure VNet topology discovery and visualization tool that generates Draw.io diagrams
upload_time2025-07-29 03:47:31
maintainerNone
docs_urlNone
authorCloudNet Draw Contributors
requires_python>=3.8
licenseMIT License Copyright (c) 2025 krhatland 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 azure drawio network topology visualization vnet
VCS
bugtrack_url
requirements azure-identity azure-mgmt-network azure-mgmt-resource lxml
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # CLOUDNET DRAW

Python tool to automatically discovery Azure virtual network infrastructures and
generate Draw.io visual diagrams from topology data.

![GitHub stars](https://img.shields.io/github/stars/krhatland/cloudnet-draw?style=social)

Website: [CloudNetDraw](https://www.cloudnetdraw.com/)

Blog: [Technical Deep Dive](https://hatnes.no/posts/cloudnetdraw/)

## Deploy to Azure

[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fkrhatland%2Fcloudnet-draw%2Fmain%2Fazure-function%2Finfra%2Fmain.json)

## 📌 Key Features

- 🔎 Azure Resource Graph integration for efficient VNet discovery
- 📄 Outputs `.drawio` files (open with [draw.io / diagrams.net](https://draw.io))
- 🖼️ Supports hub, spoke, subnets, peerings, and Azure service icons (NSG, UDR, Firewall, etc.)
- 🧠 Logic-based layout with hub-spoke architecture detection
- 🎯 VNet filtering by resource ID or path for focused diagrams
- 🔐 Multiple authentication methods (Azure CLI or Service Principal)
- 🔗 Integrated Azure portal hyperlinks and resource metadata
- 🧩 Two diagram types: HLD (VNets only) and MLD (VNets + subnets)

---

## Quick Start Guide

### 1. Install CloudNet Draw

CloudNet is a PyPi package. Use uv or pip.

Option A: Using uvx (Recommended - Run without installing)

```bash
uvx cloudnetdraw --help
```

Option B: Using uv

```bash
uv tool install cloudnetdraw
```

Option C: Install via PyPI

```bash
pip install cloudnetdraw
```

### 2. Authenticate with Azure

```bash
# Option 1: Azure CLI (default)
az login

# Option 2: Service Principal (set environment variables)
export AZURE_CLIENT_ID="your-client-id"
export AZURE_CLIENT_SECRET="your-client-secret"
export AZURE_TENANT_ID="your-tenant-id"
```

### 3. Generate Your First Diagram

```bash
<<<<<<< Updated upstream
# Query Azure and save topology
uv run azure-query.py query

# Generate high-level diagram (VNets only)
uv run azure-query.py hld

# Generate mid-level diagram (VNets + subnets)
uv run azure-query.py mld
=======
cloudnetdraw query
cloudnetdraw hld
>>>>>>> Stashed changes
```

### 4. View Results

Open the generated `network_hld.drawio` file with [Draw.io
Desktop](https://github.com/jgraph/drawio-desktop/releases) or the web version
at [diagrams.net](https://diagrams.net).

## Installation

### Prerequisites

- Python 3.8+
- Azure CLI (`az`)
- Azure access to subscriptions and vnets
- uv for package management (preferred over pip)
- [Draw.io Desktop](https://github.com/jgraph/drawio-desktop/releases) (recommended for viewing diagrams)

## Configuration

CloudNet Draw uses [`config.yaml`](config.yaml) for diagram styling and layout settings. Key configuration sections:

<<<<<<< Updated upstream
### Hub Classification
- `thresholds.hub_peering_count: 10` - VNets with 10+ peerings are classified as hubs

### VNet Styling
- **Hub VNets**: Blue theme (`#0078D4` border, `#E6F1FB` fill)
- **Spoke VNets**: Orange theme (`#CC6600` border, `#f2f7fc` fill)
- **Non-peered VNets**: Gray theme (`gray` border, `#f5f5f5` fill)
- **Subnets**: Light gray theme (`#C8C6C4` border, `#FAF9F8` fill)

### Layout Settings
- **Canvas**: 20px padding, 500px zone spacing
- **VNets**: 400px width, 50px height
- **Subnets**: 350px width, 20px height with 25px/55px padding

### Edge Styling
- **Hub-Spoke**: Black solid lines (3px width)
- **Spoke-Spoke**: Gray dashed lines (2px width)
- **Cross-Zone**: Blue dashed lines (2px width)

### Azure Icons
Includes paths and sizing for VNet, ExpressRoute, Firewall, VPN Gateway, NSG, Route Table, and Subnet icons from Azure icon library.

### Custom Configuration
```bash
# Copy and modify default configuration
cp config.yaml my-config.yaml

# Use custom configuration
uv run azure-query.py query --config-file my-config.yaml
uv run azure-query.py hld --config-file my-config.yaml
=======
```bash
# Create a local config file for customization
cloudnetdraw init-config

# Use custom config with other commands
cloudnetdraw query --config-file config.yaml
>>>>>>> Stashed changes
```

The `init-config` command copies the default configuration to your current directory where you can customize diagram styling, layout parameters, and other settings.

<<<<<<< Updated upstream
### Example 1: Basic Usage

```bash
# Query all subscriptions interactively
uv run azure-query.py query
=======
## Examples

### Single Hub with Multiple Spokes

```bash
# Query specific subscription
cloudnetdraw query --subscriptions "Production-Network"

# Generate both diagram types
cloudnetdraw hld
cloudnetdraw mld
```

**Expected Output:**

- `network_hld.drawio` - High-level view showing VNet relationships
- `network_mld.drawio` - Detailed view including subnets and services

### Interactive Mode

```bash
# Interactive subscription selection
cloudnetdraw query
>>>>>>> Stashed changes

# Query specific subscriptions
uv run azure-query.py query --subscriptions "Production-Network,Dev-Network"

<<<<<<< Updated upstream
# Query all subscriptions non-interactively
uv run azure-query.py query --subscriptions all

# Generate diagrams
uv run azure-query.py hld  # High-level (VNets only)
uv run azure-query.py mld  # Mid-level (VNets + subnets)
```

### Example 2: Service Principal Authentication

```bash
# Set environment variables
export AZURE_CLIENT_ID="your-client-id"
export AZURE_CLIENT_SECRET="your-client-secret"
export AZURE_TENANT_ID="your-tenant-id"

# Use service principal
uv run azure-query.py query --service-principal
```

### Example 3: VNet Filtering
=======
# Generate consolidated diagrams
cloudnetdraw hld
```

### VNet Filtering
>>>>>>> Stashed changes

Filter topology to focus on specific hub VNets and their directly connected spokes:

```bash
<<<<<<< Updated upstream
# Multiple VNet identifier formats supported:

# Format 1: Full Azure resource ID
uv run azure-query.py query --vnets "/subscriptions/sub-id/resourceGroups/rg-name/providers/Microsoft.Network/virtualNetworks/vnet-name"

# Format 2: subscription/resource_group/vnet_name
uv run azure-query.py query --vnets "production-sub/network-rg/hub-vnet"

# Format 3: resource_group/vnet_name (searches all accessible subscriptions)
uv run azure-query.py query --vnets "network-rg/hub-vnet"

# Multiple VNets (comma-separated)
uv run azure-query.py query --vnets "prod-rg/hub-prod,dev-rg/hub-dev"
=======
# Filter by subscription/resource-group/vnet path
cloudnetdraw query --vnets "production-sub/network-rg/hub-vnet" --verbose

# Filter by full Azure resource ID
cloudnetdraw query --vnets "/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/network-rg/providers/Microsoft.Network/virtualNetworks/hub-vnet"

# Multiple VNets using path syntax
cloudnetdraw query --vnets "prod-sub/network-rg/hub-vnet-east,prod-sub/network-rg/hub-vnet-west"
>>>>>>> Stashed changes

# Generate diagrams from filtered topology
cloudnetdraw hld
cloudnetdraw mld
```

<<<<<<< Updated upstream
**VNet Filtering Benefits:**
- Uses Azure Resource Graph API for fast, precise discovery
- Automatically resolves subscription names to IDs
- Contains only specified hubs and their directly peered spokes
- Significantly faster than full topology collection

### Example 4: File-Based Configuration

```bash
# Create subscription list file
echo "Production-Network" > subscriptions.txt
echo "Development-Network" >> subscriptions.txt

# Use subscription file
uv run azure-query.py query --subscriptions-file subscriptions.txt

# Custom config file
uv run azure-query.py query --config-file my-config.yaml
uv run azure-query.py hld --config-file my-config.yaml
```

### Example 5: Verbose Logging

```bash
# Enable detailed logging for troubleshooting
uv run azure-query.py query --vnets "rg-name/hub-vnet" --verbose
uv run azure-query.py hld --verbose
```

=======
>>>>>>> Stashed changes
## Testing

### Running Tests

```bash
# Run all tests with coverage
make test

# Run specific test tiers
make unit          # Unit tests only
make integration   # Integration tests only
make coverage      # code coverage
make random        # generate and validate random topologies
```

## Development

### Make Commands

The project includes several make commands for development and testing:

```bash
# Setup and help
make setup         # Set up development environment
make help          # Show all available targets

# Generate example topologies and diagrams
make examples

# Package management and publishing
make build           # Build distribution packages
make test-publish    # Publish to TestPyPI for testing
make publish         # Publish to production PyPI
make prepare-release # Run full test suite and build for release

# Cleanup
make clean         # Clean up test artifacts
make clean-build   # Clean build artifacts (dist/, *.egg-info/)
make clean-all     # Clean everything including .venv
```

### Utility Scripts

The [`utils/`](utils/) directory contains development tools for generating and testing topologies:

#### topology-generator.py

Generate Azure network topology JSON files with configurable parameters:

```bash
cd utils
# Basic usage
python3 topology-generator.py --vnets 50 --centralization 8 --connectivity 6 --isolation 2 --output topology.json

# With advanced options
python3 topology-generator.py -v 100 -c 7 -n 5 -i 3 -o large_topology.json --seed 42 --ensure-all-edge-types
```

**Required Parameters:**

- `-v, --vnets` - Number of VNets to generate
- `-c, --centralization` - Hub concentration (0-10, controls hub-spoke bias)
- `-n, --connectivity` - Peering density (0-10, controls outlier scenarios)
- `-i, --isolation` - Disconnected VNets (0-10, controls unpeered VNets)
- `-o, --output` - Output JSON filename

**Advanced Options:**

- `--seed` - Random seed for reproducible generation
- `--ensure-all-edge-types` - Ensure all 6 EdgeTypes are present
- `--spoke-to-spoke-rate` - Override spoke-to-spoke connection rate (0.0-1.0)
- `--cross-zone-rate` - Override cross-zone connection rate (0.0-1.0)
- `--multi-hub-rate` - Override multi-hub spoke rate (0.0-1.0)
- `--hub-count` - Override hub count (ignores centralization weight)

#### topology-randomizer.py

Generate and validate many topologies in parallel

```bash
cd utils
# Basic usage
python3 topology-randomizer.py --iterations 25 --vnets 100 --parallel-jobs 4

# With advanced options
python3 topology-randomizer.py -i 50 -v 200 -p 8 --seed 42 --ensure-all-edge-types
```

**Parameters:**

- `-i, --iterations` - Number of test iterations (default: 10)
- `-v, --vnets` - Fixed number of VNets for all iterations (default: 100)
- `-p, --parallel-jobs` - Maximum number of parallel jobs (default: 4)
- `--max-centralization` - Upper bound for centralization weight (default: 10)
- `--max-connectivity` - Upper bound for connectivity weight (default: 10)
- `--max-isolation` - Upper bound for isolation weight (default: 10)
- `--seed` - Random seed for reproducible generation
- `--ensure-all-edge-types` - Ensure all 6 EdgeTypes are present in generated topologies

#### topology-validator.py

Validates JSON topologies and generated diagrams for structural integrity:

```bash
cd utils
# Validate all files in examples directory (default behavior)
python3 topology-validator.py

# Validate specific files
python3 topology-validator.py --topology topology.json --hld topology_hld.drawio --mld topology_mld.drawio

# Validate just topology file
python3 topology-validator.py -t topology.json
```

**Parameters:**

- `-t, --topology` - JSON topology file to validate
- `-H, --hld` - HLD (High Level Design) DrawIO file to validate
- `-M, --mld` - MLD (Mid Level Design) DrawIO file to validate
- `--quiet` - Suppress informational output

All scripts support `--help` for detailed usage information.

## License and Contact

### License

This project is licensed under the MIT License.
You are free to use, modify, and distribute it with attribution.

### Author

**Kristoffer Hatland**  
🔗 [LinkedIn](https://www.linkedin.com/in/hatland) • 🐙 [GitHub](https://github.com/krhatland)

### Resources

- **Website**: [CloudNetDraw.com](https://www.cloudnetdraw.com/)
- **Blog**: [Technical Deep Dive](https://hatnes.no/posts/cloudnet-draw/)
- **Issues**: [GitHub Issues](https://github.com/krhatland/cloudnet-draw/issues)
- **Discussions**: [GitHub Discussions](https://github.com/krhatland/cloudnet-draw/discussions)

---

Made with ❤️ for the Azure community

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "cloudnetdraw",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "azure, drawio, network, topology, visualization, vnet",
    "author": "CloudNet Draw Contributors",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/2c/db/2d56eb68a4b34a80e1af7c808fb0f6d4f1e4beba84c87a863f33c13bce57/cloudnetdraw-0.1.4.tar.gz",
    "platform": null,
    "description": "# CLOUDNET DRAW\n\nPython tool to automatically discovery Azure virtual network infrastructures and\ngenerate Draw.io visual diagrams from topology data.\n\n![GitHub stars](https://img.shields.io/github/stars/krhatland/cloudnet-draw?style=social)\n\nWebsite: [CloudNetDraw](https://www.cloudnetdraw.com/)\n\nBlog: [Technical Deep Dive](https://hatnes.no/posts/cloudnetdraw/)\n\n## Deploy to Azure\n\n[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fkrhatland%2Fcloudnet-draw%2Fmain%2Fazure-function%2Finfra%2Fmain.json)\n\n## \ud83d\udccc Key Features\n\n- \ud83d\udd0e Azure Resource Graph integration for efficient VNet discovery\n- \ud83d\udcc4 Outputs `.drawio` files (open with [draw.io / diagrams.net](https://draw.io))\n- \ud83d\uddbc\ufe0f Supports hub, spoke, subnets, peerings, and Azure service icons (NSG, UDR, Firewall, etc.)\n- \ud83e\udde0 Logic-based layout with hub-spoke architecture detection\n- \ud83c\udfaf VNet filtering by resource ID or path for focused diagrams\n- \ud83d\udd10 Multiple authentication methods (Azure CLI or Service Principal)\n- \ud83d\udd17 Integrated Azure portal hyperlinks and resource metadata\n- \ud83e\udde9 Two diagram types: HLD (VNets only) and MLD (VNets + subnets)\n\n---\n\n## Quick Start Guide\n\n### 1. Install CloudNet Draw\n\nCloudNet is a PyPi package. Use uv or pip.\n\nOption A: Using uvx (Recommended - Run without installing)\n\n```bash\nuvx cloudnetdraw --help\n```\n\nOption B: Using uv\n\n```bash\nuv tool install cloudnetdraw\n```\n\nOption C: Install via PyPI\n\n```bash\npip install cloudnetdraw\n```\n\n### 2. Authenticate with Azure\n\n```bash\n# Option 1: Azure CLI (default)\naz login\n\n# Option 2: Service Principal (set environment variables)\nexport AZURE_CLIENT_ID=\"your-client-id\"\nexport AZURE_CLIENT_SECRET=\"your-client-secret\"\nexport AZURE_TENANT_ID=\"your-tenant-id\"\n```\n\n### 3. Generate Your First Diagram\n\n```bash\n<<<<<<< Updated upstream\n# Query Azure and save topology\nuv run azure-query.py query\n\n# Generate high-level diagram (VNets only)\nuv run azure-query.py hld\n\n# Generate mid-level diagram (VNets + subnets)\nuv run azure-query.py mld\n=======\ncloudnetdraw query\ncloudnetdraw hld\n>>>>>>> Stashed changes\n```\n\n### 4. View Results\n\nOpen the generated `network_hld.drawio` file with [Draw.io\nDesktop](https://github.com/jgraph/drawio-desktop/releases) or the web version\nat [diagrams.net](https://diagrams.net).\n\n## Installation\n\n### Prerequisites\n\n- Python 3.8+\n- Azure CLI (`az`)\n- Azure access to subscriptions and vnets\n- uv for package management (preferred over pip)\n- [Draw.io Desktop](https://github.com/jgraph/drawio-desktop/releases) (recommended for viewing diagrams)\n\n## Configuration\n\nCloudNet Draw uses [`config.yaml`](config.yaml) for diagram styling and layout settings. Key configuration sections:\n\n<<<<<<< Updated upstream\n### Hub Classification\n- `thresholds.hub_peering_count: 10` - VNets with 10+ peerings are classified as hubs\n\n### VNet Styling\n- **Hub VNets**: Blue theme (`#0078D4` border, `#E6F1FB` fill)\n- **Spoke VNets**: Orange theme (`#CC6600` border, `#f2f7fc` fill)\n- **Non-peered VNets**: Gray theme (`gray` border, `#f5f5f5` fill)\n- **Subnets**: Light gray theme (`#C8C6C4` border, `#FAF9F8` fill)\n\n### Layout Settings\n- **Canvas**: 20px padding, 500px zone spacing\n- **VNets**: 400px width, 50px height\n- **Subnets**: 350px width, 20px height with 25px/55px padding\n\n### Edge Styling\n- **Hub-Spoke**: Black solid lines (3px width)\n- **Spoke-Spoke**: Gray dashed lines (2px width)\n- **Cross-Zone**: Blue dashed lines (2px width)\n\n### Azure Icons\nIncludes paths and sizing for VNet, ExpressRoute, Firewall, VPN Gateway, NSG, Route Table, and Subnet icons from Azure icon library.\n\n### Custom Configuration\n```bash\n# Copy and modify default configuration\ncp config.yaml my-config.yaml\n\n# Use custom configuration\nuv run azure-query.py query --config-file my-config.yaml\nuv run azure-query.py hld --config-file my-config.yaml\n=======\n```bash\n# Create a local config file for customization\ncloudnetdraw init-config\n\n# Use custom config with other commands\ncloudnetdraw query --config-file config.yaml\n>>>>>>> Stashed changes\n```\n\nThe `init-config` command copies the default configuration to your current directory where you can customize diagram styling, layout parameters, and other settings.\n\n<<<<<<< Updated upstream\n### Example 1: Basic Usage\n\n```bash\n# Query all subscriptions interactively\nuv run azure-query.py query\n=======\n## Examples\n\n### Single Hub with Multiple Spokes\n\n```bash\n# Query specific subscription\ncloudnetdraw query --subscriptions \"Production-Network\"\n\n# Generate both diagram types\ncloudnetdraw hld\ncloudnetdraw mld\n```\n\n**Expected Output:**\n\n- `network_hld.drawio` - High-level view showing VNet relationships\n- `network_mld.drawio` - Detailed view including subnets and services\n\n### Interactive Mode\n\n```bash\n# Interactive subscription selection\ncloudnetdraw query\n>>>>>>> Stashed changes\n\n# Query specific subscriptions\nuv run azure-query.py query --subscriptions \"Production-Network,Dev-Network\"\n\n<<<<<<< Updated upstream\n# Query all subscriptions non-interactively\nuv run azure-query.py query --subscriptions all\n\n# Generate diagrams\nuv run azure-query.py hld  # High-level (VNets only)\nuv run azure-query.py mld  # Mid-level (VNets + subnets)\n```\n\n### Example 2: Service Principal Authentication\n\n```bash\n# Set environment variables\nexport AZURE_CLIENT_ID=\"your-client-id\"\nexport AZURE_CLIENT_SECRET=\"your-client-secret\"\nexport AZURE_TENANT_ID=\"your-tenant-id\"\n\n# Use service principal\nuv run azure-query.py query --service-principal\n```\n\n### Example 3: VNet Filtering\n=======\n# Generate consolidated diagrams\ncloudnetdraw hld\n```\n\n### VNet Filtering\n>>>>>>> Stashed changes\n\nFilter topology to focus on specific hub VNets and their directly connected spokes:\n\n```bash\n<<<<<<< Updated upstream\n# Multiple VNet identifier formats supported:\n\n# Format 1: Full Azure resource ID\nuv run azure-query.py query --vnets \"/subscriptions/sub-id/resourceGroups/rg-name/providers/Microsoft.Network/virtualNetworks/vnet-name\"\n\n# Format 2: subscription/resource_group/vnet_name\nuv run azure-query.py query --vnets \"production-sub/network-rg/hub-vnet\"\n\n# Format 3: resource_group/vnet_name (searches all accessible subscriptions)\nuv run azure-query.py query --vnets \"network-rg/hub-vnet\"\n\n# Multiple VNets (comma-separated)\nuv run azure-query.py query --vnets \"prod-rg/hub-prod,dev-rg/hub-dev\"\n=======\n# Filter by subscription/resource-group/vnet path\ncloudnetdraw query --vnets \"production-sub/network-rg/hub-vnet\" --verbose\n\n# Filter by full Azure resource ID\ncloudnetdraw query --vnets \"/subscriptions/12345678-1234-1234-1234-123456789012/resourceGroups/network-rg/providers/Microsoft.Network/virtualNetworks/hub-vnet\"\n\n# Multiple VNets using path syntax\ncloudnetdraw query --vnets \"prod-sub/network-rg/hub-vnet-east,prod-sub/network-rg/hub-vnet-west\"\n>>>>>>> Stashed changes\n\n# Generate diagrams from filtered topology\ncloudnetdraw hld\ncloudnetdraw mld\n```\n\n<<<<<<< Updated upstream\n**VNet Filtering Benefits:**\n- Uses Azure Resource Graph API for fast, precise discovery\n- Automatically resolves subscription names to IDs\n- Contains only specified hubs and their directly peered spokes\n- Significantly faster than full topology collection\n\n### Example 4: File-Based Configuration\n\n```bash\n# Create subscription list file\necho \"Production-Network\" > subscriptions.txt\necho \"Development-Network\" >> subscriptions.txt\n\n# Use subscription file\nuv run azure-query.py query --subscriptions-file subscriptions.txt\n\n# Custom config file\nuv run azure-query.py query --config-file my-config.yaml\nuv run azure-query.py hld --config-file my-config.yaml\n```\n\n### Example 5: Verbose Logging\n\n```bash\n# Enable detailed logging for troubleshooting\nuv run azure-query.py query --vnets \"rg-name/hub-vnet\" --verbose\nuv run azure-query.py hld --verbose\n```\n\n=======\n>>>>>>> Stashed changes\n## Testing\n\n### Running Tests\n\n```bash\n# Run all tests with coverage\nmake test\n\n# Run specific test tiers\nmake unit          # Unit tests only\nmake integration   # Integration tests only\nmake coverage      # code coverage\nmake random        # generate and validate random topologies\n```\n\n## Development\n\n### Make Commands\n\nThe project includes several make commands for development and testing:\n\n```bash\n# Setup and help\nmake setup         # Set up development environment\nmake help          # Show all available targets\n\n# Generate example topologies and diagrams\nmake examples\n\n# Package management and publishing\nmake build           # Build distribution packages\nmake test-publish    # Publish to TestPyPI for testing\nmake publish         # Publish to production PyPI\nmake prepare-release # Run full test suite and build for release\n\n# Cleanup\nmake clean         # Clean up test artifacts\nmake clean-build   # Clean build artifacts (dist/, *.egg-info/)\nmake clean-all     # Clean everything including .venv\n```\n\n### Utility Scripts\n\nThe [`utils/`](utils/) directory contains development tools for generating and testing topologies:\n\n#### topology-generator.py\n\nGenerate Azure network topology JSON files with configurable parameters:\n\n```bash\ncd utils\n# Basic usage\npython3 topology-generator.py --vnets 50 --centralization 8 --connectivity 6 --isolation 2 --output topology.json\n\n# With advanced options\npython3 topology-generator.py -v 100 -c 7 -n 5 -i 3 -o large_topology.json --seed 42 --ensure-all-edge-types\n```\n\n**Required Parameters:**\n\n- `-v, --vnets` - Number of VNets to generate\n- `-c, --centralization` - Hub concentration (0-10, controls hub-spoke bias)\n- `-n, --connectivity` - Peering density (0-10, controls outlier scenarios)\n- `-i, --isolation` - Disconnected VNets (0-10, controls unpeered VNets)\n- `-o, --output` - Output JSON filename\n\n**Advanced Options:**\n\n- `--seed` - Random seed for reproducible generation\n- `--ensure-all-edge-types` - Ensure all 6 EdgeTypes are present\n- `--spoke-to-spoke-rate` - Override spoke-to-spoke connection rate (0.0-1.0)\n- `--cross-zone-rate` - Override cross-zone connection rate (0.0-1.0)\n- `--multi-hub-rate` - Override multi-hub spoke rate (0.0-1.0)\n- `--hub-count` - Override hub count (ignores centralization weight)\n\n#### topology-randomizer.py\n\nGenerate and validate many topologies in parallel\n\n```bash\ncd utils\n# Basic usage\npython3 topology-randomizer.py --iterations 25 --vnets 100 --parallel-jobs 4\n\n# With advanced options\npython3 topology-randomizer.py -i 50 -v 200 -p 8 --seed 42 --ensure-all-edge-types\n```\n\n**Parameters:**\n\n- `-i, --iterations` - Number of test iterations (default: 10)\n- `-v, --vnets` - Fixed number of VNets for all iterations (default: 100)\n- `-p, --parallel-jobs` - Maximum number of parallel jobs (default: 4)\n- `--max-centralization` - Upper bound for centralization weight (default: 10)\n- `--max-connectivity` - Upper bound for connectivity weight (default: 10)\n- `--max-isolation` - Upper bound for isolation weight (default: 10)\n- `--seed` - Random seed for reproducible generation\n- `--ensure-all-edge-types` - Ensure all 6 EdgeTypes are present in generated topologies\n\n#### topology-validator.py\n\nValidates JSON topologies and generated diagrams for structural integrity:\n\n```bash\ncd utils\n# Validate all files in examples directory (default behavior)\npython3 topology-validator.py\n\n# Validate specific files\npython3 topology-validator.py --topology topology.json --hld topology_hld.drawio --mld topology_mld.drawio\n\n# Validate just topology file\npython3 topology-validator.py -t topology.json\n```\n\n**Parameters:**\n\n- `-t, --topology` - JSON topology file to validate\n- `-H, --hld` - HLD (High Level Design) DrawIO file to validate\n- `-M, --mld` - MLD (Mid Level Design) DrawIO file to validate\n- `--quiet` - Suppress informational output\n\nAll scripts support `--help` for detailed usage information.\n\n## License and Contact\n\n### License\n\nThis project is licensed under the MIT License.\nYou are free to use, modify, and distribute it with attribution.\n\n### Author\n\n**Kristoffer Hatland**  \n\ud83d\udd17 [LinkedIn](https://www.linkedin.com/in/hatland) \u2022 \ud83d\udc19 [GitHub](https://github.com/krhatland)\n\n### Resources\n\n- **Website**: [CloudNetDraw.com](https://www.cloudnetdraw.com/)\n- **Blog**: [Technical Deep Dive](https://hatnes.no/posts/cloudnet-draw/)\n- **Issues**: [GitHub Issues](https://github.com/krhatland/cloudnet-draw/issues)\n- **Discussions**: [GitHub Discussions](https://github.com/krhatland/cloudnet-draw/discussions)\n\n---\n\nMade with \u2764\ufe0f for the Azure community\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2025 krhatland  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": "Azure VNet topology discovery and visualization tool that generates Draw.io diagrams",
    "version": "0.1.4",
    "project_urls": {
        "Blog": "https://hatnes.no/posts/cloudnet-draw/",
        "Changelog": "https://github.com/krhatland/cloudnet-draw/releases",
        "Documentation": "https://github.com/krhatland/cloudnet-draw#readme",
        "Homepage": "https://www.cloudnetdraw.com/",
        "Issues": "https://github.com/krhatland/cloudnet-draw/issues",
        "Repository": "https://github.com/krhatland/cloudnet-draw.git"
    },
    "split_keywords": [
        "azure",
        " drawio",
        " network",
        " topology",
        " visualization",
        " vnet"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d7a7b69dc6459d23f32524b2847988ea5efa4ec48f6ddcc56083b2c043253327",
                "md5": "5ad652f9b48e2f0c7bcea3e8a3f9276a",
                "sha256": "65bb24c6c583a1ea94c33993fce98e6841ba553a8c6b183e7009c345dc843c64"
            },
            "downloads": -1,
            "filename": "cloudnetdraw-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5ad652f9b48e2f0c7bcea3e8a3f9276a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 42561,
            "upload_time": "2025-07-29T03:47:30",
            "upload_time_iso_8601": "2025-07-29T03:47:30.992157Z",
            "url": "https://files.pythonhosted.org/packages/d7/a7/b69dc6459d23f32524b2847988ea5efa4ec48f6ddcc56083b2c043253327/cloudnetdraw-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2cdb2d56eb68a4b34a80e1af7c808fb0f6d4f1e4beba84c87a863f33c13bce57",
                "md5": "a41a283ca50d843ff632f3a90c8cbbbc",
                "sha256": "531ff56a3eff07265275dd2722a796b78069c30d2cedc1e49974dd7ab1b49d65"
            },
            "downloads": -1,
            "filename": "cloudnetdraw-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "a41a283ca50d843ff632f3a90c8cbbbc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 53535,
            "upload_time": "2025-07-29T03:47:31",
            "upload_time_iso_8601": "2025-07-29T03:47:31.957521Z",
            "url": "https://files.pythonhosted.org/packages/2c/db/2d56eb68a4b34a80e1af7c808fb0f6d4f1e4beba84c87a863f33c13bce57/cloudnetdraw-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-29 03:47:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "krhatland",
    "github_project": "cloudnet-draw",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "azure-identity",
            "specs": [
                [
                    ">=",
                    "1.14.0"
                ]
            ]
        },
        {
            "name": "azure-mgmt-network",
            "specs": [
                [
                    ">=",
                    "25.0.0"
                ]
            ]
        },
        {
            "name": "azure-mgmt-resource",
            "specs": [
                [
                    ">=",
                    "23.0.0"
                ]
            ]
        },
        {
            "name": "lxml",
            "specs": [
                [
                    ">=",
                    "4.9.0"
                ]
            ]
        }
    ],
    "lcname": "cloudnetdraw"
}
        
Elapsed time: 1.43435s