1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| #!/usr/bin/env python
|
| """
| 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
|
|