Skip to content

Commit

Permalink
"version 1.2.0"
Browse files Browse the repository at this point in the history
  • Loading branch information
vhowdhur committed Apr 22, 2024
1 parent 78313c6 commit 86fd456
Show file tree
Hide file tree
Showing 93 changed files with 2,396 additions and 385 deletions.
4 changes: 4 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Release Notes
### April 2024
* 1.2.0
* support for ixnetwork version 10.00.2403.64 (10.00 Update-1)
* fixed issue for batch add traffic creation.
### January 2024
* 1.1.12
* support ixnetwork version 10.00.2312.4 (10.00 EA)
Expand Down
1 change: 1 addition & 0 deletions ixnetwork_restpy/assistants/batch/batchadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ def _handle_multivalue_xpath(self, value, xpath):
xpath_dict["xpath"] = multivalue_xpath
xpath_dict["auto"] = False
xpath_dict["optionalEnabled"] = True
xpath_dict["activeFieldChoice"] = True
else:
multivalue_name = pattern[0]

Expand Down
10 changes: 0 additions & 10 deletions ixnetwork_restpy/pytest_tests/.pytest_cache/v/cache/lastfailed

This file was deleted.

242 changes: 122 additions & 120 deletions ixnetwork_restpy/pytest_tests/.pytest_cache/v/cache/nodeids

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -257,5 +257,61 @@ def test_batch_add_with_traffic_having_href_objects(ixnetwork):
assert end_point.ScalableDestinations[0]["arg1"] == ipv4_1.href


def test_batch_add_traffic_for_non_active_fields(ixnetwork):
with BatchAdd(ixnetwork):
vport = ixnetwork.Vport.add().add()
vport[0].Name = "myVport_1"
vport[0].RxMode = "captureAndMeasure"
vport[1].Name = "myVport_2"
traffic = ixnetwork.Traffic.TrafficItem
tr1 = traffic.add(
Name="RAW TCP",
BiDirectional=False,
TrafficType="raw",
TrafficItemType="l2L3",
)
tr1.EndpointSet.add(
Sources=vport[0].Protocols.add(), Destinations=vport[1].Protocols.add()
)
stack = tr1.ConfigElement.add().Stack.add()
eth_st = stack.Ethernet.add()
eth_st.SourceAddress.Single("00:11:00:00:22:00")
eth_st.DestinationAddress.Single("00:33:00:11:22:00")
ipv4_st = stack.Ipv4.add()
ipv4_st.SrcIp.Single("1.1.1.1")
ipv4_st.PriorityRaw.Single("0xb5")

stack.find()
assert len(stack) == 3

# check eth values
eth_fields = stack[0].Field.find()
for field in eth_fields:
if field.DisplayName == "Destination MAC Address":
assert field.Auto is False
assert field.ValueType == "singleValue"
assert field.SingleValue == "00:33:00:11:22:00"
elif field.DisplayName == "Source MAC Address":
assert field.Auto is False
assert field.ValueType == "singleValue"
assert field.SingleValue == "00:11:00:00:22:00"

# check ip values
ip_fields = stack[1].Field.find()
for field in eth_fields:
if field.DisplayName == "Raw priority":
assert field.Auto is False
assert field.OptionalEnabled is True
assert field.ActiveChoiceField is True
assert field.ValueType == "singleValue"
assert field.SingleValue == "b5"
elif field.DisplayName == "Source Address":
assert field.Auto is False
assert field.OptionalEnabled is True
assert field.ActiveChoiceField is True
assert field.ValueType == "singleValue"
assert field.SingleValue == "1.1.1.1"


