Skip to content

Commit

Permalink
"version 1.1.7"
Browse files Browse the repository at this point in the history
  • Loading branch information
vhowdhur committed Oct 28, 2022
1 parent 74b24ab commit 31cc5e6
Show file tree
Hide file tree
Showing 690 changed files with 13,175 additions and 3,655 deletions.
6 changes: 6 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Release Notes
### October 2022
* 1.1.7
* support ixnetwork version 9.20.2206.84 (9.20 Update-3)
* support uhd version 1.5 patch-2
* bug fixes in batch add
* drill down statistics sample corrected
### May 2022
* 1.1.6
* support ixnetwork version 9.20.2201.69 (9.20 Update-1)
Expand Down
13 changes: 12 additions & 1 deletion ixnetwork_restpy/assistants/batch/batchadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,18 @@ def _make_xpath_json(self, node, config, child_list):
elif "arg1" in element and isinstance(
element["arg1"], Base
):
element["arg1"] = element["arg1"]._properties["xpath"]
if "href" in element["arg1"]._properties:
element["arg1"] = self._get_select_response(
element["arg1"]._properties["href"]
)[0]["xpath"]
elif "xpath" in element["arg1"]._properties:
element["arg1"] = element["arg1"]._properties[
"xpath"
]
else:
raise Exception(
"neither xpath nor href present, something went wrong!"
)
temp_list.append(element)
else:
temp_list.append(element)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,5 +218,44 @@ def test_batch_add_with_quick_flow_traffic(ixnetwork):
eth_st.DestinationAddress.Single("00:0c:29:68:05:1E")


def test_batch_add_with_traffic_having_href_objects(ixnetwork):
vports = ixnetwork.Vport.add().add()
ipv4_1 = (
ixnetwork.Topology.add(Vports=vports[0])
.DeviceGroup.add(Name="dg1")
.Ethernet.add(Name="eth1")
.Ipv4.add(Name="ip1")
)
ipv4_2 = (
ixnetwork.Topology.add(Vports=vports[1])
.DeviceGroup.add(Name="dg2")
.Ethernet.add(Name="eth2")
.Ipv4.add(Name="ip2")
)

with BatchAdd(ixnetwork):
traffic = ixnetwork.Traffic.TrafficItem
scalable_sources = [
{"arg1": ipv4_2, "arg2": "1", "arg3": "1", "arg4": "1", "arg5": "2"},
{"arg1": ipv4_2, "arg2": "1", "arg3": "1", "arg4": "3", "arg5": "2"},
]
scalable_destinations = [
{"arg1": ipv4_1, "arg2": "1", "arg3": "1", "arg4": "1", "arg5": "2"}
]
tr3 = traffic.add(Name="Multicast", TrafficType="ipv4", TrafficItemType="l2L3")
endpoint_set = tr3.EndpointSet.add(
ScalableSources=scalable_sources, ScalableDestinations=scalable_destinations
)

assert (
endpoint_set.href
== "/api/v1/sessions/1/ixnetwork/traffic/trafficItem/1/endpointSet/1"
)
end_point = ixnetwork.Traffic.TrafficItem.find().EndpointSet.find()
assert end_point.ScalableSources[0]["arg1"] == ipv4_2.href
assert end_point.ScalableSources[1]["arg1"] == ipv4_2.href
assert end_point.ScalableDestinations[0]["arg1"] == ipv4_1.href


if __name__ == "__main__":
pytest.main(["-v", "-s", "--server", "localhost:11009:windows", __file__])
6 changes: 3 additions & 3 deletions ixnetwork_restpy/samples/statistics/drill_down.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@

# print the drill down options for the view
# drill down options are dynamic and are based on tracking options selected during traffic item creation
for drill_down_option in drill_down.AvailableDrillDownOptions:
print(drill_down_option)
drill_down.TargetDrillDownOption = drill_down.AvailableDrillDownOptions[1]
for drill_down_filter in drill_down.AvailableTargetRowFilters:
print(drill_down_filter)
if len(drill_down.AvailableTargetRowFilters) > 0:
drill_down.TargetRowFilter = drill_down.AvailableTargetRowFilters[0]
for drill_down_option in drill_down.AvailableDrillDownOptions:
print(drill_down_option)
drill_down.TargetDrillDownOption = drill_down.AvailableDrillDownOptions[1]

