def chown_for_id_maps(path, id_maps):
 uid_maps_str = ','.join([_id_map_to_config(id_map) for id_map in id_maps if isinstance(id_map, vconfig.LibvirtConfigGuestUIDMap)])
 gid_maps_str = ','.join([_id_map_to_config(id_map) for id_map in id_maps if isinstance(id_map, vconfig.LibvirtConfigGuestGIDMap)])
 execute('nova-idmapshift', '-i', '-u', uid_maps_str, '-g', gid_maps_str, path, run_as_root=True)

def chown_for_id_maps ( path , id_maps ) : uid_maps_str = ',' . join ( [ _id_map_to_config ( id_map ) for id_map in id_maps if isinstance ( id_map , vconfig . LibvirtConfigGuestUIDMap ) ] ) gid_maps_str = ',' . join ( [ _id_map_to_config ( id_map ) for id_map in id_maps if isinstance ( id_map , vconfig . LibvirtConfigGuestGIDMap ) ] ) execute ( 'nova-idmapshift' , '-i' , '-u' , uid_maps_str , '-g' , gid_maps_str , path , run_as_root = True )
change ownership of file or directory for an id mapped environment .