From e03280903e7788bd01aea8366c436402d49c1465 Mon Sep 17 00:00:00 2001 From: Myles Penner Date: Tue, 3 Jun 2025 12:42:03 -0700 Subject: [PATCH] Sync charm-helpers Refreshes charm by including two additions to charmhelpers which will unblock work on Epoxy. Change-Id: Ief9377242ce9ef813dcf74d1d49f5895e96421bb --- charmhelpers/contrib/network/ip.py | 2 +- charmhelpers/contrib/openstack/context.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/charmhelpers/contrib/network/ip.py b/charmhelpers/contrib/network/ip.py index 4d472cad..d9c67f5a 100644 --- a/charmhelpers/contrib/network/ip.py +++ b/charmhelpers/contrib/network/ip.py @@ -620,7 +620,7 @@ def get_relation_ip(interface, cidr_network=None): # Currently IPv6 has priority, eventually we want IPv6 to just be # another network space. assert_charm_supports_ipv6() - return get_ipv6_addr()[0] + return get_ipv6_addr(dynamic_only=False)[0] elif cidr_network: # If a specific CIDR network is passed get the address from that # network. diff --git a/charmhelpers/contrib/openstack/context.py b/charmhelpers/contrib/openstack/context.py index cd70b55c..9082348b 100644 --- a/charmhelpers/contrib/openstack/context.py +++ b/charmhelpers/contrib/openstack/context.py @@ -25,7 +25,10 @@ import socket import time from base64 import b64decode -from distutils.version import LooseVersion +try: + from distutils.version import LooseVersion +except ImportError: + from looseversion import LooseVersion from subprocess import ( check_call, check_output,