summaryrefslogtreecommitdiffstats
path: root/test/vpp_papi_provider.py
diff options
context:
space:
mode:
authorJakub Grajciar <jgrajcia@cisco.com>2020-03-04 13:08:27 +0100
committerOle Trøan <otroan@employees.org>2020-03-23 16:07:07 +0000
commit0938eba153ed20b8a32b7278ed6301b45ce257cc (patch)
treed561ad9278247ace3b896408d0c9b8fee49fefc0 /test/vpp_papi_provider.py
parentc2c1bfd9b72aec88526c06479b128725eb525866 (diff)
sr: srv6 API cleanup
Use consistent API types. Type: fix Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com> Change-Id: I3c348ad2fca8bb3d9a246af7a2aa9dc9c33f57c3 Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Diffstat (limited to 'test/vpp_papi_provider.py')
-rw-r--r--test/vpp_papi_provider.py121
1 files changed, 0 insertions, 121 deletions
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py
index 52ce492adbd..651e07a98b1 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -925,127 +925,6 @@ class VppPapiProvider(object):
return self.api(self.papi.sr_mpls_policy_del,
{'bsid': bsid})
- def sr_localsid_add_del(self,
- localsid,
- behavior,
- nh_addr4,
- nh_addr6,
- is_del=0,
- end_psp=0,
- sw_if_index=0xFFFFFFFF,
- vlan_index=0,
- fib_table=0,
- ):
- """ Add/del IPv6 SR local-SID.
-
- :param localsid:
- :param behavior: END=1; END.X=2; END.DX2=4; END.DX6=5;
- :param behavior: END.DX4=6; END.DT6=7; END.DT4=8
- :param nh_addr4:
- :param nh_addr6:
- :param is_del: (Default value = 0)
- :param end_psp: (Default value = 0)
- :param sw_if_index: (Default value = 0xFFFFFFFF)
- :param vlan_index: (Default value = 0)
- :param fib_table: (Default value = 0)
- """
- return self.api(
- self.papi.sr_localsid_add_del,
- {'is_del': is_del,
- 'localsid': localsid,
- 'end_psp': end_psp,
- 'behavior': behavior,
- 'sw_if_index': sw_if_index,
- 'vlan_index': vlan_index,
- 'fib_table': fib_table,
- 'nh_addr4': nh_addr4,
- 'nh_addr6': nh_addr6
- }
- )
-
- def sr_policy_add(
- self,
- bsid_addr,
- weight=1,
- is_encap=1,
- type=0,
- fib_table=0,
- n_segments=0,
- segments=[]):
- """
- :param bsid_addr: bindingSID of the SR Policy
- :param weight: weight of the sid list. optional. (default: 1)
- :param is_encap: (bool) whether SR policy should Encap or SRH insert \
- (default: Encap)
- :param type: type/behavior of the SR policy. (default or spray) \
- (default: default)
- :param fib_table: VRF where to install the FIB entry for the BSID \
- (default: 0)
- :param n_segments: number of segments \
- (default: 0)
- :param segments: a vector of IPv6 address composing the segment list \
- (default: [])
- """
- return self.api(
- self.papi.sr_policy_add,
- {'bsid_addr': bsid_addr,
- 'weight': weight,
- 'is_encap': is_encap,
- 'type': type,
- 'fib_table': fib_table,
- 'n_segments': n_segments,
- 'segments': segments
- }
- )
-
- def sr_policy_del(
- self,
- bsid_addr,
- sr_policy_index=0):
- """
- :param bsid: bindingSID of the SR Policy
- :param sr_policy_index: index of the sr policy (default: 0)
- """
- return self.api(
- self.papi.sr_policy_del,
- {'bsid_addr': bsid_addr,
- 'sr_policy_index': sr_policy_index
- })
-
- def sr_steering_add_del(
- self,
- is_del,
- bsid_addr,
- sr_policy_index,
- table_id,
- prefix_addr,
- mask_width,
- sw_if_index,
- traffic_type):
- """
- Steer traffic L2 and L3 traffic through a given SR policy
-
- :param is_del: delete or add
- :param bsid_addr: bindingSID of the SR Policy (alt to sr_policy_index)
- :param sr_policy: is the index of the SR Policy (alt to bsid)
- :param table_id: is the VRF where to install the FIB entry for the BSID
- :param prefix_addr: is the IPv4/v6 address for L3 traffic type
- :param mask_width: is the mask for L3 traffic type
- :param sw_if_index: is the incoming interface for L2 traffic
- :param traffic_type: type of traffic (IPv4: 4, IPv6: 6, L2: 2)
- """
- return self.api(
- self.papi.sr_steering_add_del,
- {'is_del': is_del,
- 'bsid_addr': bsid_addr,
- 'sr_policy_index': sr_policy_index,
- 'table_id': table_id,
- 'prefix_addr': prefix_addr,
- 'mask_width': mask_width,
- 'sw_if_index': sw_if_index,
- 'traffic_type': traffic_type
- })
-
def acl_add_replace(self, acl_index, r, tag='',
expected_retval=0):
"""Add/replace an ACL
eight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
19.01-rc0~482_g884f0af~b5776