Brocade Virtual ADX OpenScript API Guide (Supporting ADX v Uživatelský manuál Strana 109

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 132
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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");
}
}
Zobrazit stránku 108
1 2 ... 104 105 106 107 108 109 110 111 112 113 114 ... 131 132

Komentáře k této Příručce

Žádné komentáře