# perform the drill down operation
drill_down.DoDrillDown()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def ActivePort(self):
"""DEPRECATED
Returns
-------
- str(None | /api/v1/sessions/1/ixnetwork/availableHardware/.../port): Deprecated. Use activePorts instead.
- str(None | /api/v1/sessions/1/ixnetwork/availableHardware/chassis/card/port): Deprecated. Use activePorts instead.
"""
return self._get_attribute(self._SDM_ATT_MAP["ActivePort"])

Expand All @@ -121,7 +121,7 @@ def ActivePorts(self):
"""
Returns
-------
- list(str[None | /api/v1/sessions/1/ixnetwork/availableHardware/.../port]): All active ports from Resource Group.
- list(str[None | /api/v1/sessions/1/ixnetwork/availableHardware/chassis/card/port]): All active ports from Resource Group.
"""
return self._get_attribute(self._SDM_ATT_MAP["ActivePorts"])

Expand Down Expand Up @@ -156,7 +156,7 @@ def ResourcePorts(self):
"""
Returns
-------
- list(str[None | /api/v1/sessions/1/ixnetwork/availableHardware/.../port]): All ports from Resource Group.
- list(str[None | /api/v1/sessions/1/ixnetwork/availableHardware/chassis/card/port]): All ports from Resource Group.
"""
return self._get_attribute(self._SDM_ATT_MAP["ResourcePorts"])

