File tree Expand file tree Collapse file tree
server/src/com/cloud/template Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -451,6 +451,7 @@ public boolean delete(TemplateProfile profile) {
451451
452452 if (imageStores == null || imageStores .size () == 0 ) {
453453 // already destroyed on image stores
454+ success = true ;
454455 s_logger .info ("Unable to find image store still having template: " + template .getName () + ", so just mark the template removed" );
455456 } else {
456457 // Make sure the template is downloaded to all found image stores
@@ -536,10 +537,7 @@ public boolean delete(TemplateProfile profile) {
536537 templateZoneDao .remove (templateZone .getId ());
537538 }
538539 }
539- } catch (InterruptedException e ) {
540- s_logger .debug ("Delete template Failed" , e );
541- throw new CloudRuntimeException ("Delete template Failed" , e );
542- } catch (ExecutionException e ) {
540+ } catch (InterruptedException |ExecutionException e ) {
543541 s_logger .debug ("Delete template Failed" , e );
544542 throw new CloudRuntimeException ("Delete template Failed" , e );
545543 }
@@ -551,7 +549,7 @@ public boolean delete(TemplateProfile profile) {
551549
552550 }
553551 if (success ) {
554- if ((imageStores .size () > 1 ) && (profile .getZoneIdList () != null )) {
552+ if ((imageStores != null && imageStores .size () > 1 ) && (profile .getZoneIdList () != null )) {
555553 //if template is stored in more than one image stores, and the zone id is not null, then don't delete other templates.
556554 return success ;
557555 }
Original file line number Diff line number Diff line change @@ -634,10 +634,8 @@ def test_07_resize_fail(self):
634634 elif hosts [0 ].hypervisor .lower () in ("vmware" , "hyperv" ):
635635 self .skipTest ("Resize Volume is unsupported on VmWare and Hyper-V" )
636636
637- # Attempting to resize it should throw an exception, as we're using a non
638- # customisable disk offering, therefore our size parameter should be ignored
639- with self .assertRaises (Exception ):
640- self .apiClient .resizeVolume (cmd )
637+ # Online resize should be supported
638+ self .apiClient .resizeVolume (cmd )
641639
642640 if hosts [0 ].hypervisor == "XenServer" :
643641 self .virtual_machine .start (self .apiClient )
You can’t perform that action at this time.
0 commit comments