def container_skel_load(container_skel, inventory, config):
    """Build out all containers as defined in the environment file.

    :param container_skel: ``dict`` container skeleton for all known containers
    :param inventory: ``dict``  Living dictionary of inventory
    :param config: ``dict``  User defined information
    """
    for key, value in container_skel.iteritems():
        for assignment in value['contains']:
            for container_type in value['belongs_to']:
                _add_container_hosts(
                    assignment,
                    config,
                    key,
                    container_type,
                    inventory,
                    value.get('properties')
                )
    else:
        cidr_networks = config.get('cidr_networks')
        provider_queues = {}
        for net_name in cidr_networks:
            ip_q = _load_optional_q(
                cidr_networks, cidr_name=net_name
            )
            provider_queues[net_name] = ip_q
            if ip_q is not None:
                net = netaddr.IPNetwork(cidr_networks.get(net_name))
                provider_queues['%s_netmask' % net_name] = str(net.netmask)

        overrides = config['global_overrides']
        # iterate over a list of provider_networks, var=pn
        pns = overrides.get('provider_networks', list())
        pns = _net_address_search(
            provider_networks=pns,
            main_network=config['global_overrides']['management_bridge'],
            key='is_ssh_address'
        )

        pns = _net_address_search(
            provider_networks=pns,
            main_network=config['global_overrides']['management_bridge'],
            key='is_container_address'
        )

        for pn in pns:
            # p_net are the provider_network values
            p_net = pn.get('network')
            if not p_net:
                continue

            q_name = p_net.get('ip_from_q')
            ip_from_q = provider_queues.get(q_name)
            if ip_from_q:
                netmask = provider_queues[q_name % '%s_netmask']
            else:
                netmask = None

            for group in p_net.get('group_binds', list()):
                _add_additional_networks(
                    key=group,
                    inventory=inventory,
                    ip_q=ip_from_q,
                    q_name=q_name,
                    netmask=netmask,
                    interface=p_net['container_interface'],
                    bridge=p_net['container_bridge'],
                    net_type=p_net.get('container_type'),
                    net_mtu=p_net.get('container_mtu'),
                    user_config=config,
                    is_ssh_address=p_net.get('is_ssh_address'),
                    is_container_address=p_net.get('is_container_address'),
                    static_routes=p_net.get('static_routes')
                )
dataset/ETHPy150Open openstack/openstack-ansible/playbooks/inventory/dynamic_inventory.py/container_skel_load/swapped operands of `%`