Create a StyleBook to upload files to NetScaler Console
StyleBook configuration
Build your StyleBook -1
name: upload-geolocations
namespace: com.citrix.adc.stylebooks.samples
version: "1.0"
display-name: GeoLocation File Upload
description: This StyleBook is used to upload a geolocation file to NetScaler
schema-version: "1.0"
import-stylebooks:
-
namespace: netscaler.nitro.config
version: "11.1"
prefix: ns
parameters:
-
name: locationfile
label: Location File
description: The system file path of the geolocation file on NetScaler Console
type: file
required: true
components:
-
name: upload-file-comp
type: ns::systemfile
properties:
filename: $parameters.locationfile.filename
filelocation: "/var/netscaler/inbuilt_db/"
filecontent: base64.encode($parameters.locationfile.contents)
Build your StyleBook - 2
name: upload-geolocations-alt
namespace: com.citrix.adc.stylebooks.samples
version: "1.0"
display-name: GeoLocation File Upload
description: This StyleBook is used to upload a geolocation file to NetScaler
schema-version: "1.0"
import-stylebooks:
-
namespace: netscaler.nitro.config
version: "11.1"
prefix: ns
parameters:
-
name: filename
label: Location Filename
description: The name of the location file on the NetScaler
type: string
required: true
-
name: filecontents
label: Location File Contents
description: The contents of the location file
type: string
required: true
components:
-
name: upload-file-comp
type: ns::systemfile
properties:
filename: $parameters.filename
filelocation: "/var/NetScaler/inbuilt_db/"
filecontent: base64.encode($parameters.filecontents)
Creating configurations to upload files
-
In NetScaler Console, navigate to Applications > Configuration, and click Create New. The Choose StyleBook page displays all the StyleBooks that are available in your NetScaler Console. Scroll down and select the StyleBook that you imported.The StyleBook parameters appear as a user-interface page that allows you to enter the values for all the parameters defined in this StyleBook.
-
Enter the name of the load balancer and the virtual IP address in the basic load balancer settings section.
-
In Location File section, enter the name or location of the file.NoteEnsure that in NetScaler Console the file is located under the current tenant's folder only. Use any file transfer protocol to copy the file to NetScaler Console file system.
-
You might be asked to provide your user credentials before you access the target instances.
-
Select the target NetScaler instance on which the configuration needs to be created, and click Create.