'Check whether VF related configurations is valid and proceed.'

def check_change_vf_context(self):

    (vf_enabled, session_data) = self.is_vf_enabled()
    LOG.debug('VF    enabled    on    switch:    %(vfenabled)s.', {'vfenabled': vf_enabled})
    if vf_enabled:
        if (self.vfid is None):
            msg = _('No    VF    ID    is    defined    in    the    configuration    file.')
            LOG.error(msg)
            raise exception.BrocadeZoningHttpException(reason=msg)
        elif (self.vfid != 128):
            self.change_vf_context(self.vfid, session_data)
    elif (self.vfid is not None):
        msg = _('VF    is    not    enabled.')
        LOG.error(msg)
        raise exception.BrocadeZoningHttpException(reason=msg)
