Skip to content

Commit 96ea53b

Browse files
committed
"version 1.5.0"
1 parent 06cd3aa commit 96ea53b

File tree

76 files changed

+8562
-735
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+8562
-735
lines changed

RELEASENOTES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# Release Notes
2+
### November 2024
3+
* 1.5.0
4+
* support for ixnetwork version 10.25.2406.6 (10.25 EA)
5+
* corrected sample csv_snapshot.py for getting statistics
6+
* added new sample: basic->nest_multivalue.py for configuring Nest Multivalue.
27
### August 2024
38
* 1.4.0
49
* support for ixnetwork version 10.00.2407.87 (10.00 Update-2)
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
"""
2+
nest_Multivalue.py:
3+
4+
- Connect to the API server
5+
- Configure one Topology
6+
- Configure Device Group for topology
7+
- Configure Network Group connected to Device Group
8+
- From Network Group fetch all the nest for ipv4 prefix pools in multivalue network address
9+
- Set different values for Nest multivalues
10+
11+
RestPy Doc:
12+
https://www.openixia.github.io/ixnetwork_restpy/#/
13+
14+
Usage:
15+
- Enter: python <script>
16+
"""
17+
18+
from ixnetwork_restpy import SessionAssistant
19+
20+
session = SessionAssistant(
21+
IpAddress="127.0.0.1",
22+
RestPort=11009,
23+
LogLevel=SessionAssistant.LOGLEVEL_INFO,
24+
ClearConfig=True,
25+
)
26+
27+
ixNetwork = session.Ixnetwork
28+
29+
ixNetwork.info("Creating vport")
30+
vport = ixNetwork.Vport.add()
31+
32+
ixNetwork.info("Creating Topology")
33+
topology1 = ixNetwork.Topology.add(Name="Topo1", Ports=vport)
34+
deviceGroup1 = topology1.DeviceGroup.add(Name="DG1", Multiplier="1")
35+
ethernet1 = deviceGroup1.Ethernet.add(Name="Eth1")
36+
ethernet1.Mac.Increment(start_value="00:01:01:01:00:01", step_value="00:00:00:00:00:01")
37+
38+
ixNetwork.info("Configuring IPv4 on Topology")
39+
ipv4 = ethernet1.Ipv4.add(Name="Ipv4")
40+
ipv4.Address.Increment(start_value="1.1.1.1", step_value="0.0.0.1")
41+
ipv4.GatewayIp.Increment(start_value="1.1.1.4", step_value="0.0.0.0")
42+
43+
ixNetwork.info("Configuring Network group behind Topology")
44+
networkGroup1 = deviceGroup1.NetworkGroup.add(Name="NG1", Multiplier="4")
45+
ipv4PrefixPool = networkGroup1.Ipv4PrefixPools.add(NumberOfAddresses="1")
46+
ipv4PrefixPool.NetworkAddress.Increment(start_value="20.10.0.1", step_value="0.0.0.1")
47+
48+
# Fetching all the Nest for multivalue network address
49+
steps = ipv4PrefixPool.NetworkAddress.Steps
50+
ixNetwork.info(steps)
51+
52+
# Setting values for different Nest multivalue
53+
steps[1].Enabled = "True"
54+
steps[1].Step = "0.0.0.4"
55+
56+
steps[0].Enabled = "True"
57+
steps[0].Step = "1.0.0.4"

ixnetwork_restpy/samples/statistics/csv_snapshot.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
)
1919
ixnetwork = session_assistant.Ixnetwork
2020
session = session_assistant.Session
21+
file_name = "StatisticsSnapshot"
2122

2223
ixnetwork.info(
2324
"""
@@ -31,11 +32,11 @@
3132
statistics = ixnetwork.Statistics
3233
csvsnapshot = statistics.CsvSnapshot
3334
csvsnapshot.update(
34-
CsvName="StatisticsSnapshot",
35+
CsvName=file_name,
3536
CsvLocation=statistics.CsvFilePath,
3637
SnapshotViewCsvGenerationMode="overwriteCSVFile",
3738
SnapshotViewContents="allPages",
38-
Views=statistics.View.find(Caption="Port Statistics"),
39+
Views=statistics.View.find(Caption="^Port Statistics$"),
3940
)
4041

4142
ixnetwork.info(csvsnapshot)
@@ -54,7 +55,8 @@
5455
The snapshot API will always add a .csv extension
5556
"""
5657
)
57-
file_name = csvsnapshot.CsvName + ".csv"
58+
file_name = file_name + ".csv"
59+
5860
remote_filename = os.path.normpath(os.path.join(csvsnapshot.CsvLocation, file_name))
5961
local_filename = os.path.normpath(os.path.join("c:/temp", file_name))
6062
session.DownloadFile(remote_filename, local_filename)

