From 15ae2c9fa466e83cda1e7f6eff14ed1a73a07731 Mon Sep 17 00:00:00 2001 From: Tino Vazquez Date: Fri, 13 Sep 2013 16:32:15 +0200 Subject: [PATCH 1/3] Initial value for VM Template memory field --- src/sunstone/public/js/plugins/templates-tab.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/sunstone/public/js/plugins/templates-tab.js b/src/sunstone/public/js/plugins/templates-tab.js index 9b6c9778e4..e821ee3d76 100644 --- a/src/sunstone/public/js/plugins/templates-tab.js +++ b/src/sunstone/public/js/plugins/templates-tab.js @@ -809,7 +809,8 @@ function setup_capacity_tab_content(capacity_section) { connect: "lower", range: [0,409600], step: 12800, - start: 1, + start: 51200, + value: 512, slide: memory_slider_change, }); @@ -826,9 +827,6 @@ function setup_capacity_tab_content(capacity_section) { memory_input.val( Math.floor(final_memory_input.val()) ); }) - // init::start is ignored for some reason - memory_slider.val(0); - memory_unit.change(function() { var memory_unit_val = $('#memory_unit :selected', capacity_section).val(); @@ -844,6 +842,7 @@ function setup_capacity_tab_content(capacity_section) { range: [0,1600], start: 1, step: 50, + value: 51200, slide: memory_slider_change, }); @@ -859,6 +858,7 @@ function setup_capacity_tab_content(capacity_section) { connect: "lower", range: [0,409600], start: 1, + value: 51200, step: 12800, slide: memory_slider_change, }); @@ -873,6 +873,9 @@ function setup_capacity_tab_content(capacity_section) { } }); + // init::start is ignored for some reason + memory_input.val(512); + // Define the vcpu slider From ff9210f95ea5b214685cf393bd60ea277292ab93 Mon Sep 17 00:00:00 2001 From: Tino Vazquez Date: Fri, 13 Sep 2013 16:47:08 +0200 Subject: [PATCH 2/3] Bug #2315: Uncheck context on update if context doesn't exist As a bonus, set memory default on VM template create --- src/sunstone/public/js/plugins/templates-tab.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sunstone/public/js/plugins/templates-tab.js b/src/sunstone/public/js/plugins/templates-tab.js index e821ee3d76..c71688438f 100644 --- a/src/sunstone/public/js/plugins/templates-tab.js +++ b/src/sunstone/public/js/plugins/templates-tab.js @@ -4588,6 +4588,9 @@ function fillTemplatePopUp(request, response){ var context = template.CONTEXT; var context_section = $('li#contextTab', $create_template_dialog); + $("#ssh_context", context_section).removeAttr('checked'); + $("#network_context", context_section).removeAttr('checked'); + if (context) { var file_ds_regexp = /\$FILE\[IMAGE_ID=([0-9]+)+/g; var net_regexp = /^NETWORK$/;; @@ -4598,8 +4601,6 @@ function fillTemplatePopUp(request, response){ var net_flag = false; var files = []; - $("#ssh_context", context_section).removeAttr('checked'); - $("#network_context", context_section).removeAttr('checked'); $.each(context, function(key, value){ if (ssh_regexp.test(key)) { $("#ssh_context", context_section).attr('checked','checked'); From 27db93832bed6dbb17a1379534a122ad131c7c71 Mon Sep 17 00:00:00 2001 From: Jaime Melis Date: Mon, 16 Sep 2013 10:58:16 +0200 Subject: [PATCH 3/3] Add standard paths to the commands executed in OpenNebulaNetwork.rb --- src/vnm_mad/remotes/OpenNebulaNetwork.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vnm_mad/remotes/OpenNebulaNetwork.rb b/src/vnm_mad/remotes/OpenNebulaNetwork.rb index ba8b72c4f1..d0a7425d04 100644 --- a/src/vnm_mad/remotes/OpenNebulaNetwork.rb +++ b/src/vnm_mad/remotes/OpenNebulaNetwork.rb @@ -42,6 +42,9 @@ COMMANDS = { :lsmod => "lsmod" } +# Set PATH +ENV['PATH'] = "#{ENV['PATH']}:/bin:/sbin:/usr/bin" + class VM attr_accessor :nics, :vm_info, :deploy_id