'Get\'s the live ScLiveVolume object for the vol with primaryid.
:param primaryid: InstanceId of the primary volume.
:param name: Volume name associated with this live volume.
:return: ScLiveVolume object or None'

def get_live_volume(self, primaryid, name=None):

    sclivevol = None
    if primaryid:
        lvs = self._sc_live_volumes(primaryid.split('.')[0])
        if (not lvs):
            lvs = self._get_live_volumes()
        if lvs:
            for lv in lvs:
                if ((lv.get('primaryVolume') and (lv['primaryVolume']['instanceId'] == primaryid)) or (lv.get('secondaryVolume') and (lv['secondaryVolume']['instanceId'] == primaryid))):
                    sclivevol = lv
                    break
                if (name and (sclivevol is None)):
                    if ((name in lv['instanceName']) or (lv.get('secondaryVolume') and (name in lv['secondaryVolume']['instanceName']))):
                        sclivevol = lv
    LOG.debug('get_live_volume:    %r', sclivevol)
    return sclivevol