Expand Down Expand Up @@ -209,11 +209,11 @@ def find(
Args
----
- ActivePort (str(None | /api/v1/sessions/1/ixnetwork/availableHardware/.../port)): Deprecated. Use activePorts instead.
- ActivePorts (list(str[None | /api/v1/sessions/1/ixnetwork/availableHardware/.../port])): All active ports from Resource Group.
- ActivePort (str(None | /api/v1/sessions/1/ixnetwork/availableHardware/chassis/card/port)): Deprecated. Use activePorts instead.
- ActivePorts (list(str[None | /api/v1/sessions/1/ixnetwork/availableHardware/chassis/card/port])): All active ports from Resource Group.
- AvailableModes (list(str[normal | tenGig | fortyGig | singleMode | dualMode | hundredGigNonFanOut | fortyGigFanOut | threeByTenGigFanOut | eightByTenGigFanOut | fourByTwentyFiveGigNonFanOut | twoByTwentyFiveGigNonFanOut | oneByFiftyGigNonFanOut | fortyGigNonFanOut | oneByTenGigFanOut | fourByTenGigFanOut | incompatibleMode | hundredGigCapturePlayback | fortyGigCapturePlayback | novusHundredGigNonFanOut | novusFourByTwentyFiveGigNonFanOut | novusTwoByFiftyGigNonFanOut | novusOneByFortyGigNonFanOut | novusFourByTenGigNonFanOut | krakenOneByFourHundredGigNonFanOut | krakenOneByTwoHundredGigNonFanOut | krakenTwoByOneHundredGigFanOut | krakenFourByFiftyGigFanOut | aresOneOneByFourHundredGigNonFanOut | aresOneTwoByTwoHundredGigFanOut | aresOneFourByOneHundredGigFanOut | aresOneFourByOneHundredGigMacSecFanOut | aresOneEightByFiftyGigFanOut | uhdOneHundredEightByHundredGigNonFanOut | uhdOneHundredEightByFortyGigNonFanOut | uhdOneHundredSixteenByFiftyGigFanOut | uhdOneHundredThirtyTwoByTwentyFiveGigFanOut | uhdOneHundredThirtyTwoByTenGigFanOut | novus5GOneByTenGigNonFanOut | novus5GOneByTwentyFiveGigNonFanOut | novus5GOneByFiftyGigNonFanOut | novus5GOneByHundredGigNonFanOut | starTwoByFourHundredGigNonFannedOutPAM4 | starFourByTwoHundredGigFannedOutPAM4 | starEightByHundredGigFannedOutPAM4 | starFourByHundredGigFannedOutNRZ | starSixteenByFiftyGigFannedOutPAM4 | starEightByFiftyGigFannedOutNRZ | starFourByFortyGigFannedOutNRZ | starSixteenByTwentyFiveGigFannedOutNRZ | starSixteenByTenGigFannedOutNRZ | novusHundredGigNonFanOutHighStream | novusFourByTwentyFiveGigNonFanOutHighStream | novusTwoByFiftyGigNonFanOutHighStream | novusOneByFortyGigNonFanOutHighStream | novusFourByTenGigNonFanOutHighStream])): Gets the supported resource group modes.
- Mode (str(normal | tenGig | fortyGig | singleMode | dualMode | hundredGigNonFanOut | fortyGigFanOut | threeByTenGigFanOut | eightByTenGigFanOut | fourByTwentyFiveGigNonFanOut | twoByTwentyFiveGigNonFanOut | oneByFiftyGigNonFanOut | fortyGigNonFanOut | oneByTenGigFanOut | fourByTenGigFanOut | incompatibleMode | hundredGigCapturePlayback | fortyGigCapturePlayback | novusHundredGigNonFanOut | novusFourByTwentyFiveGigNonFanOut | novusTwoByFiftyGigNonFanOut | novusOneByFortyGigNonFanOut | novusFourByTenGigNonFanOut | krakenOneByFourHundredGigNonFanOut | krakenOneByTwoHundredGigNonFanOut | krakenTwoByOneHundredGigFanOut | krakenFourByFiftyGigFanOut | aresOneOneByFourHundredGigNonFanOut | aresOneTwoByTwoHundredGigFanOut | aresOneFourByOneHundredGigFanOut | aresOneFourByOneHundredGigMacSecFanOut | aresOneEightByFiftyGigFanOut | uhdOneHundredEightByHundredGigNonFanOut | uhdOneHundredEightByFortyGigNonFanOut | uhdOneHundredSixteenByFiftyGigFanOut | uhdOneHundredThirtyTwoByTwentyFiveGigFanOut | uhdOneHundredThirtyTwoByTenGigFanOut | novus5GOneByTenGigNonFanOut | novus5GOneByTwentyFiveGigNonFanOut | novus5GOneByFiftyGigNonFanOut | novus5GOneByHundredGigNonFanOut | starTwoByFourHundredGigNonFannedOutPAM4 | starFourByTwoHundredGigFannedOutPAM4 | starEightByHundredGigFannedOutPAM4 | starFourByHundredGigFannedOutNRZ | starSixteenByFiftyGigFannedOutPAM4 | starEightByFiftyGigFannedOutNRZ | starFourByFortyGigFannedOutNRZ | starSixteenByTwentyFiveGigFannedOutNRZ | starSixteenByTenGigFannedOutNRZ | novusHundredGigNonFanOutHighStream | novusFourByTwentyFiveGigNonFanOutHighStream | novusTwoByFiftyGigNonFanOutHighStream | novusOneByFortyGigNonFanOutHighStream | novusFourByTenGigNonFanOutHighStream)): Resource Group mode.
- ResourcePorts (list(str[None | /api/v1/sessions/1/ixnetwork/availableHardware/.../port])): All ports from Resource Group.
- ResourcePorts (list(str[None | /api/v1/sessions/1/ixnetwork/availableHardware/chassis/card/port])): All ports from Resource Group.
Returns
-------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,28 @@ def read(self, href):
"""
return self._read(href)

def HotswapCard(self, *args, **kwargs):
# type: (*Any, **Any) -> None
"""Executes the hotswapCard operation on the server.
API to perform chassis card hotswap
hotswapCard(async_operation=bool)
---------------------------------
- async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete.
Raises
------
- NotFoundError: The requested resource does not exist on the server
- ServerError: The server has encountered an uncategorized error condition
"""
payload = {"Arg1": self.href}
for i in range(len(args)):
payload["Arg%s" % (i + 2)] = args[i]
for item in kwargs.items():
payload[item[0]] = item[1]
return self._execute("hotswapCard", payload=payload, response_object=None)

def RefreshInfo(self, *args, **kwargs):
# type: (*Any, **Any) -> None
"""Executes the refreshInfo operation on the server.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def CopyTapSettings(self, *args, **kwargs):
copyTapSettings(Arg2=list, async_operation=bool)
------------------------------------------------
- Arg2 (list(str[None | /api/v1/sessions/1/ixnetwork/availableHardware/.../port])):
- Arg2 (list(str[None | /api/v1/sessions/1/ixnetwork/availableHardware/chassis/card/port])):
- async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete.
Raises
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def NacTlvs(self):
"""
Returns
-------
- list(str[None | /api/v1/sessions/1/ixnetwork/globals/.../nacTlv]): List of NacTLVs.
- list(str[None | /api/v1/sessions/1/ixnetwork/globals/protocolStack/dot1xGlobals/nacSettings/nacTlv]): List of NacTLVs.
"""
return self._get_attribute(self._SDM_ATT_MAP["NacTlvs"])

Expand Down Expand Up @@ -125,7 +125,7 @@ def update(self, ExpectedSystemToken=None, NacTlvs=None, Name=None, Selected=Non
Args
----
- ExpectedSystemToken (number): Expected System Token.
- NacTlvs (list(str[None | /api/v1/sessions/1/ixnetwork/globals/.../nacTlv])): List of NacTLVs.
- NacTlvs (list(str[None | /api/v1/sessions/1/ixnetwork/globals/protocolStack/dot1xGlobals/nacSettings/nacTlv])): List of NacTLVs.
- Name (str): Unique name for this NAC Posture.
- Selected (bool): Add to postures list.
Expand All @@ -142,7 +142,7 @@ def add(self, ExpectedSystemToken=None, NacTlvs=None, Name=None, Selected=None):
Args
----
- ExpectedSystemToken (number): Expected System Token.
- NacTlvs (list(str[None | /api/v1/sessions/1/ixnetwork/globals/.../nacTlv])): List of NacTLVs.
- NacTlvs (list(str[None | /api/v1/sessions/1/ixnetwork/globals/protocolStack/dot1xGlobals/nacSettings/nacTlv])): List of NacTLVs.
- Name (str): Unique name for this NAC Posture.
- Selected (bool): Add to postures list.
Expand Down Expand Up @@ -184,7 +184,7 @@ def find(
Args
----
- ExpectedSystemToken (number): Expected System Token.
- NacTlvs (list(str[None | /api/v1/sessions/1/ixnetwork/globals/.../nacTlv])): List of NacTLVs.
- NacTlvs (list(str[None | /api/v1/sessions/1/ixnetwork/globals/protocolStack/dot1xGlobals/nacSettings/nacTlv])): List of NacTLVs.
- Name (str): Unique name for this NAC Posture.
- ObjectId (str): Unique identifier for this object
- Selected (bool): Add to postures list.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def NacPostures(self):
"""
Returns
-------
- list(str[None | /api/v1/sessions/1/ixnetwork/globals/.../nacPosture]): List of NacPostures.
- list(str[None | /api/v1/sessions/1/ixnetwork/globals/protocolStack/dot1xGlobals/nacSettings/nacPosture]): List of NacPostures.
"""
return self._get_attribute(self._SDM_ATT_MAP["NacPostures"])

Expand Down Expand Up @@ -92,7 +92,7 @@ def update(self, NacPostures=None, Name=None):
Args
----
- NacPostures (list(str[None | /api/v1/sessions/1/ixnetwork/globals/.../nacPosture])): List of NacPostures.
- NacPostures (list(str[None | /api/v1/sessions/1/ixnetwork/globals/protocolStack/dot1xGlobals/nacSettings/nacPosture])): List of NacPostures.
- Name (str): Unique name for this NAC Sequence.
Raises
Expand All @@ -107,7 +107,7 @@ def add(self, NacPostures=None, Name=None):
Args
----
- NacPostures (list(str[None | /api/v1/sessions/1/ixnetwork/globals/.../nacPosture])): List of NacPostures.
- NacPostures (list(str[None | /api/v1/sessions/1/ixnetwork/globals/protocolStack/dot1xGlobals/nacSettings/nacPosture])): List of NacPostures.
- Name (str): Unique name for this NAC Sequence.
Returns
Expand Down Expand Up @@ -140,7 +140,7 @@ def find(self, NacPostures=None, Name=None, ObjectId=None):
Args
----
- NacPostures (list(str[None | /api/v1/sessions/1/ixnetwork/globals/.../nacPosture])): List of NacPostures.
- NacPostures (list(str[None | /api/v1/sessions/1/ixnetwork/globals/protocolStack/dot1xGlobals/nacSettings/nacPosture])): List of NacPostures.
- Name (str): Unique name for this NAC Sequence.
- ObjectId (str): Unique identifier for this object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def NacTlvs(self):
"""
Returns
-------
- list(str[None | /api/v1/sessions/1/ixnetwork/globals/.../nacTlv]): List of NacTLVs.
- list(str[None | /api/v1/sessions/1/ixnetwork/globals/protocolStack/eapoUdpGlobals/nacSettings/nacTlv]): List of NacTLVs.
"""
return self._get_attribute(self._SDM_ATT_MAP["NacTlvs"])

Expand Down Expand Up @@ -125,7 +125,7 @@ def update(self, ExpectedSystemToken=None, NacTlvs=None, Name=None, Selected=Non
Args
----
- ExpectedSystemToken (number): Expected System Token.
- NacTlvs (list(str[None | /api/v1/sessions/1/ixnetwork/globals/.../nacTlv])): List of NacTLVs.
- NacTlvs (list(str[None | /api/v1/sessions/1/ixnetwork/globals/protocolStack/eapoUdpGlobals/nacSettings/nacTlv])): List of NacTLVs.
- Name (str): Unique name for this NAC Posture.
- Selected (bool): Add to postures list.
Expand All @@ -142,7 +142,7 @@ def add(self, ExpectedSystemToken=None, NacTlvs=None, Name=None, Selected=None):
Args
----
- ExpectedSystemToken (number): Expected System Token.
- NacTlvs (list(str[None | /api/v1/sessions/1/ixnetwork/globals/.../nacTlv])): List of NacTLVs.
- NacTlvs (list(str[None | /api/v1/sessions/1/ixnetwork/globals/protocolStack/eapoUdpGlobals/nacSettings/nacTlv])): List of NacTLVs.
- Name (str): Unique name for this NAC Posture.
- Selected (bool): Add to postures list.
Expand Down Expand Up @@ -184,7 +184,7 @@ def find(
Args
----
- ExpectedSystemToken (number): Expected System Token.
- NacTlvs (list(str[None | /api/v1/sessions/1/ixnetwork/globals/.../nacTlv])): List of NacTLVs.
- NacTlvs (list(str[None | /api/v1/sessions/1/ixnetwork/globals/protocolStack/eapoUdpGlobals/nacSettings/nacTlv])): List of NacTLVs.
- Name (str): Unique name for this NAC Posture.
- ObjectId (str): Unique identifier for this object
- Selected (bool): Add to postures list.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def NacPostures(self):
"""
Returns
-------
- list(str[None | /api/v1/sessions/1/ixnetwork/globals/.../nacPosture]): List of NacPostures.
- list(str[None | /api/v1/sessions/1/ixnetwork/globals/protocolStack/eapoUdpGlobals/nacSettings/nacPosture]): List of NacPostures.
"""
return self._get_attribute(self._SDM_ATT_MAP["NacPostures"])

Expand Down Expand Up @@ -92,7 +92,7 @@ def update(self, NacPostures=None, Name=None):
Args
----
- NacPostures (list(str[None | /api/v1/sessions/1/ixnetwork/globals/.../nacPosture])): List of NacPostures.
- NacPostures (list(str[None | /api/v1/sessions/1/ixnetwork/globals/protocolStack/eapoUdpGlobals/nacSettings/nacPosture])): List of NacPostures.
- Name (str): Unique name for this NAC Sequence.
Raises
Expand All @@ -107,7 +107,7 @@ def add(self, NacPostures=None, Name=None):
Args
----
- NacPostures (list(str[None | /api/v1/sessions/1/ixnetwork/globals/.../nacPosture])): List of NacPostures.
- NacPostures (list(str[None | /api/v1/sessions/1/ixnetwork/globals/protocolStack/eapoUdpGlobals/nacSettings/nacPosture])): List of NacPostures.
- Name (str): Unique name for this NAC Sequence.
Returns
Expand Down Expand Up @@ -140,7 +140,7 @@ def find(self, NacPostures=None, Name=None, ObjectId=None):
Args
----
- NacPostures (list(str[None | /api/v1/sessions/1/ixnetwork/globals/.../nacPosture])): List of NacPostures.
- NacPostures (list(str[None | /api/v1/sessions/1/ixnetwork/globals/protocolStack/eapoUdpGlobals/nacSettings/nacPosture])): List of NacPostures.
- Name (str): Unique name for this NAC Sequence.
- ObjectId (str): Unique identifier for this object
Expand Down
Loading

0 comments on commit 31cc5e6

Please sign in to comment.