aboutsummaryrefslogtreecommitdiffstats
path: root/check-jinja2.sh
AgeCommit message (Collapse)AuthorFilesLines
2017-09-26PDF: Run YAML Linter on pod descriptors / outputAlexandru Avadanii1-5/+13
We have 2 rounds of YAML files: - PDF (input file(s) for the installer adapter templates); - parsed PDF (output file(s) after installer adapter template parse); Run yamllint on all these files, and summarize the output in a tuple form: (valid YAML output, successful parse, installer templates cnt). This helps catching various issues: - formatting issues in installer adapter templates; - missing values in PDFs (e.g. lf-pod4 IPMI credentials); etc. For now, yamllint failures for output files are non-fatal. Sample output: | PDF Verify Matrix | YAML Lint | ... | fuel | joid | | pharos/config/pod1.yaml | OK | ... | 1/1/1 | 1/1/1 | | intel/pod18.yaml | OK | ... | 1/1/1 | 1/1/1 | | arm/pod5.yaml | OK | ... | 1/1/1 | 0/1/1 | | lf/pod4.yaml | OK | ... | 0/1/1 | 0/1/1 | Change-Id: Id598da89fab0e7e41641649833471194e8d248a9 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-09-26check-jinja: Suppress PDF output loggingAlexandru Avadanii1-2/+16
Change-Id: I92bb9302abb74f5a58b6c10144dbe8d24d188938 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-09-25check-jinja2: Fix unsupported '-e' arg for columnsAlexandru Avadanii1-1/+1
Change-Id: Id5827b2f260af215731ea819a9ffc6177648f788 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-09-24PDF: Add result summary to check-jinja2Alexandru Avadanii1-7/+33
Apart from Pod Descritpro Files for OPNFV PODs, also validate the Pharos PDF template itself. While at it, fix shellcheck warnings. Sample output: | PDF/Installer | apex | compass4nfv | daisy | joid | | pharos/config/pod1.yaml | 1/1 | 12/12 | 1/1 | 1/1 | | intel/pod18.yaml | 1/1 | 12/12 | 1/1 | 1/1 | | orange/pod1.yaml | 0/1 | 4/12 | 0/1 | 0/1 | | arm/pod5.yaml | 1/1 | 12/12 | 1/1 | 1/1 | | ericsson/pod1.yaml | 1/1 | 12/12 | 1/1 | 1/1 | | ericsson/pod2.yaml | 1/1 | 12/12 | 1/1 | 1/1 | | lf/pod4.yaml | 1/1 | 12/12 | 1/1 | 1/1 | | zte/pod3.yaml | 1/1 | 12/12 | 1/1 | 1/1 | | zte/pod1.yaml | 1/1 | 12/12 | 1/1 | 1/1 | | zte/pod2.yaml | 1/1 | 12/12 | 1/1 | 1/1 | Change-Id: Iba46a7cc62c80ccb987879ce94ffe5f0bbb23304 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-09-18Use pharos submodule for PDF validationAlexandru Avadanii1-4/+6
Depends-on: Ic4bd75e1b2dc339c15cd4943dfc5a1c74c68b094 Change-Id: I9d6807f3d24cee8d9a03955112a8c179d9ea7d14 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
2017-05-19Hello, OPNFV installer projectsagardner1-2/+2
Firstly, this patchset looks a bit messy at the onset. relevant parts are installers/apex/*.j2 installers/joid/*.j2 installers/compass4nfv/*.j2 and the new verify job that runs check-jinja2.sh If you look at installers/*/pod_config.yaml.j2 you will see the network settings for apex joid and compass4nfv installers, the possible to template hard coded values have been replaced with jinja2 vales, that are populated by reading one of labs/*/*/config/pod.yaml eg: nodes: - name: pod1-node1 becomes - name: {{ conf['nodes'][0]['name'] }} In my last patchset I had ignored data already present in the pod.yaml (which is defined in the pharos spec here: https://gerrit.opnfv.org/gerrit/gitweb?p=pharos.git;a=blob;f=config/pod1.yaml ) I created by own yaml file in an attempt to figure out what all the installers needed to know to install on any given pod. this was counter productive. I have included a script (securedlab/check-jinja2.sh) that will check all securedlab/installers/*/pod_config.yaml.j2 against all securedlab/labs/*/pod*.yaml This is a first step towards having your installers run on any pod that has a pod file created for it. (securedlab/labs/*/pod[pod-number].yaml) Moving forward I would like your input on identifing variables in your installers configs that are needed for deployment but not covered by securedlab/labs/*/pod*.yaml Thanks for your time and feedback Best Regards, Aric Change-Id: I5f2f2b403f219a1ec4b35e46a5bc49037a0a89cf Signed-off-by: agardner <agardner@linuxfoundation.org>
2017-04-27Add check-jinja and lf pod1 descriptoragardner1-0/+9
Change-Id: Ic580cd934c674e5d0e7ce3cca3a113d8531e3400 Signed-off-by: agardner <agardner@linuxfoundation.org>