Split Custom Script into multiple files #19601
Unanswered
MikuuW
asked this question in
Help Wanted!
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I am wondering if it is possible to split custom scripts into multiple files, as one would with regular Python code. I'm not very familiar with Python, but I would expect this to work. In a single file, it works as expected.
Is splitting them generally not an option?
We have more complex scenarios, such as defining complete OpenShift clusters within Netbox using custom scripts. It would be helpful to be able to reuse individual steps within different scenarios. For example, the "create-vm" step within "create-openshift-cluster" or "create-virtual-interface" within "create-virtual-machine."
I've found discussion #14108, but not sure how to apply that into my netbox-docker installation.
My Environment:
tree ├── __init__.py. # empty file ├── debug.py └── test.py 1 directory, 3 files
single-file-code
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions