Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flatten template directory structure? #536

Open
srenfo opened this issue Nov 16, 2020 · 3 comments
Open

Flatten template directory structure? #536

srenfo opened this issue Nov 16, 2020 · 3 comments

Comments

@srenfo
Copy link
Contributor

srenfo commented Nov 16, 2020

For simplifications beyond #534 the template directories could be flattened a bit.

Currently:

conpot/templates
├── default
│   ├── bacnet
│   │   └── bacnet.xml
│   ├── enip
│   │   └── enip.xml
│   ├── ftp
│   │   └── ftp.xml
│   ├── http
│   │   ├── htdocs
│   │   │   ├── tests
│   │   │   └── ...
│   │   ├── statuscodes
│   │   │   └── ...
│   │   └── http.xml
│   ├── ipmi
│   │   └── ipmi.xml
│   ├── ...
│   └── template.xml
...

Suggestion: Move the protocol XMLs up by one level. Keep the subdirectories for protocols that want auxiliary files.

conpot/templates
├── default
│   ├── bacnet.xml
│   ├── enip.xml
│   ├── ftp.xml
│   ├── http
│   │   ├── htdocs
│   │   │   ├── tests
│   │   │   └── ...
│   │   ├── statuscodes
│   │   │   └── ...
│   ├── http.xml
│   ├── ipmi.xml
│   ├── ...
│   └── template.xml
...

Pros: Easier to navigate and thus easier to modify and to keep track of.

Cons: It may look odd to have both an http.xml and an http directory. Also, template.xml is now on the same level as the protocol XMLs despite being one level above them hierarchically.

@glaslos
Copy link
Member

glaslos commented Nov 16, 2020

How about stuffing all protocols into a flat protocol folder with http as suggested? Kind of a middle ground?

@srenfo
Copy link
Contributor Author

srenfo commented Nov 20, 2020

Do you mean their XMLs or their auxiliary data?

Either way this is not a big deal, but we were talking about simplifying things anyway 🙈

@glaslos
Copy link
Member

glaslos commented Nov 21, 2020

This was my suggestion. It would keep the visibility for the template.xml

conpot/templates
├── default
│   ├── protocols
│   │   ├── bacnet.xml
│   │   ├── enip.xml
│   │   ├── ftp.xml
│   │   ├── http
│   │   │   ├── htdocs
│   │   │   │   ├── tests
│   │   │   │   └── ...
│   │   │   ├── statuscodes
│   │   │   │   └── ...
│   │   ├── http.xml
│   │   ├── ipmi.xml
│   │   ├── ...
│   └── template.xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants