EasyManuals Logo
Home>Dell>Server>FORCE10 Open Automation

Dell FORCE10 Open Automation User Manual

Dell FORCE10 Open Automation
98 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #70 background imageLoading...
Page #70 background image
70 | Programmatic Management
www.dell.com | support.dell.com
Using the REST API
The script-based REST API allows you to remotely access a switch that supports
Open Automation from a network management device through programmatic HTTP
requests to directly perform FTOS functions.
The REST API operates by invoking the CGI scripts within the HTTP server on the
switch. The HTTP server passes an HTTP request to the backend CGI scripts. For
more information on the HTTP server, see HTTP Server.
The CGI scripts are shared with the Web GUI to retrieve data through the FTOS CLI.
The CGI script functions are stored on the switch under the main Web GUI directory
at /htdocs/cgi-bin.
All REST-based API calls return plain text output.
Prerequisites: You must know the IP address of the switch to which you want to
connect and there must be network connectivity from your remote device to the
switch.
Table 7-1 describes the CGI scripts supported in an HTTP get request to access the
REST API and return data from a remote Dell Force10 switch.
The following example shows how to embed a REST-based HTTP get request in a
Perl script run from a remote device.
Figure 7-1. Perl Sample with HTTP Get Request that Invokes the REST API
Note: In Open Automation 2.0, the REST API supports only CGI scripts that perform
HTTP read (get) requests. HTTP write (post) requests that make configuration
changes will be supported in future releases.
#!/usr/bin/perl
require LWP::UserAgent;
# Create new LWP object and set the timeout large because "F10Ping" will take a
# while to return results (5 pings each with 5 second timeout, plus GUI delay).
my $ua = LWP::UserAgent->new;
$ua->timeout(300);
#Send HTTP GET request message and store response data
my $response = $ua->get('http://10.43.3.55/cgi-bin/F10Ping?IpAddress=10.43.0.1');
#Display response texts on success or display status
if ($response->is_success) {
print $response->decoded_content;
}
else {
die $response->status_line;
}

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Dell FORCE10 Open Automation and is the answer not in the manual?

Dell FORCE10 Open Automation Specifications

General IconGeneral
BrandDell
ModelFORCE10 Open Automation
CategoryServer
LanguageEnglish

Related product manuals