diff --git a/src/sunstone/public/app/tabs/provision-tab/users/quota-widget/html.hbs b/src/sunstone/public/app/tabs/provision-tab/users/quota-widget/html.hbs index 3e11ccaa63..9511182140 100644 --- a/src/sunstone/public/app/tabs/provision-tab/users/quota-widget/html.hbs +++ b/src/sunstone/public/app/tabs/provision-tab/users/quota-widget/html.hbs @@ -75,7 +75,7 @@
- {{tr "Memory (GBs)"}} + {{tr "Memory (GB)"}}
diff --git a/src/sunstone/public/app/utils/disks-resize.js b/src/sunstone/public/app/utils/disks-resize.js index 5bae6676d8..17e7af9e52 100644 --- a/src/sunstone/public/app/utils/disks-resize.js +++ b/src/sunstone/public/app/utils/disks-resize.js @@ -94,7 +94,7 @@ define(function(require){ diskContext.data('original_size', sizeGB); RangeSlider.insert({ 'label': disk.IMAGE, - 'unitLabel': 'GBs', + 'unitLabel': 'GB', 'name': 'SIZE', 'start': sizeGB, 'end': sizeGB + 500, diff --git a/src/sunstone/routes/support.rb b/src/sunstone/routes/support.rb index 48ae36e054..405c7a8e30 100644 --- a/src/sunstone/routes/support.rb +++ b/src/sunstone/routes/support.rb @@ -23,6 +23,8 @@ else ZENDESK_API_GEM = true end +require 'pp' + helpers do def zendesk_client client = ZendeskAPI::Client.new do |config| @@ -62,8 +64,17 @@ helpers do # When getting the error 'hostname does not match the server certificate' # use the API at https://yoursubdomain.zendesk.com/api/v2 end - - if client.current_user.nil? || client.current_user.id.nil? +=begin +`echo 'vvvvv zendesk_client vvvvv' >> /tmp/carlos` +`echo 'client.current_user #{client.current_user}' >> /tmp/carlos` +`echo '' >> /tmp/carlos` +`echo 'client.current_user.nil? || client.current_user.id.nil? #{(client.current_user.nil? || client.current_user.id.nil?).to_s}' >> /tmp/carlos` +`echo 'client.current_user.created_at.nil? #{client.current_user.created_at.nil?}' >> /tmp/carlos` +`echo 'client.current_user.created_at #{client.current_user.created_at}' >> /tmp/carlos` +`echo 'client.current_user.created_at.class #{client.current_user.created_at.class}' >> /tmp/carlos` +`echo '~~~~~ zendesk_client ~~~~~' >> /tmp/carlos` +=end + if client.current_user.nil? || client.current_user.id.nil? || client.current_user.created_at.nil? error 401, "Zendesk account credentials are incorrect" else return client @@ -71,8 +82,18 @@ helpers do end def zrequest_to_one(zrequest) + +`echo 'vvvvv zrequest_to_one vvvvv' >> /tmp/carlos` +`echo '' >> /tmp/carlos` +`echo 'zrequest #{zrequest}' >> /tmp/carlos` +`echo 'zrequest.id #{zrequest.id}' >> /tmp/carlos` +`echo 'zrequest.comments #{zrequest.comments}' >> /tmp/carlos` +`echo 'zrequest.comments.count #{zrequest.comments.count}' >> /tmp/carlos` +`echo 'zrequest.comments.class #{zrequest.comments.class}' >> /tmp/carlos` +#`echo '~~~~~ zrequest_to_one ~~~~~' >> /tmp/carlos` + one_zrequest = { - "id" => zrequest.id, + "id" => zrequest.id, ### TODO: .id in 1.8.7 fails!! "url" => zrequest.url, "subject" => zrequest.subject, "description" => zrequest.description, @@ -83,7 +104,7 @@ helpers do } zrequest.custom_fields.each { |field| - case field.id + case field.id ### TODO: .id in 1.8.7 fails!! when 391130 one_zrequest["opennebula_version"] = field.value when 391197 @@ -91,8 +112,15 @@ helpers do end } +`echo 'each comment' >> /tmp/carlos` +zrequest.comments.each{ |comment| + `echo 'comment #{comment}' >> /tmp/carlos` +} + + if zrequest.comments comment = zrequest.comments.delete_at(0) +`echo '#0 comment #{comment}' >> /tmp/carlos` one_zrequest["html_description"] = comment.html_body zrequest.comments.each{ |comment| diff --git a/src/tm_mad/shared/clone b/src/tm_mad/shared/clone index efb151d4d0..1eb1de5c92 100755 --- a/src/tm_mad/shared/clone +++ b/src/tm_mad/shared/clone @@ -97,9 +97,9 @@ http://*) ORIGINAL_SIZE=${ORIGINAL_SIZE:-0} - if [ "$SIZE" -ge "$ORIGINAL_SIZE" ]; then - RESIZE_CMD="; qemu-img resize ${DST_PATH} ${SIZE}M" - fi +# if [ "$SIZE" -ge "$ORIGINAL_SIZE" ]; then +# RESIZE_CMD="; qemu-img resize ${DST_PATH} ${SIZE}M" +# fi CLONE_CMD="cd ${DST_DIR}; \ cp ${SRC_PATH} ${DST_PATH} \ diff --git a/src/tm_mad/shared/cpds b/src/tm_mad/shared/cpds index fae3b52e8b..240f322e40 100755 --- a/src/tm_mad/shared/cpds +++ b/src/tm_mad/shared/cpds @@ -68,6 +68,8 @@ EOF log "Copying $SRC_PATH to datastore as $DST_PATH" +sleep 10 + ssh_exec_and_log $SRC_HOST "$CPSCRIPT" "Could not copy image $DST_PATH" exit 0 diff --git a/src/vm/VirtualMachine.cc b/src/vm/VirtualMachine.cc index d4e753816c..69ef55b4e2 100644 --- a/src/vm/VirtualMachine.cc +++ b/src/vm/VirtualMachine.cc @@ -3355,8 +3355,6 @@ int VirtualMachine::set_saveas_disk(int disk_id, const string& source, int iid) int VirtualMachine::set_saveas_state() { - string s; - switch (state) { case ACTIVE: @@ -3365,25 +3363,23 @@ int VirtualMachine::set_saveas_state() return -1; } - lcm_state = HOTPLUG_SAVEAS; + set_state(HOTPLUG_SAVEAS); break; case POWEROFF: - state = ACTIVE; - lcm_state = HOTPLUG_SAVEAS_POWEROFF; + set_state(ACTIVE); + set_state(HOTPLUG_SAVEAS_POWEROFF); break; case SUSPENDED: - state = ACTIVE; - lcm_state = HOTPLUG_SAVEAS_SUSPENDED; + set_state(ACTIVE); + set_state(HOTPLUG_SAVEAS_SUSPENDED); break; default: return -1; } - log("VM", Log::INFO, "New state is " + lcm_state_to_str(s,lcm_state)); - return 0; } @@ -3392,25 +3388,20 @@ int VirtualMachine::set_saveas_state() int VirtualMachine::clear_saveas_state() { - string s; - switch (lcm_state) { case HOTPLUG_SAVEAS: - lcm_state = RUNNING; - log("VM", Log::INFO, "New state is "+lcm_state_to_str(s,lcm_state)); + set_state(RUNNING); break; case HOTPLUG_SAVEAS_POWEROFF: - state = POWEROFF; - lcm_state = LCM_INIT; - log("VM", Log::INFO, "New state is " + vm_state_to_str(s,state)); + set_state(POWEROFF); + set_state(LCM_INIT); break; case HOTPLUG_SAVEAS_SUSPENDED: - state = SUSPENDED; - lcm_state = LCM_INIT; - log("VM", Log::INFO, "New state is " + vm_state_to_str(s,state)); + set_state(SUSPENDED); + set_state(LCM_INIT); break; default: