Skip to content

Commit a05cd34

Browse files
committed
"version 1.9.0"
1 parent 8d4652a commit a05cd34

128 files changed

Lines changed: 30826 additions & 477 deletions

File tree

Some content is hidden

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

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
include LICENSE
22
include README.md
33
include RELEASENOTES.md
4-
include setup.py
54
include version.txt
65
recursive-include ixnetwork_restpy *.py
76
recursive-include uhd_restpy *.py

RELEASENOTES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# Release Notes
2+
### December 2025
3+
* 1.9.0
4+
* support for ixnetwork version 26.0.2601.6 (26.0.0)
5+
* new option LogOnlyToFile exposed in SessionAssistant which only saves log to file without any logging in console.
26
### July 2025
37
* 1.8.0
48
* support for ixnetwork version 11.00.2407.67 (11.00 Update-1)

ixnetwork_restpy/assistants/sessions/sessionassistant.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ def __init__(
4444
ClearConfig=False,
4545
UrlPrefix=None,
4646
IgnoreStrongPasswordPolicy=True,
47+
LogOnlyToFile=False,
4748
):
4849
"""Create a session or connect to an existing session.
4950
Provides access to the TestPlatform, Sessions, Ixnetwork, PortMapAssistant and StatViewAssistant classes.
@@ -73,6 +74,7 @@ def __init__(
7374
- ClearConfig (bool): Clear the current configuration
7475
- UrlPrefix (str): Some appliances (like novus-mini) needs url prefix in their rest url nomenclature
7576
- IgnoreStrongPasswordPolicy (bool): By default True, it rejects authentication with server if password is weak.
77+
- LogOnlyToFile (bool): By default False, if enabled the logs will be redirected to only files and not to the console.
7678
7779
Raises
7880
------
@@ -89,6 +91,7 @@ def __init__(
8991
verify_cert=VerifyCertificates,
9092
trace=LogLevel,
9193
url_prefix=UrlPrefix,
94+
log_only_to_file=LogOnlyToFile,
9295
)
9396
if ApiKey is not None:
9497
testplatform.ApiKey = ApiKey

ixnetwork_restpy/connection.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def __init__(
8383
trace="none",
8484
script_watch=True,
8585
url_prefix=None,
86+
log_only_to_file=False,
8687
):
8788
"""Set the connection parameters to a rest server
8889
@@ -95,10 +96,19 @@ def __init__(
9596
verify_cert (bool):
9697
script_watch (bool):
9798
url_prefix (str): the prefix that needs to added in the rest url
99+
log_only_to_file (bool): By default False, if enabled the logs will be redirected to only files and not to the console.
98100
"""
99101
self.trace = trace
102+
# we can only show logs after the logger is initialised , so therefore having a flag to display the warning.
103+
display_log_warning = False
104+
if log_only_to_file and log_file_name is None:
105+
log_only_to_file = False
106+
display_log_warning = True
100107
if len(logging.getLogger(__name__).handlers) == 0:
101-
handlers = [logging.StreamHandler(sys.stdout)]
108+
handlers = []
109+
# only add stdout if the log_only_to_file is not set
110+
if not log_only_to_file:
111+
handlers = [logging.StreamHandler(sys.stdout)]
102112
if log_file_name is not None:
103113
handlers.append(logging.FileHandler(log_file_name, mode="w"))
104114
formatter = logging.Formatter(
@@ -109,6 +119,11 @@ def __init__(
109119
for handler in handlers:
110120
handler.setFormatter(formatter)
111121
logging.getLogger(__name__).addHandler(handler)
122+
# display the log anomaly warning.
123+
if display_log_warning:
124+
logging.getLogger(__name__).warning(
125+
"log_only_to_file was set to True and log_file_name was not provided, so ignoring the attribute"
126+
)
112127
logging.getLogger(__name__).info("using python version %s" % sys.version)
113128
try:
114129
logging.getLogger(__name__).info(

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

Lines changed: 38 additions & 6 deletions
Large diffs are not rendered by default.

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

Lines changed: 38 additions & 6 deletions
Large diffs are not rendered by default.

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class Chassis(Base):
6161
"StateV2": "stateV2",
6262
}
6363
_SDM_ENUM_MAP = {
64-
"chainTopology": ["daisy", "none", "star"],
64+
"chainTopology": ["daisy", "none", "ptp", "star"],
6565
"chassisOSType": ["linux", "unknown", "windows"],
6666
"errorState": [
6767
"ConnectError",
@@ -129,7 +129,7 @@ def ChainTopology(self):
129129
"""
130130
Returns
131131
-------
132-
- str(daisy | none | star): The chain topology type. This must be defined on the primary chassis. It must be defined only after the chassis host name has been specified and applied on the current chassis. For legacy chassis chains, the daisy chainTopology should be indicated.
132+
- str(daisy | none | ptp | star): The chain topology type. This must be defined on the primary chassis. It must be defined only after the chassis host name has been specified and applied on the current chassis. For legacy chassis chains, the daisy chainTopology should be indicated.
133133
"""
134134
return self._get_attribute(self._SDM_ATT_MAP["ChainTopology"])
135135

@@ -373,7 +373,7 @@ def update(
373373
Args
374374
----
375375
- CableLength (number): Specifies the length of the cable between two adjacent chassis. Must be set only after the chassis hostname has been set and committed on the current chassis.
376-
- ChainTopology (str(daisy | none | star)): The chain topology type. This must be defined on the primary chassis. It must be defined only after the chassis host name has been specified and applied on the current chassis. For legacy chassis chains, the daisy chainTopology should be indicated.
376+
- ChainTopology (str(daisy | none | ptp | star)): The chain topology type. This must be defined on the primary chassis. It must be defined only after the chassis host name has been specified and applied on the current chassis. For legacy chassis chains, the daisy chainTopology should be indicated.
377377
- Hostname (str): The IP address associated with the chassis.
378378
- MasterChassis (str): Specify the hostname of the primary chassis on a secondary chassis. Must be left blank on primary. Must be set only after the chassis hostname has been set and committed on the current chassis.
379379
- PrimaryChassis (str): Specify the hostname of the primary chassis on a secondary chassis. Must be left blank on primary. Must be set only after the chassis hostname has been set and committed on the current chassis.
@@ -400,7 +400,7 @@ def add(
400400
Args
401401
----
402402
- CableLength (number): Specifies the length of the cable between two adjacent chassis. Must be set only after the chassis hostname has been set and committed on the current chassis.
403-
- ChainTopology (str(daisy | none | star)): The chain topology type. This must be defined on the primary chassis. It must be defined only after the chassis host name has been specified and applied on the current chassis. For legacy chassis chains, the daisy chainTopology should be indicated.
403+
- ChainTopology (str(daisy | none | ptp | star)): The chain topology type. This must be defined on the primary chassis. It must be defined only after the chassis host name has been specified and applied on the current chassis. For legacy chassis chains, the daisy chainTopology should be indicated.
404404
- Hostname (str): The IP address associated with the chassis.
405405
- MasterChassis (str): Specify the hostname of the primary chassis on a secondary chassis. Must be left blank on primary. Must be set only after the chassis hostname has been set and committed on the current chassis.
406406
- PrimaryChassis (str): Specify the hostname of the primary chassis on a secondary chassis. Must be left blank on primary. Must be set only after the chassis hostname has been set and committed on the current chassis.
@@ -461,7 +461,7 @@ def find(
461461
Args
462462
----
463463
- CableLength (number): Specifies the length of the cable between two adjacent chassis. Must be set only after the chassis hostname has been set and committed on the current chassis.
464-
- ChainTopology (str(daisy | none | star)): The chain topology type. This must be defined on the primary chassis. It must be defined only after the chassis host name has been specified and applied on the current chassis. For legacy chassis chains, the daisy chainTopology should be indicated.
464+
- ChainTopology (str(daisy | none | ptp | star)): The chain topology type. This must be defined on the primary chassis. It must be defined only after the chassis host name has been specified and applied on the current chassis. For legacy chassis chains, the daisy chainTopology should be indicated.
465465
- ChassisOSType (str(linux | unknown | windows)):
466466
- ChassisType (str): The type of chassis.
467467
- ChassisVersion (str): The version of the Chassis in use.

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,26 @@ def Licensing(self):
155155
return self._properties.get("Licensing")
156156
return Licensing(self)._select()
157157

158+
@property
159+
def Meshing(self):
160+
"""
161+
Returns
162+
-------
163+
- obj(ixnetwork_restpy.testplatform.sessions.ixnetwork.globals.meshing.meshing.Meshing): An instance of the Meshing class
164+
165+
Raises
166+
------
167+
- ServerError: The server has encountered an uncategorized error condition
168+
"""
169+
from ixnetwork_restpy.testplatform.sessions.ixnetwork.globals.meshing.meshing import (
170+
Meshing,
171+
)
172+
173+
if len(self._object_properties) > 0:
174+
if self._properties.get("Meshing", None) is not None:
175+
return self._properties.get("Meshing")
176+
return Meshing(self)._select()
177+
158178
@property
159179
def PortTestOptions(self):
160180
"""

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

Whitespace-only changes.

ixnetwork_restpy/testplatform/sessions/ixnetwork/globals/meshing/externalendpoints/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)