19 lines
336 B
Python
Executable File
19 lines
336 B
Python
Executable File
#!/usr/bin/env python2
|
|
|
|
"""
|
|
Usage: ./print_host_labels.py <IP.or.hostname>
|
|
"""
|
|
|
|
import sys
|
|
import common
|
|
from autotest_lib.server.hosts import factory
|
|
|
|
if len(sys.argv) < 2:
|
|
print 'Usage: %s <IP.or.hostname>' % sys.argv[0]
|
|
exit(1)
|
|
|
|
host = factory.create_host(sys.argv[1])
|
|
labels = host.get_labels()
|
|
print 'Labels:'
|
|
print labels
|