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.

Using Python<br />

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

success()<br />

diag()<br />

This method will return true if the previous operation succeeded. It<br />

is a convenience method that will evolve to support all success<br />

codes returned by future versions of the <strong>AOS</strong> API.<br />

This method can be used to retrieve a specific error code delivered<br />

by the Web Service Producer. It is not recommended to use it<br />

to determine success or failure; the preferred approach is to invoke<br />

'success()' first and, if it returns False, call 'diag()' to retrieve the<br />

error code.<br />

<strong>AOS</strong>Connection(string username, string password, string server, boolean secure, boolean<br />

obeyproxy, boolean prettylinks, int port, <strong>AOS</strong>Headers headers, boolean debug)<br />

username<br />

password<br />

server<br />

secure<br />

obeyproxy<br />

prettylinks<br />

port<br />

headers<br />

debug<br />

AAA username; same as when using WebView.<br />

AAA user password<br />

The address of the device to connect to.<br />

When True, SSL connections will be used.<br />

default value: True<br />

When True, system proxy settings will be followed.<br />

default value: True<br />

When True, use semantically correct links as opposed to<br />

'?a=b&c=d…'<br />

default value: True<br />

The port where the Web Service Producer is expected to be available;<br />

typically 80 or 443; however, -1 can be used to specify the<br />

use of the default port for secure/unsecure HTTP.<br />

default value: -1<br />

An object used to inject additional headers in the request if necessary.<br />

default value: None<br />

When True, low-level GET, POST, PUT and DELETE<br />

commands will be displayed in the current terminal.<br />

default value: False<br />

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

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

Saved successfully!

Ooh no, something went wrong!