-
Notifications
You must be signed in to change notification settings - Fork 141
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
Feature Additon: Contact Group resource and data source #366
Conversation
ready for workflow task, tested locally with |
…a_source_contacts_test. Please pass ci...
A @fbreckle Is there any chance this PR can be moved aloong? Thank you |
Well, last time a test failed. This must be fixed. The original author seems to have abandoned the issue, do you want to take it up? |
netbox/provider.go
Outdated
@@ -63,6 +63,7 @@ func Provider() *schema.Provider { | |||
"netbox_cluster_type": resourceNetboxClusterType(), | |||
"netbox_cluster": resourceNetboxCluster(), | |||
"netbox_contact": resourceNetboxContact(), | |||
"netbox_contact_group": resourceNetboxContact(), |
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.
I don't have permissions to push to their fork / branch and therefore directly contribute to this PR but what about this?
"netbox_contact_group": resourceNetboxContact(), | |
"netbox_contact_group": resourceNetboxContactGroup(), |
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.
Oh right. My bad :D
As for the change you mentioned: Yes, that seems to be wrong, but the tests fail for another reason.
I will look into this MR later (tm).
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.
Hello, sorry got busy with other items and put this on the back-burn. Yea can't seem to find out why the changes fail testing. If you cowboy it with a live deployment they are succesful..
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.
I don't want to tell how long I debugged until I found in wireshark that the HTTP calls are made to /contacts instead of /contact-groups.
Then I was like "damn, I remember this". D'oh! 🙈 :D
Merge is now underway. No clue how the tests suite passes locally.
Fun fact: It does not pass locally if you only run the single test via -run TestAccNetboxContactGroupDataSource_basic
to the go test
make target.
…#366) * Feature Additon: Contact Group resource and data source * correcting data_source_netbox_contacts schema mapping * corrected tests, passed locally, ready for github test. Added docs with go generate * removed data_source_contacts as it was a problem child, corrected data_source_contacts_test. Please pass ci... * removed data-source-contacts docs * chore: Fix some names * chore: Try implicit dependency * fix: Use correct resource function for contact_group resource --------- Co-authored-by: leasley@optumserve.com <leasley@optumserve.com> Co-authored-by: Fabian Breckle <fabian.breckle@breuninger.de>
Adds the following:
Data Source:
Resource:
Currently the the contact module has a call out for group_id but no method to get/create the contact group. One would have to hardcode the group_id value. Adds the missing pieces to the provider.
Examples: