X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=csit%2Flibraries%2FBierTeResource.robot;h=b0fee30643df9081421d6f782c1f070e9d5e82ae;hb=cfea80bedb46a26b4e54990df492858abb41a92b;hp=0b02f06893f2db0188e6de03dce9413871cfd796;hpb=39de3404b2681d425af82a66f7f665ecd4a2da3a;p=integration%2Ftest.git diff --git a/csit/libraries/BierTeResource.robot b/csit/libraries/BierTeResource.robot index 0b02f06893..b0fee30643 100644 --- a/csit/libraries/BierTeResource.robot +++ b/csit/libraries/BierTeResource.robot @@ -1,22 +1,25 @@ *** Settings *** -Documentation Robot keyword library (Resource) for BIER information configuration and verification Python utilities. -... -... Copyright (c) 2016-2017 Zte, Inc. and others. All rights reserved. -... -... This resource contains some keywords which complete four main functions: -... Send corresponding request to datastore, -... Construct BIER information, -... Verity Configuration success or not and its result, -... Delete BIER configuration and close all session. -Resource TemplatedRequests.robot -Library SSHLibrary +Documentation Robot keyword library (Resource) for BIER information configuration and verification Python utilities. +... +... Copyright (c) 2016-2017 Zte, Inc. and others. All rights reserved. +... +... This resource contains some keywords which complete four main functions: +... Send corresponding request to datastore, +... Construct BIER information, +... Verity Configuration success or not and its result, +... Delete BIER configuration and close all session. + +Resource TemplatedRequests.robot +Library SSHLibrary + *** Variables *** -${BIER_TE_VAR_FOLDER} ${CURDIR}/../variables/bier -@{NETCONF_PORT_LIST} 17830 17831 17832 17833 17834 -${TESTTOOL_PATH} /root -${TESTTOOL_VERSION} netconf-testtool-1.3.0-SNAPSHOT-executable.jar -${TESTTOOL_SCHEME} ./yang_ietf_bier +${BIER_TE_VAR_FOLDER} ${CURDIR}/../variables/bier +@{NETCONF_PORT_LIST} 17830 17831 17832 17833 17834 +${TESTTOOL_PATH} /root +${TESTTOOL_VERSION} netconf-testtool-1.3.0-SNAPSHOT-executable.jar +${TESTTOOL_SCHEME} ./yang_ietf_bier + *** Keywords *** Init All @@ -26,24 +29,42 @@ Init All Init Bier Topology [Documentation] Init the configuration datastore defined by the YANG module bier-network-topology. - ${resp} TemplatedRequests.Put_As_Json_Templated ${BIER_TE_VAR_FOLDER}/bier_init_all/bier_init_biertopology {} session + ${resp} TemplatedRequests.Put_As_Json_Templated + ... ${BIER_TE_VAR_FOLDER}/bier_init_all/bier_init_biertopology + ... {} + ... session Init Channel [Documentation] Init the configuration datastore defined by the YANG module bier-network-channel. - ${resp} TemplatedRequests.Put_As_Json_Templated ${BIER_TE_VAR_FOLDER}/bier_init_all/bier_init_channel {} session + ${resp} TemplatedRequests.Put_As_Json_Templated + ... ${BIER_TE_VAR_FOLDER}/bier_init_all/bier_init_channel + ... {} + ... session Node Online [Documentation] Verify the Keyword Init Bier Topology has been successfully executed by query and verify the nodes in the datastore. - ${resp} TemplatedRequests.Post_As_Json_Templated ${BIER_TE_VAR_FOLDER}/bier_node_configuration/query_node {} session True + ${resp} TemplatedRequests.Post_As_Json_Templated + ... ${BIER_TE_VAR_FOLDER}/bier_node_configuration/query_node + ... {} + ... session + ... True Second Layer Loop - [Arguments] ${node-id} ${tp-id-list} ${bp-list} ${length} [Documentation] The keyword is used for the second layer of loop TC5_Configure Te Node. + [Arguments] ${node-id} ${tp-id-list} ${bp-list} ${length} FOR ${j} IN RANGE ${length} ${tp-id} Get From List ${tp-id-list} ${j} ${bp} Get From List ${bp-list} ${j} - ${mapping} Create Dictionary TOPOLOGYID=${TOPOLOGY_ID} NODEID=${node-id} DOMAINID=${DOMAIN_ID_LIST[0]} SUBDOMAINID=${SUBDOMAIN_ID_LIST[0]} - ... TPID=${tp-id} BP=${bp} - ${resp} TemplatedRequests.Post_As_Json_Templated ${BIER_TE_VAR_FOLDER}/bier_node_configuration/configure_te_node ${mapping} session + ${mapping} Create Dictionary + ... TOPOLOGYID=${TOPOLOGY_ID} + ... NODEID=${node-id} + ... DOMAINID=${DOMAIN_ID_LIST[0]} + ... SUBDOMAINID=${SUBDOMAIN_ID_LIST[0]} + ... TPID=${tp-id} + ... BP=${bp} + ${resp} TemplatedRequests.Post_As_Json_Templated + ... ${BIER_TE_VAR_FOLDER}/bier_node_configuration/configure_te_node + ... ${mapping} + ... session Verify_Response_As_Json_Templated ${resp} ${BIER_TE_VAR_FOLDER}/common success_response END