original_docstring: Adds cookie persist rules to virtual server instance.
  
          :param vip: Dictionary which contains name and partition of
          virtual server.
          :param persistence: Persistence definition.
          :param bigip: Single BigIP instances to update.
          
docstring: Adds cookie persist rules to virtual server instance.
docstring_tokens: Adds cookie persist rules to virtual server instance .
code: def _add_cookie_persist_rule(self, vip, persistence, bigip):
          """Adds cookie persist rules to virtual server instance.
  
          :param vip: Dictionary which contains name and partition of
          virtual server.
          :param persistence: Persistence definition.
          :param bigip: Single BigIP instances to update.
          """
          cookie_name = persistence['cookie_name']
          rule_def = self._create_app_cookie_persist_rule(cookie_name)
          rule_name = 'app_cookie_' + vip['name']
  
          r = bigip.tm.ltm.rules.rule
          if not r.exists(name=rule_name, partition=vip["partition"]):
              r.create(name=rule_name,
                       apiAnonymous=rule_def,
                       partition=vip["partition"])
              LOG.debug("Created rule %s" % rule_name)
  
          u = bigip.tm.ltm.persistence.universals.universal
          if not u.exists(name=rule_name, partition=vip["partition"]):
              u.create(name=rule_name,
                       rule=rule_name,
                       partition=vip["partition"])
              LOG.debug("Created persistence universal %s" % rule_name)
code_tokens: def _add_cookie_persist_rule ( self , vip , persistence , bigip ) : cookie_name = persistence [ 'cookie_name' ] rule_def = self . _create_app_cookie_persist_rule ( cookie_name ) rule_name = 'app_cookie_' + vip [ 'name' ] r = bigip . tm . ltm . rules . rule if not r . exists ( name = rule_name , partition = vip [ "partition" ] ) : r . create ( name = rule_name , apiAnonymous = rule_def , partition = vip [ "partition" ] ) LOG . debug ( "Created rule %s" % rule_name ) u = bigip . tm . ltm . persistence . universals . universal if not u . exists ( name = rule_name , partition = vip [ "partition" ] ) : u . create ( name = rule_name , rule = rule_name , partition = vip [ "partition" ] ) LOG . debug ( "Created persistence universal %s" % rule_name )
short_docstring: Adds cookie persist rules to virtual server instance.
short_docstring_tokens: Adds cookie persist rules to virtual server instance .
comment: """Adds cookie persist rules to virtual server instance.
  
          :param vip: Dictionary which contains name and partition of
          virtual server.
          :param persistence: Persistence definition.
          :param bigip: Single BigIP instances to update.
          """