@@ -353,17 +353,17 @@ def forbid_implicit_storage_pools(self):
353353 def _get_datacenter (self , host_description ):
354354 if host_description .get ("datacenter" ) is not None :
355355 return str (host_description .get ("datacenter" ))
356- return str (self ._walle .get_datacenter (host_description [ "name" ] ))
356+ return str (self ._walle .get_datacenter (host_description . get ( "name" , host_description . get ( "host" )) ))
357357
358358 def _get_rack (self , host_description ):
359359 if host_description .get ("rack" ) is not None :
360360 return str (host_description .get ("rack" ))
361- return str (self ._walle .get_rack (host_description [ "name" ] ))
361+ return str (self ._walle .get_rack (host_description . get ( "name" , host_description . get ( "host" )) ))
362362
363363 def _get_body (self , host_description ):
364364 if host_description .get ("body" ) is not None :
365365 return str (host_description .get ("body" ))
366- return str (self ._walle .get_body (host_description [ "name" ] ))
366+ return str (self ._walle .get_body (host_description . get ( "name" , host_description . get ( "host" )) ))
367367
368368 def _collect_drives_info (self , host_description ):
369369 host_config_id = host_description .get ("host_config_id" , None )
@@ -381,7 +381,7 @@ def _collect_drives_info(self, host_description):
381381
382382 def __collect_host_info (self , node_id , host_description ):
383383 return KiKiMRHost (
384- hostname = host_description [ "name" ] ,
384+ hostname = host_description . get ( "name" , host_description . get ( "host" )) ,
385385 node_id = host_description .get ("node_id" , node_id ),
386386 drives = self ._collect_drives_info (host_description ),
387387 ic_port = host_description .get ("ic_port" , DEFAULT_INTERCONNECT_PORT ),
@@ -475,7 +475,7 @@ def accepted_cluster_uuids(self):
475475 def host_configs (self ):
476476 converted_host_configs = []
477477 for host_config in self .__cluster_description .get ("host_configs" , []):
478- host_config_drives = host_config .get ("drives" , [] )
478+ host_config_drives = host_config .get ("drives" , host_config . get ( "drive" , []) )
479479 converted_host_configs .append (
480480 HostConfig (
481481 host_config_id = host_config ["host_config_id" ],
0 commit comments