From b7f336db5de7b1d6027f8527c2a435b119a7b774 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Fri, 21 Sep 2012 12:56:43 +0200 Subject: [PATCH 1/3] Fix oneacct help generation --- src/cli/command_parser.rb | 4 ++-- src/cli/oneacct | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cli/command_parser.rb b/src/cli/command_parser.rb index 9c1e49ba99..e034614525 100644 --- a/src/cli/command_parser.rb +++ b/src/cli/command_parser.rb @@ -619,9 +619,9 @@ module CommandParser command[:desc].split("\n").each { |l| printf cmd_format10, l puts - } + } if command[:desc] - unless command[:options].empty? + unless !command[:options] || command[:options].empty? opts_str=command[:options].flatten.collect{|o| o[:name] }.join(', ') diff --git a/src/cli/oneacct b/src/cli/oneacct index 06fba83dc3..728984a53d 100755 --- a/src/cli/oneacct +++ b/src/cli/oneacct @@ -38,7 +38,7 @@ cmd = CommandParser::CmdParser.new(ARGV) do version OpenNebulaHelper::ONE_VERSION - option [AcctHelper::ACCT_OPTIONS + CommandParser::OPTIONS] + option AcctHelper::ACCT_OPTIONS + CommandParser::OPTIONS main do filter_flag = (options[:user] || VirtualMachinePool::INFO_ALL) From 33c307995bc35ef4b8cea7098116f6f7fdaa1ab0 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Fri, 21 Sep 2012 13:15:39 +0200 Subject: [PATCH 2/3] bug #1348: added oneacct man page --- install.sh | 1 + share/man/SConstruct | 1 + share/man/oneacct.1 | 81 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 83 insertions(+) create mode 100644 share/man/oneacct.1 diff --git a/install.sh b/install.sh index a64bddbed5..3215a0d39b 100755 --- a/install.sh +++ b/install.sh @@ -1678,6 +1678,7 @@ SELF_SERVICE_PUBLIC_LOCALE_ZH_TW="src/cloud/occi/lib/ui/locale/languages/zh_TW.j #----------------------------------------------------------------------------- MAN_FILES="share/man/oneauth.1.gz \ + share/man/oneacct.1.gz \ share/man/oneacl.1.gz \ share/man/onehost.1.gz \ share/man/oneimage.1.gz \ diff --git a/share/man/SConstruct b/share/man/SConstruct index 6ca1ff5aee..044eee97b5 100644 --- a/share/man/SConstruct +++ b/share/man/SConstruct @@ -33,6 +33,7 @@ env.Man('econe-upload') env.Man('occi-compute') env.Man('occi-network') env.Man('occi-storage') +env.Man('oneacct') env.Man('oneacl') env.Man('oneauth') env.Man('onecluster') diff --git a/share/man/oneacct.1 b/share/man/oneacct.1 new file mode 100644 index 0000000000..dc285514b1 --- /dev/null +++ b/share/man/oneacct.1 @@ -0,0 +1,81 @@ +.\" generated with Ronn/v0.7.3 +.\" http://github.com/rtomayko/ronn/tree/0.7.3 +. +.TH "ONEACCT" "1" "September 2012" "" "oneacct(1) -- OpenNebula Accountin Tool" +. +.SH "NAME" +\fBoneacct\fR +. +.SH "SYNOPSIS" +\fBoneacct\fR [\fIoptions\fR] +. +.SH "OPTIONS" +. +.nf + + \-s, \-\-start TIME Start date and time to take into account + \-e, \-\-end TIME End date and time + \-u, \-\-user user User name or id to filter the results + \-g, \-\-group group Group name or id to filter the results + \-H, \-\-host HOST Host name or id to filter the results + \-\-xpath XPATH_EXPRESSION Xpath expression to filter the results\. For example: oneacct \-\-xpath \'HISTORY[ETIME>0]\' + \-x, \-\-xml Show the resource in xml format + \-j, \-\-json Show the resource in xml format + \-\-split Split the output in a table for each VM + \-v, \-\-verbose Verbose mode + \-h, \-\-help Show this message + \-V, \-\-version Show version and copyright information +. +.fi +. +.SH "ARGUMENT FORMATS" +. +.IP "\(bu" 4 +file +. +.IP "" 4 +. +.nf + +Path to a file +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +range +. +.IP "" 4 +. +.nf + +List of id\'s in the form 1,8\.\.15 +. +.fi +. +.IP "" 0 + +. +.IP "\(bu" 4 +text +. +.IP "" 4 +. +.nf + +String +. +.fi +. +.IP "" 0 + +. +.IP "" 0 +. +.SH "LICENSE" +OpenNebula 3\.7\.0 Copyright 2002\-2012, OpenNebula Project Leads (OpenNebula\.org) +. +.P +Licensed under the Apache License, Version 2\.0 (the "License"); you may not use this file except in compliance with the License\. You may obtain a copy of the License at http://www\.apache\.org/licenses/LICENSE\-2\.0 From d105000dda7273e3ff7e5c54a5b4ce7859624ba0 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Fri, 21 Sep 2012 15:41:01 +0200 Subject: [PATCH 3/3] feature #1327: took out -d for description as it is use for datastore --- src/cli/one_helper/oneimage_helper.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/src/cli/one_helper/oneimage_helper.rb b/src/cli/one_helper/oneimage_helper.rb index 0ec17b61a3..c06eaf6076 100644 --- a/src/cli/one_helper/oneimage_helper.rb +++ b/src/cli/one_helper/oneimage_helper.rb @@ -27,7 +27,6 @@ class OneImageHelper < OpenNebulaHelper::OneHelper }, { :name => "description", - :short => "-d description", :large => "--description description", :format => String, :description => "Description for the new Image"