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

show                      Show current configuration
get <path>                Show value stored at path
set <path>=<value>        Set value, e.g. log.log_size=64
add <path>                Add object to list at <path>
load <filename>           Import a valid JSON configuration
write <filename>          Save configuration to <filename>
add_list <path>=<value>   Add empty object to list
del_list <path>=<value>   Add value to list

Examples

>> set uuid=123
>> add network
network[0]
>> set network[0].cfg.dhcp.leasetime='12h'
>> add network[0].cfg.leases
network[0].cfg.leases[0]
>> set network[0].cfg.leases[0].hostname=Apollo
>> add_list ntp.server = "ntp.example.org"
>> add_list ntp.server = "ntp.example.com"
>> print

{
    "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.2.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

ucentral-0.0.2-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file ucentral-0.0.2.tar.gz.

File metadata

  • Download URL: ucentral-0.0.2.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for ucentral-0.0.2.tar.gz
Algorithm Hash digest
SHA256 52e7675f80d7dffd714242630210c2d7d4b15378b936ff9b9d6a7354ff334306
MD5 a4c1a6327c0e28b80166b97fc1e36b1b
BLAKE2b-256 f710bb2bfae95f5bee614a42fe57e5693b033f61aac630893586c2bb1f739dda

See more details on using hashes here.

File details

Details for the file ucentral-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: ucentral-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for ucentral-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 93e050f18e1d63b0208fb878ec6d0746157a013728b1fe9b3afa842c66f332b8
MD5 8000969c3dc10de8384c77da0e91932c
BLAKE2b-256 aff55093d5c23ad1714c7a55d3699c393a8b3b9e9533e5bb04243ab56ddb92bc

See more details on using hashes here.

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