Delete unused SR keywords 37/21437/7
authorVratko Polak <vrpolak@cisco.com>
Thu, 22 Aug 2019 12:15:09 +0000 (14:15 +0200)
committerPeter Mikus <pmikus@cisco.com>
Tue, 27 Aug 2019 11:17:42 +0000 (11:17 +0000)
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>
resources/api/vpp/supported_crcs.yaml
resources/libraries/python/SRv6.py
resources/libraries/robot/overlay/srv6.robot

index 98eff45..3ceb252 100644 (file)
@@ -27,9 +27,9 @@
 
 # Trailing comments are optional, for tracking how to test the message.
 
-# https://logs.fd.io/production/vex-yul-rot-jenkins-1/
-# vpp-beta-merge-master-ubuntu1804/3370/archives/build-root/
-19.08-rc0~806-g4f9446444~b3370:
+# https://logs.fd.io/production/vex-yul-rot-jenkins-1
+# /vpp-beta-merge-master-ubuntu1804/3490/archives/build-root/
+20.01-rc0~85:
     acl_add_replace: '0x13bc8539'  # perf
     acl_add_replace_reply: '0xac407b0c'  # perf
     acl_dump: '0xef34fea4'  # perf teardown
     sr_policies_dump: '0x51077d14'  # perf
     sr_policy_add: '0x4b6e2484'  # perf
     sr_policy_add_reply: '0xe8d4e804'  # perf
-    sr_policy_del: '0xe4133171'  # perf
-    sr_policy_del_reply: '0xe8d4e804'  # perf
     sr_set_encap_source: '0xd05bb4de'  # perf
     sr_set_encap_source_reply: '0xe8d4e804'  # perf
     sr_steering_add_del: '0x28b5dcab'  # perf
index 1099c75..24ebea7 100644 (file)
@@ -205,27 +205,6 @@ class SRv6(object):
         with PapiSocketExecutor(node) as papi_exec:
             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.
@@ -266,23 +245,6 @@ class SRv6(object):
         with PapiSocketExecutor(node) as papi_exec:
             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):
@@ -394,48 +357,6 @@ class SRv6(object):
         with PapiSocketExecutor(node) as papi_exec:
             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.
index 1be008a..dafc0fe 100644 (file)
 | | ... | 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.
 | | ...
 | | ...
 | | 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.
 | | ...
 | | 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.
 | | ...