You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The functions were using the old legacy function API. This meant that
when they called `has_interface_with`, they were calling the legacy
implementation of that function and not the v4 API version introduced in
bc218f0.
Only in the v4 API implementation was the modern `networking` structured
fact being used. The old `parser/functions/has_interface_with.rb`
version still used legacy facts that are now not included in Puppet 8 by
default.
In this commit, we replace the `has_ip_address` and `has_ip_network`
functions with namespaced Puppet language functions, (these functions
are simple enough to not need ruby). Non-namespaced versions are added
(but marked as deprecated) in `lib/puppet/functions`.
The old implementations are removed completely. This is _almost_
certainly not going to be a breaking change for anyone. (Only other
legacy functions which in turn call these functions could be affected).
Fixes#1447
Copy file name to clipboardExpand all lines: REFERENCE.md
+56-53
Original file line number
Diff line number
Diff line change
@@ -63,9 +63,8 @@ environment.
63
63
*[`grep`](#grep): This function searches through an array and returns any elements that match
64
64
the provided regular expression.
65
65
*[`has_interface_with`](#has_interface_with): DEPRECATED. Use the namespaced function [`stdlib::has_interface_with`](#stdlibhas_interface_with) instead.
66
-
*[`has_interface_with`](#has_interface_with): Returns boolean based on kind and value.
67
-
*[`has_ip_address`](#has_ip_address): Returns true if the client has the requested IP address on some interface.
68
-
*[`has_ip_network`](#has_ip_network): Returns true if the client has an IP address within the requested network.
66
+
*[`has_ip_address`](#has_ip_address): DEPRECATED. Use the namespaced function [`stdlib::has_ip_address`](#stdlibhas_ip_address) instead.
67
+
*[`has_ip_network`](#has_ip_network): DEPRECATED. Use the namespaced function [`stdlib::has_ip_network`](#stdlibhas_ip_network) instead.
69
68
*[`intersection`](#intersection): This function returns an array of the intersection of two.
70
69
*[`is_a`](#is_a): Boolean check to determine whether a variable is of a given data type.
71
70
This is equivalent to the `=~` type checks.
@@ -126,6 +125,8 @@ optional seed for repeatable randomness.
126
125
*[`stdlib::fqdn_rotate`](#stdlib--fqdn_rotate): Rotates an array or string a random number of times, combining the `fqdn` fact and an optional seed for repeatable randomness.
127
126
*[`stdlib::has_function`](#stdlib--has_function): Returns whether the Puppet runtime has access to a given function.
128
127
*[`stdlib::has_interface_with`](#stdlib--has_interface_with): Returns boolean based on network interfaces present and their attribute values.
128
+
*[`stdlib::has_ip_address`](#stdlib--has_ip_address): Returns true if the client has the requested IPv4 address on some interface.
129
+
*[`stdlib::has_ip_network`](#stdlib--has_ip_network): Returns true if the client has the requested IPv4 network on some interface.
129
130
*[`stdlib::ip_in_range`](#stdlib--ip_in_range): Returns true if the ipaddress is within the given CIDRs
130
131
*[`stdlib::merge`](#stdlib--merge): Merges two or more hashes together or hashes resulting from iteration, and returns
0 commit comments