You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by lu...@redhat.com on 2010/10/23 00:52:57 UTC

[PATCH 2/2] * client/bin/deltacloudc: print error if ID for show operation is missing

From: David Lutterkort <lu...@redhat.com>

---
 client/bin/deltacloudc |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/client/bin/deltacloudc b/client/bin/deltacloudc
index 5153e35..9408f90 100755
--- a/client/bin/deltacloudc
+++ b/client/bin/deltacloudc
@@ -124,6 +124,7 @@ if options[:collection] and options[:operation]
   # If collection is set and requested operation is 'show' just 'singularize'
   # collection name and print item with specified id (-i parameter)
   if options[:operation].eql?('show')
+    invalid_usage("Missing ID, must be provided with --id") unless options[:id]
     puts format(client.send(options[:collection].gsub(/s$/, ''), options[:id]))
     exit(0)
   end
-- 
1.7.2.3