def main():
    global opencloud_auth

    if len(sys.argv)!=3:
        print >> sys.stderr, "syntax: get_instance_name.py <username>, <password>"
        sys.exit(-1)

    username = sys.argv[1]
    password = sys.argv[2]

    opencloud_auth=(username, password)

    sites = get_nodes_by_site()

    for site in sites.values():
        if not site["hostnames"]:
            continue

        print site["name"] % "[%s]"
        for hostname in site["hostnames"]:
            print hostname
        print ""

    print "[all-opencloud:children]"
    for site in sites.values():
        if not site["hostnames"]:
            continue
        print site["name"]
dataset/ETHPy150Open open-cloud/xos/xos/tools/ansible_hosts.py/main/swapped operands of `%`