PCEP Speaker Entity Identifier 37/66937/6
authorTomas Markovic <tomas.markovic@pantheon.tech>
Mon, 8 Jan 2018 13:04:15 +0000 (14:04 +0100)
committerTomas Markovic <tomas.markovic@pantheon.tech>
Tue, 9 Jan 2018 15:07:56 +0000 (16:07 +0100)
Additional configuration for PCEP Speaker.
PCEP Speaker can skip session sync.
Test Cases functionality doesn't change.

Change-Id: Ide482afcc44b6c2a569530cd635cbb5237373ed6
Signed-off-by: Tomas Markovic <tomas.markovic@pantheon.tech>
csit/suites/bgpcep/pcepuser/pcepuser.robot
csit/variables/pcepuser/node_speaker_entity_identifier/data.xml [new file with mode: 0644]
csit/variables/pcepuser/node_speaker_entity_identifier/location.uri [new file with mode: 0644]

index 62b5d487002d31ed1e28e354766ba67647bacd18..d6c28e4f2d59f5c8c6686c0a7cb32e8be97f1f1c 100644 (file)
@@ -17,13 +17,14 @@ Resource          ../../../libraries/PcepOperations.robot
 Resource          ../../../libraries/Utils.robot
 Resource          ../../../libraries/RemoteBash.robot
 Resource          ../../../libraries/TemplatedRequests.robot
-Resource          ../../../libraries/KarafKeywords.robot
-Variables         ../../../variables/Variables.py
+Resource          ../../../libraries/CompareStream.robot
+Resource          ../../../variables/Variables.robot
 Variables         ../../../variables/pcepuser/variables.py    ${TOOLS_SYSTEM_IP}
 
 *** Variables ***
 ${CONFIG_SESSION}    session
 ${PATH_SESSION_URI}    node/pcc:%2F%2F${TOOLS_SYSTEM_IP}/path-computation-client
+${PCEP_VARIABLES_FOLDER}    ${CURDIR}/../../../variables/pcepuser/
 
 *** Test Cases ***
 Topology_Precondition
@@ -34,11 +35,17 @@ Topology_Precondition
 
 Start_Pcc_Mock
     [Documentation]    Execute pcc-mock on Mininet, fail is Open is not sent, keep it running for next tests.
-    ${command}=    NexusKeywords.Compose_Full_Java_Command    -jar ${filename} --local-address ${TOOLS_SYSTEM_IP} --remote-address ${ODL_SYSTEM_IP} 2>&1 | tee pccmock.log
+    ${command}=    NexusKeywords.Compose_Full_Java_Command    -jar ${filename} --reconnect 1 --local-address ${TOOLS_SYSTEM_IP} --remote-address ${ODL_SYSTEM_IP} 2>&1 | tee pccmock.log
     Log    ${command}
     Write    ${command}
     Read_Until    started, sent proposal Open
 
+Configure_Speaker_Entity_Identifier
+    [Documentation]    Additional PCEP Speaker configuration for at least oxygen streams.
+    ...    Allows PCEP speaker to determine if state synchronization can be skipped when a PCEP session is restarted.
+    &{mapping}    BuiltIn.Create_Dictionary    IP=${ODL_SYSTEM_IP}
+    CompareStream.Run_Keyword_If_At_Least_Oxygen    TemplatedRequests.Put_As_Xml_Templated    ${PCEP_VARIABLES_FOLDER}${/}node_speaker_entity_identifier    mapping=${mapping}    session=${CONFIG_SESSION}
+
 Topology_Default
     [Documentation]    Compare pcep-topology to default_json, which includes a tunnel from pcc-mock.
     ...    Timeout is lower than in Precondition, as state from pcc-mock should be updated quickly.
diff --git a/csit/variables/pcepuser/node_speaker_entity_identifier/data.xml b/csit/variables/pcepuser/node_speaker_entity_identifier/data.xml
new file mode 100644 (file)
index 0000000..0fc8573
--- /dev/null
@@ -0,0 +1,8 @@
+<node xmlns="urn:TBD:params:xml:ns:yang:network-topology">
+    <node-id>$IP</node-id>
+    <session-config xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep:config">
+        <speaker-entity-id-value xmlns="urn:opendaylight:params:xml:ns:yang:topology:pcep:sync:optimizations:config">
+            AQIDBA==
+        </speaker-entity-id-value>
+    </session-config>
+</node>
diff --git a/csit/variables/pcepuser/node_speaker_entity_identifier/location.uri b/csit/variables/pcepuser/node_speaker_entity_identifier/location.uri
new file mode 100644 (file)
index 0000000..8141554
--- /dev/null
@@ -0,0 +1 @@
+restconf/config/network-topology:network-topology/topology/pcep-topology/node/$IP