Brocade Virtual ADX OpenScript API Guide (Supporting ADX v Manuel d'utilisateur Page 109

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 132
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 108
Brocade Virtual ADX OpenScript API Guide 97
53-1003243-01
Methods
7
Return Values
None
Example
OS_SLB:: passive_persist($method, $string)
Causes the system to add a persist entry to the system.
Context
This function can be called from HTTP events.
Usage
Can be used with the persist action to perform passive persist.
Input Parameters
The following table contains the input values.
Return Values
None
Example
TABLE 120 Input Values
Name Type Description
$method method Either value of add or delete.
$string string The string to persist on.
use OS_HTTP_REQUEST;
use OS_SLB;
sub HTTP_REQUEST{
OS_SLB::persist("hash-to-bucket", OS_HTTP_REQUEST::url);
}
use OS_SLB;
use OS_HTTP_RESPONSE;
sub HTTP_RESPONSE {
$mySetCookieHeader = OS_HTTP_RESPONSE::header("Set-Cookie");
if ( $mySetCookieHeader =~ m/.*ServerID=(\d+).*/ ) {
$CookieValue = $1;
OS_SLB::passive_persist("add","$CookieValue");
}
}
Vue de la page 108
1 2 ... 104 105 106 107 108 109 110 111 112 113 114 ... 131 132

Commentaires sur ces manuels

Pas de commentaire