Skip to content

Commit 345300f

Browse files
committed
(#41) Improve help text for vmfloaty
General clean up of the text around the --help flag for all vmfloaty commands.
1 parent b023339 commit 345300f

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

lib/vmfloaty.rb

+25-25
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ def run
2222
config = Conf.read_config
2323

2424
command :get do |c|
25-
c.syntax = 'floaty get os_type1=x ox_type2=y ...'
26-
c.summary = 'Gets a vm or vms based on the os flag'
27-
c.description = ''
25+
c.syntax = 'floaty get os_type0 os_type1=x ox_type2=y [options]'
26+
c.summary = 'Gets a vm or vms based on the os argument'
27+
c.description = 'A command to retrieve vms from vmpooler. Can either be a single vm, or multiple with the `=` syntax.'
2828
c.example 'Gets a few vms', 'floaty get centos=3 debian --user brian --url http://vmpooler.example.com'
2929
c.option '--verbose', 'Enables verbose output'
3030
c.option '--user STRING', String, 'User to authenticate with'
@@ -98,8 +98,8 @@ def run
9898

9999
command :list do |c|
100100
c.syntax = 'floaty list [options]'
101-
c.summary = 'Shows a list of available vms from the pooler'
102-
c.description = ''
101+
c.summary = 'Shows a list of available vms from the pooler or vms obtained with a token'
102+
c.description = 'List will either show all vm templates available in vmpooler, or with the --active flag it will list vms obtained with a vmpooler token.'
103103
c.example 'Filter the list on centos', 'floaty list centos --url http://vmpooler.example.com'
104104
c.option '--verbose', 'Enables verbose output'
105105
c.option '--active', 'Prints information about active vms for a given token'
@@ -136,9 +136,9 @@ def run
136136
end
137137

138138
command :query do |c|
139-
c.syntax = 'floaty query [hostname] [options]'
139+
c.syntax = 'floaty query hostname [options]'
140140
c.summary = 'Get information about a given vm'
141-
c.description = ''
141+
c.description = 'Given a hostname from vmpooler, vmfloaty with query vmpooler to get various details about the vm.'
142142
c.example 'Get information about a sample host', 'floaty query hostname --url http://vmpooler.example.com'
143143
c.option '--verbose', 'Enables verbose output'
144144
c.option '--url STRING', String, 'URL of vmpooler'
@@ -153,9 +153,9 @@ def run
153153
end
154154

155155
command :modify do |c|
156-
c.syntax = 'floaty modify [hostname] [options]'
157-
c.summary = 'Modify a vms tags, TTL, and disk space'
158-
c.description = ''
156+
c.syntax = 'floaty modify hostname [options]'
157+
c.summary = 'Modify a vms tags, time to live, and disk space'
158+
c.description = 'This command makes modifications to the virtual machines state in vmpooler. You can either append tags to the vm, increase how long it stays active for, or increase the amount of disk space.'
159159
c.example 'Modifies myhost1 to have a TTL of 12 hours and adds a custom tag', 'floaty modify myhost1 --lifetime 12 --url https://myurl --token mytokenstring --tags \'{"tag":"myvalue"}\''
160160
c.option '--verbose', 'Enables verbose output'
161161
c.option '--url STRING', String, 'URL of vmpooler'
@@ -277,9 +277,9 @@ def run
277277
end
278278

279279
command :delete do |c|
280-
c.syntax = 'floaty delete [hostname,...]'
280+
c.syntax = 'floaty delete hostname,hostname2 [options]'
281281
c.summary = 'Schedules the deletion of a host or hosts'
282-
c.description = ''
282+
c.description = 'Given a comma separated list of hostnames, or --all for all vms, vmfloaty makes a request to vmpooler to schedule the deletion of those vms.'
283283
c.example 'Schedules the deletion of a host or hosts', 'floaty delete myhost1,myhost2 --url http://vmpooler.example.com'
284284
c.option '--verbose', 'Enables verbose output'
285285
c.option '--all', 'Deletes all vms acquired by a token'
@@ -352,9 +352,9 @@ def run
352352
end
353353

354354
command :snapshot do |c|
355-
c.syntax = 'floaty snapshot [hostname] [options]'
355+
c.syntax = 'floaty snapshot hostname [options]'
356356
c.summary = 'Takes a snapshot of a given vm'
357-
c.description = ''
357+
c.description = 'Will request a snapshot be taken of the given hostname in vmpooler. This command is known to take a while depending on how much load is on vmpooler.'
358358
c.example 'Takes a snapshot for a given host', 'floaty snapshot myvm.example.com --url http://vmpooler.example.com --token a9znth9dn01t416hrguu56ze37t790bl'
359359
c.option '--verbose', 'Enables verbose output'
360360
c.option '--url STRING', String, 'URL of vmpooler'
@@ -378,9 +378,9 @@ def run
378378
end
379379

380380
command :revert do |c|
381-
c.syntax = 'floaty revert [hostname] [snapshot] [options]'
381+
c.syntax = 'floaty revert hostname snapshot [options]'
382382
c.summary = 'Reverts a vm to a specified snapshot'
383-
c.description = ''
383+
c.description = 'Given a snapshot SHA, vmfloaty will request a revert to vmpooler to go back to a previous snapshot.'
384384
c.example 'Reverts to a snapshot for a given host', 'floaty revert myvm.example.com n4eb4kdtp7rwv4x158366vd9jhac8btq --url http://vmpooler.example.com --token a9znth9dn01t416hrguu56ze37t790bl'
385385
c.option '--verbose', 'Enables verbose output'
386386
c.option '--url STRING', String, 'URL of vmpooler'
@@ -410,8 +410,8 @@ def run
410410

411411
command :status do |c|
412412
c.syntax = 'floaty status [options]'
413-
c.summary = 'Prints the status of vmpooler'
414-
c.description = ''
413+
c.summary = 'Prints the status of pools in vmpooler'
414+
c.description = 'Makes a request to vmpooler to request the information about vm pools and how many are ready to be used, what pools are empty, etc.'
415415
c.example 'Gets the current vmpooler status', 'floaty status --url http://vmpooler.example.com'
416416
c.option '--verbose', 'Enables verbose output'
417417
c.option '--url STRING', String, 'URL of vmpooler'
@@ -436,8 +436,8 @@ def run
436436

437437
command :summary do |c|
438438
c.syntax = 'floaty summary [options]'
439-
c.summary = 'Prints the summary of vmpooler'
440-
c.description = ''
439+
c.summary = 'Prints a summary of vmpooler'
440+
c.description = 'Gives a very detailed summary of information related to vmpooler.'
441441
c.example 'Gets the current day summary of vmpooler', 'floaty summary --url http://vmpooler.example.com'
442442
c.option '--verbose', 'Enables verbose output'
443443
c.option '--url STRING', String, 'URL of vmpooler'
@@ -452,9 +452,9 @@ def run
452452
end
453453

454454
command :token do |c|
455-
c.syntax = 'floaty token [get | delete | status] [token]'
456-
c.summary = 'Retrieves or deletes a token'
457-
c.description = ''
455+
c.syntax = 'floaty token <get delete status> [options]'
456+
c.summary = 'Retrieves or deletes a token or checks token status'
457+
c.description = 'This command is used to manage your vmpooler token. Through the various options, you are able to get a new token, delete an existing token, and request a tokens status.'
458458
c.example 'Gets a token from the pooler', 'floaty token get'
459459
c.option '--verbose', 'Enables verbose output'
460460
c.option '--url STRING', String, 'URL of vmpooler'
@@ -506,9 +506,9 @@ def run
506506
end
507507

508508
command :ssh do |c|
509-
c.syntax = 'floaty ssh os_type'
509+
c.syntax = 'floaty ssh os_type [options]'
510510
c.summary = 'Grabs a single vm and sshs into it'
511-
c.description = ''
511+
c.description = 'This command simply will grab a vm template that was requested, and then ssh the user into the machine all at once.'
512512
c.example 'SSHs into a centos vm', 'floaty ssh centos7 --url https://vmpooler.example.com'
513513
c.option '--verbose', 'Enables verbose output'
514514
c.option '--url STRING', String, 'URL of vmpooler'

0 commit comments

Comments
 (0)