-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgraph.py
More file actions
18 lines (15 loc) · 730 Bytes
/
graph.py
File metadata and controls
18 lines (15 loc) · 730 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import argparse
import workerbee
import getpass
parser = argparse.ArgumentParser(description='Manage HoneyComb')
parser.add_argument('--username', required=True, help='Username')
parser.add_argument('--debug', required=False, help='Debug', action='store_true')
parser.add_argument('--device', required=True, help='Device list, comma delimited')
parser.add_argument('--attribute', required=False, help='Attribute, eg temperature', default='temperature')
parser.add_argument('--filename', required=True, help='Filename')
options = parser.parse_args()
hc = workerbee.workerbee(options.debug, options.username)
hc.login()
hc.nodes()
hc.graphNodeAttribute(options.device.split(','), options.attribute, options.filename)
hc.logout()