def GetLBSessionPersistence(self):

        if self.extensions_enabled:
            return CitrixNetScalerLBSessionPersistence(
                lbservice=self.lbservice, lbresource=self.lbresource)
        else:
            return LBSessionPersistence(lbservice=self.lbservice,
                                        lbresource=self.lbresource)
示例#2
0
    def validate_sessionpersistence_object_for_add(self, sessionpersistence):

        errors = LBSessionPersistence.validate_sessionpersistence_object_for_add(
            self, sessionpersistence)

        if "timeout" in sessionpersistence:
            error = self.validate_timeout_value(sessionpersistence)

            if error:
                errors.append(error)

        return errors
示例#3
0
    def validate_persistencetype_value(self, sessionpersistence, errors=[]):

        error = LBSessionPersistence.validate_persistencetype_value(
            self, sessionpersistence)

        if not error:
            return None

        if sessionpersistence.persistenceType == "SOURCE_IP":
            return None

        return error
示例#4
0
 def GetLBSessionPersistence(self):
     return LBSessionPersistence(lbservice=self.lbservice,
                                 lbresource=self.lbresource)
示例#5
0
 def __init__(self, lbservice, lbresource=None):
     LBSessionPersistence.__init__(self, lbservice, lbresource)
示例#6
0
 def GetLBSessionPersistence(self):
     return LBSessionPersistence(lbservice=self)