Comment 4 for bug 1523871

Revision history for this message
Bruno Carvalho (brunowcs) wrote :

I´m resolved change this code, it´s working. You can create this official charm fix?

def get_networks(config_opt='ceph-public-network'):
    """Get all configured networks from provided config option.

    If public network(s) are provided, go through them and return those for
    which we have an address configured.
    """
    networks = config(config_opt)
    if networks:
        - networks = networks.split()
        + networks = networks.split(',')
        return [n for n in networks if get_address_in_network(n)]

    return []

def get_network_addrs(config_opt):
    """Get all configured public networks addresses.

    If public network(s) are provided, go through them and return the
    addresses we have configured on any of those networks.
    """
    addrs = []
    networks = config(config_opt)
    if networks:
        - networks = networks.split()
        + networks = networks.split(',')
        addrs = [get_address_in_network(n) for n in networks]
        addrs = [a for a in addrs if a]