def teardown_network(container_id):
    if (os.name == 'nt'):
        return
    try:
        (output, err) = utils.execute('ip', '-o', 'netns', 'list')
        for line in output.split('\n'):
            if (container_id == line.strip()):
                utils.execute('ip', 'netns', 'delete', container_id, run_as_root=True)
                break
    except processutils.ProcessExecutionError:
        LOG.warning(_('Cannot remove network namespace, netns id: %s'), container_id)
def teardown_network(container_id):
    if (os.name == 'nt'):
        return
    try:
        (output, err) = utils.execute('ip', '-o', 'netns', 'list')
        for line in output.split('\n'):
            if (container_id == line.strip()):
                utils.execute('ip', 'netns', 'delete', container_id, run_as_root=True)
                break
    except processutils.ProcessExecutionError:
        LOG.warning(_('Cannot remove network namespace, netns id: %s'), container_id)