Coverage for drivers/on_slave : 89%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
#!/usr/bin/python # # Copyright (C) Citrix Systems Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; version 2.1 only. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # A plugin for synchronizing slaves when something changes on the Master
"""Perform several actions in one call (to save on round trips)""" args["lvName%d" % i], False) args["lvName%d" % i], False) else:
"""Check if VDI <args["vdiUuid"]> is open by a tapdisk on this host"""
# FIXME: ugly hacks to create a VDI object without a real SRCommand to # avoid having to refactor the core files "server": None, "device": "/HACK", # Hack for custom XCP-ng drivers. "masterhost": None, # MooseFS "rootpath": None, # MooseFS "serverpath": None, # CephFS "location": "/HACK" # ZFS }
# Another ugly piece of code to load a real Linstor SR, otherwise # we can't fetch the VDI path. host_ref = util.get_this_host_ref(session) sr_ref = session.xenapi.SR.get_by_uuid(sr_uuid)
pbd = util.find_my_pbd(session, host_ref, sr_ref) if pbd is None: raise util.SMException('Failed to find Linstor PBD')
cmd.dconf = session.xenapi.PBD.get_device_config(pbd)
# session_ref param is required to have a valid session when SR object is created. # It's not the case here, so attach the current session object to make LinstorSR happy. sr.session = session
"""Refresh the size of LUNs backing the SCSIid on the local node.""" % args) else:
import XenAPIPlugin XenAPIPlugin.dispatch({ "multi": multi, "is_open": is_open, "refresh_lun_size_by_SCSIid": refresh_lun_size_by_SCSIid}) |