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

Contact startups #728

Merged
merged 2 commits into from
Apr 25, 2022
Merged

Contact startups #728

merged 2 commits into from
Apr 25, 2022

Conversation

Lon1
Copy link
Contributor

@Lon1 Lon1 commented Apr 1, 2022

Related Issue:

New Behavior

Adding Contact, Contact Group, Contact Role startup scripts along with corresponding initialization yaml file examples.

Contrast to Current Behavior

Created new contact startup scripts feature that will execute at startup of NetBox.

Discussion: Benefits and Drawbacks

Contact objects were recently added to NetBox and did not have any corresponding startup scripts. There are no drawbacks, should be backwards compatible as far as when Contacts were added. I did not include Tags as an option in the yaml files, but did include custom fields.

Changes to the Wiki

The Wiki doesn't need updated.

Proposed Release Note Entry

Contact, Contact Group, Contact Role startup scripts added.

Double Check

  • I have read the comments and followed the PR template.
  • I have explained my PR according to the information in the comments.
  • My PR targets the develop branch.

Copy link
Contributor Author

@Lon1 Lon1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added line at end

@kr3ator
Copy link
Contributor

kr3ator commented Apr 12, 2022

Hi @Lon1, recently there has been a merge to the develop branch and now all startup_scripts are made idempotent.
Please check out this line in racks script and the lines below and adjust your scripts accordingly, i.e. to use the new split_params function and by moving the set_custom_fields_values outside of the last if.

@Lon1
Copy link
Contributor Author

Lon1 commented Apr 13, 2022

@kr3ator - I've made the requested changes, hopefully all the checks pass this time!

@Lon1
Copy link
Contributor Author

Lon1 commented Apr 13, 2022

@kr3ator - hold off! - I didn't see the use for match_params further above in your script. Please standby.

Copy link
Contributor Author

@Lon1 Lon1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done adding match_params assignments @kr3ator

startup_scripts/460_contact_groups.py Outdated Show resolved Hide resolved
startup_scripts/460_contact_groups.py Outdated Show resolved Hide resolved
startup_scripts/470_contact_roles.py Outdated Show resolved Hide resolved
startup_scripts/470_contact_roles.py Outdated Show resolved Hide resolved
startup_scripts/480_contacts.py Outdated Show resolved Hide resolved
startup_scripts/480_contacts.py Outdated Show resolved Hide resolved
@Lon1
Copy link
Contributor Author

Lon1 commented Apr 14, 2022

@kr3ator - I fixed the linting issues, but I still don't have the split_params function. Will you just merge anyway?

Copy link
Contributor Author

@Lon1 Lon1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed linting issues

@tobiasge
Copy link
Member

@kr3ator - I fixed the linting issues, but I still don't have the split_params function. Will you just merge anyway?

You should rebase your branch onto the current develop branch. Then you will have the function.

@Lon1
Copy link
Contributor Author

Lon1 commented Apr 18, 2022

@kr3ator - should be rebased, please try again. Thanks.

Copy link
Contributor Author

@Lon1 Lon1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, I should have viewed all these and submitted previously.

@tobiasge tobiasge merged commit 0410cf2 into netbox-community:develop Apr 25, 2022
@Lon1 Lon1 deleted the contact-startups branch April 25, 2022 18:21
@tobiasge tobiasge mentioned this pull request Jul 12, 2022
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

Successfully merging this pull request may close these issues.

3 participants