.NET Core sample projects that interacts with the Citrix Netscaler appliance via the Citrix NITRO APIs. This can use the Netscaler CPX docker container.
npm install generator-citrix-netscalerThis generator builds a .NET Core application, so you will also
need the .NET Core SDK and runtime from Microsoft. You can find
the the .NET Core download here for the different platforms.
While not required for these samples, it is always good to have a source code editor.Visual Studio Code is a good one since it knows how to handle .NET core projects but feel free to an editor that makes you happy. Sublime Text or Brackets are also good editors.
![]() | ![]() |
``bash`
sudo npm install -g yo
sudo npm install -g generator-citrix-netscaler
Then generate your new project:
`bash`
yo citrix-netscaler
This will prompt you for you Netscaler information and generate a starter project that shows how to authenticate to the
Citrix Netscaler CPX container
Example:
`bash`
yo citrix-netscaler:features`
Produces NSListFeatures.cs in the project directory. In order to use the new methods
you should add the following method call to your main calling method.csharp`
await ListFeatures();
Example:
`bash`
yo citrix-netscaler:ip`
Produces NSIP.cs in the project directory. In order to use the new methods
you should add the following method call to your main calling method.csharp`
await Listips();
Example:
`bash
yo citrix-netscaler:cpxsupport
$ Would you like to add Netscaler CPX to y (Y/n)
$ Please enter the local HTTP port to map to the http port in the docker container (32777)
$ Please enter the local HTTPS port to map to the https port in the docker container (32778)
$ Please enter the local SSH port to map to the SSH port in the docker container (32779)
$ Please enter the local SNMP port to map to the SNMP port in the docker container (32780)
`
Example:
`bash`
yo citrix-netscaler:hostname`
Produces NSHostname.cs in the project directory. In order to use the new methods
you should add the following method call to your main calling method.csharp`
//List hostname
await ListHostname();
//set the hostname
await SetHostname("MyNewHostname");
Example:
`bash`
yo citrix-netscaler:listvservers`
Produces NSListServers.cs in the project directory. In order to use the new methods
you should add the following method call to your main calling method.csharp``
await ListVirtualServers();
> *At Citrix, we’re committed to building a world-class ecosystem
through open platforms. Our offerings power mission-critical business
operations for users, IT and partners, and we provide a number of APIs,
SDKs and tools to help you extend and integrate with our services. We’re excited to work
with you to make Citrix your platform of choice.*
[npm-image]: https://badge.fury.io/js/generator-citrix-netscaler.svg
[npm-url]: https://npmjs.org/package/generator-citrix-netscaler