29.04.2019 Views

OS6860(E)_AOS_8.1.1.R01_Switch_Management_Guide

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Web Services, CLI Scripting, and OpenFlow<br />

Web Services Overview<br />

• Uniform Interface: all resources can be thought of as nouns: as hinted before, both state representation<br />

and functionality are expected to be represented using nouns; and accessed using a minimal set of<br />

verbs: GET, POST, PUT, and DELETE.<br />

• Media Types: These are to be used to identify the type of resources being dealt with.<br />

REST Verbs<br />

As described earlier, only a small set of verbs are be used. They are:<br />

• GET: To retrieve information. It is a rough equivalent to SNMP/MIP GET but also, at a higher level, a<br />

SHOW command. This is exclusively for read-only, side-effect free commands.<br />

• PUT: To create new information. For instance, a new VLAN. This is a write operation.<br />

• POST: The same action used when submitting web forms is used, in a Web Service context, to update<br />

existing information.<br />

• DELETE: To delete information. This verb is used to delete resources.<br />

Unsupported verbs will cause the Producer to return an error diagnostic such as '405 Method Not Allowed'<br />

Web Service routing<br />

The producer (server-side) is implemented by piggybacking on top of the existing Webview architecture.<br />

WebView continues to provide web pages as usual. However, when a certain URL is requested ("Web<br />

Service Endpoint"), information is interpreted and delivered using alternative formats such as JSON or<br />

simple XML, rather than HTML pages or HTML forms.<br />

Security<br />

Security is maintained through the use of backend sessions and frontend cookies which is the same as<br />

current HTTP security for thin clients.<br />

• Authentication - Adheres to a web-service model, through its own REST domain and use of the GET<br />

verb.<br />

• Authorization - Follows the usual authorization mechanism already in use in WebView, where<br />

WebView checks with Partition Manager what permission families a user belongs to, thus specifying<br />

which MIB tables are accessible to that user.<br />

• Encryption - Follows the same model as WebView: if unencrypted access ("HTTP") is allowed, then<br />

the Web Service is allowed over the same transport. Similarly, if listening HTTP/HTTPS ports are<br />

changed, the Web Service will be available through those ports.<br />

<strong>AOS</strong> REST Implementation<br />

All requests are performed through a URL being in accordance with the principles of REST. The following elements<br />

are used to build the REST URL:<br />

Protocol - The protocol can be 'http' which defaults to port 80, or 'https' which defaults to port 443.<br />

HTTPS is encrypted and HTTP is clear-text.<br />

Server address[:port] - Server address: the IP address typically used to access the switch’s WebView<br />

interface. If the listening port was changed, the port number should be appended after ':' The combi-<br />

Omni<strong>Switch</strong> <strong>AOS</strong> Release 8 <strong>Switch</strong> <strong>Management</strong> <strong>Guide</strong> May 2014 page 10-3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!