Path¶
-
ExecuteRPC
(provider ServiceProvider, entity Entity, filter string, dataTag string, setConfigFlag bool)¶ Executes payload converted from entity.
Parameters: - provider – (Service Providers).
- entity – (Entity).
- filter – (
string
) A Go string. - dataTag – (
string
) A Go string. - setConfigFlag – (
bool
) A Go bool.
Returns: A data node representing the result of the executed rpc.
Return type:
-
ExecuteRPCEntity
(provider ServiceProvider, rpcEntity, topEntity types.Entity)¶ Executes payload converted from entity.
Parameters: - provider – (Service Providers).
- rpcEntity – (Entity).
- topEntity – (Entity). Optional arg. Use when expecting return data.
Returns: An entity representing the result of the executed rpc.
Return type:
-
ReadDatanode
(filter Entity, readDataNode DataNode)¶ Populates entity by reading the top level entity from a given data node
Parameters: Returns: The top entity from readDataNode.
Return type:
-
ConnectToNetconfProvider
(state *State, repo Repository, address, username, password string, port int)¶ Connects to NETCONF service provider by creating a connection to the given provider using given address, username, password, and port.
Parameters: - state – (pointer to
State
) Current state of execution - repo – (
Repository
). - address – (
string
) A Go string. - username – (
string
) A Go string. - password – (
string
) A Go string. - port – (
int
) An integer.
Returns: The connected service provider.
Return type: - state – (pointer to
-
DisconnectFromNetconfProvider
(provider CServiceProvider)¶ Disconnects from NETCONF device and frees the given service provider
Param: provider: ( CServiceProvider
) A service provider instance.
-
GetCapabilitesFromNetconfProvider
(provider CServiceProvider)¶ Gets the of capabilities supported by the given provider.
Param: provider: ( CServiceProvider
) A service provider instance.Returns: The list of capabilities. Return type: []string
-
CleanUpErrorState
(state *State)¶ CleanUpErrorState cleans up memory for CState
Parameters: state – (pointer to State
) Current state of execution
-
ConnectToRestconfProvider
(state *State, path, address, username, password string, port int)¶ ConnectToRestconfProvider connects to RESTCONF device by creating a connection to the provider using given path, address, username, password, and port.
Parameters: - state – (pointer to
State
) Current state of execution - path – (
string
) A Go string. - address – (
string
) A Go string. - username – (
string
) A Go string. - password – (
string
) A Go string. - port – (
int
) An integer.
Returns: The connected service provider.
Return type: - state – (pointer to
-
DisconnectFromRestconfProvider
(provider CServiceProvider)¶ DisconnectFromRestconfProvider disconnects from RESTCONF device and frees the given service provider
Param: provider: ( CServiceProvider
) A service provider instance.
-
InitCodecServiceProvider
(state *State, entity Entity, repo Repository)¶ InitCodecServiceProvider initializes CodecServiceProvider
Parameters: - state – (pointer to
State
) Current state of execution - entity – Entity
- repo – (
Repository
).
Returns: The root schema node parsed from repository
Return type: - state – (pointer to
-
CodecServiceEncode
(state *State, entity Entity, rootSchema RootSchemaNode, encoding EncodingFormat)¶ CodecServiceEncode encodes entity to XML/JSON payloads based on encoding format passed in
Parameters: - state – (pointer to
State
) Current state of execution - entity – (Entity).
- rootSchema – (
RootSchemaNode
). - encoding – (Encoding Format).
Returns: The resulting payload.
Return type: (
string
) A Go string.- state – (pointer to
-
CodecServiceDecode
(state *State, rootSchema RootSchemaNode, payload string, encoding EncodingFormat, topEntity Entity)¶ CodecServiceDecode decodes XML/JSON payloads passed in to entity.
Parameters: - state – (pointer to
State
) Current state of execution - rootSchema – (
RootSchemaNode
). - payload – (
string
) A Go string. - encoding – (Encoding Format).
- topEntity – (Entity)
Returns: The top level entity from resulting data node.
Return type: - state – (pointer to
-
ConnectToOpenDaylightProvider
(state *State, path, address, username, password string, port int, encoding EncodingFormat, protocol Protocol)¶ ConnectToOpenDaylightProvider connects to OpenDaylight device.
Parameters: - state – (pointer to
State
) Current state of execution - path – (
string
) A Go string. - address – (
string
) A Go string. - username – (
string
) A Go string. - password – (
string
) A Go string. - port – (
int
) An integer. - encoding – (Encoding Format).
- protocol – (Protocol).
Returns: The connected service provider.
Return type: - state – (pointer to
-
DisconnectFromOpenDaylightProvider
(provider COpenDaylightServiceProvider)¶ DisconnectFromOpenDaylightProvider disconnects from OpenDaylight device and frees allocated memory.
Parameters: provider – ( COpenDaylightServiceProvider
).
-
OpenDaylightServiceProviderGetNodeIDs
(state *State, provider COpenDaylightServiceProvider)¶ A getter function for the node ids given the opendaylight service provider.
Parameters: - state – (pointer to
State
) Current state of execution - provider – (
COpenDaylightServiceProvider
).
Returns: A slice of Go strings representing node ids.
Return type: []string
- state – (pointer to
-
OpenDaylightServiceProviderGetNodeProvider
(provider COpenDaylightServiceProvider, nodeID string)¶ A getter function for the node provider given the opendaylight service provider and node id.
Parameters: - state – (pointer to
State
) Current state of execution - provider – (
COpenDaylightServiceProvider
). - nodeID – (
string
) A Go string.
Returns: The service provider.
Return type: - state – (pointer to