From 9c3e12f28fefd95929ceaa4887c3ee97c03e8956 Mon Sep 17 00:00:00 2001 From: Jaime Melis Date: Wed, 15 Sep 2010 15:06:22 +0200 Subject: [PATCH 1/9] fixed bug in sh polling --- src/vmm_mad/remotes/kvm/poll | 3 +-- src/vmm_mad/remotes/xen/poll | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/vmm_mad/remotes/kvm/poll b/src/vmm_mad/remotes/kvm/poll index 4c68fbb168..224edb5d49 100755 --- a/src/vmm_mad/remotes/kvm/poll +++ b/src/vmm_mad/remotes/kvm/poll @@ -52,8 +52,7 @@ info=`$virsh_cmd 2>/dev/null | awk "$AWK_SCRIPT"` if [ -n "$info" ]; then echo $info - exit 0 else echo STATE=d - exit 1 fi +exit 0 diff --git a/src/vmm_mad/remotes/xen/poll b/src/vmm_mad/remotes/xen/poll index 59eb9614c0..c1f6e3aa64 100755 --- a/src/vmm_mad/remotes/xen/poll +++ b/src/vmm_mad/remotes/xen/poll @@ -58,8 +58,7 @@ info=`get_info $1 2>/dev/null | awk "$AWK_SCRIPT"` if [ -n "$info" ]; then echo $info - exit 0 else echo STATE=d - exit 1 fi +exit 0 From 2455ad4ff16f8fcca1612f2b0c9c766382312c46 Mon Sep 17 00:00:00 2001 From: Jaime Melis Date: Wed, 15 Sep 2010 15:36:57 +0200 Subject: [PATCH 2/9] removed bash -e flag in shutdown scripts --- src/vmm_mad/remotes/kvm/shutdown | 2 +- src/vmm_mad/remotes/xen/shutdown | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vmm_mad/remotes/kvm/shutdown b/src/vmm_mad/remotes/kvm/shutdown index 53d84d25d1..892e9718a8 100755 --- a/src/vmm_mad/remotes/kvm/shutdown +++ b/src/vmm_mad/remotes/kvm/shutdown @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/bin/bash # -------------------------------------------------------------------------- # # Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) # diff --git a/src/vmm_mad/remotes/xen/shutdown b/src/vmm_mad/remotes/xen/shutdown index ee73b12bd0..b90e1dec5e 100755 --- a/src/vmm_mad/remotes/xen/shutdown +++ b/src/vmm_mad/remotes/xen/shutdown @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/bin/bash # -------------------------------------------------------------------------- # # Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) # From 64f1b7e45906857841b7cdfbeb3d4afb97429eb0 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Wed, 15 Sep 2010 16:48:21 +0200 Subject: [PATCH 3/9] Stopped using Array#index as it is not compatible with ruby 1.8.5 --- src/mad/ruby/VirtualMachineDriver.rb | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/mad/ruby/VirtualMachineDriver.rb b/src/mad/ruby/VirtualMachineDriver.rb index ec42758be4..5a5c1be48d 100644 --- a/src/mad/ruby/VirtualMachineDriver.rb +++ b/src/mad/ruby/VirtualMachineDriver.rb @@ -168,11 +168,16 @@ private end def get_first_runable - action_index=@action_queue.index do |action| - if action[:args][HOST_ARG] - !@hosts.include? action[:args][HOST_ARG] + action_index=nil + @action_queue.each_with_index do |action, index| + if action[:args][HOST_ARG] + if !@hosts.include?(action[:args][HOST_ARG]) + action_index=index + break + end else - true + action_index=index + break end end From e900b964da5a7768c22ede679ebf4392c75ffd96 Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Wed, 15 Sep 2010 18:01:53 +0200 Subject: [PATCH 4/9] Refactor OCA test directory tree --- src/oca/ruby/test/ClusterPool_spec.rb | 2 +- src/oca/ruby/test/Cluster_spec.rb | 2 +- src/oca/ruby/test/HostPool_spec.rb | 2 +- src/oca/ruby/test/Host_spec.rb | 2 +- src/oca/ruby/test/UserPool_spec.rb | 2 +- src/oca/ruby/test/User_spec.rb | 2 +- src/oca/ruby/test/VirtualMachinePool_spec.rb | 2 +- src/oca/ruby/test/VirtualMachine_spec.rb | 2 +- src/oca/ruby/test/VirtualNetworkPool_spec.rb | 2 +- src/oca/ruby/test/VirtualNetwork_spec.rb | 2 +- .../test/{xml_test => fixtures}/cluster.xml | 0 .../{xml_test => fixtures}/clusterpool.xml | 0 .../ruby/test/{xml_test => fixtures}/host.xml | 0 .../test/{xml_test => fixtures}/hostpool.xml | 0 .../ruby/test/{xml_test => fixtures}/user.xml | 0 .../test/{xml_test => fixtures}/userpool.xml | 0 .../ruby/test/{xml_test => fixtures}/vm.xml | 0 .../test/{xml_test => fixtures}/vmpool.xml | 0 .../ruby/test/{xml_test => fixtures}/vnet.xml | 0 .../test/{xml_test => fixtures}/vnetpool.xml | 0 src/oca/ruby/test/{ => helpers}/MockClient.rb | 20 +++++++++---------- 21 files changed, 20 insertions(+), 20 deletions(-) rename src/oca/ruby/test/{xml_test => fixtures}/cluster.xml (100%) rename src/oca/ruby/test/{xml_test => fixtures}/clusterpool.xml (100%) rename src/oca/ruby/test/{xml_test => fixtures}/host.xml (100%) rename src/oca/ruby/test/{xml_test => fixtures}/hostpool.xml (100%) rename src/oca/ruby/test/{xml_test => fixtures}/user.xml (100%) rename src/oca/ruby/test/{xml_test => fixtures}/userpool.xml (100%) rename src/oca/ruby/test/{xml_test => fixtures}/vm.xml (100%) rename src/oca/ruby/test/{xml_test => fixtures}/vmpool.xml (100%) rename src/oca/ruby/test/{xml_test => fixtures}/vnet.xml (100%) rename src/oca/ruby/test/{xml_test => fixtures}/vnetpool.xml (100%) rename src/oca/ruby/test/{ => helpers}/MockClient.rb (72%) diff --git a/src/oca/ruby/test/ClusterPool_spec.rb b/src/oca/ruby/test/ClusterPool_spec.rb index e68f052ba4..fd30f0fdb3 100644 --- a/src/oca/ruby/test/ClusterPool_spec.rb +++ b/src/oca/ruby/test/ClusterPool_spec.rb @@ -1,7 +1,7 @@ $: << '../' require 'OpenNebula' -require 'MockClient' +require 'helpers/MockClient' module OpenNebula diff --git a/src/oca/ruby/test/Cluster_spec.rb b/src/oca/ruby/test/Cluster_spec.rb index 953d1b99f8..bb2a30889a 100644 --- a/src/oca/ruby/test/Cluster_spec.rb +++ b/src/oca/ruby/test/Cluster_spec.rb @@ -1,7 +1,7 @@ $: << '../' require 'OpenNebula' -require 'MockClient' +require 'helpers/MockClient' module OpenNebula diff --git a/src/oca/ruby/test/HostPool_spec.rb b/src/oca/ruby/test/HostPool_spec.rb index 52a02ba019..5d08319618 100644 --- a/src/oca/ruby/test/HostPool_spec.rb +++ b/src/oca/ruby/test/HostPool_spec.rb @@ -1,7 +1,7 @@ $: << '../' require 'OpenNebula' -require 'MockClient' +require 'helpers/MockClient' module OpenNebula diff --git a/src/oca/ruby/test/Host_spec.rb b/src/oca/ruby/test/Host_spec.rb index 08af3d377e..e2d8cb39e4 100644 --- a/src/oca/ruby/test/Host_spec.rb +++ b/src/oca/ruby/test/Host_spec.rb @@ -1,7 +1,7 @@ $: << '../' require 'OpenNebula' -require 'MockClient' +require 'helpers/MockClient' module OpenNebula diff --git a/src/oca/ruby/test/UserPool_spec.rb b/src/oca/ruby/test/UserPool_spec.rb index 6bd5fcba8c..765603a422 100644 --- a/src/oca/ruby/test/UserPool_spec.rb +++ b/src/oca/ruby/test/UserPool_spec.rb @@ -1,7 +1,7 @@ $: << '../' require 'OpenNebula' -require 'MockClient' +require 'helpers/MockClient' module OpenNebula diff --git a/src/oca/ruby/test/User_spec.rb b/src/oca/ruby/test/User_spec.rb index e0f43f8f61..1a4085d4e2 100644 --- a/src/oca/ruby/test/User_spec.rb +++ b/src/oca/ruby/test/User_spec.rb @@ -1,7 +1,7 @@ $: << '../' require 'OpenNebula' -require 'MockClient' +require 'helpers/MockClient' module OpenNebula diff --git a/src/oca/ruby/test/VirtualMachinePool_spec.rb b/src/oca/ruby/test/VirtualMachinePool_spec.rb index 8e7c81acba..28ffb96dd3 100644 --- a/src/oca/ruby/test/VirtualMachinePool_spec.rb +++ b/src/oca/ruby/test/VirtualMachinePool_spec.rb @@ -1,7 +1,7 @@ $: << '../' require 'OpenNebula' -require 'MockClient' +require 'helpers/MockClient' module OpenNebula diff --git a/src/oca/ruby/test/VirtualMachine_spec.rb b/src/oca/ruby/test/VirtualMachine_spec.rb index e2fc6571ff..53c4397e05 100644 --- a/src/oca/ruby/test/VirtualMachine_spec.rb +++ b/src/oca/ruby/test/VirtualMachine_spec.rb @@ -1,7 +1,7 @@ $: << '../' require 'OpenNebula' -require 'MockClient' +require 'helpers/MockClient' module OpenNebula diff --git a/src/oca/ruby/test/VirtualNetworkPool_spec.rb b/src/oca/ruby/test/VirtualNetworkPool_spec.rb index 51013dc20f..fd107827c6 100644 --- a/src/oca/ruby/test/VirtualNetworkPool_spec.rb +++ b/src/oca/ruby/test/VirtualNetworkPool_spec.rb @@ -1,7 +1,7 @@ $: << '../' require 'OpenNebula' -require 'MockClient' +require 'helpers/MockClient' module OpenNebula diff --git a/src/oca/ruby/test/VirtualNetwork_spec.rb b/src/oca/ruby/test/VirtualNetwork_spec.rb index 0b19f675f9..b74982bf52 100644 --- a/src/oca/ruby/test/VirtualNetwork_spec.rb +++ b/src/oca/ruby/test/VirtualNetwork_spec.rb @@ -1,7 +1,7 @@ $: << '../' require 'OpenNebula' -require 'MockClient' +require 'helpers/MockClient' module OpenNebula diff --git a/src/oca/ruby/test/xml_test/cluster.xml b/src/oca/ruby/test/fixtures/cluster.xml similarity index 100% rename from src/oca/ruby/test/xml_test/cluster.xml rename to src/oca/ruby/test/fixtures/cluster.xml diff --git a/src/oca/ruby/test/xml_test/clusterpool.xml b/src/oca/ruby/test/fixtures/clusterpool.xml similarity index 100% rename from src/oca/ruby/test/xml_test/clusterpool.xml rename to src/oca/ruby/test/fixtures/clusterpool.xml diff --git a/src/oca/ruby/test/xml_test/host.xml b/src/oca/ruby/test/fixtures/host.xml similarity index 100% rename from src/oca/ruby/test/xml_test/host.xml rename to src/oca/ruby/test/fixtures/host.xml diff --git a/src/oca/ruby/test/xml_test/hostpool.xml b/src/oca/ruby/test/fixtures/hostpool.xml similarity index 100% rename from src/oca/ruby/test/xml_test/hostpool.xml rename to src/oca/ruby/test/fixtures/hostpool.xml diff --git a/src/oca/ruby/test/xml_test/user.xml b/src/oca/ruby/test/fixtures/user.xml similarity index 100% rename from src/oca/ruby/test/xml_test/user.xml rename to src/oca/ruby/test/fixtures/user.xml diff --git a/src/oca/ruby/test/xml_test/userpool.xml b/src/oca/ruby/test/fixtures/userpool.xml similarity index 100% rename from src/oca/ruby/test/xml_test/userpool.xml rename to src/oca/ruby/test/fixtures/userpool.xml diff --git a/src/oca/ruby/test/xml_test/vm.xml b/src/oca/ruby/test/fixtures/vm.xml similarity index 100% rename from src/oca/ruby/test/xml_test/vm.xml rename to src/oca/ruby/test/fixtures/vm.xml diff --git a/src/oca/ruby/test/xml_test/vmpool.xml b/src/oca/ruby/test/fixtures/vmpool.xml similarity index 100% rename from src/oca/ruby/test/xml_test/vmpool.xml rename to src/oca/ruby/test/fixtures/vmpool.xml diff --git a/src/oca/ruby/test/xml_test/vnet.xml b/src/oca/ruby/test/fixtures/vnet.xml similarity index 100% rename from src/oca/ruby/test/xml_test/vnet.xml rename to src/oca/ruby/test/fixtures/vnet.xml diff --git a/src/oca/ruby/test/xml_test/vnetpool.xml b/src/oca/ruby/test/fixtures/vnetpool.xml similarity index 100% rename from src/oca/ruby/test/xml_test/vnetpool.xml rename to src/oca/ruby/test/fixtures/vnetpool.xml diff --git a/src/oca/ruby/test/MockClient.rb b/src/oca/ruby/test/helpers/MockClient.rb similarity index 72% rename from src/oca/ruby/test/MockClient.rb rename to src/oca/ruby/test/helpers/MockClient.rb index 4fa7ed7b6d..d119eb552a 100644 --- a/src/oca/ruby/test/MockClient.rb +++ b/src/oca/ruby/test/helpers/MockClient.rb @@ -5,13 +5,13 @@ class MockClient case xmlrpc_action when "one.vn.info" - return File.read("xml_test/vnet.xml") + return File.read("fixtures/vnet.xml") when "one.vn.allocate" return 3 when "one.vn.delete" return nil when "one.vm.info" - return File.read("xml_test/vm.xml") + return File.read("fixtures/vm.xml") when "one.vm.allocate" return 6 when "one.vm.delete" @@ -23,7 +23,7 @@ class MockClient when "one.vm.migrate" return nil when "one.host.info" - return File.read("xml_test/host.xml") + return File.read("fixtures/host.xml") when "one.host.allocate" return 7 when "one.host.delete" @@ -33,13 +33,13 @@ class MockClient when "one.user.allocate" return 3 when "one.user.info" - return File.read("xml_test/user.xml") + return File.read("fixtures/user.xml") when "one.user.delete" return nil when "one.cluster.allocate" return 5 when "one.cluster.info" - return File.read("xml_test/cluster.xml") + return File.read("fixtures/cluster.xml") when "one.cluster.delete" return nil when "one.cluster.addhost" @@ -47,15 +47,15 @@ class MockClient when "one.cluster.removehost" return nil when "one.vnpool.info" - return File.read("xml_test/vnetpool.xml") + return File.read("fixtures/vnetpool.xml") when "one.vmpool.info" - return File.read("xml_test/vmpool.xml") + return File.read("fixtures/vmpool.xml") when "one.hostpool.info" - return File.read("xml_test/hostpool.xml") + return File.read("fixtures/hostpool.xml") when "one.userpool.info" - return File.read("xml_test/userpool.xml") + return File.read("fixtures/userpool.xml") when "one.clusterpool.info" - return File.read("xml_test/clusterpool.xml") + return File.read("fixtures/clusterpool.xml") end end end \ No newline at end of file From 6ab6730a2f26a3ffa289d4e022bf65c83bb748f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tino=20V=C3=A1zquez?= Date: Thu, 16 Sep 2010 12:29:41 +0200 Subject: [PATCH 5/9] Get rid of "-e" debug flag for bash in the remotes shell scripts --- src/vmm_mad/remotes/kvm/cancel | 2 +- src/vmm_mad/remotes/kvm/deploy | 2 +- src/vmm_mad/remotes/kvm/migrate | 2 +- src/vmm_mad/remotes/kvm/poll | 2 +- src/vmm_mad/remotes/kvm/restore | 2 +- src/vmm_mad/remotes/kvm/save | 2 +- src/vmm_mad/remotes/kvm/shutdown | 3 ++- src/vmm_mad/remotes/xen/cancel | 2 +- src/vmm_mad/remotes/xen/deploy | 2 +- src/vmm_mad/remotes/xen/migrate | 2 +- src/vmm_mad/remotes/xen/poll | 2 +- src/vmm_mad/remotes/xen/restore | 2 +- src/vmm_mad/remotes/xen/save | 2 +- src/vmm_mad/remotes/xen/shutdown | 2 +- 14 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/vmm_mad/remotes/kvm/cancel b/src/vmm_mad/remotes/kvm/cancel index ad708bd76a..b879901db7 100755 --- a/src/vmm_mad/remotes/kvm/cancel +++ b/src/vmm_mad/remotes/kvm/cancel @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/bin/bash # -------------------------------------------------------------------------- # # Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) # diff --git a/src/vmm_mad/remotes/kvm/deploy b/src/vmm_mad/remotes/kvm/deploy index b9bd265bbe..b3cdb0d5d6 100755 --- a/src/vmm_mad/remotes/kvm/deploy +++ b/src/vmm_mad/remotes/kvm/deploy @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/bin/bash # -------------------------------------------------------------------------- # # Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) # diff --git a/src/vmm_mad/remotes/kvm/migrate b/src/vmm_mad/remotes/kvm/migrate index b56d8773a5..5d23368648 100755 --- a/src/vmm_mad/remotes/kvm/migrate +++ b/src/vmm_mad/remotes/kvm/migrate @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/bin/bash # -------------------------------------------------------------------------- # # Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) # diff --git a/src/vmm_mad/remotes/kvm/poll b/src/vmm_mad/remotes/kvm/poll index 224edb5d49..54d9ff3e7d 100755 --- a/src/vmm_mad/remotes/kvm/poll +++ b/src/vmm_mad/remotes/kvm/poll @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/bin/bash # -------------------------------------------------------------------------- # # Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) # diff --git a/src/vmm_mad/remotes/kvm/restore b/src/vmm_mad/remotes/kvm/restore index 9a01b73333..655288e276 100755 --- a/src/vmm_mad/remotes/kvm/restore +++ b/src/vmm_mad/remotes/kvm/restore @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/bin/bash # -------------------------------------------------------------------------- # # Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) # diff --git a/src/vmm_mad/remotes/kvm/save b/src/vmm_mad/remotes/kvm/save index efd44274b7..f9bf8888f8 100755 --- a/src/vmm_mad/remotes/kvm/save +++ b/src/vmm_mad/remotes/kvm/save @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/bin/bash # -------------------------------------------------------------------------- # # Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) # diff --git a/src/vmm_mad/remotes/kvm/shutdown b/src/vmm_mad/remotes/kvm/shutdown index 892e9718a8..64aba04296 100755 --- a/src/vmm_mad/remotes/kvm/shutdown +++ b/src/vmm_mad/remotes/kvm/shutdown @@ -1,4 +1,5 @@ -#!/bin/bash +#!/bin/bash + # -------------------------------------------------------------------------- # # Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) # diff --git a/src/vmm_mad/remotes/xen/cancel b/src/vmm_mad/remotes/xen/cancel index 6d6835f435..af411dcee0 100755 --- a/src/vmm_mad/remotes/xen/cancel +++ b/src/vmm_mad/remotes/xen/cancel @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/bin/bash # -------------------------------------------------------------------------- # # Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) # diff --git a/src/vmm_mad/remotes/xen/deploy b/src/vmm_mad/remotes/xen/deploy index 06ef8dce32..c5871d2abc 100755 --- a/src/vmm_mad/remotes/xen/deploy +++ b/src/vmm_mad/remotes/xen/deploy @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/bin/bash # -------------------------------------------------------------------------- # # Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) # diff --git a/src/vmm_mad/remotes/xen/migrate b/src/vmm_mad/remotes/xen/migrate index 0996202b43..3130c37741 100755 --- a/src/vmm_mad/remotes/xen/migrate +++ b/src/vmm_mad/remotes/xen/migrate @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/bin/bash # -------------------------------------------------------------------------- # # Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) # diff --git a/src/vmm_mad/remotes/xen/poll b/src/vmm_mad/remotes/xen/poll index c1f6e3aa64..7c45ddaae3 100755 --- a/src/vmm_mad/remotes/xen/poll +++ b/src/vmm_mad/remotes/xen/poll @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/bin/bash # -------------------------------------------------------------------------- # # Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) # diff --git a/src/vmm_mad/remotes/xen/restore b/src/vmm_mad/remotes/xen/restore index a35c236d8b..0955253b9e 100755 --- a/src/vmm_mad/remotes/xen/restore +++ b/src/vmm_mad/remotes/xen/restore @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/bin/bash # -------------------------------------------------------------------------- # # Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) # diff --git a/src/vmm_mad/remotes/xen/save b/src/vmm_mad/remotes/xen/save index d28422c6bf..33f690b17a 100755 --- a/src/vmm_mad/remotes/xen/save +++ b/src/vmm_mad/remotes/xen/save @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/bin/bash # -------------------------------------------------------------------------- # # Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) # diff --git a/src/vmm_mad/remotes/xen/shutdown b/src/vmm_mad/remotes/xen/shutdown index b90e1dec5e..da368cd502 100755 --- a/src/vmm_mad/remotes/xen/shutdown +++ b/src/vmm_mad/remotes/xen/shutdown @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash # -------------------------------------------------------------------------- # # Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.org) # From 2bf89b9143802b7090d77734e0641e74569a0c98 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Fri, 17 Sep 2010 18:38:38 +0200 Subject: [PATCH 6/9] Added xml output to cppunit tests --- include/test/PoolTest.h | 7 +++++++ include/test/one_test_common.h | 12 ++++++++++++ src/authm/test/AuthManagerTest.cc | 6 ++++++ src/common/test/action_manager.cc | 6 ++++++ src/common/test/mem_collector.cc | 6 ++++++ src/common/test/single_attribute.cc | 6 ++++++ src/common/test/vector_attribute.cc | 6 ++++++ src/pool/test/pool.cc | 6 ++++++ src/scheduler/src/pool/test/HostXMLTest.cc | 7 +++++++ src/scheduler/src/pool/test/VirtualMachineXMLTest.cc | 6 ++++++ src/scheduler/src/xml/test/ObjectXMLTest.cc | 6 ++++++ src/scheduler/src/xml/test/SConstruct | 1 + src/template/test/template.cc | 6 ++++++ 13 files changed, 81 insertions(+) create mode 100644 include/test/one_test_common.h diff --git a/include/test/PoolTest.h b/include/test/PoolTest.h index 25a87bbe18..91a90654cf 100644 --- a/include/test/PoolTest.h +++ b/include/test/PoolTest.h @@ -36,6 +36,8 @@ #include "PoolSQL.h" #include "Nebula.h" +#include "test/one_test_common.h" + // Use this macro in sub-classes to add all the tests defined here #define ALL_POOLTEST_CPPUNIT_TESTS() \ CPPUNIT_TEST (oid_assignment); \ @@ -339,6 +341,9 @@ public: NebulaLog::log("Test", Log::INFO, "Test started"); CppUnit::TextUi::TestRunner runner; + + SETUP_XML_WRITER(runner, "output.xml") + runner.addTest( suite ); if (sqlite_flag) @@ -356,6 +361,8 @@ public: runner.run(); + END_XML_WRITER + if (!log_flag) remove("test.log"); diff --git a/include/test/one_test_common.h b/include/test/one_test_common.h new file mode 100644 index 0000000000..857f2be6c6 --- /dev/null +++ b/include/test/one_test_common.h @@ -0,0 +1,12 @@ + +#include + +#define SETUP_XML_WRITER(runner, output) \ + ofstream outputFile(output); \ + CppUnit::XmlOutputter* outputter = \ + new CppUnit::XmlOutputter(&runner.result(), outputFile); \ + \ + runner.setOutputter(outputter); + +#define END_XML_WRITER outputFile.close(); + diff --git a/src/authm/test/AuthManagerTest.cc b/src/authm/test/AuthManagerTest.cc index 882d8b4a91..452419fa52 100644 --- a/src/authm/test/AuthManagerTest.cc +++ b/src/authm/test/AuthManagerTest.cc @@ -34,6 +34,8 @@ #include #include +#include "test/one_test_common.h" + using namespace std; @@ -291,10 +293,14 @@ int main(int argc, char ** argv) NebulaLog::init_log_system(NebulaLog::FILE, Log::DEBUG,"test.log"); NebulaLog::log("Test", Log::INFO, "Test started"); + SETUP_XML_WRITER(runner, "AuthManagerTest.xml"); + runner.addTest(AuthManagerTest::suite()); runner.run(); + END_XML_WRITER + NebulaLog::finalize_log_system(); return 0; diff --git a/src/common/test/action_manager.cc b/src/common/test/action_manager.cc index 134c30e899..87f71017d9 100644 --- a/src/common/test/action_manager.cc +++ b/src/common/test/action_manager.cc @@ -10,6 +10,8 @@ #include #include +#include "test/one_test_common.h" + using namespace std; extern "C" void * addsub_loop(void *arg); @@ -175,9 +177,13 @@ int main(int argc, char ** argv) { CppUnit::TextUi::TestRunner tr; + + SETUP_XML_WRITER(tr, "action_manager.xml"); tr.addTest(ActionManagerTest::suite()); tr.run(); + END_XML_WRITER + return 0; } diff --git a/src/common/test/mem_collector.cc b/src/common/test/mem_collector.cc index 19397c2031..b7fe391738 100644 --- a/src/common/test/mem_collector.cc +++ b/src/common/test/mem_collector.cc @@ -27,6 +27,8 @@ extern "C" #include #include +#include "test/one_test_common.h" + using namespace std; class MemCollectorTest : public CppUnit::TestFixture @@ -110,8 +112,12 @@ int main(int argc, char ** argv) { CppUnit::TextUi::TestRunner tr; + SETUP_XML_WRITER(tr, "mem_collector.xml"); + tr.addTest(MemCollectorTest::suite()); tr.run(); + END_XML_WRITER + return 0; } diff --git a/src/common/test/single_attribute.cc b/src/common/test/single_attribute.cc index cd9462e0d4..6a02e47914 100644 --- a/src/common/test/single_attribute.cc +++ b/src/common/test/single_attribute.cc @@ -9,6 +9,8 @@ #include #include +#include "test/one_test_common.h" + using namespace std; class SingleAttributeTest : public CppUnit::TestFixture @@ -123,9 +125,13 @@ public: int main(int argc, char ** argv) { CppUnit::TextUi::TestRunner tr; + + SETUP_XML_WRITER(tr, "single_attribute.xml"); tr.addTest(SingleAttributeTest::suite()); tr.run(); + END_XML_WRITER + return 0; } diff --git a/src/common/test/vector_attribute.cc b/src/common/test/vector_attribute.cc index 5c6b3d634d..54b18a3a40 100644 --- a/src/common/test/vector_attribute.cc +++ b/src/common/test/vector_attribute.cc @@ -10,6 +10,8 @@ #include #include +#include "test/one_test_common.h" + using namespace std; class VectorAttributeTest : public CppUnit::TestFixture @@ -156,9 +158,13 @@ int main(int argc, char ** argv) { CppUnit::TextUi::TestRunner tr; + + SETUP_XML_WRITER(tr, "vector_attribute.xml"); tr.addTest(VectorAttributeTest::suite()); tr.run(); + END_XML_WRITER + return 0; } diff --git a/src/pool/test/pool.cc b/src/pool/test/pool.cc index 5b2580ae8b..f12e95cb3f 100644 --- a/src/pool/test/pool.cc +++ b/src/pool/test/pool.cc @@ -32,6 +32,8 @@ #include "MySqlDB.h" #include "SqlDB.h" +#include "test/one_test_common.h" + using namespace std; /* ************************************************************************* */ @@ -287,12 +289,16 @@ int main(int argc, char ** argv) cout << "\nRunning MySQL tests...\n"; } + SETUP_XML_WRITER(runner, "pool.xml") + runner.addTest( PoolTest::suite() ); runner.run(); if (!log_flag) remove("test.log"); + END_XML_WRITER + NebulaLog::finalize_log_system(); return 0; diff --git a/src/scheduler/src/pool/test/HostXMLTest.cc b/src/scheduler/src/pool/test/HostXMLTest.cc index 1fbca65e84..e178097976 100644 --- a/src/scheduler/src/pool/test/HostXMLTest.cc +++ b/src/scheduler/src/pool/test/HostXMLTest.cc @@ -31,6 +31,8 @@ #include "ObjectXML.h" #include "HostPoolXML.h" +#include "test/one_test_common.h" + /* ************************************************************************* */ /* ************************************************************************* */ @@ -263,10 +265,15 @@ int main(int argc, char ** argv) CppUnit::TextUi::TestRunner runner; + SETUP_XML_WRITER(runner, "HostXMLTest.xml") + runner.addTest(HostXMLTest::suite()); runner.run(); + END_XML_WRITER + + // remove("test.log"); NebulaLog::finalize_log_system(); diff --git a/src/scheduler/src/pool/test/VirtualMachineXMLTest.cc b/src/scheduler/src/pool/test/VirtualMachineXMLTest.cc index 9b446e9eeb..aac5f1750b 100644 --- a/src/scheduler/src/pool/test/VirtualMachineXMLTest.cc +++ b/src/scheduler/src/pool/test/VirtualMachineXMLTest.cc @@ -32,6 +32,8 @@ #include "VirtualMachinePoolXML.h" #include "HostPoolXML.h" +#include "test/one_test_common.h" + /* ************************************************************************* */ /* ************************************************************************* */ @@ -317,9 +319,13 @@ int main(int argc, char ** argv) CppUnit::TextUi::TestRunner runner; + SETUP_XML_WRITER(runner, "VirtualMachineXMLTest.xml") + runner.addTest(VirtualMachineXMLTest::suite()); runner.run(); + END_XML_WRITER + remove("test.log"); NebulaLog::finalize_log_system(); diff --git a/src/scheduler/src/xml/test/ObjectXMLTest.cc b/src/scheduler/src/xml/test/ObjectXMLTest.cc index 8a3ef1b809..6652e0e765 100644 --- a/src/scheduler/src/xml/test/ObjectXMLTest.cc +++ b/src/scheduler/src/xml/test/ObjectXMLTest.cc @@ -30,6 +30,8 @@ #include "ObjectXML.h" +#include "test/one_test_common.h" + /* ************************************************************************* */ /* ************************************************************************* */ @@ -331,9 +333,13 @@ int main(int argc, char ** argv) { CppUnit::TextUi::TestRunner runner; + SETUP_XML_WRITER(runner, "ObjectXMLTest.xml"); + runner.addTest(ObjectXMLTest::suite()); runner.run(); + END_XML_WRITER + return 0; } diff --git a/src/scheduler/src/xml/test/SConstruct b/src/scheduler/src/xml/test/SConstruct index f17f7e4cf6..d750c4e7c5 100644 --- a/src/scheduler/src/xml/test/SConstruct +++ b/src/scheduler/src/xml/test/SConstruct @@ -29,6 +29,7 @@ main_env['ENV']['PATH']=os.environ['PATH'] # Include dirs main_env.Append(CPPPATH=[ cwd+'/../../../include', + cwd+'/../../../../../include', '/usr/include/cppunit/' ]) diff --git a/src/template/test/template.cc b/src/template/test/template.cc index dfdd060a18..87e4084362 100644 --- a/src/template/test/template.cc +++ b/src/template/test/template.cc @@ -9,6 +9,8 @@ #include #include +#include "test/one_test_common.h" + using namespace std; /* ************************************************************************* */ @@ -400,8 +402,12 @@ int main(int argc, char ** argv) { CppUnit::TextUi::TestRunner tr; + SETUP_XML_WRITER(tr, "template.xml") + tr.addTest(TemplateTest::suite()); tr.run(); + END_XML_WRITER + return 0; } From de97b5d24904e1696c2eea1a97177bbb32e87c12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tino=20V=C3=A1zquez?= Date: Mon, 20 Sep 2010 17:51:55 +0200 Subject: [PATCH 7/9] Remove EH installation from the core distribution See http://dev.opennebula.org/projects/elastichosts in order to get the ElasticHosts drivers. --- install.sh | 40 +++----- src/im_mad/eh/im_eh.conf | 7 -- src/im_mad/eh/im_ehrc | 16 ---- src/im_mad/eh/one_im_eh | 42 --------- src/im_mad/eh/one_im_eh.rb | 61 ------------ src/vmm_mad/eh/one_vmm_eh | 38 -------- src/vmm_mad/eh/one_vmm_eh.rb | 178 ----------------------------------- src/vmm_mad/eh/vmm_eh.conf | 1 - src/vmm_mad/eh/vmm_ehrc | 25 ----- 9 files changed, 12 insertions(+), 396 deletions(-) delete mode 100644 src/im_mad/eh/im_eh.conf delete mode 100644 src/im_mad/eh/im_ehrc delete mode 100644 src/im_mad/eh/one_im_eh delete mode 100644 src/im_mad/eh/one_im_eh.rb delete mode 100644 src/vmm_mad/eh/one_vmm_eh delete mode 100644 src/vmm_mad/eh/one_vmm_eh.rb delete mode 100644 src/vmm_mad/eh/vmm_eh.conf delete mode 100644 src/vmm_mad/eh/vmm_ehrc diff --git a/install.sh b/install.sh index 782168eaff..7da1b48534 100755 --- a/install.sh +++ b/install.sh @@ -150,9 +150,7 @@ SHARE_DIRS="$SHARE_LOCATION/examples \ ETC_DIRS="$ETC_LOCATION/im_kvm \ $ETC_LOCATION/im_xen \ $ETC_LOCATION/im_ec2 \ - $ETC_LOCATION/im_eh \ $ETC_LOCATION/vmm_ec2 \ - $ETC_LOCATION/vmm_eh \ $ETC_LOCATION/vmm_sh \ $ETC_LOCATION/tm_nfs \ $ETC_LOCATION/tm_ssh \ @@ -242,20 +240,18 @@ INSTALL_OCCI_CLIENT_FILES[2]="OCCI_BIN_CLIENT_FILES:$BIN_LOCATION" INSTALL_ETC_FILES[0]="ETC_FILES:$ETC_LOCATION" INSTALL_ETC_FILES[1]="VMM_EC2_ETC_FILES:$ETC_LOCATION/vmm_ec2" -INSTALL_ETC_FILES[2]="VMM_EH_ETC_FILES:$ETC_LOCATION/vmm_eh" -INSTALL_ETC_FILES[3]="VMM_SH_ETC_FILES:$ETC_LOCATION/vmm_sh" -INSTALL_ETC_FILES[4]="IM_EC2_ETC_FILES:$ETC_LOCATION/im_ec2" -INSTALL_ETC_FILES[5]="IM_EH_ETC_FILES:$ETC_LOCATION/im_eh" -INSTALL_ETC_FILES[6]="TM_NFS_ETC_FILES:$ETC_LOCATION/tm_nfs" -INSTALL_ETC_FILES[7]="TM_SSH_ETC_FILES:$ETC_LOCATION/tm_ssh" -INSTALL_ETC_FILES[8]="TM_DUMMY_ETC_FILES:$ETC_LOCATION/tm_dummy" -INSTALL_ETC_FILES[9]="TM_LVM_ETC_FILES:$ETC_LOCATION/tm_lvm" -INSTALL_ETC_FILES[10]="HM_ETC_FILES:$ETC_LOCATION/hm" -INSTALL_ETC_FILES[11]="AUTH_ETC_FILES:$ETC_LOCATION/auth" -INSTALL_ETC_FILES[14]="ECO_ETC_FILES:$ETC_LOCATION" -INSTALL_ETC_FILES[15]="ECO_ETC_TEMPLATE_FILES:$ETC_LOCATION/ec2query_templates" -INSTALL_ETC_FILES[16]="OCCI_ETC_FILES:$ETC_LOCATION" -INSTALL_ETC_FILES[17]="OCCI_ETC_TEMPLATE_FILES:$ETC_LOCATION/occi_templates" +INSTALL_ETC_FILES[2]="VMM_SH_ETC_FILES:$ETC_LOCATION/vmm_sh" +INSTALL_ETC_FILES[3]="IM_EC2_ETC_FILES:$ETC_LOCATION/im_ec2" +INSTALL_ETC_FILES[4]="TM_NFS_ETC_FILES:$ETC_LOCATION/tm_nfs" +INSTALL_ETC_FILES[5]="TM_SSH_ETC_FILES:$ETC_LOCATION/tm_ssh" +INSTALL_ETC_FILES[6]="TM_DUMMY_ETC_FILES:$ETC_LOCATION/tm_dummy" +INSTALL_ETC_FILES[7]="TM_LVM_ETC_FILES:$ETC_LOCATION/tm_lvm" +INSTALL_ETC_FILES[8]="HM_ETC_FILES:$ETC_LOCATION/hm" +INSTALL_ETC_FILES[9]="AUTH_ETC_FILES:$ETC_LOCATION/auth" +INSTALL_ETC_FILES[10]="ECO_ETC_FILES:$ETC_LOCATION" +INSTALL_ETC_FILES[11]="ECO_ETC_TEMPLATE_FILES:$ETC_LOCATION/ec2query_templates" +INSTALL_ETC_FILES[12]="OCCI_ETC_FILES:$ETC_LOCATION" +INSTALL_ETC_FILES[13]="OCCI_ETC_TEMPLATE_FILES:$ETC_LOCATION/occi_templates" #------------------------------------------------------------------------------- # Binary files, to be installed under $BIN_LOCATION @@ -325,16 +321,12 @@ MADS_LIB_FILES="src/mad/sh/madcommon.sh \ src/vmm_mad/sh/one_vmm_sh \ src/vmm_mad/ec2/one_vmm_ec2.rb \ src/vmm_mad/ec2/one_vmm_ec2 \ - src/vmm_mad/eh/one_vmm_eh.rb \ - src/vmm_mad/eh/one_vmm_eh \ src/vmm_mad/dummy/one_vmm_dummy.rb \ src/vmm_mad/dummy/one_vmm_dummy \ src/im_mad/im_ssh/one_im_ssh.rb \ src/im_mad/im_ssh/one_im_ssh \ src/im_mad/ec2/one_im_ec2.rb \ src/im_mad/ec2/one_im_ec2 \ - src/im_mad/eh/one_im_eh.rb \ - src/im_mad/eh/one_im_eh \ src/im_mad/dummy/one_im_dummy.rb \ src/im_mad/dummy/one_im_dummy \ src/tm_mad/one_tm \ @@ -429,21 +421,16 @@ ETC_FILES="share/etc/oned.conf \ #------------------------------------------------------------------------------- # Virtualization drivers config. files, to be installed under $ETC_LOCATION # - ec2, $ETC_LOCATION/vmm_ec2 -# - eh, $ETC_LOCATION/vmm_eh # - sh, $ETC_LOCATION/vmm_sh #------------------------------------------------------------------------------- VMM_EC2_ETC_FILES="src/vmm_mad/ec2/vmm_ec2rc \ src/vmm_mad/ec2/vmm_ec2.conf" -VMM_EH_ETC_FILES="src/vmm_mad/eh/vmm_ehrc \ - src/vmm_mad/eh/vmm_eh.conf" - VMM_SH_ETC_FILES="src/vmm_mad/sh/vmm_shrc \ src/vmm_mad/sh/vmm_sh_kvm.conf \ src/vmm_mad/sh/vmm_sh_xen.conf" - #------------------------------------------------------------------------------- # Information drivers config. files, to be installed under $ETC_LOCATION # - ec2, $ETC_LOCATION/im_ec2 @@ -452,9 +439,6 @@ VMM_SH_ETC_FILES="src/vmm_mad/sh/vmm_shrc \ IM_EC2_ETC_FILES="src/im_mad/ec2/im_ec2rc \ src/im_mad/ec2/im_ec2.conf" -IM_EH_ETC_FILES="src/im_mad/eh/im_ehrc \ - src/im_mad/eh/im_eh.conf" - #------------------------------------------------------------------------------- # Storage drivers config. files, to be installed under $ETC_LOCATION # - nfs, $ETC_LOCATION/tm_nfs diff --git a/src/im_mad/eh/im_eh.conf b/src/im_mad/eh/im_eh.conf deleted file mode 100644 index e122c1a79d..0000000000 --- a/src/im_mad/eh/im_eh.conf +++ /dev/null @@ -1,7 +0,0 @@ -# Max memory that can be provided by ElasticHosts -# These defaults allows for two machines with MEMORY=1024 and using 1 CPU - -TOTAL_MEMORY=2048 -TOTAL_CPU=2 - - diff --git a/src/im_mad/eh/im_ehrc b/src/im_mad/eh/im_ehrc deleted file mode 100644 index e740161f09..0000000000 --- a/src/im_mad/eh/im_ehrc +++ /dev/null @@ -1,16 +0,0 @@ -# -------------------------------------------------------------------------- # -# Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.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. # -#--------------------------------------------------------------------------- # - diff --git a/src/im_mad/eh/one_im_eh b/src/im_mad/eh/one_im_eh deleted file mode 100644 index 2c64a8c67f..0000000000 --- a/src/im_mad/eh/one_im_eh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# -------------------------------------------------------------------------- # -# Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.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. # -#--------------------------------------------------------------------------- # - -if [ -z "${ONE_LOCATION}" ]; then - EHRC=/etc/one/im_eh/im_ehrc - EHCONF=/etc/one/im_eh/im_eh.conf - MADCOMMON=/usr/lib/one/mads/madcommon.sh - VAR_LOCATION=/var/lib/one -else - EHRC=$ONE_LOCATION/etc/im_eh/im_ehrc - EHCONF=$ONE_LOCATION/etc/im_eh/im_eh.conf - MADCOMMON=$ONE_LOCATION/lib/mads/madcommon.sh - VAR_LOCATION=$ONE_LOCATION/var -fi - -. $MADCOMMON - -# Export the vmm_mad specific rc -export_rc_vars $EHRC - -# Export max instance type usages -export_rc_vars $EHCONF - -# Go to var directory ONE_LOCATION/var or /var/lib/one -cd $VAR_LOCATION - -# Execute the actual MAD -execute_mad $* diff --git a/src/im_mad/eh/one_im_eh.rb b/src/im_mad/eh/one_im_eh.rb deleted file mode 100644 index d6eeb98168..0000000000 --- a/src/im_mad/eh/one_im_eh.rb +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env ruby - -# -------------------------------------------------------------------------- # -# Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.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. # -#--------------------------------------------------------------------------- # - -ONE_LOCATION=ENV["ONE_LOCATION"] - -if !ONE_LOCATION - RUBY_LIB_LOCATION="/usr/lib/one/ruby" -else - RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby" -end - -$: << RUBY_LIB_LOCATION - -require 'pp' -require 'one_mad' - -################ -# EC2 IM MAD # -################ - -class IM < ONEMad - - def initialize(sensors=nil) - super(3, 4) - end - - def action_init(args) - STDOUT.puts "INIT SUCCESS" - STDOUT.flush - end - - def action_monitor(args) - - totalmemory = ENV["TOTAL_MEMORY"].to_i - totalcpu = 100 * ENV["TOTAL_CPU"].to_i - - - STDOUT.puts "MONITOR SUCCESS " + args[1].to_s + - "HOSTNAME=#{args[2]},TOTALMEMORY=#{totalmemory},TOTALCPU=#{totalcpu},CPUSPEED=1000,FREEMEMORY=#{totalmemory},FREECPU=#{totalcpu}" - STDOUT.flush - end - -end - -im=IM.new(nil) -im.loop diff --git a/src/vmm_mad/eh/one_vmm_eh b/src/vmm_mad/eh/one_vmm_eh deleted file mode 100644 index 3bfabb0261..0000000000 --- a/src/vmm_mad/eh/one_vmm_eh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash - -# -------------------------------------------------------------------------- # -# Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.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. # -#--------------------------------------------------------------------------- # - -if [ -z "${ONE_LOCATION}" ]; then - DRIVERRC=/etc/one/vmm_eh/vmm_ehrc - MADCOMMON=/usr/lib/one/mads/madcommon.sh - VAR_LOCATION=/var/lib/one -else - DRIVERRC=$ONE_LOCATION/etc/vmm_eh/vmm_ehrc - MADCOMMON=$ONE_LOCATION/lib/mads/madcommon.sh - VAR_LOCATION=$ONE_LOCATION/var -fi - -. $MADCOMMON - -# Export the vmm_mad specific rc -export_rc_vars $DRIVERRC - -# Go to ONE_LOCATION -cd $VAR_LOCATION - -# Execute the actual MAD -execute_mad $* diff --git a/src/vmm_mad/eh/one_vmm_eh.rb b/src/vmm_mad/eh/one_vmm_eh.rb deleted file mode 100644 index 89f0b6038c..0000000000 --- a/src/vmm_mad/eh/one_vmm_eh.rb +++ /dev/null @@ -1,178 +0,0 @@ -#!/usr/bin/env ruby -# -------------------------------------------------------------------------- # -# Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.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. # -#--------------------------------------------------------------------------- # - -EHAUTH = ENV["EHAUTH"] - -if !EHAUTH - puts "EHAUTH not set" - exit -1 -end - -ONE_LOCATION=ENV["ONE_LOCATION"] - -if !ONE_LOCATION - RUBY_LIB_LOCATION="/usr/lib/one/ruby" -else - RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby" -end - -$: << RUBY_LIB_LOCATION - -require 'pp' -require 'one_mad' -require 'open3' - -class DM < ONEMad - - def initialize - super(5, 4) - end - - def action_init(args) - - send_message("INIT", "SUCCESS") - - end - - def action_deploy(args) - - action_number=args[1] - action_host=args[2] - remote_deployment_file=args[3] - - # Get local deployment file - local_deployment_file=get_local_deployment_file(remote_deployment_file) - - std_action("DEPLOY", "elastichosts -f #{local_deployment_file} servers create", args) - - end - - def action_shutdown(args) - - std_action("SHUTDOWN", "elastichosts servers #{args[3]} shutdown", args) - - end - - def action_cancel(args) - - std_action("SHUTDOWN", "elastichosts servers #{args[3]} destroy", args) - - end - - def action_checkpoint(args) - - send_message("CHECKPOINT", "FAILURE", args[1], "action not supported for ElasticHost") - - end - - def action_save(args) - - send_message("SAVE", "FAILURE", args[1], "action not supported for ElasticHost") - - end - - def action_restore(args) - - send_message("RESTORE", "FAILURE", args[1], "action not supported for ElasticHost") - - end - - def action_poll(args) - - std = Open3.popen3("elastichosts servers #{args[3]} info; echo ExitCode: $? 1>&2") - - stdout=std[1].read - stderr=std[2].read - - exit_code=get_exit_code(stderr) - - tx=0 - rx=0 - - if exit_code=="0" - stdout.each_line{|line| - cols=line.split(" ") - case cols[0] - when "rx" - rx=cols[1] - when "tx" - tx=cols[1] - end - } - - end - - send_message("POLL", "SUCCESS", args[1],"USEDCPU=0.0 NETTX=#{tx} NETRX=#{rx} USEDMEMORY=0") - - end - - ########################### - # Common action functions # - ########################### - - def std_action(action, command, args) - - std= Open3.popen3("#{command} ; echo ExitCode: $? 1>&2") - - stdout=std[1].read - stderr=std[2].read - - exit_code=get_exit_code(stderr) - - if exit_code=="0" - domain_name=args[3] - if action=="DEPLOY" - remote_deployment_file=args[3] - - # Get local deployment file - local_deployment_file=get_local_deployment_file(remote_deployment_file) - - domain_name = stdout - end - send_message(action, "SUCCESS", args[1], domain_name) - else - error_message=get_error_message(stderr) - send_message(action, "FAILURE", args[1], error_message) - end - - end - - ######################################### - # Get information form xm create output # - ######################################### - - # From STDERR if exit code == 1 - def get_exit_code(str) - tmp=str.scan(/^ExitCode:.*$/)[0] - if tmp - return tmp.split(' ')[1] - else - return -1 - end - end - - # From STDERR if exit code == 1 - def get_error_message(str) - tmp=str.split(/\n/) - return "Unknown error" if !tmp[0] - tmp[0] - end - -end - -dm=DM.new -dm.loop diff --git a/src/vmm_mad/eh/vmm_eh.conf b/src/vmm_mad/eh/vmm_eh.conf deleted file mode 100644 index 22ec225dc7..0000000000 --- a/src/vmm_mad/eh/vmm_eh.conf +++ /dev/null @@ -1 +0,0 @@ -# Default configuration attributes for the ElasticHost driver diff --git a/src/vmm_mad/eh/vmm_ehrc b/src/vmm_mad/eh/vmm_ehrc deleted file mode 100644 index e47129a2db..0000000000 --- a/src/vmm_mad/eh/vmm_ehrc +++ /dev/null @@ -1,25 +0,0 @@ -# -------------------------------------------------------------------------- # -# Copyright 2002-2010, OpenNebula Project Leads (OpenNebula.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. # -#--------------------------------------------------------------------------- ## - -# May be needed in some setups -# CLASSPATH="" - -# -# Note: elastichosts command line script (download it here http://www.elastichosts.com/downloads/elastichosts) -# MUST be in the PATH -# - -EHAUTH=":" From ba4106e1d15a72a2d72b9add0fe1d3f747e6fcb6 Mon Sep 17 00:00:00 2001 From: Jaime Melis Date: Mon, 27 Sep 2010 14:01:31 +0200 Subject: [PATCH 8/9] Rename ShDriver to SshDriver. Fixed install.sh --- install.sh | 16 ++++++++-------- share/etc/oned.conf | 8 ++++---- src/vmm_mad/{sh/one_vmm_sh => ssh/one_vmm_ssh} | 4 ++-- .../{sh/one_vmm_sh.rb => ssh/one_vmm_ssh.rb} | 10 +++++----- .../{sh/vmm_sh_kvm.conf => ssh/vmm_ssh_kvm.conf} | 0 .../{sh/vmm_sh_xen.conf => ssh/vmm_ssh_xen.conf} | 0 src/vmm_mad/{sh/vmm_shrc => ssh/vmm_sshrc} | 0 7 files changed, 19 insertions(+), 19 deletions(-) rename src/vmm_mad/{sh/one_vmm_sh => ssh/one_vmm_ssh} (94%) rename src/vmm_mad/{sh/one_vmm_sh.rb => ssh/one_vmm_ssh.rb} (96%) rename src/vmm_mad/{sh/vmm_sh_kvm.conf => ssh/vmm_ssh_kvm.conf} (100%) rename src/vmm_mad/{sh/vmm_sh_xen.conf => ssh/vmm_ssh_xen.conf} (100%) rename src/vmm_mad/{sh/vmm_shrc => ssh/vmm_sshrc} (100%) diff --git a/install.sh b/install.sh index 7da1b48534..0990de9f96 100755 --- a/install.sh +++ b/install.sh @@ -151,7 +151,7 @@ ETC_DIRS="$ETC_LOCATION/im_kvm \ $ETC_LOCATION/im_xen \ $ETC_LOCATION/im_ec2 \ $ETC_LOCATION/vmm_ec2 \ - $ETC_LOCATION/vmm_sh \ + $ETC_LOCATION/vmm_ssh \ $ETC_LOCATION/tm_nfs \ $ETC_LOCATION/tm_ssh \ $ETC_LOCATION/tm_dummy \ @@ -240,7 +240,7 @@ INSTALL_OCCI_CLIENT_FILES[2]="OCCI_BIN_CLIENT_FILES:$BIN_LOCATION" INSTALL_ETC_FILES[0]="ETC_FILES:$ETC_LOCATION" INSTALL_ETC_FILES[1]="VMM_EC2_ETC_FILES:$ETC_LOCATION/vmm_ec2" -INSTALL_ETC_FILES[2]="VMM_SH_ETC_FILES:$ETC_LOCATION/vmm_sh" +INSTALL_ETC_FILES[2]="VMM_SH_ETC_FILES:$ETC_LOCATION/vmm_ssh" INSTALL_ETC_FILES[3]="IM_EC2_ETC_FILES:$ETC_LOCATION/im_ec2" INSTALL_ETC_FILES[4]="TM_NFS_ETC_FILES:$ETC_LOCATION/tm_nfs" INSTALL_ETC_FILES[5]="TM_SSH_ETC_FILES:$ETC_LOCATION/tm_ssh" @@ -317,8 +317,8 @@ RUBY_OPENNEBULA_LIB_FILES="src/oca/ruby/OpenNebula/Host.rb \ MADS_LIB_FILES="src/mad/sh/madcommon.sh \ src/tm_mad/tm_common.sh \ - src/vmm_mad/sh/one_vmm_sh.rb \ - src/vmm_mad/sh/one_vmm_sh \ + src/vmm_mad/ssh/one_vmm_ssh.rb \ + src/vmm_mad/ssh/one_vmm_ssh \ src/vmm_mad/ec2/one_vmm_ec2.rb \ src/vmm_mad/ec2/one_vmm_ec2 \ src/vmm_mad/dummy/one_vmm_dummy.rb \ @@ -421,15 +421,15 @@ ETC_FILES="share/etc/oned.conf \ #------------------------------------------------------------------------------- # Virtualization drivers config. files, to be installed under $ETC_LOCATION # - ec2, $ETC_LOCATION/vmm_ec2 -# - sh, $ETC_LOCATION/vmm_sh +# - ssh, $ETC_LOCATION/vmm_ssh #------------------------------------------------------------------------------- VMM_EC2_ETC_FILES="src/vmm_mad/ec2/vmm_ec2rc \ src/vmm_mad/ec2/vmm_ec2.conf" -VMM_SH_ETC_FILES="src/vmm_mad/sh/vmm_shrc \ - src/vmm_mad/sh/vmm_sh_kvm.conf \ - src/vmm_mad/sh/vmm_sh_xen.conf" +VMM_SH_ETC_FILES="src/vmm_mad/ssh/vmm_sshrc \ + src/vmm_mad/ssh/vmm_ssh_kvm.conf \ + src/vmm_mad/ssh/vmm_ssh_xen.conf" #------------------------------------------------------------------------------- # Information drivers config. files, to be installed under $ETC_LOCATION diff --git a/share/etc/oned.conf b/share/etc/oned.conf index b304e57189..81ab5670cf 100644 --- a/share/etc/oned.conf +++ b/share/etc/oned.conf @@ -164,9 +164,9 @@ IM_MAD = [ #------------------------------------------------------------------------------- VM_MAD = [ name = "vmm_kvm", - executable = "one_vmm_sh", + executable = "one_vmm_ssh", arguments = "kvm", - default = "vmm_sh/vmm_sh_kvm.conf", + default = "vmm_ssh/vmm_ssh_kvm.conf", type = "kvm" ] #------------------------------------------------------------------------------- @@ -175,9 +175,9 @@ VM_MAD = [ #------------------------------------------------------------------------------- #VM_MAD = [ # name = "vmm_xen", -# executable = "one_vmm_sh", +# executable = "one_vmm_ssh", # arguments = "xen", -# default = "vmm_sh/vmm_sh_xen.conf", +# default = "vmm_ssh/vmm_ssh_xen.conf", # type = "xen" ] #------------------------------------------------------------------------------- diff --git a/src/vmm_mad/sh/one_vmm_sh b/src/vmm_mad/ssh/one_vmm_ssh similarity index 94% rename from src/vmm_mad/sh/one_vmm_sh rename to src/vmm_mad/ssh/one_vmm_ssh index 1d278edc84..35a503ae63 100755 --- a/src/vmm_mad/sh/one_vmm_sh +++ b/src/vmm_mad/ssh/one_vmm_ssh @@ -17,11 +17,11 @@ #--------------------------------------------------------------------------- # if [ -z "${ONE_LOCATION}" ]; then - DRIVERRC=/etc/one/vmm_sh/vmm_shrc + DRIVERRC=/etc/one/vmm_ssh/vmm_sshrc MADCOMMON=/usr/lib/one/mads/madcommon.sh VAR_LOCATION=/var/lib/one else - DRIVERRC=$ONE_LOCATION/etc/vmm_sh/vmm_shrc + DRIVERRC=$ONE_LOCATION/etc/vmm_ssh/vmm_sshrc MADCOMMON=$ONE_LOCATION/lib/mads/madcommon.sh VAR_LOCATION=$ONE_LOCATION/var fi diff --git a/src/vmm_mad/sh/one_vmm_sh.rb b/src/vmm_mad/ssh/one_vmm_ssh.rb similarity index 96% rename from src/vmm_mad/sh/one_vmm_sh.rb rename to src/vmm_mad/ssh/one_vmm_ssh.rb index 60d39800e9..ed37db0fee 100755 --- a/src/vmm_mad/sh/one_vmm_sh.rb +++ b/src/vmm_mad/ssh/one_vmm_ssh.rb @@ -37,9 +37,9 @@ require "VirtualMachineDriver" # ---------------------------------------------------------------------------- # # The main class for the Sh driver # # ---------------------------------------------------------------------------- # -class ShDriver < VirtualMachineDriver +class SshDriver < VirtualMachineDriver # ------------------------------------------------------------------------ # - # ShDriver constructor # + # SshDriver constructor # # ------------------------------------------------------------------------ # def initialize(hypervisor) super(15,true) @@ -120,9 +120,9 @@ class ShDriver < VirtualMachineDriver end # ---------------------------------------------------------------------------- # -# ShDriver Main program +# SshDriver Main program # ---------------------------------------------------------------------------- # hypervisor = ARGV[0] -sh_driver = ShDriver.new(hypervisor) -sh_driver.start_driver +ssh_driver = SshDriver.new(hypervisor) +ssh_driver.start_driver diff --git a/src/vmm_mad/sh/vmm_sh_kvm.conf b/src/vmm_mad/ssh/vmm_ssh_kvm.conf similarity index 100% rename from src/vmm_mad/sh/vmm_sh_kvm.conf rename to src/vmm_mad/ssh/vmm_ssh_kvm.conf diff --git a/src/vmm_mad/sh/vmm_sh_xen.conf b/src/vmm_mad/ssh/vmm_ssh_xen.conf similarity index 100% rename from src/vmm_mad/sh/vmm_sh_xen.conf rename to src/vmm_mad/ssh/vmm_ssh_xen.conf diff --git a/src/vmm_mad/sh/vmm_shrc b/src/vmm_mad/ssh/vmm_sshrc similarity index 100% rename from src/vmm_mad/sh/vmm_shrc rename to src/vmm_mad/ssh/vmm_sshrc From 7095f3c7b7a0b69565392ce8db230a10470d4fbd Mon Sep 17 00:00:00 2001 From: Jaime Melis Date: Mon, 27 Sep 2010 16:46:47 +0200 Subject: [PATCH 9/9] Revert "Rename ShDriver to SshDriver. Fixed install.sh" This reverts commit ba4106e1d15a72a2d72b9add0fe1d3f747e6fcb6. --- install.sh | 16 ++++++++-------- share/etc/oned.conf | 8 ++++---- src/vmm_mad/{ssh/one_vmm_ssh => sh/one_vmm_sh} | 4 ++-- .../{ssh/one_vmm_ssh.rb => sh/one_vmm_sh.rb} | 10 +++++----- .../{ssh/vmm_ssh_kvm.conf => sh/vmm_sh_kvm.conf} | 0 .../{ssh/vmm_ssh_xen.conf => sh/vmm_sh_xen.conf} | 0 src/vmm_mad/{ssh/vmm_sshrc => sh/vmm_shrc} | 0 7 files changed, 19 insertions(+), 19 deletions(-) rename src/vmm_mad/{ssh/one_vmm_ssh => sh/one_vmm_sh} (94%) rename src/vmm_mad/{ssh/one_vmm_ssh.rb => sh/one_vmm_sh.rb} (96%) rename src/vmm_mad/{ssh/vmm_ssh_kvm.conf => sh/vmm_sh_kvm.conf} (100%) rename src/vmm_mad/{ssh/vmm_ssh_xen.conf => sh/vmm_sh_xen.conf} (100%) rename src/vmm_mad/{ssh/vmm_sshrc => sh/vmm_shrc} (100%) diff --git a/install.sh b/install.sh index 0990de9f96..7da1b48534 100755 --- a/install.sh +++ b/install.sh @@ -151,7 +151,7 @@ ETC_DIRS="$ETC_LOCATION/im_kvm \ $ETC_LOCATION/im_xen \ $ETC_LOCATION/im_ec2 \ $ETC_LOCATION/vmm_ec2 \ - $ETC_LOCATION/vmm_ssh \ + $ETC_LOCATION/vmm_sh \ $ETC_LOCATION/tm_nfs \ $ETC_LOCATION/tm_ssh \ $ETC_LOCATION/tm_dummy \ @@ -240,7 +240,7 @@ INSTALL_OCCI_CLIENT_FILES[2]="OCCI_BIN_CLIENT_FILES:$BIN_LOCATION" INSTALL_ETC_FILES[0]="ETC_FILES:$ETC_LOCATION" INSTALL_ETC_FILES[1]="VMM_EC2_ETC_FILES:$ETC_LOCATION/vmm_ec2" -INSTALL_ETC_FILES[2]="VMM_SH_ETC_FILES:$ETC_LOCATION/vmm_ssh" +INSTALL_ETC_FILES[2]="VMM_SH_ETC_FILES:$ETC_LOCATION/vmm_sh" INSTALL_ETC_FILES[3]="IM_EC2_ETC_FILES:$ETC_LOCATION/im_ec2" INSTALL_ETC_FILES[4]="TM_NFS_ETC_FILES:$ETC_LOCATION/tm_nfs" INSTALL_ETC_FILES[5]="TM_SSH_ETC_FILES:$ETC_LOCATION/tm_ssh" @@ -317,8 +317,8 @@ RUBY_OPENNEBULA_LIB_FILES="src/oca/ruby/OpenNebula/Host.rb \ MADS_LIB_FILES="src/mad/sh/madcommon.sh \ src/tm_mad/tm_common.sh \ - src/vmm_mad/ssh/one_vmm_ssh.rb \ - src/vmm_mad/ssh/one_vmm_ssh \ + src/vmm_mad/sh/one_vmm_sh.rb \ + src/vmm_mad/sh/one_vmm_sh \ src/vmm_mad/ec2/one_vmm_ec2.rb \ src/vmm_mad/ec2/one_vmm_ec2 \ src/vmm_mad/dummy/one_vmm_dummy.rb \ @@ -421,15 +421,15 @@ ETC_FILES="share/etc/oned.conf \ #------------------------------------------------------------------------------- # Virtualization drivers config. files, to be installed under $ETC_LOCATION # - ec2, $ETC_LOCATION/vmm_ec2 -# - ssh, $ETC_LOCATION/vmm_ssh +# - sh, $ETC_LOCATION/vmm_sh #------------------------------------------------------------------------------- VMM_EC2_ETC_FILES="src/vmm_mad/ec2/vmm_ec2rc \ src/vmm_mad/ec2/vmm_ec2.conf" -VMM_SH_ETC_FILES="src/vmm_mad/ssh/vmm_sshrc \ - src/vmm_mad/ssh/vmm_ssh_kvm.conf \ - src/vmm_mad/ssh/vmm_ssh_xen.conf" +VMM_SH_ETC_FILES="src/vmm_mad/sh/vmm_shrc \ + src/vmm_mad/sh/vmm_sh_kvm.conf \ + src/vmm_mad/sh/vmm_sh_xen.conf" #------------------------------------------------------------------------------- # Information drivers config. files, to be installed under $ETC_LOCATION diff --git a/share/etc/oned.conf b/share/etc/oned.conf index 81ab5670cf..b304e57189 100644 --- a/share/etc/oned.conf +++ b/share/etc/oned.conf @@ -164,9 +164,9 @@ IM_MAD = [ #------------------------------------------------------------------------------- VM_MAD = [ name = "vmm_kvm", - executable = "one_vmm_ssh", + executable = "one_vmm_sh", arguments = "kvm", - default = "vmm_ssh/vmm_ssh_kvm.conf", + default = "vmm_sh/vmm_sh_kvm.conf", type = "kvm" ] #------------------------------------------------------------------------------- @@ -175,9 +175,9 @@ VM_MAD = [ #------------------------------------------------------------------------------- #VM_MAD = [ # name = "vmm_xen", -# executable = "one_vmm_ssh", +# executable = "one_vmm_sh", # arguments = "xen", -# default = "vmm_ssh/vmm_ssh_xen.conf", +# default = "vmm_sh/vmm_sh_xen.conf", # type = "xen" ] #------------------------------------------------------------------------------- diff --git a/src/vmm_mad/ssh/one_vmm_ssh b/src/vmm_mad/sh/one_vmm_sh similarity index 94% rename from src/vmm_mad/ssh/one_vmm_ssh rename to src/vmm_mad/sh/one_vmm_sh index 35a503ae63..1d278edc84 100755 --- a/src/vmm_mad/ssh/one_vmm_ssh +++ b/src/vmm_mad/sh/one_vmm_sh @@ -17,11 +17,11 @@ #--------------------------------------------------------------------------- # if [ -z "${ONE_LOCATION}" ]; then - DRIVERRC=/etc/one/vmm_ssh/vmm_sshrc + DRIVERRC=/etc/one/vmm_sh/vmm_shrc MADCOMMON=/usr/lib/one/mads/madcommon.sh VAR_LOCATION=/var/lib/one else - DRIVERRC=$ONE_LOCATION/etc/vmm_ssh/vmm_sshrc + DRIVERRC=$ONE_LOCATION/etc/vmm_sh/vmm_shrc MADCOMMON=$ONE_LOCATION/lib/mads/madcommon.sh VAR_LOCATION=$ONE_LOCATION/var fi diff --git a/src/vmm_mad/ssh/one_vmm_ssh.rb b/src/vmm_mad/sh/one_vmm_sh.rb similarity index 96% rename from src/vmm_mad/ssh/one_vmm_ssh.rb rename to src/vmm_mad/sh/one_vmm_sh.rb index ed37db0fee..60d39800e9 100755 --- a/src/vmm_mad/ssh/one_vmm_ssh.rb +++ b/src/vmm_mad/sh/one_vmm_sh.rb @@ -37,9 +37,9 @@ require "VirtualMachineDriver" # ---------------------------------------------------------------------------- # # The main class for the Sh driver # # ---------------------------------------------------------------------------- # -class SshDriver < VirtualMachineDriver +class ShDriver < VirtualMachineDriver # ------------------------------------------------------------------------ # - # SshDriver constructor # + # ShDriver constructor # # ------------------------------------------------------------------------ # def initialize(hypervisor) super(15,true) @@ -120,9 +120,9 @@ class SshDriver < VirtualMachineDriver end # ---------------------------------------------------------------------------- # -# SshDriver Main program +# ShDriver Main program # ---------------------------------------------------------------------------- # hypervisor = ARGV[0] -ssh_driver = SshDriver.new(hypervisor) -ssh_driver.start_driver +sh_driver = ShDriver.new(hypervisor) +sh_driver.start_driver diff --git a/src/vmm_mad/ssh/vmm_ssh_kvm.conf b/src/vmm_mad/sh/vmm_sh_kvm.conf similarity index 100% rename from src/vmm_mad/ssh/vmm_ssh_kvm.conf rename to src/vmm_mad/sh/vmm_sh_kvm.conf diff --git a/src/vmm_mad/ssh/vmm_ssh_xen.conf b/src/vmm_mad/sh/vmm_sh_xen.conf similarity index 100% rename from src/vmm_mad/ssh/vmm_ssh_xen.conf rename to src/vmm_mad/sh/vmm_sh_xen.conf diff --git a/src/vmm_mad/ssh/vmm_sshrc b/src/vmm_mad/sh/vmm_shrc similarity index 100% rename from src/vmm_mad/ssh/vmm_sshrc rename to src/vmm_mad/sh/vmm_shrc