@@ -87,6 +87,7 @@ public ServiceOfferingVO(String name, int cpu, int ramSize, int speed, Integer r
8787 this .volatileVm = false ;
8888 this .default_use = defaultUse ;
8989 this .vm_type = vm_type == null ? null : vm_type .toString ().toLowerCase ();
90+ this .deploymentPlanner = "FirstFitPlanner" ;
9091 }
9192
9293 public ServiceOfferingVO (String name , int cpu , int ramSize , int speed , Integer rateMbps , Integer multicastRateMbps , boolean offerHA , boolean limitCpuUse , boolean volatileVm , String displayText , boolean useLocalStorage , boolean recreatable , String tags , boolean systemUse , VirtualMachine .Type vm_type , Long domainId ) {
@@ -100,11 +101,13 @@ public ServiceOfferingVO(String name, int cpu, int ramSize, int speed, Integer r
100101 this .limitCpuUse = limitCpuUse ;
101102 this .volatileVm = volatileVm ;
102103 this .vm_type = vm_type == null ? null : vm_type .toString ().toLowerCase ();
104+ this .deploymentPlanner = "FirstFitPlanner" ;
103105 }
104106
105107 public ServiceOfferingVO (String name , int cpu , int ramSize , int speed , Integer rateMbps , Integer multicastRateMbps , boolean offerHA , boolean limitResourceUse , boolean volatileVm , String displayText , boolean useLocalStorage , boolean recreatable , String tags , boolean systemUse , VirtualMachine .Type vm_type , Long domainId , String hostTag ) {
106108 this (name , cpu , ramSize , speed , rateMbps , multicastRateMbps , offerHA , limitResourceUse , volatileVm , displayText , useLocalStorage , recreatable , tags , systemUse , vm_type , domainId );
107109 this .hostTag = hostTag ;
110+ this .deploymentPlanner = "FirstFitPlanner" ;
108111 }
109112
110113 public ServiceOfferingVO (String name , int cpu , int ramSize , int speed , Integer rateMbps , Integer multicastRateMbps ,
@@ -113,7 +116,11 @@ public ServiceOfferingVO(String name, int cpu, int ramSize, int speed, Integer r
113116 String hostTag , String deploymentPlanner ) {
114117 this (name , cpu , ramSize , speed , rateMbps , multicastRateMbps , offerHA , limitResourceUse , volatileVm ,
115118 displayText , useLocalStorage , recreatable , tags , systemUse , vm_type , domainId , hostTag );
116- this .deploymentPlanner = deploymentPlanner ;
119+ if (deploymentPlanner != null ) {
120+ this .deploymentPlanner = deploymentPlanner ;
121+ } else {
122+ this .deploymentPlanner = "FirstFitPlanner" ;
123+ }
117124 }
118125
119126 @ Override
0 commit comments