RestconfSession

class ydk.path.RestconfSession(repo, address, username, password, port=80, encoding=EncodingFormat.JSON, config_url_root="/data", state_url_root="/data")
param repo:(Repository) Reference to an instance of Repository
param address:(str) IP address or DNC name of the device supporting Netconf interface.
param username:(str) Username to log in to the device.
param password:(str) Password to log in to the device.
param port:(int) Type of encoding to be used for the payload. Default is 80.
param encoding:(EncodingFormat) Encoding Format, default is JSON.
param config_url_root:
 (str) To provider backwards compatibility with older drafts of Restconf RFC, this can be /config or /data (which is the default).
param state_url_root:
 (str) To provider backwards compatibility with older drafts of Restconf RFC, this can be /operational or /data (which is the default)
get_root_schema()

Returns the RootSchemaNode tree supported by this instance of the RestconfSession.

Returns:Pointer to the RootSchemaNode or nullptr if one could not be created.
invoke(rpc)

Invokes or executes the given rpc and returns a DataNode pointer if the Rpc has an output modelled in YANG.

Parameters:rpc – (Rpc)
Returns:Pointer to the DataNode representing the output.