${stdout} ${stderr} ${rc}= SSHLibrary.Execute Command sudo pip install zmq pyzmq return_stdout=True return_stderr=True
... return_rc=True
Log ${stdout}
- ${module} OperatingSystem.Get File ${INTERFACES_MODULE_JSON}
- ${data} OperatingSystem.Get File ${INTERFACES_DATA_JSON}
+ ${module} OperatingSystem.Get File ${JSONRPCCONFIG_MODULE_JSON}
+ ${data} OperatingSystem.Get File ${JSONRPCCONFIG_DATA_JSON}
${cmd} Builtin.Set Variable nohup python ${WORKSPACE}/${BUNDLEFOLDER}/odl-jsonrpc-test-read tcp://0.0.0.0:${DEFAULT_PORT} 'config' ${DEFAULT_ENDPOINT} '${module}' '${data}'
Log ${cmd}
${stdout} SSHLibrary.Write echo | rm -rf nohup.out
${resp} ClusterManagement.Get_From_Member ${READ_SERVICE_PEER_GET_1}${endpoint}${READ_SERVICE_PEER_GET_2} ${controller_index}
${response_json} Builtin.Convert To String ${resp}
Log ${response_json}
- Verify Restconf Get On Mounted Endpoint ${response_json} ${READSERVICE_NAME} ${INTERFACE_MODULE_DEFAULT_DATA}
+ Verify Restconf Get On Mounted Endpoint ${response_json} ${READSERVICE_NAME}
Verify Restconf Get On Mounted Endpoint
- [Arguments] ${output} ${name} ${type}
+ [Arguments] ${output} ${name}
[Documentation] This keyword parses restconf get of mountpoint
Builtin.Should Match Regexp ${output} "name":"${name}"
- Builtin.Should Match Regexp ${output} "type":"${type}"
Library OperatingSystem
Library DateTime
Resource ../../libraries/JsonrpcKeywords.robot
+Resource ../../libraries/KarafKeywords.robot
*** Test Cases ***
Push MDSAL data and Verify Through Restconf
[Documentation] Push data using python utility and verify using restconf
[Tags] Basic data
+ KarafKeywords.Setup_Karaf_Keywords
+ KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set DEBUG org.opendaylight.jsonrpc
JsonrpcKeywords.Mount Read Service Endpoint
JsonrpcKeywords.Run Read Service Python Script on Controller Vm
JsonrpcKeywords.Verify Data On Mounted Endpoint
Documentation Resource consisting purely of variable definitions useful for multiple project suites.
*** Variables ***
-${INTERFACES_MODULE_JSON} ${CURDIR}/interfaces_module.json
-${INTERFACES_DATA_JSON} ${CURDIR}/interfaces_data.json
+${JSONRPCCONFIG_MODULE_JSON} ${CURDIR}/jsonrpcconfig_module.json
+${JSONRPCCONFIG_DATA_JSON} ${CURDIR}/jsonrpcconfig_data.json
${READ_SERVICE_PEER_PUT_URL} /restconf/config/jsonrpc:config/configured-endpoints/
${READ_SERVICE_PEER_PAYLOAD} ${CURDIR}/readservice_peer_payload.json
${READ_SERVICE_PEER_GET_1} /restconf/config/jsonrpc:config/configured-endpoints/
-${READ_SERVICE_PEER_GET_2} /yang-ext:mount/ietf-interfaces:interfaces/
+${READ_SERVICE_PEER_GET_2} /yang-ext:mount/jsonrpc:config/
${DEFAULT_ENDPOINT} foo
${DEFAULT_PORT} 4444
-${DEFAULT_PUT_MODULE} ietf-interfaces
${FIRST_CONTROLLER_INDEX} 1
${CENTOS_PIP} sudo yum -y install python-pip
${UB_PIP} sudo apt-get install -y python-pip
${READ_SERVICE_SCRIPT} ${CURDIR}/odl-jsonrpc-test-read
-${INTERFACE_MODULE_DEFAULT_DATA} ietf-interfaces:other
-${READSERVICE_NAME} test
+${JSONRPCCONFIG_MODULE_DEFAULT_DATA} jsonrpc:config
+${READSERVICE_NAME} foo
+++ /dev/null
-{
- "interface": [{
- "name": "test",
- "type": "other"
- }]
-}
+++ /dev/null
-{
- "ietf-interfaces:interfaces": {}
-}
--- /dev/null
+{
+ "configured-endpoints": [
+ {
+ "name": "foo"
+ }
+ ]
+}
--- /dev/null
+{
+ "jsonrpc:config": {}
+}
try:
# assumes that params are supplied as a list for call by position
response["result"] = self._methods[method](
- *params
+ params['store'], params['entity'], params['path']
) # pylint: disable=star-args
except KeyError:
response["error"] = {"code": -32601, "message": "Method not found"}
{
"configured-endpoints": {
"name": "foo",
- "modules": ["ietf-interfaces"],
+ "modules": ["jsonrpc"],
"data-config-endpoints": [{
"path": "{}",
"endpoint-uri": "zmq://127.0.0.1:4444"