2 Documentation Robot keyword library (Resource) for BIER information configuration and verification Python utilities.
4 ... Copyright (c) 2016-2017 Zte, Inc. and others. All rights reserved.
6 ... This resource contains some keywords which complete four main functions:
7 ... Send corresponding request to datastore,
8 ... Construct BIER information,
9 ... Verity Configuration success or not and its result,
10 ... Delete BIER configuration and close all session.
11 Resource TemplatedRequests.robot
15 ${BIER_TE_VAR_FOLDER} ${CURDIR}/../variables/bier
16 @{NETCONF_PORT_LIST} 17830 17831 17832 17833 17834
17 ${TESTTOOL_PATH} /root
18 ${TESTTOOL_VERSION} netconf-testtool-1.3.0-SNAPSHOT-executable.jar
19 ${TESTTOOL_SCHEME} ./yang_ietf_bier
23 [Documentation] Init the configuration datastore defined by YANG modules bier-network-topology and bier-network-channel, the Testtool for to simulate the netconf devices, and the netconf connecting IP address and port for the ODL controller.
28 [Documentation] Init the configuration datastore defined by the YANG module bier-network-topology.
29 ${resp} TemplatedRequests.Put_As_Json_Templated ${BIER_TE_VAR_FOLDER}/bier_init_all/bier_init_biertopology {} session
32 [Documentation] Init the configuration datastore defined by the YANG module bier-network-channel.
33 ${resp} TemplatedRequests.Put_As_Json_Templated ${BIER_TE_VAR_FOLDER}/bier_init_all/bier_init_channel {} session
36 [Documentation] Verify the Keyword Init Bier Topology has been successfully executed by query and verify the nodes in the datastore.
37 ${resp} TemplatedRequests.Post_As_Json_Templated ${BIER_TE_VAR_FOLDER}/bier_node_configuration/query_node {} session True
40 [Arguments] ${node-id} ${tp-id-list} ${bp-list} ${length}
41 [Documentation] The keyword is used for the second layer of loop TC5_Configure Te Node.
42 : FOR ${j} IN RANGE ${length}
43 \ ${tp-id} Get From List ${tp-id-list} ${j}
44 \ ${bp} Get From List ${bp-list} ${j}
45 \ ${mapping} Create Dictionary TOPOLOGYID=${TOPOLOGY_ID} NODEID=${node-id} DOMAINID=${DOMAIN_ID_LIST[0]} SUBDOMAINID=${SUBDOMAIN_ID_LIST[0]}
46 \ ... TPID=${tp-id} BP=${bp}
47 \ ${resp} TemplatedRequests.Post_As_Json_Templated ${BIER_TE_VAR_FOLDER}/bier_node_configuration/configure_te_node ${mapping} session
48 \ Verify_Response_As_Json_Templated ${resp} ${BIER_TE_VAR_FOLDER}/common success_response