aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2019-08-22 14:15:09 +0200
committerPeter Mikus <pmikus@cisco.com>2019-08-27 11:17:42 +0000
commit6cdc335b42c3fa4c4c69ec0b20314df02118e4b4 (patch)
treef12cac34f25a77ad498602d0299c0786de1b7083 /resources/libraries
parent823e79aca6d19531f3abb080ab6510418f6af94d (diff)
Delete unused SR keywords
Trim both Python (L1) and Robot (L2) keywords, as no test performs SR related deletions. Change-Id: Ic76d870c3f58e927ea222b350e149d0770985072 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries')
-rw-r--r--resources/libraries/python/SRv6.py81
-rw-r--r--resources/libraries/robot/overlay/srv6.robot58
2 files changed, 1 insertions, 138 deletions
diff --git a/resources/libraries/python/SRv6.py b/resources/libraries/python/SRv6.py
index 1099c754e6..24ebea7ccf 100644
--- a/resources/libraries/python/SRv6.py
+++ b/resources/libraries/python/SRv6.py
@@ -206,27 +206,6 @@ class SRv6(object):
papi_exec.add(cmd, **args).get_reply(err_msg)
@staticmethod
- def delete_sr_localsid(node, local_sid):
- """Delete SRv6 LocalSID on the given node.
-
- :param node: Given node to delete localSID on.
- :param local_sid: LocalSID IPv6 address.
- :type node: dict
- :type local_sid: str
- """
- cmd = 'sr_localsid_add_del'
- args = dict(
- is_del=1,
- localsid=SRv6.create_srv6_sid_object(local_sid),
- sw_if_index=Constants.BITWISE_NON_ZERO,
- )
- err_msg = 'Failed to delete SR localSID {lsid} on host {host}'.format(
- lsid=local_sid, host=node['host'])
-
- with PapiSocketExecutor(node) as papi_exec:
- papi_exec.add(cmd, **args).get_reply(err_msg)
-
- @staticmethod
def show_sr_localsids(node):
"""Show SRv6 LocalSIDs on the given node.
@@ -267,23 +246,6 @@ class SRv6(object):
papi_exec.add(cmd, **args).get_reply(err_msg)
@staticmethod
- def delete_sr_policy(node, bsid):
- """Delete SRv6 policy on the given node.
-
- :param node: Given node to delete SRv6 policy on.
- :param bsid: BindingSID IPv6 address.
- :type node: dict
- :type bsid: str
- """
- cmd = 'sr_policy_del'
- args = dict(bsid_addr=IPv6Address(unicode(bsid)).packed)
- err_msg = 'Failed to delete SR policy for BindingSID {bsid} ' \
- 'on host {host}'.format(bsid=bsid, host=node['host'])
-
- with PapiSocketExecutor(node) as papi_exec:
- papi_exec.add(cmd, **args).get_reply(err_msg)
-
- @staticmethod
def show_sr_policies(node):
"""Show SRv6 policies on the given node.
@@ -350,6 +312,7 @@ class SRv6(object):
return sw_if_index, mask_width, prefix_addr, traffic_type
+ # TODO: Bring L1 names, arguments and defaults closer to PAPI ones.
@staticmethod
def configure_sr_steer(
node, mode, bsid, interface=None, ip_addr=None, prefix=None):
@@ -395,48 +358,6 @@ class SRv6(object):
papi_exec.add(cmd, **args).get_reply(err_msg)
@staticmethod
- def delete_sr_steer(
- node, mode, bsid, interface=None, ip_addr=None, mask=None):
- """Delete SRv6 steering policy on the given node.
-
- :param node: Given node to delete steering policy on.
- :param mode: Mode of operation - L2 or L3.
- :param bsid: BindingSID - local SID IPv6 address.
- :param interface: Interface name (Optional, required in case of
- L2 mode).
- :param ip_addr: IPv4/IPv6 address (Optional, required in case of L3
- mode).
- :param mask: IP address mask (Optional, required in case of L3 mode).
- :type node: dict
- :type mode: str
- :type bsid: str
- :type interface: str
- :type ip_addr: str
- :type mask: int
- :raises ValueError: If unsupported mode used or required parameter
- is missing.
- """
- sw_if_index, mask_width, prefix_addr, traffic_type = \
- SRv6._get_sr_steer_policy_args(node, mode, interface, ip_addr, mask)
-
- cmd = 'sr_steering_add_del'
- args = dict(
- is_del=1,
- bsid_addr=IPv6Address(unicode(bsid)).packed,
- sr_policy_index=0,
- table_id=0,
- prefix_addr=prefix_addr,
- mask_width=mask_width,
- sw_if_index=sw_if_index,
- traffic_type=traffic_type
- )
- err_msg = 'Failed to delete SRv6 steering policy for BindingSID ' \
- '{bsid} on host {host}'.format(bsid=bsid, host=node['host'])
-
- with PapiSocketExecutor(node) as papi_exec:
- papi_exec.add(cmd, **args).get_reply(err_msg)
-
- @staticmethod
def show_sr_steering_policies(node):
"""Show SRv6 steering policies on the given node.
diff --git a/resources/libraries/robot/overlay/srv6.robot b/resources/libraries/robot/overlay/srv6.robot
index 1be008a44a..dafc0fe566 100644
--- a/resources/libraries/robot/overlay/srv6.robot
+++ b/resources/libraries/robot/overlay/srv6.robot
@@ -69,21 +69,6 @@
| | ... | out_if=${out_if} | in_if=${in_if} | src_addr=${src_addr}
| | ... | sid_list=${sid_list}
-| Delete SR LocalSID on DUT
-| | [Documentation] | Delete SRv6 LocalSID on the given DUT node.
-| | ...
-| | ... | *Arguments:*
-| | ... | - dut_node - DUT node where to delete localSID on. Type: dictionary
-| | ... | - local_sid - LocalSID IPv6 address. Type: string
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Delete SR LocalSID on DUT \| ${nodes['DUT1']} \| B:: \|
-| | ...
-| | [Arguments] | ${dut_node} | ${local_sid}
-| | ...
-| | Delete SR LocalSID | ${dut_node} | ${local_sid}
-
| Show SR LocalSIDs on DUT
| | [Documentation] | Show SRv6 LocalSIDs on the given DUT node.
| | ...
@@ -118,21 +103,6 @@
| | ...
| | Configure SR Policy | ${dut_node} | ${bsid} | ${sid_list} | mode=${mode}
-| Delete SR Policy on DUT
-| | [Documentation] | Delete SRv6 policy on the given DUT node.
-| | ...
-| | ... | *Arguments:*
-| | ... | - dut_node - DUT node where to delete SRv6 policy on. Type: dictionary
-| | ... | - bsid - BindingSID - local SID IPv6 address. Type: string
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Delete SR Policy on DUT \| ${nodes['DUT1']} \| A:: \|
-| | ...
-| | [Arguments] | ${dut_node} | ${bsid}
-| | ...
-| | Delete SR Policy | ${dut_node} | ${bsid}
-
| Show SR Policies on DUT
| | [Documentation] | Show SRv6 policies on the given DUT node.
| | ...
@@ -175,34 +145,6 @@
| | Configure SR Steer | ${dut_node} | ${mode} | ${bsid}
| | ... | interface=${interface} | ip_addr=${ip_addr} | prefix=${prefix}
-| Delete SR Steer on DUT
-| | [Documentation] | Delete SRv6 steering policy on the given DUT node.
-| | ...
-| | ... | *Arguments:*
-| | ... | - dut_node - DUT node where to delete SR steering policy on.
-| | ... | Type: dictionary
-| | ... | - mode - Mode of operation - L2 or L3. Type: string
-| | ... | - bsid - BindingSID - local SID IPv6 address. Type: string
-| | ... | - interface - Interface name (Optional, default value: None; required
-| | ... | in case of L2 mode). Type: string
-| | ... | - ip_addr - IPv4/IPv6 address (Optional, default value: None; required
-| | ... | in case of L3 mode). Type: string
-| | ... | - prefix - IP address prefix (Optional, default value: None; required
-| | ... | for L3 mode). Type: integer
-| | ...
-| | ... | *Example:*
-| | ...
-| | ... | \| Delete SR Steer on DUT \| ${nodes['DUT1']} \| L2 \| B:: \
-| | ... | \| interface=GigabitEthernet0/10/0 \|
-| | ... | \| Delete SR Steer on DUT \| ${nodes['DUT1']} \| L3 \| C:: \
-| | ... | \| ip_address=2001::1 \| prefix=64 \|
-| | ...
-| | [Arguments] | ${dut_node} | ${mode} | ${bsid}
-| | ... | ${interface}=${None} | ${ip_addr}=${None} | ${prefix}=${None}
-| | ...
-| | Delete SR Steer | ${dut_node} | ${mode} | ${bsid}
-| | ... | interface=${interface} | ip_addr=${ip_addr} | prefix=${prefix}
-
| Show SR Steering Policies on DUT
| | [Documentation] | Show SRv6 steering policies on the given DUT node.
| | ...