NetApp API for Data ONTAP and OnCommand DFM.
Contains classes required to issue API calls to Data ONTAP and OnCommand DFM.
Bases: exceptions.Exception
Base exception class for NetApp API errors.
Bases: object
Class wraps basic building block for NetApp API request.
Add the attribute to the element.
Add multiple attributes to the element.
Add the child element to the element.
Add child with tag name and content.
Convert replaces entity refs to chars.
Creates named node with children.
Creates and returns named node with children.
Get the attribute with the given name.
Returns the list of attribute names.
Get the child element by the tag name.
Get the content of the child.
Get the children for the element.
Get the text for the element.
Returns the tag name of the element.
Checks whether element has attribute.
Set the text string for the element.
Prints the element to string.
Convert list, tuple, dict to NaElement and appends.
Example usage: 1. <root>
<elem1>vl1</elem1> <elem2>vl2</elem2> <elem3>vl3</elem3>
</root> The above can be achieved by doing root = NaElement(‘root’) root.translate_struct({‘elem1’: ‘vl1’, ‘elem2’: ‘vl2’,
‘elem3’: ‘vl3’})
2. <root>
<elem1>vl1</elem1> <elem2>vl2</elem2> <elem1>vl3</elem1>
</root> The above can be achieved by doing root = NaElement(‘root’) root.translate_struct([{‘elem1’: ‘vl1’, ‘elem2’: ‘vl2’},
{‘elem1’: ‘vl3’}])
Bases: object
Encapsulates server connection logic.
Gets the API version tuple.
Get the server communication port.
Get the target server type.
Get the authorization style for communicating with the server.
Gets the timeout in seconds if set.
Get the transport type protocol.
Get the vfiler to use in tunneling.
Get the vserver to use in tunneling.
Invokes API and checks execution status as success.
Need to set enable_tunneling to True explicitly to achieve it. This helps to use same connection instance to enable or disable tunneling. The vserver or vfiler should be set before this call otherwise tunneling remains disabled.
Invoke the API on the server.
Set the API version.
Set the password for authentication.
Set the server communication port.
Set the target server type.
Supports filer and dfm server types.
Set the authorization style for communicating with the server.
Supports basic_auth for now. Certificate_auth mode to be done.
Sets the timeout in seconds.
Set the transport type protocol for API.
Supports http and https transport types.
Set the user name for authentication.
Set the vfiler to use if tunneling gets enabled.
Set the vserver to use if tunneling gets enabled.
Bases: object
Encapsulates connection logic and command execution for SSH client.
Creates a NetApp API request.
Parameters: |
|
---|
Invokes any given API call to a NetApp server.
Parameters: |
|
---|