8
if __name__ == '__main__':
9
parser = argparse.ArgumentParser(description=lava_salt.add_worker.__doc__)
10
parser.add_argument('minion', metavar='<minion>',
11
help='The host to install the lava worker instance on.')
12
parser.add_argument('ip', metavar='<ip>',
13
help='The public IP address for the minion.')
14
parser.add_argument('instance', metavar='<instance>',
15
help='The instance name we are creating on the worker')
16
parser.add_argument('--dry-run', dest='dryrun', action='store_true',
17
help='Just display what would be changed')
18
args = parser.parse_args()
20
client = lava_salt.salt_client()
21
ret = lava_salt.add_worker(client, args.minion, args.ip, args.instance, args.dryrun)
22
print ret[args.minion]