Add shutdown(-prefix)-shard_replica rpc into lib 86/58586/7
authorPeter Gubka <pgubka@cisco.com>
Fri, 9 Jun 2017 09:35:04 +0000 (11:35 +0200)
committerVratko Polák <vrpolak@cisco.com>
Thu, 22 Jun 2017 08:06:20 +0000 (08:06 +0000)
Change-Id: I3d3508cb0063287138d804fe7c9a1731abc9b393
Signed-off-by: Peter Gubka <pgubka@cisco.com>
csit/libraries/MdsalLowlevel.robot
csit/variables/mdsal/lowlevelrpc/shutdown_prefix_shard_replica/location.uri [new file with mode: 0644]
csit/variables/mdsal/lowlevelrpc/shutdown_prefix_shard_replica/post_data.xml [new file with mode: 0644]
csit/variables/mdsal/lowlevelrpc/shutdown_shard_replica/location.uri [new file with mode: 0644]
csit/variables/mdsal/lowlevelrpc/shutdown_shard_replica/post_data.xml [new file with mode: 0644]

index 7f5e1807fd437198dde0d2281b0f60c5af3d8355..03861c8dea80a741f50bb13493ae3259ae249a55 100644 (file)
@@ -24,6 +24,8 @@ ${REGISTER_CONSTANT_DIR}    ${LOWLEVEL_RPC_DIR}/register_constant
 ${REGISTER_FLAPPING_SINGLETON_DIR}    ${LOWLEVEL_RPC_DIR}/register_flapping_singleton
 ${REGISTER_SINGLETON_CONSTANT_DIR}    ${LOWLEVEL_RPC_DIR}/register_singleton_constant
 ${REMOVE_PREFIX_SHARD_DIR}    ${LOWLEVEL_RPC_DIR}/remove_prefix_shard
+${SHUTDOWN_SHARD_REPLICA_DIR}    ${LOWLEVEL_RPC_DIR}/shutdown_shard_replica
+${SHUTDOWN_PREFIX_SHARD_REPLICA_DIR}    ${LOWLEVEL_RPC_DIR}/shutdown_prefix_shard_replica
 ${START_PUBLISH_NOTIFICATIONS_DIR}    ${LOWLEVEL_RPC_DIR}/start_publish_notifications
 ${SUBSCRIBE_DDTL_DIR}    ${LOWLEVEL_RPC_DIR}/subscribe_ddtl
 ${SUBSCRIBE_DTCL_DIR}    ${LOWLEVEL_RPC_DIR}/subscribe_dtcl
@@ -245,3 +247,17 @@ Unregister_Bound_Constant
     ${session} =    ClusterManagement.Resolve_Http_Session_For_Member    member_index=${member_index}
     &{mapping}    BuiltIn.Create_Dictionary    CONTEXT=${context}
     TemplatedRequests.Post_As_Xml_Templated    ${UNREGISTER_BOUND_CONSTANT_DIR}    mapping=${mapping}    session=${session}
+
+Shutdown_Shard_Replica
+    [Arguments]    ${member_index}    ${shard_name}
+    [Documentation]    Invoke shutdown-shard-replica rpc.
+    ${session} =    ClusterManagement.Resolve_Http_Session_For_Member    member_index=${member_index}
+    &{mapping}    BuiltIn.Create_Dictionary    SHARD_NAME=${shard_name}
+    TemplatedRequests.Post_As_Xml_Templated    ${SHUTDOWN_SHARD_REPLICA_DIR}    mapping=${mapping}    session=${session}
+
+Shutdown_Prefix_Shard_Replica
+    [Arguments]    ${member_index}    ${shard_prefix}
+    [Documentation]    Invoke shutdown-prefix-shard-replica rpc.
+    ${session} =    ClusterManagement.Resolve_Http_Session_For_Member    member_index=${member_index}
+    &{mapping}    BuiltIn.Create_Dictionary    PREFIX=${shard_prefix}
+    TemplatedRequests.Post_As_Xml_Templated    ${SHUTDOWN_PREFIX_SHARD_REPLICA_DIR}    mapping=${mapping}    session=${session}
diff --git a/csit/variables/mdsal/lowlevelrpc/shutdown_prefix_shard_replica/location.uri b/csit/variables/mdsal/lowlevelrpc/shutdown_prefix_shard_replica/location.uri
new file mode 100644 (file)
index 0000000..7e00f37
--- /dev/null
@@ -0,0 +1 @@
+/restconf/operations/odl-mdsal-lowlevel-control:shutdown-prefix-shard-replica
diff --git a/csit/variables/mdsal/lowlevelrpc/shutdown_prefix_shard_replica/post_data.xml b/csit/variables/mdsal/lowlevelrpc/shutdown_prefix_shard_replica/post_data.xml
new file mode 100644 (file)
index 0000000..c64abb0
--- /dev/null
@@ -0,0 +1,3 @@
+<input xmlns="tag:opendaylight.org,2017:controller:yang:lowlevel:control" xmlns:odl-mdsal-lowlevel-target="tag:opendaylight.org,2017:controller:yang:lowlevel:target">
+  <prefix>/odl-mdsal-lowlevel-target:$PREFIX</prefix>
+</input>
diff --git a/csit/variables/mdsal/lowlevelrpc/shutdown_shard_replica/location.uri b/csit/variables/mdsal/lowlevelrpc/shutdown_shard_replica/location.uri
new file mode 100644 (file)
index 0000000..968202b
--- /dev/null
@@ -0,0 +1 @@
+/restconf/operations/odl-mdsal-lowlevel-control:shutdown-shard-replica
diff --git a/csit/variables/mdsal/lowlevelrpc/shutdown_shard_replica/post_data.xml b/csit/variables/mdsal/lowlevelrpc/shutdown_shard_replica/post_data.xml
new file mode 100644 (file)
index 0000000..2404312
--- /dev/null
@@ -0,0 +1,3 @@
+<input xmlns="tag:opendaylight.org,2017:controller:yang:lowlevel:control">
+  <shard-name>$SHARD_NAME</shard-name>
+</input>