MCPcopy Create free account
hub / github.com/ceph/ceph / is_ipv6

Function is_ipv6

src/python-common/ceph/deployment/utils.py:50–56  ·  view source on GitHub ↗
(address)

Source from the content-addressed store, hash-verified

48
49
50def is_ipv6(address):
51 # type: (str) -> bool
52 address = unwrap_ipv6(address)
53 try:
54 return ipaddress.ip_address(address).version == 6
55 except ValueError:
56 return False
57
58
59def valid_addr(addr: str) -> Tuple[bool, str]:

Callers 3

test_is_ipv6Function · 0.90
prepare_createMethod · 0.90

Calls 2

ip_addressMethod · 0.80
unwrap_ipv6Function · 0.70

Tested by 1

test_is_ipv6Function · 0.72