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
[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
${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
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
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
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
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}
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}
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 ***