Documente Academic
Documente Profesional
Documente Cultură
Abstract: As XML (eXtensible Markup Language) standards have matured over time,
XML-based communication is becoming the standard way to manage network and server
elements, whether its physical or virtual elements.
The main advantages of XML are platform independence for both client and server and
an open communications architecture that allows for interoperability across point
solutions eliminating proprietary or closed environments. In addition, XML provides faster
development and quicker integration with management tools as compared to traditional
methods of SNMP or CLI. As developers and/or customers write code for network element
features, they can also define XML-based APIs (Application Programming Interfaces) for
specific features that can be integrated with their management systems. These APIs can
be made public so that third-party vendors can provide support for device features in their
management tools. ExtremeXOS XML API is a means to an open infrastructure.
In this Application Note we will discuss Extreme Networks approach to device
management in ExtremeXOS using XML APIs and the advantages associated with it.
Table of Contents
Introduction
XML Element
XML Namespaces
XML Schema
Definitions of Messages
10
Definitions of Services
11
11
17
19
19
26
31
Conclusion
37
Introduction
Extreme Networks was one of the pioneers in open
XML-based APIs (Application Programming Interfaces) to
manage networking elements at a time when the rest of
industry was using proprietary APIs to manage networking
elements. This proprietary strategy had the effect of locking
down customers to a single-vendor solution and depriving
them of open-architecture choices.
The main motivations for Extreme Networks and others to
adopt XML-based APIs are openness, object orientation,
flexibility and cost structure. XML is a standard to encode
and decode documents. The XML specification is produced
by the World Wide Web Consortium (W3C). The data
representation for XML is in standardized format and it is
available for anyone to access via the Internet.
One of the advantages of XML is its object-oriented nature,
and thus XML-based objects are self-describing. The object
orientation makes programming simpler to implement and
self-description eliminates the need to compile interface
control files for both client and server side. These attributes
make client/server programming easier to implement
and maintain.
In addition, XML Schema adds flexibility when new
subsystems are added, the client does not have to be
modified. Instead, an XML scheme file associated with the
new subsystems is simply added to the client.
Since there are open-source tools and libraries associated
with XML technology, along with ample manpower trained
to design and implement XML-based systems, the cost
structure associated with implementing XML based
technology can be optimized.
A Comparison of Different
Management Models
Prior to XML-based APIs, the traditional method for device
management was either through SNMP (Simple Network
Management Protocol), CLI (Command Line Interface) or
proprietary APIs. In this section we will address the
advantages of XML as compared to SNMP and CLI in
IP-based networks.
SNMP pioneered the traditional manager-agent method of
managing a network element using standard Management
Information Bases (MIBs). The main advantage of SNMP
was its simplicity, which had major appeal for its vast
adoption. However, even after undergoing three revisions,
SNMP in conjunction with Syslog has been at most a very
good monitoring tool. It suffers from a severe lack of
configuration capabilities. Other drawbacks of SNMP are in
application development complexity, time-lags in feature
releases, and lack of manageability which does not benefit
the end-user.
XML Element
An element is the most basic entity of a document2. An
element is identified by a name (most commonly referred to
as a tag). An element contains a start or opening tag, end or
closing tag, and optionally one or more attributes. The
element contents (information), if any, are placed between
the start tag and the end tag. An element can contain other
elements. These concepts are exemplified in the XML
snippet below.
<object type=VlanConfig>
<name>authvlan</name>
<adminState>Enabled</adminState>
<tagValue>7</tagValue>
<tagType>802dot1Q</tagType>
<vlanTaggedPorts/>
<vlanUnTaggedPorts>13-20</vlanUnTaggedPorts>
<vlanTranslatedPorts/>
element
<ipv4ForwardingEnabled>false</ipv4ForwardingEnabled>
<primaryIpv4Address>
<ipAddress>192.168.100.1</ipAddress>
<netmask>24</netmask>
</primaryIpv4Address>
<protocol>ANY</protocol>
</object>
Figure 1
XML Namespaces
We have noted that the self-describing nature of XML allows
application developers to define elements with custom
names. However, this could create conflicts when different
XML documents are to be merged from different XML-based
applications. Since element names are chosen by application
developers, there could be situations where elements from
two entirely different applications or services could have the
same name, yet have different contents and semantics.
1
The term tag is most commonly used in HTML. While both element and tag can be used interchangeably, the term element is used in this document.
2
The term document is used to denote a complete block of information returned by an application or service either in response to a request or unsolicited, and
conforms to an XML schema. The concept of XML schemas is discussed in subsequent sections.
Security Profile
UPM Profile
<profile>
<profile>
<name>Power off ports</name>
<name>Authorize Employees</name>
<data>poweroff_ports.upm</data>
<upmscript>corpvlan</upmscript>
<enabled>yes</enabled>
<enabled>yes</enabled>
</profile>
<creationTime>14:20:30
</creationTime>
</profile>
Figure 2
Figure 3
<allprofiles
xmlns:upm=http://www.extremenetworks.com/XMLSchema/xos/upm
xmlns:nl=http://www.extremenetworks.com/XMLSchema/xos/netlogin
<upm:profile>
<upm:name>Power off ports</upm:name>
<upm:data>poweroff_ports.upm</upm:data>
<upm:enabled>yes</upm:enabled>
<upm:creationTime>14:20:30
</upm:creationTime>
</upm:profile>
<nl:profile>
<nl:name>Authorize Employees</nl:name>
<nl:upmscript>corpvlan</nl:upmscript>
<nl:enabled>0</nl:enabled>
</nl:profile>
</allprofiles>
Figure 4
3
XML Schemas
In the previous two sections we discussed elements and
namespaces and noted that the former is the most basic
entity in an XML document, and the latter provides for
methods to avoid name conflicts when processing elements
in an XML document. In reality, applications which process
XML content received from XML-based services will have to
deal with many types of elements, attributes of elements,
attribute values, various orders of elements (i.e. various
structures of XML documents), etc. Hence, a number of
questions arise while designing applications that work with
XML-based Web services.
In an XML document,
What is the order in which elements can appear,
attributes that they contain, and the attribute values?
What are the semantics of an element, or in other words,
what is the data type of an element?
What are the child elements that can appear within an
element, and the order in which they can appear?
We will again revisit the most salient design goal of XML: its
self-describing nature. XML provides for schemas which can
be used to describe the structure of an XML document. This
is most popularly referred to as XML Schema. A language to
define a schema is required, however many options exist
today for applications to use. Some of them are:
Document Type Definitions (DTD) is a set of markup
declarations that define a document type for languages
such as HTML, SGML, and also XML
Regular Language for XML Next Generation (RELAX
NG) is a schema language for XML and specifies a
pattern for the structure and content of an XML
document
XML Schema Document (XSD) is a widely used schema
language to define a set of rules and constraints to which
an XML document has to conform (in order to be
deemed as valid)
Service
Binding
portType
Messages
Types
Network
Endpoints
OR
Ports
Operations
Transport
Protocol
Protocol
Binding Style
Operations
Supported by
the Interface
Messages
Used
Parts of
a Message
Associated
Data Types
Description
of Data Using
XML Schema
(Data Types,
Elements,
Attributes, etc.)
5419-01
Figure 5
<wsdl:types>
<xsd:schema>
<xsd:import
namespace=http://www.extremenetworks.com/XMLSchema/
xos/switch
schemaLocation=./xsd/switch.xsd/>
<xsd:import
namespace=http://www.extremenetworks.com/XMLSchema/
xos/common
schemaLocation=./xsd/common.xsd/>
</xsd:schema>
</wsdl:types>
Figure 6
2010 Extreme Networks, Inc. All rights reserved.
Definitions of Messages
contains an element of type switch:getRequest. In the
previous section, we imported XML schemas defined in
common.xsd and switch.xsd.
<message name=getRequest>
</message>
<message name=getResponse>
</message>
<message name=setRequest>
</message>
<message name=setResponse>
</message>
Figure 7
<portType name=switchPortType>
<operation name=get>
<documentation>
Operation used to get data for objects from the switch. The type of
object to get and other options for the get operation are specified
as part of the <code>getRequest</code> message. This operation can
be used to get either a specific object or a set of objects of a
type.<br/> The data returned by this operation is contained in the
<code>getResponse</code> message.
</documentation>
<input message=tns:getRequest/>
<output message=tns:getResponse/>
</operation>
<operation name=set>
<documentation>
Operation used to set data for an object on the switch.
The type of object and values to set are specified as part of the
<code>setRequest</code> message.
</documentation>
<input message=tns:setRequest/>
<output message=tns:setResponse/>
</operation>
--- definitions of other operations --</portType>
Figure 8
Figure 9
Definitions of Services
The definition of the services offered by the device or
application is the last block in a WSDL document. The XML
snippet below from switch.wsdl describes a network
endpoint switchPort offered by the XML-based Web
services offered by ExtremeXOS switches.
<service name=switch>
<port name=switchPort binding=tns:switchBinding>
<SOAP:address location=http://localhost/xapi/>
</port>
</service>
Figure 10
SOAP
Message
Envelope
Header
Body
Fault
5420-01
Figure 11
Figure 12
Figure 13
Figure 14
Figure 15
Figure 16
Figure 17
ExtremeXOS Architecture
for Extensibility
The components of XML, WSDL, and SOAP form the
building blocks on which ExtremeXOS provides the
extensibility framework. A layered view (of data representation, message envelope, and the transport layer) summarizes the Web services framework offered by ExtremeXOS
based switches.
API Layer
Data Representation
Figure 19 shows the ExtremeXOS architecture for configuration management and integration with both internal and
external custom applications. ExtremeXOS Configuration
Manager, which is at the core between different management interfaces and internal ExtremeXOS processes and
services, handles XML natively. This not only allows
ExtremeXOS services to easily provide XML-based APIs,
but also allows custom in-switch applications to use the
open communication framework.
5421-01
Figure 18
External
Business
Applications
XML Client
In-Switch
Custom
Applications
Web
(HTTP/S Server)
SSH/Telenet
SNMP
Stack
gSoap Server
CLI
SNMP
Agent
XML
APIs
XML Server
5422-01
Figure 19
NOTES
This case study uses soapUI Version 3.5.
It is recommended to have a copy of the ExtremeXOS
InSite SDK in the host on which soapUI is planned to be
installed. This case study uses the ExtremeXOS InSite SDK
Release 12.4.1.7 available at http://www.extremenetworks.com/solutions/Insite.aspx.
The rest of this section will explain the steps to install soapUI
on a host. Open the soapUI installer program and follow the
steps given after each screenshot to complete the installation
process.
Steps: Accept all the default set of components that are selected for installation Click Next.
Steps: Ensure that options are selected as shown above Click Finish to complete the installation process.
Steps: When soapUI program starts, Right Click on the Default Workspace Click New soapUI Project.
Steps: Enter the project name as shown or choose a custom project name Click Ok.
Steps: Click Browse to locate the WSDL files provided by the ExtremeXOS InSite SDK.
Steps: Select switch.wsdl from the list of WSDL files provided in the ExtremeXOS InSite SDK Click Open.
Steps: Ensure that all the options are selected as shown Click Ok.
Steps: Expand switchBinding under the project Expand openSession Double Click on Request 1.
NOTES
Notice the use of https instead of http to secure information exchange between the edge switch and the application
The edge switch has already been configured to enable the Web server (Refer Section Error! Reference source not found. Error!
Reference source not found.)
Subsequent requests to the edge switch will have to use the SessionID returned by the edge switch.
Steps: Expand the get method Replace the request to retrieve the list of active users with content provided below.
NOTES
It is important to replace the value of the sessionId tag with the value recorded earlier when the edge switch responded to the
openSession request.
Conclusion
ExtremeXOS provides an open communications architecture that allows for interoperability across point solutions eliminating
proprietary or closed environments. ExtremeXOS XML-based APIs helps simplify the management of network elements in
terms of configuration, ease of deployment and standardization. Following the pioneering lead of Extreme Networks, today
the networking industry actively supports XML-based APIs to support an open, yet secured infrastructure.
www.extremenetworks.com
Corporate
and North America
Extreme Networks, Inc.
3585 Monroe Street
Santa Clara, CA 95051 USA
Phone +1 408 579 2800
Asia Pacific
Phone +65 6836 5437
Japan
Phone +81 3 5842 4011
2010 Extreme Networks, Inc. All rights reserved. Extreme Networks, the Extreme Networks logo, EPICenter and ExtremeXOS are either registered trademarks or trademarks
of Extreme Networks, Inc. in the United States and/or other countries. Specifications are subject to change without notice. 1685_02 05/10