Skip to main content

No project description provided

Project description

zBoxApi

zPodFactory zBox Api

Features

  • DNS Management: Manage DNS records in /etc/hosts with automatic dnsmasq integration
  • VLAN Management: Manage VLAN interfaces with automatic network configuration

Installation

Complete the following steps to set up zBox Api:

  1. Install pipx

    # Install and configure pipx
    apt update
    apt install -y pipx
    pipx ensurepath
    
    # Reload your profile
    source ~/.zshrc
    
  2. Install zBoxApi:

    pipx install zboxapi
    
  3. Set up and start zboxapi.service

    cp zboxapi.service /etc/systemd/system
    systemctl daemon-reload
    systemctl enable zboxapi.service
    systemctl start zboxapi.service
    

    Note: The service runs on 127.0.0.1:8000 and requires root privileges for network configuration operations.

Configuration

VLAN Management

For VLAN management functionality, create a configuration file at /etc/zboxapi.conf:

[DEFAULT]
# Base interface name for VLAN management
interface = eth1

# MTU setting for VLAN interfaces
mtu = 1700

# System default VLANs that cannot be modified (comma-separated)
system_vlans_default = 10,20,30

# System zPod VLANs that cannot be modified (comma-separated)
system_vlans_zpod = 64,128,192

See DOC_VLAN.md for detailed documentation on VLAN management features.

API Usage

Authentication

All API endpoints require authentication using the access_token header. The API key is the zPod password which is also the root password of the zbox VM. The password is automatically retrieved from VMware tools:

curl -H "access_token: your_zpod_password" http://127.0.0.1:8000/dns

Note: The service runs on 127.0.0.1:8000 and requires root privileges for network configuration operations.

DNS Management

Manage DNS records in /etc/hosts:

# Add DNS record
curl -X POST "http://127.0.0.1:8000/dns" \
     -H "access_token: your_zpod_password" \
     -H "Content-Type: application/json" \
     -d '{"ip": "192.168.1.100", "hostname": "example.com"}'

# List all DNS records
curl -X GET "http://127.0.0.1:8000/dns" \
     -H "access_token: your_zpod_password"

For complete DNS management documentation, see DOC_DNS.md.

VLAN Management

Manage VLAN interfaces:

# Create VLAN interface
curl -X POST "http://127.0.0.1:8000/vlan" \
     -H "access_token: your_zpod_password" \
     -H "Content-Type: application/json" \
     -d '{"vlan": 2000, "gateway": "192.168.42.129/25"}'

# List all VLAN interfaces
curl -X GET "http://127.0.0.1:8000/vlan" \
     -H "access_token: your_zpod_password"

For complete VLAN management documentation, see DOC_VLAN.md.

Documentation

  • DOC_DNS.md - Complete guide to DNS management features
  • DOC_VLAN.md - Complete guide to VLAN management features

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zboxapi-0.0.7.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zboxapi-0.0.7-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file zboxapi-0.0.7.tar.gz.

File metadata

  • Download URL: zboxapi-0.0.7.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.2 Linux/6.1.0-32-amd64

File hashes

Hashes for zboxapi-0.0.7.tar.gz
Algorithm Hash digest
SHA256 852ba75716e32a1faae9284ed2d164dd746036e88be398f313481a145440dbd3
MD5 31a4e8c30429324f86c80248019401e5
BLAKE2b-256 bad216fd873262a8b0cbb79259502bb0b986335d9c4b2504d533198ac50c1d7a

See more details on using hashes here.

File details

Details for the file zboxapi-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: zboxapi-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.2 Linux/6.1.0-32-amd64

File hashes

Hashes for zboxapi-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 79b6d14d30c2cb005113f1225a53a6b4e8cd33e8798b128a606a549fbdbe0a46
MD5 685d566856d3e87f4a122d9dd573b02c
BLAKE2b-256 f14e988247852f3612da82e727a15fbcf1ec870164d6d7f8558fd4da49257d7a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page