Adding an charm generator 26/7226/5
authorEduardo Sousa <esousa@whitestack.com>
Wed, 13 Feb 2019 12:28:56 +0000 (12:28 +0000)
committerEduardo Sousa <esousa@whitestack.com>
Thu, 28 Feb 2019 06:15:37 +0000 (06:15 +0000)
commit10b27efcce4ba9b6613dd6fcaf162496204f5a98
tree59072a52d1baa82631022403040a2280ee6dd8d5
parent330ebb0b5850055c6e9f993340e588198c104ce4
Adding an charm generator

Current version only supports Ansible.

It takes as input an empty charm with playbooks and generates
the following files:
- metadata.yaml
- layers.yaml
- reactive/<ansible_charm>.py
- actions.yaml
- actions/<action-name>

After that, it is only required to build the charm.

NOTE: In this version, it doesn't support parameters yet.

Change-Id: Ia771185a38421a04c1adcef4ded3d7a55fa164ee
Signed-off-by: Eduardo Sousa <esousa@whitestack.com>
17 files changed:
descriptor-packages/tools/charm-generator/LICENSE [new file with mode: 0644]
descriptor-packages/tools/charm-generator/README.md [new file with mode: 0644]
descriptor-packages/tools/charm-generator/actions/__init__.py [new file with mode: 0644]
descriptor-packages/tools/charm-generator/actions/templates/action.j2 [new file with mode: 0644]
descriptor-packages/tools/charm-generator/actions/templates/actions.yaml.j2 [new file with mode: 0644]
descriptor-packages/tools/charm-generator/ansible-charm/__init__.py [new file with mode: 0644]
descriptor-packages/tools/charm-generator/ansible-charm/templates/ansible_charm.py.j2 [new file with mode: 0644]
descriptor-packages/tools/charm-generator/ansible-charm/templates/ansible_lib.py.j2 [new file with mode: 0644]
descriptor-packages/tools/charm-generator/ansible-charm/templates/layer.yaml.j2 [new file with mode: 0644]
descriptor-packages/tools/charm-generator/generator.py [new file with mode: 0644]
descriptor-packages/tools/charm-generator/generators/__init__.py [new file with mode: 0644]
descriptor-packages/tools/charm-generator/generators/actions_generator.py [new file with mode: 0644]
descriptor-packages/tools/charm-generator/generators/ansible_generator.py [new file with mode: 0644]
descriptor-packages/tools/charm-generator/generators/metadata_generator.py [new file with mode: 0644]
descriptor-packages/tools/charm-generator/metadata/__init__.py [new file with mode: 0644]
descriptor-packages/tools/charm-generator/metadata/templates/metadata.yaml.j2 [new file with mode: 0644]
descriptor-packages/tools/charm-generator/requirements.txt [new file with mode: 0644]