Update Robot Framework format - step 5
[integration/test.git] / csit / suites / controller / dom_rpc_broker / action_provider_precedence.robot
1 *** Settings ***
2 Documentation       DOMRpcBroker testing: Action Provider Precedence
3 ...
4 ...                 Copyright (c) 2017 Cisco Systems, Inc. and others. All rights reserved.
5 ...
6 ...                 This program and the accompanying materials are made available under the
7 ...                 terms of the Eclipse Public License v1.0 which accompanies this distribution,
8 ...                 and is available at http://www.eclipse.org/legal/epl-v10.html
9 ...
10 ...                 The aim is to establish that remote action implementations have lower priority
11 ...                 than local ones, which is to say that any movement of actions on remote nodes
12 ...                 does not affect routing as long as a local implementation is available.
13
14 Library             SSHLibrary
15 Resource            ${CURDIR}/../../../libraries/controller/DrbCommons.robot
16 Resource            ${CURDIR}/../../../libraries/SetupUtils.robot
17
18 Suite Setup         Setup_Keyword
19 Suite Teardown      SSHLibrary.Close_All_Connections
20 Test Setup          SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
21 Test Teardown       SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
22
23 Default Tags        critical
24
25
26 *** Variables ***
27 ${UNREGISTERED_RPC_NODE}    ${1}
28
29
30 *** Test Cases ***
31 Register_Rpc_On_Each_Node
32     [Documentation]    Register routed rpc on each node of the cluster.
33     DrbCommons.Register_Action_On_Nodes    ${all_indices}
34
35 Invoke_Rpc_On_Each_Node
36     [Documentation]    Verify that the rpc response comes from the local node.
37     DrbCommons.Verify_Contexted_Constant_On_Registered_Nodes    ${all_indices}
38
39 Unregister_Rpc_On_Node
40     [Documentation]    Unregister the rpc on one of the cluster nodes.
41     DrbCommons.Unregister_Action_And_Update_Possible_Constants    ${UNREGISTERED_RPC_NODE}
42
43 Invoke_Rpc_On_Node_With_Unregistered_Rpc
44     [Documentation]    Invoke rcp on the node with unregistered rpc. The response is expected
45     ...    to come from other nodes where the rpc remained registered.
46     DrbCommons.Verify_Contexted_Constant_On_Unregistered_Node    ${UNREGISTERED_RPC_NODE}
47
48 Invoke_Rpc_On_Remaining_Nodes
49     [Documentation]    Verify that the rpc response comes from the local node.
50     DrbCommons.Verify_Contexted_Constant_On_Registered_Nodes    ${registered_indices}
51
52 Reregister_Rpc_On_Node
53     [Documentation]    Reregister the rpc.
54     DrbCommons.Register_Action_And_Update_Possible_Constants    ${UNREGISTERED_RPC_NODE}
55
56 Invoke_Rpc_On_Each_Node_Again
57     [Documentation]    Verify that the rpc response comes from the local node.
58     DrbCommons.Verify_Contexted_Constant_On_Registered_Nodes    ${all_indices}
59
60 Unregister_Rpc_On_Each_Node
61     [Documentation]    Unregister rpc on every node.
62     DrbCommons.Unregister_Action_On_Nodes    ${all_indices}
63
64
65 *** Keywords ***
66 Setup_Keyword
67     [Documentation]    Create a list of possible constant responses on the node with unregistered rpc.
68     SetupUtils.Setup_Utils_For_Setup_And_Teardown    http_timeout=125
69     DrbCommons.DrbCommons_Init