if __name__ == "__main__":
pytest.main(["-v", "-s", "--server", "localhost:11009:windows", __file__])
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class BgpIpv4Peer(Base):
"EnBGPFastFailoverOnLinkDown": "enBGPFastFailoverOnLinkDown",
"EnLenthForPolicyNLRI": "enLenthForPolicyNLRI",
"EnableAdVplsPrefixLength": "enableAdVplsPrefixLength",
"EnableTraceroute": "enableTraceroute",
"GSRv6SIDEncodingSubTlvType": "gSRv6SIDEncodingSubTlvType",
"HighScaleRouteMode": "highScaleRouteMode",
"IBgpTester4BytesAsNumber": "iBgpTester4BytesAsNumber",
Expand All @@ -67,6 +68,7 @@ class BgpIpv4Peer(Base):
"Ipv6NodeAddrType": "ipv6NodeAddrType",
"Ipv6SIDType": "ipv6SIDType",
"LenthForPolicyNLRI": "lenthForPolicyNLRI",
"MaxTtl": "maxTtl",
"MldpP2mpFecType": "mldpP2mpFecType",
"MplsSIDType": "mplsSIDType",
"Name": "name",
Expand All @@ -82,7 +84,9 @@ class BgpIpv4Peer(Base):
"PolicySegmentSubTLVTypeK": "policySegmentSubTLVTypeK",
"PreferenceType": "preferenceType",
"PrefixSIDAttrType": "prefixSIDAttrType",
"ProbeInterval": "probeInterval",
"ProtoclIdType": "protoclIdType",
"QueryCount": "queryCount",
"RemoteEndpointType": "remoteEndpointType",
"RequestVpnLabelExchangeOverLsp": "requestVpnLabelExchangeOverLsp",
"ReverseBindingType": "reverseBindingType",
Expand All @@ -102,6 +106,7 @@ class BgpIpv4Peer(Base):
"UseUnicastDestMacForBierTraffic": "useUnicastDestMacForBierTraffic",
"VPNSIDType": "vPNSIDType",
"VrfRouteImportExtendedCommunitySubType": "vrfRouteImportExtendedCommunitySubType",
"WaitTime": "waitTime",
"WeightType": "weightType",
}
_SDM_ENUM_MAP = {
Expand Down Expand Up @@ -392,6 +397,20 @@ def EnableAdVplsPrefixLength(self):
self, self._get_attribute(self._SDM_ATT_MAP["EnableAdVplsPrefixLength"])
)

@property
def EnableTraceroute(self):
# type: () -> 'Multivalue'
"""
Returns
-------
- obj(ixnetwork_restpy.multivalue.Multivalue): This will enable the traceroute functionality on all the BGP peers configured in this port.
"""
from ixnetwork_restpy.multivalue import Multivalue

return Multivalue(
self, self._get_attribute(self._SDM_ATT_MAP["EnableTraceroute"])
)

@property
def GSRv6SIDEncodingSubTlvType(self):
# type: () -> 'Multivalue'
Expand Down Expand Up @@ -600,6 +619,18 @@ def LenthForPolicyNLRI(self):
self, self._get_attribute(self._SDM_ATT_MAP["LenthForPolicyNLRI"])
)

@property
def MaxTtl(self):
# type: () -> 'Multivalue'
"""
Returns
-------
- obj(ixnetwork_restpy.multivalue.Multivalue): The TTL value used in the probes will start from 1 and incremented up to this value.
"""
from ixnetwork_restpy.multivalue import Multivalue

return Multivalue(self, self._get_attribute(self._SDM_ATT_MAP["MaxTtl"]))

@property
def MldpP2mpFecType(self):
# type: () -> 'Multivalue'
Expand Down Expand Up @@ -809,6 +840,18 @@ def PrefixSIDAttrType(self):
self, self._get_attribute(self._SDM_ATT_MAP["PrefixSIDAttrType"])
)

@property
def ProbeInterval(self):
# type: () -> 'Multivalue'
"""
Returns
-------
- obj(ixnetwork_restpy.multivalue.Multivalue): Time interval in milliseconds between each probe per hop.
"""
from ixnetwork_restpy.multivalue import Multivalue

return Multivalue(self, self._get_attribute(self._SDM_ATT_MAP["ProbeInterval"]))

@property
def ProtoclIdType(self):
# type: () -> 'Multivalue'
Expand All @@ -821,6 +864,18 @@ def ProtoclIdType(self):

return Multivalue(self, self._get_attribute(self._SDM_ATT_MAP["ProtoclIdType"]))

@property
def QueryCount(self):
# type: () -> 'Multivalue'
"""
Returns
-------
- obj(ixnetwork_restpy.multivalue.Multivalue): Maximum number of paths that can be discovered.
"""
from ixnetwork_restpy.multivalue import Multivalue

return Multivalue(self, self._get_attribute(self._SDM_ATT_MAP["QueryCount"]))

@property
def RemoteEndpointType(self):
# type: () -> 'Multivalue'
Expand Down Expand Up @@ -1083,6 +1138,18 @@ def VrfRouteImportExtendedCommunitySubType(self):
),
)

