From fe2e33c4884e09b74bede235250271ef176cf207 Mon Sep 17 00:00:00 2001 From: Tino Vazquez Date: Tue, 13 Dec 2011 16:04:37 +0100 Subject: [PATCH 01/10] Successfully fix typo --- src/vmm_mad/exec/one_vmm_exec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vmm_mad/exec/one_vmm_exec.rb b/src/vmm_mad/exec/one_vmm_exec.rb index 499f174e7d..f4627c31b3 100755 --- a/src/vmm_mad/exec/one_vmm_exec.rb +++ b/src/vmm_mad/exec/one_vmm_exec.rb @@ -168,7 +168,7 @@ class VmmAction break else @vmm.log(@id, - "Sussecfully execute #{DRIVER_NAMES[step[:driver]]} " \ + "Successfully execute #{DRIVER_NAMES[step[:driver]]} " \ "operation: #{step[:action]}.") end end From 3bce21e03a53a4bdae843d56f0add99c9f21a6ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Tue, 13 Dec 2011 17:35:17 +0100 Subject: [PATCH 02/10] Modify one.host.allocate signature, to match changes of commit:665036ef --- include/RequestManagerAllocate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/RequestManagerAllocate.h b/include/RequestManagerAllocate.h index e2561eb4d9..c9921b39d0 100644 --- a/include/RequestManagerAllocate.h +++ b/include/RequestManagerAllocate.h @@ -210,7 +210,7 @@ public: HostAllocate(): RequestManagerAllocate("HostAllocate", "Allocates a new host", - "A:sssss", + "A:ssssss", false) { Nebula& nd = Nebula::instance(); From 60fe076f85d427325e44b0d9762030974986f8cf Mon Sep 17 00:00:00 2001 From: Hector Sanjuan Date: Tue, 13 Dec 2011 14:34:58 +0100 Subject: [PATCH 03/10] Sunstone's multiple VM instantation should act as CLI's when naming the new VMs (cherry picked from commit be1cea51b1d8d376ee3d34a9ac88ea0b578193af) --- src/sunstone/public/js/plugins/vms-tab.js | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/sunstone/public/js/plugins/vms-tab.js b/src/sunstone/public/js/plugins/vms-tab.js index bdf52bc315..fcb660d857 100644 --- a/src/sunstone/public/js/plugins/vms-tab.js +++ b/src/sunstone/public/js/plugins/vms-tab.js @@ -750,20 +750,17 @@ function setupCreateVMDialog(){ if (!template_id.length){ notifyError("You have not selected a template"); return false; - } + }; if (n_times.length){ n_times_int=parseInt(n_times,10); - } + }; - if (n_times_int>1){ - if (!vm_name.length){ - vm_name = $('#template_id option:selected',this).text(); - } - for (var i=0; i< n_times_int; i++){ - Sunstone.runAction("Template.instantiate",template_id,vm_name+"_"+i); - }; - } else { + if (!vm_name.length){ + vm_name = $('#template_id option:selected',this).text(); + }; + + for (var i=0; i< n_times_int; i++){ Sunstone.runAction("Template.instantiate",template_id,vm_name); }; From 395850c6c34581490422750c51f16f3f8453b0db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Thu, 15 Dec 2011 18:12:16 +0100 Subject: [PATCH 04/10] Include 'fw' network driver in onedb migrator 3.1.0_to_3.1.80.rb --- src/onedb/3.1.0_to_3.1.80.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/onedb/3.1.0_to_3.1.80.rb b/src/onedb/3.1.0_to_3.1.80.rb index 5644157197..022e096dfd 100644 --- a/src/onedb/3.1.0_to_3.1.80.rb +++ b/src/onedb/3.1.0_to_3.1.80.rb @@ -34,8 +34,8 @@ module Migrator vn_mad = "" - while !( ["802.1Q", "dummy", "ebtables", "ovswitch"].include?(vn_mad) ) do - print " Driver name (802.1Q, dummy, ebtables, ovswitch): " + while !( ["802.1Q", "dummy", "ebtables", "ovswitch", "fw"].include?(vn_mad) ) do + print " Driver name (802.1Q, dummy, ebtables, ovswitch, fw): " vn_mad = gets.chomp vn_mad = "dummy" if vn_mad.empty? end From 004b1ab8f5448503ef86825c191931ebb4dd545f Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Fri, 16 Dec 2011 17:59:04 +0100 Subject: [PATCH 05/10] bug fix drivers for local actions. --- src/mad/ruby/DriverExecHelper.rb | 11 +++++++++++ src/mad/ruby/OpenNebulaDriver.rb | 12 ++---------- src/vmm_mad/exec/one_vmm_exec.rb | 2 +- src/vmm_mad/exec/one_vmm_sh | 2 +- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/mad/ruby/DriverExecHelper.rb b/src/mad/ruby/DriverExecHelper.rb index d6b632b7e0..bb4b86d71b 100644 --- a/src/mad/ruby/DriverExecHelper.rb +++ b/src/mad/ruby/DriverExecHelper.rb @@ -44,6 +44,9 @@ module DriverExecHelper # dummy paths @remote_scripts_path = File.join(@remote_scripts_base_path, directory) @local_scripts_path = File.join(@local_scripts_base_path, directory) + + # mutex for logging + @send_mutex = Mutex.new end # @@ -94,6 +97,14 @@ module DriverExecHelper # # METHODS FOR LOGS & COMMAND OUTPUT # + # Sends a message to the OpenNebula core through stdout + def send_message(action="-", result=RESULT[:failure], id="-", info="-") + @send_mutex.synchronize { + STDOUT.puts "#{action} #{result} #{id} #{info}" + STDOUT.flush + } + end + # Sends a log message to ONE. The +message+ can be multiline, it will # be automatically splitted by lines. def log(number, message) diff --git a/src/mad/ruby/OpenNebulaDriver.rb b/src/mad/ruby/OpenNebulaDriver.rb index 758750aa75..18561f1fc7 100644 --- a/src/mad/ruby/OpenNebulaDriver.rb +++ b/src/mad/ruby/OpenNebulaDriver.rb @@ -57,23 +57,15 @@ class OpenNebulaDriver < ActionManager super(@options[:concurrency], @options[:threaded]) - @retries = @options[:retries] + @retries = @options[:retries] - @send_mutex = Mutex.new - #Set default values initialize_helper(directory, @options) register_action(:INIT, method("init")) end - # Sends a message to the OpenNebula core through stdout - def send_message(action="-", result=RESULT[:failure], id="-", info="-") - @send_mutex.synchronize { - STDOUT.puts "#{action} #{result} #{id} #{info}" - STDOUT.flush - } - end + # Calls remotes or local action checking the action name and # @local_actions. Optional arguments can be specified as a hash diff --git a/src/vmm_mad/exec/one_vmm_exec.rb b/src/vmm_mad/exec/one_vmm_exec.rb index f4627c31b3..a17b02b4c6 100755 --- a/src/vmm_mad/exec/one_vmm_exec.rb +++ b/src/vmm_mad/exec/one_vmm_exec.rb @@ -155,7 +155,7 @@ class VmmAction end # Save the step info - @data["#{step[:action]}_info".to_sym] = info + @data["#{step[:action]}_info".to_sym] = info.strip # Roll back steps, store failed info and break steps if DriverExecHelper.failed?(result) diff --git a/src/vmm_mad/exec/one_vmm_sh b/src/vmm_mad/exec/one_vmm_sh index 77aed093fe..6db516936c 100755 --- a/src/vmm_mad/exec/one_vmm_sh +++ b/src/vmm_mad/exec/one_vmm_sh @@ -22,4 +22,4 @@ else MAD_LOCATION=$ONE_LOCATION/lib/mads fi -exec $MAD_LOCATION/one_vmm_exec -l deploy,shutdown,cancel,save,restore,migrate,poll $* +exec $MAD_LOCATION/one_vmm_exec -l deploy,shutdown,cancel,save,restore,migrate,poll,pre,post,clean $* From beaa71c4f2689236b7ee15506f3f903cc042a972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Fri, 16 Dec 2011 09:49:47 -0800 Subject: [PATCH 06/10] Add XML Schemas (xsd) documentation --- share/doc/xsd/README.txt | 9 ++ share/doc/xsd/group.xsd | 19 +++ share/doc/xsd/group_pool.xsd | 12 ++ share/doc/xsd/host.xsd | 37 +++++ share/doc/xsd/host_pool.xsd | 12 ++ share/doc/xsd/image.xsd | 26 ++++ share/doc/xsd/image_pool.xsd | 12 ++ share/doc/xsd/samples/group/1.xml | 12 ++ share/doc/xsd/samples/group/2.xml | 7 + share/doc/xsd/samples/group_pool/1.xml | 37 +++++ share/doc/xsd/samples/host/1.xml | 27 ++++ share/doc/xsd/samples/host/2.xml | 27 ++++ share/doc/xsd/samples/host/3.xml | 38 +++++ share/doc/xsd/samples/host_pool/1.xml | 41 ++++++ share/doc/xsd/samples/host_pool/2.xml | 67 +++++++++ share/doc/xsd/samples/host_pool/3.xml | 3 + share/doc/xsd/samples/image/1.xml | 23 ++++ share/doc/xsd/samples/image/2.xml | 22 +++ share/doc/xsd/samples/image_pool/1.xml | 3 + share/doc/xsd/samples/image_pool/2.xml | 47 +++++++ share/doc/xsd/samples/image_pool/3.xml | 25 ++++ share/doc/xsd/samples/template/1.xml | 16 +++ share/doc/xsd/samples/template/2.xml | 16 +++ share/doc/xsd/samples/template/3.xml | 13 ++ share/doc/xsd/samples/template_pool/1.xml | 35 +++++ share/doc/xsd/samples/template_pool/2.xml | 3 + share/doc/xsd/samples/user/1.xml | 12 ++ share/doc/xsd/samples/user/2.xml | 12 ++ share/doc/xsd/samples/user/3.xml | 21 +++ share/doc/xsd/samples/user_pool/1.xml | 53 +++++++ share/doc/xsd/samples/vm/1.xml | 26 ++++ share/doc/xsd/samples/vm/2.xml | 81 +++++++++++ share/doc/xsd/samples/vm/3.xml | 81 +++++++++++ share/doc/xsd/samples/vm_pool/1.xml | 161 ++++++++++++++++++++++ share/doc/xsd/samples/vm_pool/2.xml | 3 + share/doc/xsd/samples/vnet/1.xml | 48 +++++++ share/doc/xsd/samples/vnet/2.xml | 26 ++++ share/doc/xsd/samples/vnet/3.xml | 23 ++++ share/doc/xsd/samples/vnet_pool/1.xml | 3 + share/doc/xsd/samples/vnet_pool/2.xml | 63 +++++++++ share/doc/xsd/template.xsd | 18 +++ share/doc/xsd/template_pool.xsd | 12 ++ share/doc/xsd/test.sh | 5 + share/doc/xsd/user.xsd | 18 +++ share/doc/xsd/user_pool.xsd | 12 ++ share/doc/xsd/vm.xsd | 55 ++++++++ share/doc/xsd/vm_pool.xsd | 12 ++ share/doc/xsd/vnet.xsd | 48 +++++++ share/doc/xsd/vnet_pool.xsd | 12 ++ 49 files changed, 1394 insertions(+) create mode 100644 share/doc/xsd/README.txt create mode 100644 share/doc/xsd/group.xsd create mode 100644 share/doc/xsd/group_pool.xsd create mode 100644 share/doc/xsd/host.xsd create mode 100644 share/doc/xsd/host_pool.xsd create mode 100644 share/doc/xsd/image.xsd create mode 100644 share/doc/xsd/image_pool.xsd create mode 100644 share/doc/xsd/samples/group/1.xml create mode 100644 share/doc/xsd/samples/group/2.xml create mode 100644 share/doc/xsd/samples/group_pool/1.xml create mode 100644 share/doc/xsd/samples/host/1.xml create mode 100644 share/doc/xsd/samples/host/2.xml create mode 100644 share/doc/xsd/samples/host/3.xml create mode 100644 share/doc/xsd/samples/host_pool/1.xml create mode 100644 share/doc/xsd/samples/host_pool/2.xml create mode 100644 share/doc/xsd/samples/host_pool/3.xml create mode 100644 share/doc/xsd/samples/image/1.xml create mode 100644 share/doc/xsd/samples/image/2.xml create mode 100644 share/doc/xsd/samples/image_pool/1.xml create mode 100644 share/doc/xsd/samples/image_pool/2.xml create mode 100644 share/doc/xsd/samples/image_pool/3.xml create mode 100644 share/doc/xsd/samples/template/1.xml create mode 100644 share/doc/xsd/samples/template/2.xml create mode 100644 share/doc/xsd/samples/template/3.xml create mode 100644 share/doc/xsd/samples/template_pool/1.xml create mode 100644 share/doc/xsd/samples/template_pool/2.xml create mode 100644 share/doc/xsd/samples/user/1.xml create mode 100644 share/doc/xsd/samples/user/2.xml create mode 100644 share/doc/xsd/samples/user/3.xml create mode 100644 share/doc/xsd/samples/user_pool/1.xml create mode 100644 share/doc/xsd/samples/vm/1.xml create mode 100644 share/doc/xsd/samples/vm/2.xml create mode 100644 share/doc/xsd/samples/vm/3.xml create mode 100644 share/doc/xsd/samples/vm_pool/1.xml create mode 100644 share/doc/xsd/samples/vm_pool/2.xml create mode 100644 share/doc/xsd/samples/vnet/1.xml create mode 100644 share/doc/xsd/samples/vnet/2.xml create mode 100644 share/doc/xsd/samples/vnet/3.xml create mode 100644 share/doc/xsd/samples/vnet_pool/1.xml create mode 100644 share/doc/xsd/samples/vnet_pool/2.xml create mode 100644 share/doc/xsd/template.xsd create mode 100644 share/doc/xsd/template_pool.xsd create mode 100755 share/doc/xsd/test.sh create mode 100644 share/doc/xsd/user.xsd create mode 100644 share/doc/xsd/user_pool.xsd create mode 100644 share/doc/xsd/vm.xsd create mode 100644 share/doc/xsd/vm_pool.xsd create mode 100644 share/doc/xsd/vnet.xsd create mode 100644 share/doc/xsd/vnet_pool.xsd diff --git a/share/doc/xsd/README.txt b/share/doc/xsd/README.txt new file mode 100644 index 0000000000..00d6a90185 --- /dev/null +++ b/share/doc/xsd/README.txt @@ -0,0 +1,9 @@ +These XML Schemas define the XMLs returned by OpenNebula's XML-RPC API. + +The included XML samples are not actual responses from OpenNebula, as it does +not include the headers (namespace, schema location). + + +To learn more, please read the API reference documentation at +http://opennebula.org/documentation:documentation:api + diff --git a/share/doc/xsd/group.xsd b/share/doc/xsd/group.xsd new file mode 100644 index 0000000000..eb36432fff --- /dev/null +++ b/share/doc/xsd/group.xsd @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + diff --git a/share/doc/xsd/group_pool.xsd b/share/doc/xsd/group_pool.xsd new file mode 100644 index 0000000000..c8dc69c06b --- /dev/null +++ b/share/doc/xsd/group_pool.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/share/doc/xsd/host.xsd b/share/doc/xsd/host.xsd new file mode 100644 index 0000000000..58fa4d8bbe --- /dev/null +++ b/share/doc/xsd/host.xsd @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/share/doc/xsd/host_pool.xsd b/share/doc/xsd/host_pool.xsd new file mode 100644 index 0000000000..5d797d3cbb --- /dev/null +++ b/share/doc/xsd/host_pool.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/share/doc/xsd/image.xsd b/share/doc/xsd/image.xsd new file mode 100644 index 0000000000..207cee1bd0 --- /dev/null +++ b/share/doc/xsd/image.xsd @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/share/doc/xsd/image_pool.xsd b/share/doc/xsd/image_pool.xsd new file mode 100644 index 0000000000..6e39f45267 --- /dev/null +++ b/share/doc/xsd/image_pool.xsd @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/share/doc/xsd/samples/group/1.xml b/share/doc/xsd/samples/group/1.xml new file mode 100644 index 0000000000..35813b2430 --- /dev/null +++ b/share/doc/xsd/samples/group/1.xml @@ -0,0 +1,12 @@ + + 1 + users + + 2 + 3 + 4 + 5 + + \ No newline at end of file diff --git a/share/doc/xsd/samples/group/2.xml b/share/doc/xsd/samples/group/2.xml new file mode 100644 index 0000000000..83ec0ed02b --- /dev/null +++ b/share/doc/xsd/samples/group/2.xml @@ -0,0 +1,7 @@ + + 100 + new + + \ No newline at end of file diff --git a/share/doc/xsd/samples/group_pool/1.xml b/share/doc/xsd/samples/group_pool/1.xml new file mode 100644 index 0000000000..4c99b3289c --- /dev/null +++ b/share/doc/xsd/samples/group_pool/1.xml @@ -0,0 +1,37 @@ + + + 0 + oneadmin + + 0 + 1 + + + + 1 + users + + 2 + 3 + 4 + 5 + + + + 100 + new + + + + 101 + test + + + + 102 + abc + + + \ No newline at end of file diff --git a/share/doc/xsd/samples/host/1.xml b/share/doc/xsd/samples/host/1.xml new file mode 100644 index 0000000000..400cdf25f7 --- /dev/null +++ b/share/doc/xsd/samples/host/1.xml @@ -0,0 +1,27 @@ + + 0 + localhost + 3 + im_dummy + vmm_dummy + fw + tm_shared + 0 + + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + +