Configuring policy extensions
When your policy extension file is ready, import it to the NetScaler appliance. The import process copies the extension file into a directory on the NetScaler appliance and checks for syntax errors.
After the import, you have to make the extension file available for use in the policy expressions.
Note:
- Use the
import
command to download the file content from an external source\<src\>
, or an internal source, onto the NetScaler file system.- Use the
add
command to load the file content into one or more packet engines for the first time.- If the file content is updated, you can download the new content to the NetScaler file system by using the
import
command with the overwrite argument.- Use the
update
command to load the updated content to one or more packet engines.
Configure policy extensions by using the CLI
-
Import the policy extension file to the NetScaler Appliance, from either a web server (using HTTP) or your local workstation.
-
HTTP Import
If you have a web server available, you can store the extension file in the webserver directory and import it to the NetScaler appliance.
import ns extension <src> <name> [-comment<string>] [-overwrite] <!--NeedCopy-->
Example:
import ns extension http://myhost/path/to/extension myextension -comment "Custom crc calculation" <!--NeedCopy-->
-
Local Import
You can use the SSH client to copy the extension file from your workstation to the
/var/tmp
directory of the NetScaler appliancescp extension-file-name <ns-userid@ns-ip-addr>:/var/tmp <!--NeedCopy-->
where,
-
extension-file-name
is the name of the extension file on your client machine. -
ns-userid
is the NetScaler appliance user with permission to write to /var/tmp. -
ns-ip-addr
is the NetScaler IP address.
After copying the file to the NetScaler appliance, run the import command on the NetScaler appliance.
import ns extension local:<extension-file-name> <extension-name> <!--NeedCopy-->
Note:
The CLI must be used to import a local extension file, by running the
import
command. -
-
-
Add the policy extension to the packet engine for evaluation.
add ns extension <name> [-comment <string>] <!--NeedCopy-->
Example:
add ns extension myextension <!--NeedCopy-->
After an extension file is imported, you can update it, if you included the -overwrite parameter in the import command, or remove it. You can also display the details of an imported extension file.
Update an extension file on the NetScaler appliance from the source
At the command prompt, type:
update ns extension <name>
<!--NeedCopy-->
Note:
You can update the extension file only after importing the specified extension file to the NetScaler appliance with the -overwrite parameter.
Example:
update ns extension myextension
<!--NeedCopy-->
Remove an extension file from the NetScaler appliance
At the command prompt type:
rm ns extension <name>
<!--NeedCopy-->
Example:
rm ns extension myextension
<!--NeedCopy-->
Display the details of the specified extension function on the NetScaler appliance
At the command prompt, type:
show ns extension <name>
<!--NeedCopy-->
Example:
show ns extension myextension
<!--NeedCopy-->
Configure policy extensions by using the GUI
-
Import the policy extension file to the NetScaler Appliance, from either a web server (using HTTP) or your local workstation.
-
Navigate to AppExpert > Policy Extensions, click Policy Extension, from the Import From drop-down list, select the URL for the location of the extension file that you want to import.
-
Navigate to AppExpert > Policy Extensions, and on the Policy Extension tab, import the extension file by selecting File in the Import From drop-down list.
-
-
Add the policy extension to the packet engine for evaluation.
Navigate to AppExpert > Policy Extensions, and on the Policy Extensions tab, add the extension file.
Update an extension file on the NetScaler appliance from the source
Navigate to AppExpert > Policy Extensions, and on the Policy Extensions tab, update the extension file.
Remove an extension file from the NetScaler appliance
Navigate to AppExpert > Policy Extensions, and on the Policy Extensions tab, remove the extension file.
Display the details of the specified extension function on the NetScaler appliance
Navigate to AppExpert > Policy Extensions, and on the Policy Extensions Functions tab, click the drop-down list arrow of the extension function that you want to see the details.