Skip to main content

A Heat Teamplate Validator

Project description

Heat Template Validator

N|Solid

Heat Template Validator (HTV) is a tool created to validate .yaml (Heat) files and check the parameters' existence in the server Openstack.

What does it do?

The main script validator.py will analyze every single file from the dir ./TemplateLocalStorage. It moves the valid files into the dir ./ValidHeatFiles. It moves the warning files into the dir ./WarnHeatFiles. It moves the error files into the dir ./ErrorHeatFiles and for each file of the last two groups it creates a log and then it moves all log files into the dir ./Log. At the very beginning of the installation HTV will also create crontab lines inside the list_cron.txt.

Installation

HTV requires python3 and pip in order to run. Open the terminal and download the application through git:

$ git clone git@github.com:ko2-srls/HeatTemplateValidator.git

Then change directory:

$ cd HeatTemplateValidator/

install the requirements from the requirements.txt file and create the virtual environment:

$ ./setup.sh

There are few simple steps to follow in order to correctly use HTV:

  • Move the Heat files into the ./TemplateLocalStorage dir
  • Move the open.rc files into the ./rc_files dir After these files transfer activate the virtual environment:
$ source ./venv/bin/activate

Then the application will need the Openstack server password. Remember to enter this command only once: during the HTV installation, or everytime you need to change the Openstack passwords or openrc.hs files. Enter the passwords after executing the shadow.py script:

$ python shadow.py

This command will also generate a list of crontabs in the list_cron.txt file that you can use in the general crontab file depending on which openrc.sh file is needed.

Usage

You can choose to run the application using the crontabs created or to run it interactively via validator.py:

$ python validator.py

In the interactive mode the application will ask for which openrc file to use for the Openstack. After this you are ready to go, the files will be moved accordingly with their warnings or errors and logs will be created and moved to the ./Log dir.

In case the application directory changes

In case you move the HeatTemplateValidator directory to a different path it is necessary to do as follows:

$ python cron_update.py

This is a requirement in order to generate the new crontabs and having them working.

Clean environment for testing

To go back to a clean environment use the goback.py script:

$ python goback.py

Notes

This application fully functions on Ubuntu and MacOS with python3 and pip3 installed. All advice welcome!

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

htv-0.1-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file htv-0.1-py3-none-any.whl.

File metadata

  • Download URL: htv-0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for htv-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d7b5991779e08ec56dbba87ec3020a8c3abb2edc38f6ae37867525ae2c559aff
MD5 4ace9e823e704fb5e3e46e6398fea9ad
BLAKE2b-256 2299657d21fa620d56509a9765b0e37164d6387f7bef628cb218b41e747b4d8b

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