PyNSO API - Client¶
-
class
pynso.client.
NSOClient
(host, username, password, port=8080, ssl=False)¶ -
apply_rollback
(datastore, name)¶ Apply a system rollback
-
create_data_value
(datastore, data_path, data, params=None)¶ Create (PUT) a data entry in a datastore
Parameters: - datastore (
DatastoreType
) – The target datastore - data_path (
list
ofstr
ortuple
) – The list of paths - data (
dict
) – The new value at the given path
Return type: bool
Returns: True
if successful, otherwise error.- datastore (
-
delete_path
(datastore, data_path, params=None)¶ Delete a data entry in a datastore
Parameters: - datastore (
DatastoreType
) – The target datastore - data_path (
list
ofstr
ortuple
) – The list of paths
Return type: bool
Returns: True
if successful, otherwise error.- datastore (
-
get_data
(datastore, data_path, params=None)¶ Get a data entry in a datastore
Parameters: - datastore (
DatastoreType
) – The target datastore - data_path (
list
ofstr
ortuple
) – The list of paths
- datastore (
-
get_datastore
(datastore, params=None)¶ Get the details of a datastore
Parameters: datastore ( DatastoreType
) – The target datastore
-
get_rollback
(name)¶ Get a list of stored rollbacks
-
get_rollbacks
()¶ Get a list of stored rollbacks
-
info
()¶ Returns API information
-
set_data_value
(datastore, data_path, data, params=None)¶ Update (POST) a data entry in a datastore
Parameters: - datastore (
DatastoreType
) – The target datastore - data_path (
list
ofstr
ortuple
) – The list of paths - data (
dict
) – The new value at the given path
Return type: bool
Returns: True
if successful, otherwise error.- datastore (
-
Enumerations¶
-
class
pynso.datastores.
DatastoreType
¶ An enum of the resource types in the API.
Variables: - config – Link to the “config” resource
- running – Link to the “running” resource.
- operational – Link to the “operational” resource.
- operations – Container for available operations (i.e: YANG rpc statements).
- rollbacks – Container for available rollback files.