original_docstring: Update session persistence for virtual server.
  
          Handles setting persistence type and creating associated
          profiles if necessary. This should be called when the pool
          is created because LBaaS pools define persistence types, not
          listener objects.
  
          :param service: Dictionary which contains a listener, pool,
          and load balancer definition.
          :param bigips: Array of BigIP class instances to update.
          
docstring: Update session persistence for virtual server.
  Handles setting persistence type and creating associated
  profiles if necessary. This should be called when the pool
  is created because LBaaS pools define persistence types, not
  listener objects.
docstring_tokens: Update session persistence for virtual server . Handles setting persistence type and creating associated profiles if necessary . This should be called when the pool is created because LBaaS pools define persistence types not listener objects .
code: def update_session_persistence(self, service, bigips):
          """Update session persistence for virtual server.
  
          Handles setting persistence type and creating associated
          profiles if necessary. This should be called when the pool
          is created because LBaaS pools define persistence types, not
          listener objects.
  
          :param service: Dictionary which contains a listener, pool,
          and load balancer definition.
          :param bigips: Array of BigIP class instances to update.
          """
          pool = service["pool"]
          if "session_persistence" in pool and pool['session_persistence']:
              vip = self.service_adapter.get_virtual_name(service)
              persistence = pool['session_persistence']
              persistence_type = persistence['type']
              vip_persist = self.service_adapter.get_session_persistence(service)
              for bigip in bigips:
                  if persistence_type == 'HTTP_COOKIE':
                      self._add_profile(vip, 'http', bigip)
                  elif persistence_type == 'APP_COOKIE':
                      self._add_profile(vip, 'http', bigip)
                      if 'cookie_name' in persistence:
                          self._add_cookie_persist_rule(vip, persistence, bigip)
  
                  # profiles must be added before setting profile attribute
                  self.vs_helper.update(bigip, vip_persist)
                  LOG.debug("Set persist %s" % vip["name"])
code_tokens: def update_session_persistence ( self , service , bigips ) : pool = service [ "pool" ] if "session_persistence" in pool and pool [ 'session_persistence' ] : vip = self . service_adapter . get_virtual_name ( service ) persistence = pool [ 'session_persistence' ] persistence_type = persistence [ 'type' ] vip_persist = self . service_adapter . get_session_persistence ( service ) for bigip in bigips : if persistence_type == 'HTTP_COOKIE' : self . _add_profile ( vip , 'http' , bigip ) elif persistence_type == 'APP_COOKIE' : self . _add_profile ( vip , 'http' , bigip ) if 'cookie_name' in persistence : self . _add_cookie_persist_rule ( vip , persistence , bigip ) self . vs_helper . update ( bigip , vip_persist ) LOG . debug ( "Set persist %s" % vip [ "name" ] )
short_docstring: Update session persistence for virtual server.
short_docstring_tokens: Update session persistence for virtual server .
comment: """Update session persistence for virtual server.
  
          Handles setting persistence type and creating associated
          profiles if necessary. This should be called when the pool
          is created because LBaaS pools define persistence types, not
          listener objects.
  
          :param service: Dictionary which contains a listener, pool,
          and load balancer definition.
          :param bigips: Array of BigIP class instances to update.
          """$SEP$# profiles must be added before setting profile attribute