Remove usage of removed RPC delete-entry 14/73914/7
authorIvan Hrasko <ihrasko@cisco.com>
Wed, 11 Jul 2018 08:21:54 +0000 (10:21 +0200)
committerIvan Hrasko <ihrasko@cisco.com>
Mon, 16 Jul 2018 12:00:56 +0000 (14:00 +0200)
- delete-entry RPC was deprecated since Boron
and removed for Fluorine release
- delete-bindings RPC is a replacement
- also removed not needed Robot functions:
'Delete Binding Default' and 'Delete Binding Be'

Change-Id: Ifc80740d715f1121dfc738634c7c2ccd95885819
Signed-off-by: Ivan Hrasko <ihrasko@cisco.com>
csit/libraries/Sxp.py
csit/libraries/SxpLib.robot
csit/suites/sxp/basic/020_Restconf_CRUD.robot
csit/suites/sxp/clustering/030_RPC_functionality.robot
csit/suites/sxp/filtering/050_Domain_filtering.robot

index c7a85e3697259f9f29240e5332307ef379fce71a..489cc3249095a1ffc1d83a9b8f609f241226f2c4 100644 (file)
@@ -608,30 +608,6 @@ def delete_connections_xml(address, port, node, domain_name):
     return data
 
 
-def delete_binding_xml(sgt, prefix, ip, domain_name):
-    """Generate xml for Delete Binding request
-
-    :param sgt: Source Group Tag
-    :type sgt: str
-    :param prefix: Ipv4/6 prefix
-    :type prefix: str
-    :param ip: Ipv4 address of node
-    :type ip: str
-    :param domain_name: Name of Domain
-    :type domain_name: str
-    :returns: String containing xml data for request
-
-    """
-    templ = Template('''<input>
-  <requested-node xmlns="urn:opendaylight:sxp:controller">$ip</requested-node>
-  <sgt xmlns="urn:opendaylight:sxp:controller">$sgt</sgt>
-  <ip-prefix xmlns="urn:opendaylight:sxp:controller">$prefix</ip-prefix>
-  $domain
-</input>''')
-    data = templ.substitute({'sgt': sgt, 'prefix': prefix, 'ip': ip, 'domain': get_domain_name(domain_name)})
-    return data
-
-
 def add_peer_group_xml(name, peers, ip):
     """Generate xml for Add PeerGroups request
 
index 090ae67552d98b354aeb2c85611ee884d42eb853..51ee1b45da9c140a7da3950ca0c8c50bfd7432bf 100644 (file)
@@ -115,23 +115,13 @@ Clean Binding
     [Arguments]    ${sgt}    ${prefixes}    ${node}    ${session}    ${domain}=global
     [Documentation]    Used for nester FOR loop
     : FOR    ${prefix}    IN    @{prefixes}
-    \    Delete Binding Default    ${sgt}    ${prefix}    ${node}    ${domain}    ${session}
+    \    Delete Bindings    ${sgt}    ${prefix}    ${node}    ${domain}    ${session}
 
-Delete Binding Default
-    [Arguments]    ${sgt}    ${prefix}    ${node}    ${domain}    ${session}
-    [Documentation]    Delete binding via RPC
-    Delete Binding    ${sgt}    ${prefix}    ${node}    ${domain}    ${session}
-
-Delete Binding Be
-    [Arguments]    ${sgt}    ${prefix}    ${node}    ${domain}    ${session}
-    [Documentation]    Delete binding via RPC
-    Delete Binding    ${sgt['sgt']}    ${prefix['ip-prefix']}    ${node}    ${domain}    ${session}
-
-Delete Binding
-    [Arguments]    ${sgt}    ${prefix}    ${node}=127.0.0.1    ${domain}=global    ${session}=session
-    [Documentation]    Delete binding via RPC from Master DB of node
-    ${DATA}    Delete Binding Xml    ${sgt}    ${prefix}    ${node}    ${domain}
-    Post To Controller    ${session}    delete-entry    ${DATA}
+Delete Bindings
+    [Arguments]    ${sgt}    ${prefixes}    ${node}=127.0.0.1    ${domain}=global    ${session}=session
+    [Documentation]    Delete one or more bindings via RPC from Master DB of node
+    ${DATA}    Delete Bindings Xml    ${node}    ${domain}    ${sgt}    ${prefixes}
+    Post To Controller    ${session}    delete-bindings    ${DATA}
 
 Add PeerGroup
     [Arguments]    ${name}    ${peers}=    ${node}=127.0.0.1    ${session}=session
@@ -293,12 +283,6 @@ Delete Domain
     ${DATA}    Delete Domain Xml    ${node}    ${domain_name}
     Post To Controller    ${session}    delete-domain    ${DATA}
 
-Delete Bindings
-    [Arguments]    ${sgt}    ${prefixes}    ${node}=127.0.0.1    ${session}=session    ${domain}=global
-    [Documentation]    Delete bindings via RPC from Master DB of node
-    ${DATA}    Delete Bindings Xml    ${node}    ${domain}    ${sgt}    ${prefixes}
-    Post To Controller    ${session}    delete-bindings    ${DATA}
-
 Add Bindings Range
     [Arguments]    ${sgt}    ${start}    ${size}    ${node}=127.0.0.1
     [Documentation]    Add Bindings to Node specified by range
index a747f67d54ee2bdaf49e89dbda6855df10a9f190..c377c1c42c2879a81a0f45bbf5fca7084d45b193 100644 (file)
@@ -29,6 +29,16 @@ Test Update Bindings
     Wait Until Keyword Succeeds    3x    250ms    Bindings Should Not Contain    30    1.1.1.10/32
     Wait Until Keyword Succeeds    3x    250ms    Bindings Should Contain    40    1.1.1.10/32
 
+Test Delete Bindings
+    [Documentation]    Test if bindings are deleted from Master DB
+    [Tags]    Restconf CRUD    SXP
+    Add Bindings    52301    12.1.1.1/32
+    Wait Until Keyword Succeeds    3x    250ms    Bindings Should Contain    52301    12.1.1.1/32
+    Run Keyword And Expect Error    *    Delete Bindings    2631    12.1.1.1/32
+    Wait Until Keyword Succeeds    3x    250ms    Bindings Should Contain    52301    12.1.1.1/32
+    Delete Bindings    52301    12.1.1.1/32
+    Wait Until Keyword Succeeds    3x    250ms    Bindings Should Not Contain    52301    12.1.1.1/32
+
 Test Add Connection
     [Documentation]    Test if connections are added to Node
     [Tags]    Restconf CRUD    SXP
@@ -39,16 +49,6 @@ Test Add Connection
     Wait Until Keyword Succeeds    3x    250ms    Connections Should Contain    105.12.0.50    64000    listener
     ...    version1
 
-Test Delete Binding
-    [Documentation]    Test if bindings are deleted from Master DB
-    [Tags]    Restconf CRUD    SXP
-    Add Bindings    52301    12.1.1.1/32
-    Wait Until Keyword Succeeds    3x    250ms    Bindings Should Contain    52301    12.1.1.1/32
-    Run Keyword And Expect Error    *    Delete Binding    2631    12.1.1.1/32
-    Wait Until Keyword Succeeds    3x    250ms    Bindings Should Contain    52301    12.1.1.1/32
-    Delete Binding    52301    12.1.1.1/32
-    Wait Until Keyword Succeeds    3x    250ms    Bindings Should Not Contain    52301    12.1.1.1/32
-
 Test Delete Connection
     [Documentation]    Test if conncetions are removed from Node
     [Tags]    Restconf CRUD    SXP
index 0060946802c48074137e1abe6513c90bb0835713..9aa22a8537d0c5069ddd6ea2a7d0dde82431a962 100644 (file)
@@ -39,7 +39,7 @@ Isolate SXP Controller
     Wait Until Keyword Succeeds    30    1    Check Bindings Exist
     ${active_controller}    Get Active Controller
     : FOR    ${i}    IN RANGE    ${NUM_ODL_SYSTEM}
-    \    Delete Binding    ${i+1}0    ${i+1}0.${i+1}0.${i+1}0.${i+1}0/32    node=${CLUSTER_NODE_ID}    session=controller${active_controller}
+    \    Delete Bindings    ${i+1}0    ${i+1}0.${i+1}0.${i+1}0.${i+1}0/32    node=${CLUSTER_NODE_ID}    session=controller${active_controller}
     Flush_Iptables_From_List_Or_All
     Wait Until Keyword Succeeds    240    1    Sync_Status_Should_Be_True    ${controller_index}
     Wait Until Keyword Succeeds    30    1    Check Bindings Does Not Exist
index 53423bedba56bff0d28528d199d4192435feba24..a5b8f02fdf855dd4151fbacadd4106b77cf64640 100644 (file)
@@ -32,8 +32,8 @@ Update Messages Test
     Add Filters
     Wait Until Keyword Succeeds    15    1    Check Domain Sharing
     : FOR    ${node}    IN RANGE    2    5
-    \    Delete Binding    ${node}0    ${node}0.${node}0.${node}0.0/24    127.0.0.${node}
-    \    Delete Binding    ${node}0    ${node}0.${node}0.0.0/16    127.0.0.${node}
+    \    Delete Bindings    ${node}0    ${node}0.${node}0.${node}0.0/24    127.0.0.${node}
+    \    Delete Bindings    ${node}0    ${node}0.${node}0.0.0/16    127.0.0.${node}
     Wait Until Keyword Succeeds    15    1    Check Domain Sharing After Update
     : FOR    ${node}    IN RANGE    2    5
     \    Add Bindings    ${node}0    ${node}0.${node}0.${node}0.0/24    127.0.0.${node}
@@ -56,9 +56,9 @@ Local Binding Update Test
     Wait Until Keyword Succeeds    15    1    Check Initialized Local
     Add Filters
     Wait Until Keyword Succeeds    15    1    Check Domain Sharing Local
-    Delete Binding    20    20.20.20.5/32    127.0.0.1    ${DOMAIN_1}
-    Delete Binding    30    30.30.30.5/32    127.0.0.1    ${DOMAIN_2}
-    Delete Binding    40    40.40.40.5/32    127.0.0.1    ${DOMAIN_3}
+    Delete Bindings    20    20.20.20.5/32    127.0.0.1    ${DOMAIN_1}
+    Delete Bindings    30    30.30.30.5/32    127.0.0.1    ${DOMAIN_2}
+    Delete Bindings    40    40.40.40.5/32    127.0.0.1    ${DOMAIN_3}
     Wait Until Keyword Succeeds    15    1    Check Domain Sharing After Update Local
     Add Bindings    20    20.20.20.5/32    127.0.0.1    ${DOMAIN_1}
     Add Bindings    30    30.30.30.5/32    127.0.0.1    ${DOMAIN_2}
@@ -75,7 +75,7 @@ Binding Replacement Test
     Wait Until Keyword Succeeds    15    1    Check After Update Part One
     Add Filters After Update
     Wait Until Keyword Succeeds    15    1    Check After Update Part Two
-    Delete Binding    450    35.35.35.35/32    127.0.0.1    ${DOMAIN_3}
+    Delete Bindings    450    35.35.35.35/32    127.0.0.1    ${DOMAIN_3}
     Wait Until Keyword Succeeds    15    1    Check After Update Part Three
 
 *** Keywords ***