-
-
-
-
Importing and synchronizing StyleBooks from GitHub repository
-
Simplified migration of Citrix ADC application configuration using StyleBooks
-
Use API to create configurations from StyleBooks
-
-
Use ADM log messages for managing and monitoring your infrastructure
-
-
Citrix ADC automation using Citrix ADM in Cisco ACI hybrid mode
-
Citrix ADC device package in Cisco ACI's cloud orchestrator mode
-
This content has been machine translated dynamically.
Dieser Inhalt ist eine maschinelle Übersetzung, die dynamisch erstellt wurde. (Haftungsausschluss)
Cet article a été traduit automatiquement de manière dynamique. (Clause de non responsabilité)
Este artículo lo ha traducido una máquina de forma dinámica. (Aviso legal)
此内容已经过机器动态翻译。 放弃
このコンテンツは動的に機械翻訳されています。免責事項
이 콘텐츠는 동적으로 기계 번역되었습니다. 책임 부인
Este texto foi traduzido automaticamente. (Aviso legal)
Questo contenuto è stato tradotto dinamicamente con traduzione automatica.(Esclusione di responsabilità))
This article has been machine translated.
Dieser Artikel wurde maschinell übersetzt. (Haftungsausschluss)
Ce article a été traduit automatiquement. (Clause de non responsabilité)
Este artículo ha sido traducido automáticamente. (Aviso legal)
この記事は機械翻訳されています.免責事項
이 기사는 기계 번역되었습니다.책임 부인
Este artigo foi traduzido automaticamente.(Aviso legal)
这篇文章已经过机器翻译.放弃
Questo articolo è stato tradotto automaticamente.(Esclusione di responsabilità))
Translation failed!
Use API to create configurations from StyleBooks
After you have built your StyleBook, you have to import it to Citrix Application Delivery Management (ADM) to use it either by using the Citrix ADM or by using Citrix ADM APIs. Citrix ADM validates your StyleBook when you import it, and if the validation is successful, your StyleBook appears on the Citrix ADM catalog of StyleBooks, ready to be used for creating configurations.
You can now use the StyleBook APIs to create configurations based on this StyleBook. You can use any tool such as the curl command line tool or the Postman chrome browser extension to send HTTP requests to Citrix ADM.
Example 1
Consider the “lb-vserver” StyleBook you have created in StyleBook to Create a Load Balancing Virtual Server. Use REST API to create a configuration pack from this StyleBook as follows:
POST
https://<MAS-DNS-or-IP>/stylebook/nitro/v1/config/stylebooks/com.example.stylebooks/0.1/lb-vserver/configpacks
<!--NeedCopy-->
Content-Type: application/json
Accept: application/json
{
"configpack":
{
"parameters": {
"name": "lb1",
"ip": "10.102.117.31"
},
"target_devices":
[
{
"id": "deecee30-f478-4446-9741-a85041903410"
}
]
}
}
<!--NeedCopy-->
In this HTTP request, the id (for example, “deecee30-f478-4446-9741-a85041903410”) is the instance ID of the Citrix ADC instance on which the load balancing virtual server lb1 with IP address 10.102.117.31 is created. The instance ID of the Citrix ADC instance is retrieved from Citrix ADM.
To obtain the ID of an instance managed by Citrix ADM, you can use Citrix ADM APIs. For example, to retrieve the instance ID os a Citrix ADC instance whose IP address is 192.168.153.160, you can use the following API:
GET https://<MAS-IP>/nitro/v1/config/ns?filter=ip_address:192.168.153.160
<!--NeedCopy-->
Accept: application/json
<!--NeedCopy-->
The response contains the ID in the payload:
200
OK
Content-Type: application/json
{
"errorcode": 0,
"message": "Done",
"operation": "get",
"resourceType": "ns",
"username": "nsroot",
"tenant_name": "Owner",
"resourceName": "",
"ns":
[
{
"is_grace": "false",
"hostname": "",
"std_bw_config": "0",
"gateway_deployment": "false",
…"id": "deecee30-f478-4446-9741-a85041903410",
...
}
]
}
<!--NeedCopy-->
If the configuration pack is successfully created, you receive the following HTTP response:
200 OK
Content-Type: application/json
{
"configpack":
{
"config_id": "1460806080"
}
}
<!--NeedCopy-->
You have created your first configuration pack that is uniquely identified by using the id 1460806080. You can use this ID to query, update, or delete the configuration.
Example 2
You can use the same StyleBook to create another configuration pack and execute it on the same or different Citrix ADC instances. In this example, create another configuration and provide a different name and IP address for the virtual server and also specify LEASTCONNECTION as the load balancing method. Deploy this configuration on two Citrix ADC instances.
The HTTP request is as follows:
POST
https://<MAS-DNS-or-IP>/stylebook/nitro/v1/config/stylebooks/com.example.stylebooks/0.1/lb-vserver/configpacks
<!--NeedCopy-->
Content-Type: application/json
Accept: application/json
{
"configpack":
{
"parameters":
{
"name": "lb2",
"ip": "10.102.117.32",
"lb-alg": "LEASTCONNECTION"
},
"target_devices"
[
{"id": "deecee30-f478-4446-9741-a85041903410"},
{"id": "debecc60-d589-4557-8632-a74032802412"}
]
}
}
<!--NeedCopy-->
In this HTTP request, the load balancing virtual server lb2 with IP address 10.102.117.32 is created on the two Citrix ADC instances represented by the ids “deecee30-f478-4446-9741-a85041903410” and “debecc60-d589-4557-8632-a74032802412”.
On successful creation of the configuration pack, the following HTTP response is received:
200 OK
Content-Type: application/json
{
"configpack":
{
"config_id": "1657696292"
}
}
<!--NeedCopy-->
This new configuration pack has a different id 165769629. You can update or remove this configuration by using this id.
Example 3
Consider the “basic-lb-config” StyleBook you have created in StyleBook to Create a Basic Load balancing Configuration. Use REST API to create a configuration pack from this StyleBook as follows:
POST
http://<MAS-DNS-or-IP>/stylebook/nitro/v1/config/stylebooks/com.example.stylebooks/0.1/basic-lb-config/configpacks
<!--NeedCopy-->
Content-Type: application/json
Accept: application/json
{
"configpack":
{
"parameters":
{
"name": "myapp",
"ip": "10.70.122.25",
"svc-servers":
["192.168.100.11","192.168.100.12"],
"svc-port": 8080
},
"target_devices":
[
{
"id": "deecee30-f478-4446-9741-a85041903410"
},
{
"id": "debecc60-d589-4557-8632-a74032802412"
}
]
}
}
<!--NeedCopy-->
In this HTTP request, the load balancing configuration is executed on two Citrix ADC instances. You can log on to these Citrix ADC instances to verify whether a virtual server and a service group with two services bound are created.
Example 4
Consider the composite StyleBook composite-example you created in Create a Composite StyleBook. Use REST API to create a configuration pack from this StyleBook as follows:
POST http://<MAS-DNS-or-IP>/stylebook/nitro/v1/config/stylebooks/com.example.stylebooks/0.1/composite-example/configpacks
<!--NeedCopy-->
Content-Type: application/json
Accept: application/json
{
"configpack":
{
"parameters": {
"name": "myapp",
"ip": "2.2.2.2",
"svc-servers": ["10.102.29.52","10.102.29.53"]
},
"target_devices":
[
{
"id": "deecee30-f478-4446-9741-a85041903410"
},
{
"id": "debecc60-d589-4557-8632-a74032802412"
}
]
}
}
<!--NeedCopy-->
In this HTTP request, the configuration is created on two Citrix ADC instances represented by their IDs. If you log on to the Citrix ADC instances, you can view the configuration objects created by the “basic-lb-config” StyleBook that was imported into the “composite-example” StyleBook. You can also see a new HTTP monitor called “myapp-mon” that was part of the ”composite-example” StyleBook.
On successful creation of the configuration pack, the following HTTP response is received:
200 OK
Content-Type: application/json{
"configpack": {
"config_id": "4917276817"
}
}
<!--NeedCopy-->
Updating a configuration
To update this configuration, for example, by adding a new backend server with IP address 10.102.29.54 to the load balancing virtual server myapp, use the API for updating a configuration pack as follows:
PUT http://<MAS-DNS-or-IP>/stylebook/nitro/v1/config/stylebooks/com.example.stylebooks/0.1/composite-example/configpacks/4917276817
<!--NeedCopy-->
Content-Type: application/json
Accept: application/json
{
"configpack": {
"parameters": {
"name": "myapp",
"ip": "2.2.2.2",
"svc-servers": ["10.102.29.52","10.102.29.53","10.102.29.54"]
},
"target_devices":
[
{
"id": "deecee30-f478-4446-9741-a85041903410"
},
{
"id": "debecc60-d589-4557-8632-a74032802412"
}
]
}
}
<!--NeedCopy-->
On successful update of the configuration pack, the following HTTP response is received:
200 OK
Content-Type: application/json
{
"configpack": {
"config-id": "4917276817"
}
}
<!--NeedCopy-->
Deleting a configuration
To delete this configuration (from all the Citrix ADC instances), you can use the API for deleting a configuration pack as follows:
DELETE http://<MAS-DNS-or-IP>/stylebook/nitro/v1/config/stylebooks/com.example.stylebooks/0.1/composite-example/configpacks/4917276817
<!--NeedCopy-->
Accept: application/json
<!--NeedCopy-->
On successful deletion of the configuration pack, the following HTTP response is received:
200 OK
Content-Type: application/json
{
"configpack": {
"config_id": "4917276817"
}
}
<!--NeedCopy-->
You can log on to the Citrix ADC instance and verify that all the configuration objects that are part of this configuration pack have been removed.
If you want to remove the configuration from specific Citrix ADC instances instead of from all, use the update configuration pack operation described above and change the “target_devices” attribute in the JSON payload to remove the specific Citrix ADC instance IDs.
Share
Share
This Preview product documentation is Cloud Software Group Confidential.
You agree to hold this documentation confidential pursuant to the terms of your Cloud Software Group Beta/Tech Preview Agreement.
The development, release and timing of any features or functionality described in the Preview documentation remains at our sole discretion and are subject to change without notice or consultation.
The documentation is for informational purposes only and is not a commitment, promise or legal obligation to deliver any material, code or functionality and should not be relied upon in making Cloud Software Group product purchase decisions.
If you do not agree, select I DO NOT AGREE to exit.