From 3d4cd209996e6a1dfbf2a3fc42cc71017efeb2b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20S=2E=20Montero?= Date: Mon, 12 Oct 2009 12:41:14 +0000 Subject: [PATCH] Updated client tools to use the new location git-svn-id: http://svn.opennebula.org/one/trunk@849 3034c82b-c49b-4eb3-8279-a7acafdc01c0 --- src/cloud/ec2/bin/econe-describe-images | 6 ++++-- src/cloud/ec2/bin/econe-describe-instances | 8 ++++---- src/cloud/ec2/bin/econe-register | 3 +-- src/cloud/ec2/bin/econe-run-instances | 2 +- src/cloud/ec2/bin/econe-terminate-instances | 2 +- src/cloud/ec2/bin/econe-upload | 3 +-- src/cloud/ec2/lib/EC2QueryClient.rb | 16 ++++++++++++++++ 7 files changed, 28 insertions(+), 12 deletions(-) diff --git a/src/cloud/ec2/bin/econe-describe-images b/src/cloud/ec2/bin/econe-describe-images index 1dead33894..4eaa8f0222 100755 --- a/src/cloud/ec2/bin/econe-describe-images +++ b/src/cloud/ec2/bin/econe-describe-images @@ -52,7 +52,7 @@ end $: << RUBY_LIB_LOCATION -$: << RUBY_LIB_LOCATION+"/econe" +$: << RUBY_LIB_LOCATION+"/cloud/econe" require 'EC2QueryClient' require 'getoptlong' @@ -118,9 +118,11 @@ if headers puts "------------------------------------------------------------------------------" end -images.each { |img| +if images + images.each { |img| puts fmt % [img['imageOwnerId'],img['imageId'],img['imageLocation']] } +end exit 0 diff --git a/src/cloud/ec2/bin/econe-describe-instances b/src/cloud/ec2/bin/econe-describe-instances index 5103fc6d4d..722fcbb59e 100755 --- a/src/cloud/ec2/bin/econe-describe-instances +++ b/src/cloud/ec2/bin/econe-describe-instances @@ -50,9 +50,8 @@ else RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby" end - $: << RUBY_LIB_LOCATION -$: << RUBY_LIB_LOCATION+"/econe" +$: << RUBY_LIB_LOCATION+"/cloud/econe" require 'EC2QueryClient' require 'getoptlong' @@ -119,10 +118,11 @@ if headers puts "------------------------------------------------------------------------------------------------------------" end -instances.each { |img| +if instances + instances.each { |img| puts fmt % [owner, img['instanceId'],img['imageId'],img['instanceState']['name'],img['dnsName'],img['instanceType']] } - +end exit 0 diff --git a/src/cloud/ec2/bin/econe-register b/src/cloud/ec2/bin/econe-register index 2aed2631d4..0e770346c1 100755 --- a/src/cloud/ec2/bin/econe-register +++ b/src/cloud/ec2/bin/econe-register @@ -55,9 +55,8 @@ else RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby" end - $: << RUBY_LIB_LOCATION -$: << RUBY_LIB_LOCATION+"/econe" +$: << RUBY_LIB_LOCATION+"/cloud/econe" require 'EC2QueryClient' require 'getoptlong' diff --git a/src/cloud/ec2/bin/econe-run-instances b/src/cloud/ec2/bin/econe-run-instances index 59b4e68520..4ab08c5b5f 100755 --- a/src/cloud/ec2/bin/econe-run-instances +++ b/src/cloud/ec2/bin/econe-run-instances @@ -54,7 +54,7 @@ end $: << RUBY_LIB_LOCATION -$: << RUBY_LIB_LOCATION+"/econe" +$: << RUBY_LIB_LOCATION+"/cloud/econe" require 'EC2QueryClient' require 'getoptlong' diff --git a/src/cloud/ec2/bin/econe-terminate-instances b/src/cloud/ec2/bin/econe-terminate-instances index 1b7c302077..65c7bd5718 100755 --- a/src/cloud/ec2/bin/econe-terminate-instances +++ b/src/cloud/ec2/bin/econe-terminate-instances @@ -53,7 +53,7 @@ end $: << RUBY_LIB_LOCATION -$: << RUBY_LIB_LOCATION+"/econe" +$: << RUBY_LIB_LOCATION+"/cloud/econe" require 'EC2QueryClient' require 'getoptlong' diff --git a/src/cloud/ec2/bin/econe-upload b/src/cloud/ec2/bin/econe-upload index 3072744c6b..f1a0572e21 100755 --- a/src/cloud/ec2/bin/econe-upload +++ b/src/cloud/ec2/bin/econe-upload @@ -52,9 +52,8 @@ else RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby" end - $: << RUBY_LIB_LOCATION -$: << RUBY_LIB_LOCATION+"/econe" +$: << RUBY_LIB_LOCATION+"/cloud/econe" require 'EC2QueryClient' require 'getoptlong' diff --git a/src/cloud/ec2/lib/EC2QueryClient.rb b/src/cloud/ec2/lib/EC2QueryClient.rb index ff38c28d84..16503ece0b 100644 --- a/src/cloud/ec2/lib/EC2QueryClient.rb +++ b/src/cloud/ec2/lib/EC2QueryClient.rb @@ -1,4 +1,20 @@ #!/usr/bin/ruby +# -------------------------------------------------------------------------- # +# Copyright 2002-2009, Distributed Systems Architecture Group, Universidad # +# Complutense de Madrid (dsa-research.org) # +# # +# 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 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +#--------------------------------------------------------------------------- # $ec2url = nil