def main(args):

    bind_ip = str(args.ip)
    port = args.port
    is_up = True

    try:
        stats = item_stats(bind_ip, port)
        current_version = stats['version']
    except (__HOLE__, IndexError):
        is_up = False
    else:
        is_up = True
        if current_version not in VERSIONS:
            status_err('This plugin has only been tested with version %s '
                       'of memcached, and you are using version %s'
                       % (VERSIONS, current_version))

    status_ok()
    metric_bool('memcache_api_local_status', is_up)
    if is_up:
        for m, u in MEMCACHE_METRICS.iteritems():
            metric('memcache_%s' % m, 'uint64', stats[m], u)
dataset/ETHPy150Open rcbops/rpc-openstack/maas/plugins/memcached_status.py/main