ixnetwork_restpy/testplatform/sessions/ixnetwork/availablehardware/chassis/card/aggregation/aggregation.py

Lines changed: 22 additions & 11 deletions
Large diffs are not rendered by default.

ixnetwork_restpy/testplatform/sessions/ixnetwork/availablehardware/chassis/card/card.py

Lines changed: 22 additions & 11 deletions
Large diffs are not rendered by default.

ixnetwork_restpy/testplatform/sessions/ixnetwork/globals/globals.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class Globals(Base):
4040
"CommandArgs": "commandArgs",
4141
"ConfigFileName": "configFileName",
4242
"ConfigSummary": "configSummary",
43-
"IsQuickTestMode": "isQuickTestMode",
4443
"IxosBuildNumber": "ixosBuildNumber",
4544
"PersistencePath": "persistencePath",
4645
"ProductVersion": "productVersion",
@@ -384,16 +383,6 @@ def ConfigSummary(self):
384383
"""
385384
return self._get_attribute(self._SDM_ATT_MAP["ConfigSummary"])
386385

387-
@property
388-
def IsQuickTestMode(self):
389-
# type: () -> bool
390-
"""
391-
Returns
392-
-------
393-
- bool:
394-
"""
395-
return self._get_attribute(self._SDM_ATT_MAP["IsQuickTestMode"])
396-
397386
@property
398387
def IxosBuildNumber(self):
399388
# type: () -> str
@@ -481,7 +470,6 @@ def find(
481470
CommandArgs=None,
482471
ConfigFileName=None,
483472
ConfigSummary=None,
484-
IsQuickTestMode=None,
485473
IxosBuildNumber=None,
486474
PersistencePath=None,
487475
ProductVersion=None,
@@ -504,7 +492,6 @@ def find(
504492
- CommandArgs (str):
505493
- ConfigFileName (str): The name of the configuration file.
506494
- ConfigSummary (list(dict(arg1:str,arg2:str,arg3:list[dict(arg1:str,arg2:str)]))): A high level summary description of the currently loaded configuration
507-
- IsQuickTestMode (bool):
508495
- IxosBuildNumber (str): The IxOS software build number.
509496
- PersistencePath (str): This attribute returns a directory of the IxNetwork API server machine, where users can drop their files from the client scripts using IxNetwork APIs. To Put files in this directory, users do not require to run IxNetwork API server in administrative mode
510497
- ProductVersion (str):

ixnetwork_restpy/testplatform/sessions/ixnetwork/globals/preferences/preferences.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ class Preferences(Base):
6666
"ResourceManagerLocation": "resourceManagerLocation",
6767
"ScriptgenTextEditorPath": "scriptgenTextEditorPath",
6868
"SelectDGOnCreation": "selectDGOnCreation",
69+
"SequenceCheckingWhenNoTxRxSync": "sequenceCheckingWhenNoTxRxSync",
6970
"ShortenScenarioObjectNameInMiddle": "shortenScenarioObjectNameInMiddle",
7071
"StreamLogsToSyslogServer": "streamLogsToSyslogServer",
7172
"SyslogHost": "syslogHost",
@@ -586,6 +587,21 @@ def SelectDGOnCreation(self, value):
586587
# type: (bool) -> None
587588
self._set_attribute(self._SDM_ATT_MAP["SelectDGOnCreation"], value)
588589

590+
@property
591+
def SequenceCheckingWhenNoTxRxSync(self):
592+
# type: () -> bool
593+
"""
594+
Returns
595+
-------
596+
- bool: When true, advanced sequence checking is preferred if Tx-Rx Sync is unavailable on any port.
597+
"""
598+
return self._get_attribute(self._SDM_ATT_MAP["SequenceCheckingWhenNoTxRxSync"])
599+
600+
@SequenceCheckingWhenNoTxRxSync.setter
601+
def SequenceCheckingWhenNoTxRxSync(self, value):
602+
# type: (bool) -> None
603+
self._set_attribute(self._SDM_ATT_MAP["SequenceCheckingWhenNoTxRxSync"], value)
604+
589605
@property
590606
def ShortenScenarioObjectNameInMiddle(self):
591607
# type: () -> bool
@@ -697,13 +713,14 @@ def update(
697713
ResourceManagerLocation=None,
698714
ScriptgenTextEditorPath=None,
699715
SelectDGOnCreation=None,
716+
SequenceCheckingWhenNoTxRxSync=None,
700717
ShortenScenarioObjectNameInMiddle=None,
701718
StreamLogsToSyslogServer=None,
702719
SyslogHost=None,
703720
SyslogPort=None,
704721
TransmitMode=None,
705722
):
706-
# type: (bool, bool, int, str, str, str, bool, int, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, int, int, str, bool, bool, bool, bool, str, List[str], str, str, bool, bool, bool, str, int, str) -> Preferences
723+
# type: (bool, bool, int, str, str, str, bool, int, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, int, int, str, bool, bool, bool, bool, str, List[str], str, str, bool, bool, bool, bool, str, int, str) -> Preferences
707724
"""Updates preferences resource on the server.
708725
709726
Args
@@ -738,6 +755,7 @@ def update(
738755
- ResourceManagerLocation (str): Set the Resource Manager resources location
739756
- ScriptgenTextEditorPath (str): Set the text editor path for Scriptgen
740757
- SelectDGOnCreation (bool): When true, Device Group will be auto selected in Scenario on a new Topology creation
758+
- SequenceCheckingWhenNoTxRxSync (bool): When true, advanced sequence checking is preferred if Tx-Rx Sync is unavailable on any port.
741759
- ShortenScenarioObjectNameInMiddle (bool): Shorten Topology/DG/NG names in the middle. If this is true, Topology/Device Group/Network Group names are shortened in the middle (with .), otherwise at the end
742760
- StreamLogsToSyslogServer (bool): Enables streaming Logs To Syslog Server
743761
- SyslogHost (str): syslog host
@@ -783,13 +801,14 @@ def find(
783801
ResourceManagerLocation=None,
784802
ScriptgenTextEditorPath=None,
785803
SelectDGOnCreation=None,
804+
SequenceCheckingWhenNoTxRxSync=None,
786805
ShortenScenarioObjectNameInMiddle=None,
787806
StreamLogsToSyslogServer=None,
788807
SyslogHost=None,
789808
SyslogPort=None,
790809
TransmitMode=None,
791810
):
792-
# type: (bool, bool, int, str, str, str, bool, int, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, int, int, str, bool, bool, bool, bool, str, List[str], List[str], str, str, bool, bool, bool, str, int, str) -> Preferences
811+
# type: (bool, bool, int, str, str, str, bool, int, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, int, int, str, bool, bool, bool, bool, str, List[str], List[str], str, str, bool, bool, bool, bool, str, int, str) -> Preferences
793812
"""Finds and retrieves preferences resources from the server.
794813
795814
All named parameters are evaluated on the server using regex. The named parameters can be used to selectively retrieve preferences resources from the server.
@@ -829,6 +848,7 @@ def find(
829848
- ResourceManagerLocation (str): Set the Resource Manager resources location
830849
- ScriptgenTextEditorPath (str): Set the text editor path for Scriptgen
831850
- SelectDGOnCreation (bool): When true, Device Group will be auto selected in Scenario on a new Topology creation
851+
- SequenceCheckingWhenNoTxRxSync (bool): When true, advanced sequence checking is preferred if Tx-Rx Sync is unavailable on any port.
832852
- ShortenScenarioObjectNameInMiddle (bool): Shorten Topology/DG/NG names in the middle. If this is true, Topology/Device Group/Network Group names are shortened in the middle (with .), otherwise at the end
833853
- StreamLogsToSyslogServer (bool): Enables streaming Logs To Syslog Server
834854
- SyslogHost (str): syslog host

0 commit comments

Comments
 (0)