Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F9926102
D3641.id9415.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
566 B
Referenced Files
None
Subscribers
None
D3641.id9415.diff
View Options
diff --git a/_modules/node.py b/_modules/node.py
--- a/_modules/node.py
+++ b/_modules/node.py
@@ -263,6 +263,21 @@
return " ".join(["[" + ip + "]" for ip in ipv6])
+def get_public_ipv6():
+ """
+ A function to get a list of public IPv6.
+
+ Returns a list depending on the IPv6 currently assigned.
+
+ CLI Example:
+
+ salt * node.get_public_ipv6
+ """
+ ipv6 = __grains__.get("ipv6")
+
+ return [ip for ip in ipv6 if ip.startswith("2001")]
+
+
def get_all_ips():
"""
A function to get a list of IPv4, not enclosed,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jun 17, 08:37 (9 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2734524
Default Alt Text
D3641.id9415.diff (566 B)
Attached To
Mode
D3641: Get public IPV6 from servers
Attached
Detach File
Event Timeline
Log In to Comment