post demo tidy
parent
74f434d971
commit
ac5e8a59a4
|
|
@ -1 +1 @@
|
|||
venv_nautofake/
|
||||
venv/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,26 @@
|
|||
# Repo
|
||||
|
||||
```sh
|
||||
git clone https://tseed.work/tseed/gc_integration_templater.git --config "http.proxy=asblcinfpxy01:3128"
|
||||
```
|
||||
|
||||
# Python venv
|
||||
|
||||
- Host with Python version 3.6+
|
||||
|
||||
```sh
|
||||
python3 -m venv $HOME/gc_integration_templater/venv
|
||||
source $HOME/gc_integration_templater/venv/bin/activate
|
||||
python --version
|
||||
which python
|
||||
pip install --proxy http://asblcinfpxy01:3128 --upgrade pip
|
||||
pip install --proxy http://asblcinfpxy01:3128 pyyaml jinja2
|
||||
deactivate
|
||||
```
|
||||
|
||||
# Run
|
||||
|
||||
```sh
|
||||
./render_engine.py
|
||||
python3 render_engine.py
|
||||
```
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
# Python venv
|
||||
|
||||
- Host with Python version 3.6+
|
||||
|
||||
```sh
|
||||
python3 -m venv $HOME/nautofake/venv_nautofake
|
||||
source $HOME/nautofake/venv_nautofake/bin/activate
|
||||
python --version
|
||||
which python
|
||||
pip install --upgrade pip
|
||||
pip install pyyaml jinja2
|
||||
deactivate
|
||||
'''
|
||||
|
|
@ -281,8 +281,10 @@ if __name__ == "__main__":
|
|||
main()
|
||||
|
||||
# turn this into a tool?
|
||||
# - wrap up into parameterized script, try with a real template
|
||||
# add comment block to each renderd config such as rendered date (maybe list templates in use?)
|
||||
# needs a config file to point to contexts/folders, use toml top allow for comments
|
||||
# - feedback, the templates directory is confusing, templates/platforms
|
||||
# needs a rendered artefact directory parameter somewhere, maybe this should be a write_rendered_template parameter to allow it to be placed in another git repo
|
||||
# needs proper logging
|
||||
# needs a mode to create example files/dirs
|
||||
|
|
|
|||
9
test.py
9
test.py
|
|
@ -111,14 +111,7 @@ def main():
|
|||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
# do a validation class
|
||||
# do a device class - this should be added to a list that the render class does something with
|
||||
|
||||
|
||||
# what does this need to do?
|
||||
# render a config_context
|
||||
# render a jinja2 template
|
||||
# print out a rendered context for someone to develop a jinja2 template
|
||||
|
||||
# you can easily wrap this up as a class, it just needs to be called with some paths and have methods to return the config_contexts
|
||||
# this really needs to be changed to validate all configs first, then start ingesting devices
|
||||
# print out a rendered context for someone when writing jinja2 templates
|
||||
Loading…
Reference in New Issue