File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
engine/schema/src/main/java/com/cloud/upgrade/dao Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 1919import java .io .InputStream ;
2020import java .sql .Connection ;
2121
22+ import com .cloud .upgrade .SystemVmTemplateRegistration ;
2223import com .cloud .utils .exception .CloudRuntimeException ;
2324
2425public class Upgrade42020to42030 extends DbUpgradeAbstractImpl implements DbUpgrade , DbUpgradeSystemVmTemplate {
26+ private SystemVmTemplateRegistration systemVmTemplateRegistration ;
2527
2628 @ Override
2729 public String [] getUpgradableVersionRange () {
@@ -58,7 +60,18 @@ public InputStream[] getCleanupScripts() {
5860 return null ;
5961 }
6062
63+ private void initSystemVmTemplateRegistration () {
64+ systemVmTemplateRegistration = new SystemVmTemplateRegistration ("" );
65+ }
66+
6167 @ Override
6268 public void updateSystemVmTemplates (Connection conn ) {
69+ logger .debug ("Updating System Vm template IDs" );
70+ initSystemVmTemplateRegistration ();
71+ try {
72+ systemVmTemplateRegistration .updateSystemVmTemplates (conn );
73+ } catch (Exception e ) {
74+ throw new CloudRuntimeException ("Failed to find / register SystemVM template(s)" , e );
75+ }
6376 }
6477}
You can’t perform that action at this time.
0 commit comments