StyleBook configuration

Use target NetScaler instances as data sources

You can also use the target NetScaler of your configuration itself as a data source input for your configuration. In this scenario, you might want to refer the existing configuration on the target NetScaler to create new configurations on that NetScaler.

To use target instances as data sources, you don’t have to use the datum built-in type parameter, since no NetScaler instances need to be selected by the StyleBook user. You can directly write expressions in the components section of your StyleBook that retrieve data from the target NetScaler instance.

Use the following expression to retrieve the following from the target NetScaler instances:

  • Collections:



  • Attributes:


Example StyleBook to use the target NetScaler instance as a data source

The following is an example StyleBook to demonstrate how to use the target NetScaler instance as a data source:

name: lb-add-service-with-target-adc
namespace: com.citrix.adc.stylebooks
version: "1.1"
display-name: "HTTP/SSL LoadBalancing StyleBook with Service Binding"
description: "This stylebook defines a typical Load Balanced Application configuration."
schema-version: "1.0"
    namespace: netscaler.nitro.config
    prefix: ns
    version: "10.5"

    name: servicegroup-comp
    type: ns::servicegroup
      servicegroupname: "lb-demo-svcgrp"
      servicetype: "HTTP"

        name: lbvserver-svg-binding
        type: ns::lbvserver_servicegroup_binding
        repeat: $current-target-as-datasource.collections.lbvserver
        repeat-item: lbvsrvr
        repeat-condition: $ == "lb-demo-lb"
          name: $
          servicegroupname: $

In this example, the configuration pack checks for the load-balancing virtual servers in the target NetScaler instances. And, if the given load-balancing virtual server IP address is matched, it retrieves the name and service group name.

Target NetScaler instance as a data source

Use target NetScaler instances as data sources