-
Notifications
You must be signed in to change notification settings - Fork 5
Import and customise create_vm script #20
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
base: main
Are you sure you want to change the base?
Conversation
* New values for choices * Use IPAddressWithMaskVar * Make VM role optional
Remove IPAddress.family which was removed from Netbox data model in v2.8.0
Updated for Netbox 2.9
Custom script run() method must take a 'commit' argument
Otherwise it's possible to create objects which bypass the ORM validation rules.
Add object.full_clean() when creating objects
Also use f"..." formatting and remove unnecessary field_order
Correct way of assigning tags to objects
c352011 to
9b530e2
Compare
drossy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels like most of these could/should be a pull request against the original script. Is it feasible to make the existing fields you've made mandatory configurable somehow (via a config file possibly)?
|
Perhaps, I'll give it a go. |
255c341 to
d5ab892
Compare
Also remove references to values set by commented out lines.
pep-0328
This gets passed as a keyword argument by the script framework, so has to be defined.
|
I've used my best Python introspection skills and turned it into a configurable monstrosity, will see about making a PR against upstream. |
No description provided.