2.4. Config Command Line Tool

This command line tool creates all the files for a chosen device that would normally be either pushed to that device or created locally in an output directory specified by the command line parameters.

By default, the tool will use the unmodified default device configuration, but this can optionally be modified by supplying a valid import database source. Initially only XML import with optional Kajiki template statements is supported.

example: -x my.xml

Properties can be defined on the command line to support passing text definitions to Kajiki and similar templating engines.

example: -p variant=soundbar colour=blue

usage: pyconfigcmd [-h] [-f DATABASE_FILE | -u URI] [-x XML_FILE]
                   [-p PROPERTIES [PROPERTIES ...]] [-v | -q] [-o OUTPUT_DIR]
                   [--version]

2.4.1. Named Arguments

-v, --verbose Verbose (debug) logging
-q, --quiet Show warnings and errors only
-o, --output-dir
 
The output directory where all the device files will be sent. Device files will be named as their remotepath or localpath. An exported XML file (device_db.xml) and created device database (device_db.fs) will also be placed here.
--version show program’s version number and exit

2.4.2. Device selection

-f, --database-file
 Open a device using its Device Database (.fs) file
-u, --uri Create a device using its Unique Resource Identifier Default: “device://test/testdev3”

2.4.3. Import configuration set

-x, --xml-file Use configuration from an XML file or template to create the device database.
-p, --properties
 
One or more properties to extend or replace the device properties in a templated import file. Example: -p device_type=test device_name=testdev1