#!/usr/bin/env python


import sys
import ndl


if len(sys.argv) > 1 and sys.argv[1] == ",":
    print ','.join(ndl.get_vms())
elif len(sys.argv) > 1 and sys.argv[1] == "1":
    print ndl.get_vms()[0]
elif len(sys.argv) == 2:
        ct = int(sys.argv[1])
        sys.stderr.write("requesting %d vms" % ct)
        print '\n'.join(ndl.get_vms(count=ct))
else:
        sys.stderr.write( "requesting all vms")
        print '\n'.join(ndl.get_vms())




104a95dc5b5cd2c99985ba70b97e308c1db2c2e1
#!/usr/bin/env python


import sys
import ndl


if len(sys.argv) > 1 and sys.argv[1] == ",":
    print ','.join(ndl.get_vms())
elif len(sys.argv) > 1 and sys.argv[1] == "1":
    print ndl.get_vms()[0]
elif len(sys.argv) == 2:
        ct = int(sys.argv[1])
        sys.stderr.write("requesting %d vms" % ct)
        print '\n'.join(ndl.get_vms(count=ct))
else:
        sys.stderr.write( "requesting all vms")
        print '\n'.join(ndl.get_vms())



