@@ -490,7 +490,7 @@ class VDI(object):
490490 DEVICE_MAJOR = 202
491491
492492 # config keys & values
493- DB_VHD_PARENT = "vhd-parent"
493+ DB_VDI_PARENT = "vhd-parent"
494494 DB_VDI_TYPE = "vdi_type"
495495 DB_VHD_BLOCKS = "vhd-blocks"
496496 DB_VDI_PAUSED = "paused"
@@ -510,7 +510,7 @@ class VDI(object):
510510 DB_ALLOW_CACHING = "allow_caching"
511511
512512 CONFIG_TYPE = {
513- DB_VHD_PARENT : XAPI .CONFIG_SM ,
513+ DB_VDI_PARENT : XAPI .CONFIG_SM ,
514514 DB_VDI_TYPE : XAPI .CONFIG_SM ,
515515 DB_VHD_BLOCKS : XAPI .CONFIG_SM ,
516516 DB_VDI_PAUSED : XAPI .CONFIG_SM ,
@@ -1031,7 +1031,7 @@ def _setParent(self, parent) -> None:
10311031 self .parentUuid = parent .uuid
10321032 parent .children .append (self )
10331033 try :
1034- self .setConfig (self .DB_VHD_PARENT , self .parentUuid )
1034+ self .setConfig (self .DB_VDI_PARENT , self .parentUuid )
10351035 Util .log ("Updated the vhd-parent field for child %s with %s" % \
10361036 (self .uuid , self .parentUuid ))
10371037 except :
@@ -1418,7 +1418,7 @@ def _setParent(self, parent) -> None:
14181418 self .parentUuid = parent .uuid
14191419 parent .children .append (self )
14201420 try :
1421- self .setConfig (self .DB_VHD_PARENT , self .parentUuid )
1421+ self .setConfig (self .DB_VDI_PARENT , self .parentUuid )
14221422 Util .log ("Updated the vhd-parent field for child %s with %s" % \
14231423 (self .uuid , self .parentUuid ))
14241424 except :
@@ -1685,7 +1685,7 @@ def _setParent(self, parent) -> None:
16851685 self .parentUuid = parent .uuid
16861686 parent .children .append (self )
16871687 try :
1688- self .setConfig (self .DB_VHD_PARENT , self .parentUuid )
1688+ self .setConfig (self .DB_VDI_PARENT , self .parentUuid )
16891689 Util .log ("Updated the vhd-parent field for child %s with %s" % \
16901690 (self .uuid , self .parentUuid ))
16911691 except :
@@ -2541,7 +2541,7 @@ def _doCoalesceLeaf(self, vdi):
25412541 # garbage
25422542
25432543 # update the VDI record
2544- vdi .parent .delConfig (VDI .DB_VHD_PARENT )
2544+ vdi .parent .delConfig (VDI .DB_VDI_PARENT )
25452545 if vdi .parent .vdi_type == VdiType .RAW :
25462546 vdi .parent .setConfig (VDI .DB_VDI_TYPE , VdiType .RAW )
25472547 vdi .parent .delConfig (VDI .DB_VHD_BLOCKS )
@@ -2845,7 +2845,7 @@ def _undoInterruptedCoalesceLeaf(self, childUuid, parentUuid):
28452845 Util .log ("Renaming child back to %s" % childUuid )
28462846 child .rename (childUuid )
28472847 Util .log ("Updating the VDI record" )
2848- child .setConfig (VDI .DB_VHD_PARENT , parentUuid )
2848+ child .setConfig (VDI .DB_VDI_PARENT , parentUuid )
28492849 child .setConfig (VDI .DB_VDI_TYPE , VdiType .VHD )
28502850 util .fistpoint .activate ("LVHDRT_coaleaf_undo_after_rename2" , self .uuid )
28512851
@@ -3065,7 +3065,7 @@ def _undoInterruptedCoalesceLeaf(self, childUuid, parentUuid):
30653065 Util .log ("Renaming child back to %s" % childUuid )
30663066 child .rename (childUuid )
30673067 Util .log ("Updating the VDI record" )
3068- child .setConfig (VDI .DB_VHD_PARENT , parentUuid )
3068+ child .setConfig (VDI .DB_VDI_PARENT , parentUuid )
30693069 child .setConfig (VDI .DB_VDI_TYPE , VdiType .VHD )
30703070 util .fistpoint .activate ("LVHDRT_coaleaf_undo_after_rename2" , self .uuid )
30713071
@@ -3430,7 +3430,7 @@ def _undoInterruptedCoalesceLeaf(self, childUuid, parentUuid):
34303430 Util .log ('Renaming child back to {}' .format (childUuid ))
34313431 child .rename (childUuid )
34323432 Util .log ('Updating the VDI record' )
3433- child .setConfig (VDI .DB_VHD_PARENT , parentUuid )
3433+ child .setConfig (VDI .DB_VDI_PARENT , parentUuid )
34343434 child .setConfig (VDI .DB_VDI_TYPE , VdiType .VHD )
34353435
34363436 # TODO: Maybe deflate here.
0 commit comments