Cisco Systems 78-11424-03 Manual De Usuario

Descargar
Página de 50
Chapter 2
Configuring User Profiles and CSS Parameters
Configuring Content API
2-42
Cisco Content Services Switch Basic Configuration Guide
78-11424-03
Configuring Content API
The CSS Content Application Program Interface (API) feature allows you to use
a network management workstation to make Web-based configuration changes to
the CSS using Extensible Markup Language (XML) documents. XML is a
powerful tool that can be used to automatically configure a CSS using all of the
CLI commands included in the CSS software, such as to specify server weight and
load, to configure load balancing across a group of servers, or to configure content
rules to restrict access to a group of directories or files on the servers.
XML code loads a series of CLI commands into the CSS without the need to
respond to the prompts, similar to operating in expert mode. As the CSS
administrator, plan which type of changes you want to implement and the
consequences of these changes as they are performed.
After you create the XML document, you publish (upload) the XML file to the
Hypertext Transfer Protocol (HTTP) server embedded in the CSS using a HTTP
PUT method.
Creating XML Code
When developing XML code for Content API to issue CLI commands, adhere to
the following guidelines. You can use any text editor for creating the XML code.
1.
Include the following line as the first line in the XML file:
<?xml version="1.0" standalone="yes"?>
2.
Enclose the CLI commands within the <action></action> tag set. For
example:
<action>add service MyServiceName</action>
<action>vip address 10.2.3.4</action>
Note
A nested script play command (to execute a script line by
line from the CLI) is not allowed in an XML file. This
restriction is enforced because the actual execution of the
XML tag set is performed within a script play command