def init_host(ip_range, is_external=False):
    # NOTE(devcamcar): Cloud public SNAT entries and the default
    # SNAT rule for outbound traffic.

    add_snat_rule(ip_range, is_external)

    rules = []
    if is_external:
        for snat_range in CONF.force_snat_range:
            rules.append('PREROUTING -p ipv4 --ip-src %s --ip-dst %s '
                         '-j redirect --redirect-target ACCEPT' %
                         (ip_range, snat_range))
    if rules:
        ensure_ebtables_rules(rules, 'nat')

    iptables_manager.ipv4['nat'].add_rule('POSTROUTING',
                                          '-s %s -d %s/32 -j ACCEPT' %
                                          (ip_range, CONF.metadata_host))

    for dmz in CONF.dmz_cidr:
        iptables_manager.ipv4['nat'].add_rule('POSTROUTING',
                                              '-s %s -d %s -j ACCEPT' %
                                              (ip_range, dmz))

    iptables_manager.ipv4['nat'].add_rule('POSTROUTING',
                                          '-s %(range)s -d %(range)s '
                                          '-m conntrack ! --ctstate DNAT '
                                          '-j ACCEPT' %
                                          {'range': ip_range})
    iptables_manager.apply()
Delete a credential.
dataset/ETHPy150Open openstack/nova/nova/network/linux_net.py/init_host--crossover with--dataset/ETHPy150Open google/oauth2client/oauth2client/contrib/multistore_file.py/_MultiStore._Storage.locked_delete