${TEMPLATE_FOLDER} ${CURDIR}/templates
${DRAFT_STREAMS_URI} restconf/streams
${RFC8040_STREAMS_URI} rests/data/ietf-restconf-monitoring:restconf-state/streams
-${NODES_STREAM_PATH} opendaylight-inventory:nodes/datastore=CONFIGURATION/scope=BASE
+${NODES_STREAM_PATH} network-topology:network-topology/datastore=CONFIGURATION/scope=BASE
${DRAFT_DCN_STREAM_URI} ${DRAFT_STREAMS_URI}/stream/data-change-event-subscription/${NODES_STREAM_PATH}
${RFC8040_DCN_STREAM_URI} ${RFC8040_STREAMS_URI}/stream/data-change-event-subscription/${NODES_STREAM_PATH}
${RESTCONF_SUBSCRIBE_DATA} subscribe.xml
Start_Receiver
[Documentation] Start the websocket listener
${output} = BuiltIn.Run_Keyword_If "${USE_RFC8040}" == "False" SSHLibrary.Write python wsreceiver.py --uri ${location} --count 2 --logfile ${RECEIVER_LOG_FILE} ${RECEIVER_OPTIONS}
- ... ELSE SSHLibrary.Write python3 ssereceiver.py --controller ${ODL_SYSTEM_IP} --logfile ${RECEIVER_LOG_FILE}
+ ... ELSE SSHLibrary.Write python3 ssereceiver.py --uri ${location} --logfile ${RECEIVER_LOG_FILE}
BuiltIn.Log ${output}
${output} = SSHLibrary.Read delay=2s
BuiltIn.Log ${output}
[Documentation] Make a change in DS configuration.
[Tags] critical
${body} = OperatingSystem.Get_File ${TEMPLATE_FOLDER}/${RESTCONF_CONFIG_DATA}
- ${uri} = BuiltIn.Set_Variable_If "${USE_RFC8040}" == "False" /restconf/config /rests/data
- ${resp} = RequestsLibrary.Post_Request restconf ${uri} headers=${SEND_ACCEPT_XML_HEADERS} data=${body}
+ ${uri} = BuiltIn.Set_Variable_If "${USE_RFC8040}" == "False" /restconf/config/network-topology:network-topology
+ ... /rests/data/network-topology:network-topology
+ ${resp} = RequestsLibrary.Put_Request restconf ${uri} headers=${SEND_ACCEPT_XML_HEADERS} data=${body}
Log_Response ${resp}
BuiltIn.Should_Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
- ${uri} = Restconf.Generate URI opendaylight-inventory:nodes config
+ ${uri} = BuiltIn.Set_Variable_If "${USE_RFC8040}" == "False" /restconf/config/network-topology:network-topology/topology/netconf-notif
+ ... /rests/data/network-topology:network-topology/topology=netconf-notif
${resp} = RequestsLibrary.Delete_Request restconf ${uri} headers=${SEND_ACCEPT_XML_HEADERS}
Log_Response ${resp}
BuiltIn.Should_Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
BuiltIn.Should_Contain ${notification} <notification xmlns=
BuiltIn.Should_Contain ${notification} <eventTime>
BuiltIn.Should_Contain ${notification} <data-changed-notification xmlns=
- BuiltIn.Should_Contain ${notification} <operation>created</operation>
+ BuiltIn.Should_Contain ${notification} <operation>updated</operation>
BuiltIn.Should_Contain ${notification} </data-change-event>
BuiltIn.Should_Contain ${notification} </data-changed-notification>
BuiltIn.Should_Contain ${notification} </notification>
conn = aiohttp.TCPConnector()
auth = aiohttp.BasicAuth(args.user, args.password)
client = aiohttp.ClientSession(connector=conn, auth=auth)
- async with sse_client.EventSource(
- "http://" + args.controller + ":8181" + args.uri, session=client
- ) as event_source:
+ async with sse_client.EventSource(args.uri, session=client) as event_source:
try:
async for event in event_source:
logger.info(event)
:return: args object
"""
parser = argparse.ArgumentParser()
- parser.add_argument("--controller", default="127.0.0.1", help="Controller IP")
parser.add_argument(
"--uri",
- default="/rests/notif/data-change-event-subscription/opendaylight-inventory:nodes/datastore=CONFIGURATION/scope=BASE",
+ default="http://127.0.0.1:8181/rests/notif/data-change-event-subscription"
+ "/network-topology:network-topology/datastore=CONFIGURATION/scope=BASE",
help="URI endpoint to connect",
)
parser.add_argument(