aboutsummaryrefslogtreecommitdiffstats
path: root/test/vpp_papi_provider.py
AgeCommit message (Expand)AuthorFilesLines
2021-10-08vxlan-gpe: add udp-port configuration supportArtem Glazychev1-37/+0
2021-08-13tests docs: upgrade python packagesDave Wallace1-14/+19
2021-04-26tests: clean up gbp calls from vpp_papi_providerPaul Vinciguerra1-138/+0
2021-04-12tests: support attaching to existing vppKlement Sekera1-2/+2
2021-03-16fib: Allow the creation of new source on the APINeale Ranns1-1/+10
2021-03-15tests: use socket transport instead of shared memoryOle Troan1-35/+31
2021-01-21ip: use IPv6 flowlabel in flow hash computationAhmed Abdelsalam1-2/+0
2021-01-08l2: Separating scan-delay and learn-limit into a separate API from want_l2_ma...Jerome Tollet1-0/+1
2020-12-01tests: remove ip_punt from vpp_papi_provider and add ip_punt object modelsJakub Grajciar1-27/+0
2020-11-24tests: remove bond, pipe, session and api_namespace from vpp_papi_providerJakub Grajciar1-49/+0
2020-11-24tests: remove svs, proxy_arp and gso from vpp_papi_providerOle Troan1-76/+0
2020-11-02ipsec: Tunnel SA DSCP behaviourNeale Ranns1-4/+0
2020-05-05ipsec: User can choose the UDP source portNeale Ranns1-55/+0
2020-05-03tests: improve vpp_papi_provider exception outputPaul Vinciguerra1-4/+12
2020-04-28tests: implement ipaddress convenience methodsPaul Vinciguerra1-26/+0
2020-04-28lisp: API cleanupJakub Grajciar1-124/+0
2020-04-28tests: move defaults from defaultmapping to .api filesPaul Vinciguerra1-16/+1
2020-03-27acl: API cleanupJakub Grajciar1-120/+0
2020-03-26acl: revert acl: api cleanupOle Trøan1-0/+120
2020-03-26acl: API cleanupJakub Grajciar1-120/+0
2020-03-23sr: srv6 API cleanupJakub Grajciar1-121/+0
2020-03-12policer: API cleanupJakub Grajciar1-36/+1
2020-03-09l2: API cleanupJakub Grajciar1-10/+1
2020-03-05session: API cleanupJakub Grajciar1-2/+1
2020-02-26sr: API cleanupJakub Grajciar1-1/+1
2020-01-30gre: Tunnel encap/decap flagsNeale Ranns1-37/+0
2019-12-17ip: Protocol Independent IP NeighborsNeale Ranns1-21/+1
2019-12-09gtpu: use explicit types in apiOle Troan1-34/+0
2019-12-07pppoe: use explicit types in apiOle Troan1-2/+0
2019-12-04gre: Multi-point interfacesNeale Ranns1-4/+6
2019-12-03classify: API cleanupJakub Grajciar1-82/+0
2019-11-26fib: Table ReplaceNeale Ranns1-25/+0
2019-11-15tests: Remove the unrequired VPP IP address/prefix class wrappersNeale Ranns1-6/+3
2019-11-08ipsec: remove dedicated IPSec tunnelsNeale Ranns1-1/+1
2019-10-17classify: make tests support python3Ole Troan1-5/+4
2019-10-16tests: cli wrapper should return stringOle Troan1-2/+1
2019-10-14gso: Add gso feature arcMohsin Kazmi1-0/+7
2019-10-10tests: add cli_return_response to vpp_papi_providerDave Barach1-2/+13
2019-10-09dhcp: dhcp6_pd_client_cp API cleanupJakub Grajciar1-10/+0
2019-10-08tests: handle unicode charactes in cli outputKlement Sekera1-1/+2
2019-10-07dhcp: Move to pluginNeale Ranns1-12/+0
2019-10-03dhcp: API cleanupJakub Grajciar1-96/+4
2019-09-30dhcp: dhcp6_ia_na_client_cp API cleanupJakub Grajciar1-6/+0
2019-09-11bonding: API cleanupJakub Grajciar1-0/+1
2019-09-04bfd: API cleanupJakub Grajciar1-81/+5
2019-07-26dhcp ip: DSCP settings for transmitted DHCP packetsNeale Ranns1-1/+3
2019-07-24qos: QoS dump APIsNeale Ranns1-22/+0
2019-07-19bonding: add support for numa-only in lacp modeZhiyong Yang1-0/+3
2019-07-12tests: remove invalid arguments passed to papiPaul Vinciguerra1-5/+1
2019-07-05gbp: add unit-tests for anonymous l3outBenoît Ganne1-2/+3
.len: return True return False def encode(self): return {'address': self.addr.encode(), 'len': self.len} @property def version(self): return self.addr.version @property def address(self): return self.addr.address @property def bytes(self): return self.addr.bytes @property def length(self): return self.len @property def is_ip6(self): return self.addr.is_ip6 def __str__(self): return "%s/%d" % (self.address, self.length) def __eq__(self, other): if isinstance(other, self.__class__): return (self.len == other.len and self.addr == other.addr) elif hasattr(other, "address") and hasattr(other, "len"): # vl_api_prefix_t return self.len == other.len and \ self.addr == other.address else: _log.error( "Comparing VppIpPrefix:%s with incomparable type: %s" % (self, other)) return NotImplemented class VppIpMPrefix(): def __init__(self, saddr, gaddr, glen): self.saddr = saddr self.gaddr = gaddr self.glen = glen self.ip_saddr = VppIpAddressUnion(text_type(self.saddr)) self.ip_gaddr = VppIpAddressUnion(text_type(self.gaddr)) if self.ip_saddr.version != self.ip_gaddr.version: raise ValueError('Source and group addresses must be of the ' 'same address family.') def encode(self): if 6 == self.ip_saddr.version: prefix = { 'af': VppEnum.vl_api_address_family_t.ADDRESS_IP6, 'grp_address': { 'ip6': self.gaddr }, 'src_address': { 'ip6': self.saddr }, 'grp_address_length': self.glen, } else: prefix = { 'af': VppEnum.vl_api_address_family_t.ADDRESS_IP4, 'grp_address': { 'ip4': self.gaddr }, 'src_address': { 'ip4': self.saddr }, 'grp_address_length': self.glen, } return prefix @property def length(self): return self.glen @property def version(self): return self.ip_gaddr.version def __str__(self): return "(%s,%s)/%d" % (self.saddr, self.gaddr, self.glen) def __eq__(self, other): if isinstance(other, self.__class__): return (self.glen == other.glen and self.ip_saddr == other.ip_gaddr and self.ip_saddr == other.ip_saddr) elif (hasattr(other, "grp_address_length") and hasattr(other, "grp_address") and hasattr(other, "src_address")): # vl_api_mprefix_t if 4 == self.ip_saddr.version: if self.glen == other.grp_address_length and \ self.gaddr == str(other.grp_address.ip4) and \ self.saddr == str(other.src_address.ip4): return True return False else: return (self.glen == other.grp_address_length and self.gaddr == other.grp_address.ip6 and self.saddr == other.src_address.ip6) else: raise Exception("Comparing VppIpPrefix:%s with unknown type: %s" % (self, other)) return False