mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-23 13:15:14 +09:00
Bug #4430: Remove info calls after image upload
This commit is contained in:
1 parent
03b17ede0a
commit
834ed4e3fd
3 files changed
+9
-12
No files matched your search
@@ -27,9 +27,6 @@ class SunstoneServer < CloudServer
|
||||
# FLAG that will filter the elements retrieved from the Pools
|
||||
POOL_FILTER = Pool::INFO_ALL
|
||||
|
||||
# Secs to sleep between checks to see if image upload to repo is finished
|
||||
IMAGE_POLL_SLEEP_TIME = 5
|
||||
|
||||
def initialize(client, config, logger)
|
||||
super(config, logger)
|
||||
@client = client
|
||||
@@ -167,12 +164,12 @@ class SunstoneServer < CloudServer
|
||||
return [500, rc.to_json]
|
||||
end
|
||||
|
||||
image.info
|
||||
#wait until image is ready to return
|
||||
while (image.state_str == 'LOCKED') && (image['RUNNING_VMS'] == '0') do
|
||||
sleep IMAGE_POLL_SLEEP_TIME
|
||||
image.info
|
||||
rc = image.info
|
||||
|
||||
if OpenNebula.is_error?(rc)
|
||||
return [500, rc.to_json]
|
||||
end
|
||||
|
||||
return [201, image.to_json]
|
||||
end
|
||||
|
||||
|
||||
@@ -251,8 +251,8 @@ define(function(require) {
|
||||
file: file.fileName,
|
||||
tempfile: file.uniqueIdentifier
|
||||
},
|
||||
success: function() {
|
||||
Notifier.notifyMessage("Image uploaded correctly");
|
||||
success: function(response) {
|
||||
Notifier.notifyCustom(Locale.tr("Image uploaded correctly"), " ID: " + response.IMAGE.ID, false);
|
||||
$('div[id="files-' + file.fileName + 'progressBar"]').remove();
|
||||
Sunstone.runAction("File.refresh");
|
||||
},
|
||||
|
||||
@@ -401,8 +401,8 @@ define(function(require) {
|
||||
file: file.fileName,
|
||||
tempfile: file.uniqueIdentifier
|
||||
},
|
||||
success: function() {
|
||||
Notifier.notifyMessage("Image uploaded correctly");
|
||||
success: function(response) {
|
||||
Notifier.notifyCustom(Locale.tr("Image uploaded correctly"), " ID: " + response.IMAGE.ID, false);
|
||||
$('div[id="' + file.fileName + 'progressBar"]').remove();
|
||||
Sunstone.runAction("Image.refresh");
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user