From 39a3d09766534b1a91ddf7dbdb9195bb7d2ae172 Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Thu, 17 Sep 2015 21:09:25 -0700 Subject: [PATCH] Fix modify command bug Hash is not a valid flag type so instead it will use string --- lib/vmfloaty.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vmfloaty.rb b/lib/vmfloaty.rb index a187ca2..5132c96 100644 --- a/lib/vmfloaty.rb +++ b/lib/vmfloaty.rb @@ -96,13 +96,13 @@ class Vmfloaty c.option '--url STRING', String, 'URL of vmpooler' c.option '--token STRING', String, 'Token for vmpooler' c.option '--lifetime INT', Integer, 'VM TTL (Integer, in hours)' - c.option '--tags HASH', Hash, 'free-form VM tagging' + c.option '--tags STRING', String, 'free-form VM tagging (json)' c.action do |args, options| verbose = options.verbose || config['verbose'] url = options.url ||= config['url'] hostname = args[0] lifetime = options.lifetime - tags = options.tags + tags = JSON.parse(options.tags) token = options.token || config['token'] res_body = Pooler.modify(verbose, url, hostname, token, lifetime, tags)