Creating the DPI Script Service (SRC CLI)

To create the script service:

  1. Create a script service in the [edit services scope name service name] hierarchy. In this sample procedure, the service is configured in the DPI service scope, and DPI is the name of the service.
    user@host# edit services scope DPI service DPI
  2. Set the type of service to script.
    [edit services scope DPI service DPI]user@host# set type script
  3. (Optional) Configure other properties as needed for your service.
  4. Configure the script properties.
    [edit services scope DPI service DPI]user@host# edit script
  5. Configure net.juniper.smgt.dpiscriptservice.DpiService as the name of the class that implements the script service.
    [edit services scope DPI service DPI script]user@host# set class-name net.juniper.smgt.dpiscriptservice.DpiScriptService
  6. Configure Java archive file as the type of script that the script service uses.
    [edit services scope DPI service DPI script]user@host# set script-type java-archive
  7. Specify the filename of the script service implementation so that its contents will be loaded into the file option. Copy the dpiss.jar file to the C Series Controller before you specify the filename. In this sample procedure, the dpiss.jar file was copied from a location that is accessible by a URL (such as an FTP or HTTP server) to the /tmp directory.
    [edit services scope DPI service DPI script]user@host# run file copy URL /tmp/dpiss.jar user@host# set filename /tmp/dpiss.jar
  8. (Optional) From configuration mode, enter the service parameter configuration and configure values for parameters.
    user@host# edit services scope DPI service DPI parameter [edit services scope DPI service DPI parameter]user@host# set substitution [substitution...]

    For example, to specify the configuration file that is used or to specify whether the configuration file is reloaded for each script service activation:

    user@host# set substitution dpiConfig=\"resource/dpiConf.xml\"user@host# set substitution dpiConfigDebug=\"off\"
  9. (Optional) Verify your configuration.
    [edit services scope DPI service DPI]
    user@host# show 
    

Related Documentation