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

Add ability to pass functions to host objects in address field #51

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dn1s
Copy link
Contributor

@dn1s dn1s commented Mar 21, 2019

As infoblox api allows you can pass functions like this:
func:nextavailableip:10.0.0.10-10.0.0.20
in host object field ipv4addr or ipv6addr.

dn1s added 2 commits March 21, 2019 15:40
since api allows for address field following:

Examples:
  • func:nextavailableip:network/ZG54dfgsrDFEFfsfsLzA:10.0.0.0/8/default
  • func:nextavailableip:10.0.0.0/8
  • func:nextavailableip:10.0.0.0/8,external
  • func:nextavailableip:10.0.0.3-10.0.0.10

We fill address with function attribute since we only want an ip
back if we use something like this:
  element(infoblox_record_host.internal_ip.*.ipv4addr.0.address, count.index)
otherwise if we use address for the function string as well we would not
get an ip back but the function statement.
@dn1s
Copy link
Contributor Author

dn1s commented Mar 21, 2019

A side note from what I did try to do but was too horrible to implement. I tried to implement a function for ConflictsWith: to conflict with ipv4addr.*.address for all ipv4addr.*.function but in the end I just documented in which order these attributes are processed.

@dn1s dn1s force-pushed the f_add_functions_to_host_object branch from b9f2f57 to 0c0d784 Compare March 27, 2019 09:10
@dn1s dn1s changed the title Add ability to pass functions to host objects in address field Add ability to restart grid if host object is created/deleted Mar 27, 2019
@dn1s dn1s force-pushed the f_add_functions_to_host_object branch from 0c0d784 to 59cd554 Compare March 27, 2019 09:18
@dn1s dn1s changed the title Add ability to restart grid if host object is created/deleted Add ability to pass functions to host objects in address field Mar 27, 2019
@JackBracken
Copy link
Collaborator

Thanks @dn1s I'll test this now

@dn1s
Copy link
Contributor Author

dn1s commented Apr 23, 2019

@JackBracken are you done testing?

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.

2 participants