Skip to main content

CLI to create ucentral configuration files

Project description

ucentral cli

Create and modify valid ucentral-schema schemata.

Installation

pip install -e .

The latest ucentral.schema.json is required in the main folder.

Usage

Run CLI via ucentral

Supported commands:

add          Add an anonymous obejct to the given configuration.
add-list     Add the given value to a list option.
base64       Set <path> to base64 encoded content <filename>
del-list     Delete element <value> from list at <path>
file         Set <path> to content of <filename>
get          Return value from <path>
load         Load configuration from JSON at <filename>
schema-load  Load JSON schema from <filename>
set          Set <path> to <value>
show         Show current configuration
write        Store configuration as JSON at <filename>

Type help <command> to see usage.

Examples

>> set uuid 123
>> set network.0.cfg.dhcp.leasetime 12h
>> set network.0.cfg.leases.0.hostname Apollo
>> add_list ntp.server ntp.example.org
>> add_list ntp.server ntp.example.com
>> show

{
    "network": [
        {
            "cfg": {
                "dhcp": {
                    "leasetime": "12h"
                },
                "leases": [
                    {
                        "hostname": "Apollo"
                    }
                ]
            }
        }
    ],
    "ntp": {
        "server": [
            "ntp.example.org",
            "ntp.example.com"
        ]
    },
    "uuid": 123
}

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

ucentral-0.0.4.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

ucentral-0.0.4-py3-none-any.whl (4.2 kB view hashes)

Uploaded Python 3

Supported by

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