@property
def WaitTime(self):
# type: () -> 'Multivalue'
"""
Returns
-------
- obj(ixnetwork_restpy.multivalue.Multivalue): Time in milliseconds to wait for a response.
"""
from ixnetwork_restpy.multivalue import Multivalue

return Multivalue(self, self._get_attribute(self._SDM_ATT_MAP["WaitTime"]))

@property
def WeightType(self):
# type: () -> 'Multivalue'
Expand Down Expand Up @@ -1182,6 +1249,7 @@ def get_device_ids(
EnBGPFastFailoverOnLinkDown=None,
EnLenthForPolicyNLRI=None,
EnableAdVplsPrefixLength=None,
EnableTraceroute=None,
GSRv6SIDEncodingSubTlvType=None,
HighScaleRouteMode=None,
IBgpTester4BytesAsNumber=None,
Expand All @@ -1197,6 +1265,7 @@ def get_device_ids(
Ipv6NodeAddrType=None,
Ipv6SIDType=None,
LenthForPolicyNLRI=None,
MaxTtl=None,
MldpP2mpFecType=None,
MplsSIDType=None,
PeerAdjSidType=None,
Expand All @@ -1211,7 +1280,9 @@ def get_device_ids(
PolicySegmentSubTLVTypeK=None,
PreferenceType=None,
PrefixSIDAttrType=None,
ProbeInterval=None,
ProtoclIdType=None,
QueryCount=None,
RemoteEndpointType=None,
RequestVpnLabelExchangeOverLsp=None,
ReverseBindingType=None,
Expand All @@ -1229,6 +1300,7 @@ def get_device_ids(
UseUnicastDestMacForBierTraffic=None,
VPNSIDType=None,
VrfRouteImportExtendedCommunitySubType=None,
WaitTime=None,
WeightType=None,
):
"""Base class infrastructure that gets a list of bgpIpv4Peer device ids encapsulated by this object.
Expand All @@ -1253,6 +1325,7 @@ def get_device_ids(
- EnBGPFastFailoverOnLinkDown (str): optional regex of enBGPFastFailoverOnLinkDown
- EnLenthForPolicyNLRI (str): optional regex of enLenthForPolicyNLRI
- EnableAdVplsPrefixLength (str): optional regex of enableAdVplsPrefixLength
- EnableTraceroute (str): optional regex of enableTraceroute
- GSRv6SIDEncodingSubTlvType (str): optional regex of gSRv6SIDEncodingSubTlvType
- HighScaleRouteMode (str): optional regex of highScaleRouteMode
- IBgpTester4BytesAsNumber (str): optional regex of iBgpTester4BytesAsNumber
Expand All @@ -1268,6 +1341,7 @@ def get_device_ids(
- Ipv6NodeAddrType (str): optional regex of ipv6NodeAddrType
- Ipv6SIDType (str): optional regex of ipv6SIDType
- LenthForPolicyNLRI (str): optional regex of lenthForPolicyNLRI
- MaxTtl (str): optional regex of maxTtl
- MldpP2mpFecType (str): optional regex of mldpP2mpFecType
- MplsSIDType (str): optional regex of mplsSIDType
- PeerAdjSidType (str): optional regex of peerAdjSidType
Expand All @@ -1282,7 +1356,9 @@ def get_device_ids(
- PolicySegmentSubTLVTypeK (str): optional regex of policySegmentSubTLVTypeK
- PreferenceType (str): optional regex of preferenceType
- PrefixSIDAttrType (str): optional regex of prefixSIDAttrType
- ProbeInterval (str): optional regex of probeInterval
- ProtoclIdType (str): optional regex of protoclIdType
- QueryCount (str): optional regex of queryCount
- RemoteEndpointType (str): optional regex of remoteEndpointType
- RequestVpnLabelExchangeOverLsp (str): optional regex of requestVpnLabelExchangeOverLsp
- ReverseBindingType (str): optional regex of reverseBindingType
Expand All @@ -1300,6 +1376,7 @@ def get_device_ids(
- UseUnicastDestMacForBierTraffic (str): optional regex of useUnicastDestMacForBierTraffic
- VPNSIDType (str): optional regex of vPNSIDType
- VrfRouteImportExtendedCommunitySubType (str): optional regex of vrfRouteImportExtendedCommunitySubType
- WaitTime (str): optional regex of waitTime
- WeightType (str): optional regex of weightType
Returns
Expand Down

0 comments on commit 86fd456

Please sign in to comment.