]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
cephadm: add unwrap_ipv6 helper method
authorMatthew Oliver <moliver@suse.com>
Thu, 30 Jul 2020 03:18:48 +0000 (13:18 +1000)
committerSebastian Wagner <sebastian.wagner@suse.com>
Tue, 4 Aug 2020 14:21:44 +0000 (16:21 +0200)
commitcd152c6d5da2b11516630ad887d059025ea4e818
tree9cd6b7cbfc821e47e62f24601054358f7ec666e2
parentd3acf61aa84dc6c8c6f95ab9201ce39789768f1f
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>
(cherry picked from commit 13d3bad01954a25dd49b7a7d71bd74dd931f09c5)
src/cephadm/cephadm
src/cephadm/tests/test_cephadm.py