]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cephadm: add unwrap_ipv6 helper method 36360/head
authorMatthew Oliver <moliver@suse.com>
Thu, 30 Jul 2020 03:18:48 +0000 (13:18 +1000)
committerMatthew Oliver <moliver@suse.com>
Thu, 30 Jul 2020 03:27:05 +0000 (13:27 +1000)
commit13d3bad01954a25dd49b7a7d71bd74dd931f09c5
tree9b004c1d0f040cf30b1f68ef4d78f6fdb8c39b83
parent15274af1d4d98f606cd1802727151d9a2c0a45ac
cephadm: add unwrap_ipv6 helper method

When we pass in a mon-ip that is ipv6 we want it wrapped, this is so it
can be properly inserted into the mon_addrv address.
But there are times we need to unwrap it to test it's a valid ipv6
address.

This patch adds a helper method `unwrap_ipv6` which takes a string and
returns it either unwrapped or as it is, so it's harmless to other types
of ips.

This allows us to check a wrapped ipv6 base_ip with the networks on the
host.

Signed-off-by: Matthew Oliver <moliver@suse.com>
src/cephadm/cephadm
src/cephadm/tests/test_cephadm.py