Closed creolis closed 10 years ago
i like it, especially that it becomes easy to package up a template and ship it...
This sounds very good Daniel. I think this is one of the features we as developers like to forget about as we already understand how to use Conpot. :thumbsup:
Do you need any additional help with this?
No, I'm good, thanks :) Gotta think this through again to be sure I didn't forget something, but I want to get this done before Brucon :)
@johnnykv: Almost everything seems to be okay now, if you have some spare time, would you do some basic testing on branch new_template_structure?
Unittests work well, but there seems to be some custom XML sanity checking in place that still tries to take care of the central template file (which is gone :).
Latest build report: https://travis-ci.org/glastopf/conpot/builds/36822407
Yeah, i will take a look at one of the comming days, np.
Solved with #180
This addresses our configuration mess, all together with #152 and #109.
I propose the following file system structure for templates (example listing: see below).
We place a folder into the root templates directory - the name of the folder is the name of the template: This is our template root.
The template root contains a generic template.xml which holds "common" configurations used by all protocols, e.g. databus settings. Each protocol we enable gets its own directory there too - which is our "protocol root".
The protocol root contains a dedicated template.xml with protocol specific settings, as well as directories and files that comes along with them (html files, binaries, certificates, you name it..).
I agree that this will not fully satisfy Lukas as he tries to get away from XML where I split templates into many of them ;-) But the advantages of this approach would be:
Users would love the "easier" way of interacting with conpot, we will take advantage from a more structured approach since you always know what configuration is located where.
Basic configuration like logging, hpfeeds etc. stays in default conpot.cfg since this will not change when another template is used.
Here is a quick overview of the directory structure example:
Any comments except from "Do it already!!!!" ? :-)