ranger/orm/orm_client/imagegen
Nicholas Jones dac751d04b Merge diverged code
Change-Id: I7a88d9bec69371bec1004572a4fa87cdfbbf1f28
2018-05-08 11:50:06 -05:00
..
image_dir Added orm_client codebase 2017-08-28 14:17:28 +00:00
imageator.py Merge diverged code 2018-05-08 11:50:06 -05:00
README Added orm_client codebase 2017-08-28 14:17:28 +00:00
regionator.py Merge diverged code 2018-05-08 11:50:06 -05:00

imagegen Usage

To install:

1. Download attached file imagegen.tgz
2. Copy imagegen.tgz to <orm_host>:/opt/app/orm/ormcli
3. cd /opt/app/orm/ormcli
4. tar xvzf imagegen.tgz

All the predefined imagess are defined in image_dir. Edit if necessary.

To generate these images:

5. cd /opt/app/orm/ormcli/imagegen
6. python imageator.py

You should normally create the list of images once.

Then when you want to add regions to all the images, use:

7. python regionator.py <region1>,<region2>

The argument is a comma-separated list of regions with no internal whitespace.


Use of -h will produce the following help:

./regionator.py -h
usage: regionator [-h] [--image_dir IMAGE_DIR] [--host HOST]
                  [--cli_command CLI_COMMAND] [--regions REGIONS]

batch add region to image

optional arguments:
  -h, --help            show this help message and exit
  --image_dir IMAGE_DIR
                        <JSON image directory, default: ./image_dir>
  --host HOST           <orm host ip>
  --cli_command CLI_COMMAND
                        <path to cli command>
  --regions REGIONS     <comma-separated regions to add, e.g. region1,region2>