Skip to content

Commit

Permalink
"version 1.1.12"
Browse files Browse the repository at this point in the history
  • Loading branch information
vhowdhur committed Jan 9, 2024
1 parent 476942f commit 78313c6
Show file tree
Hide file tree
Showing 713 changed files with 26,332 additions and 201 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
### January 2024
* 1.1.12
* support ixnetwork version 10.00.2312.4 (10.00 EA)
* fixed an issue with find() on a restpy node with href
### November 2023
* 1.1.11
* support ixnetwork version 9.30.2309.46 (9.30 Update-3)
Expand Down
2 changes: 2 additions & 0 deletions ixnetwork_restpy/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ def _process_response_status_code(self, url, headers, response, async_status=Fal
0 : url.find("/", url.find("/sessions/") + len("/sessions/"))
]
url = preamble + "/ixnetwork/globals/appErrors/error"
self._print_request("GET", url)
error_response = self._session.request(
"GET",
url,
Expand All @@ -470,6 +471,7 @@ def _process_response_status_code(self, url, headers, response, async_status=Fal
pass
# raise the appropriate error
message = "\n".join(errors)
logging.getLogger(__name__).debug(message)
if response.status_code == 400:
raise BadRequestError(message, response.status_code)
elif response.status_code == 401:
Expand Down
2 changes: 2 additions & 0 deletions ixnetwork_restpy/pytest_tests/.pytest_cache/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Created by pytest automatically.
*
4 changes: 4 additions & 0 deletions ixnetwork_restpy/pytest_tests/.pytest_cache/CACHEDIR.TAG
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Signature: 8a477f597d28d172789f06886806bc55
# This file is a cache directory tag created by pytest.
# For information about cache directory tags, see:
# https://bford.info/cachedir/spec.html
8 changes: 8 additions & 0 deletions ixnetwork_restpy/pytest_tests/.pytest_cache/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# pytest cache directory #

This directory contains data from the pytest's cache plugin,
which provides the `--lf` and `--ff` options, as well as the `cache` fixture.

**Do not** commit this to version control.

See [the docs](https://docs.pytest.org/en/stable/how-to/cache.html) for more information.
10 changes: 10 additions & 0 deletions ixnetwork_restpy/pytest_tests/.pytest_cache/v/cache/lastfailed
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"tests/batch/test_batch_find.py::test_bath_find_on_mix_of_nodes_with_different_multiplicity[10.39.38.127:443:linux]": true,
"tests/batch/batch_add/test_batch_add_classic.py::test_batch_add_with_dependent_attr[10.39.38.127:443:linux]": true,
"tests/batch/batch_add/test_batch_add_classic.py::test_batch_add_with_classic_config[10.39.38.127:443:linux]": true,
"tests/batch/batch_add/test_batch_add_traffic.py::test_batch_add_with_traffic[10.39.38.127:443:linux]": true,
"tests/batch/batch_add/test_batch_add_traffic.py::test_batch_add_with_multicast_traffic[10.39.38.127:443:linux]": true,
"tests/batch/batch_add/test_batch_add_traffic.py::test_batch_add_with_traffic_having_href_objects[10.39.38.127:443:linux]": true,
"tests/batch/batch_add/test_batch_add_with_load_config.py::test_batch_add_with_multiple_nodes[10.39.38.127:443:linux]": true,
"tests/batch/batch_add/test_batch_add_with_load_config.py::test_precedence_with_batch_add[10.39.38.127:443:linux]": true
}
242 changes: 242 additions & 0 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
@@ -0,0 +1 @@
[]
17 changes: 17 additions & 0 deletions ixnetwork_restpy/pytest_tests/tests/test_find_with_href.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import pytest


def test_select_call_with_list_of_hrefs(ixnetwork):
ixnetwork.Vport.add().add().add().add()
vps = ixnetwork.Vport.find()
assert len(vps) == 4

ixnetwork.Topology.add(Vports=vps[0:2]).add(Vports=vps[2:])
tp = ixnetwork.Topology.find(Ports=vps[1].href + "|" + vps[0].href)
assert len(tp) == 1
tp = ixnetwork.Topology.find(Ports=vps[3].href + "|" + vps[0].href)
assert len(tp) == 2


if __name__ == "__main__":
pytest.main(["-v", "-s", "--server", "localhost:11009:windows", __file__])

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class Globals(Base):
"ProductVersion": "productVersion",
"ProtocolbuildNumber": "protocolbuildNumber",
"RpfPort": "rpfPort",
"ServerTime": "serverTime",
"SessionUpTime": "sessionUpTime",
"Username": "username",
}
Expand Down Expand Up @@ -432,6 +433,16 @@ def RpfPort(self):
"""
return self._get_attribute(self._SDM_ATT_MAP["RpfPort"])

@property
def ServerTime(self):
# type: () -> str
"""
Returns
-------
- str: Current Time of the Server
"""
return self._get_attribute(self._SDM_ATT_MAP["ServerTime"])

@property
def SessionUpTime(self):
# type: () -> str
Expand Down Expand Up @@ -464,6 +475,7 @@ def find(
ProductVersion=None,
ProtocolbuildNumber=None,
RpfPort=None,
ServerTime=None,
SessionUpTime=None,
Username=None,
):
Expand All @@ -485,6 +497,7 @@ def find(
- ProductVersion (str):
- ProtocolbuildNumber (str): The build number of the protocol.
- RpfPort (number):
- ServerTime (str): Current Time of the Server
- SessionUpTime (str): Amount of time IxNetwork session is up
- Username (str): The name of the user.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class Preferences(Base):
_SDM_NAME = "preferences"
_SDM_ATT_MAP = {
"AllowProtocolSessionStateLog": "allowProtocolSessionStateLog",
"AutoCleanLogs": "autoCleanLogs",
"AutoSaveIntervalMin": "autoSaveIntervalMin",
"AutoSaveLocation": "autoSaveLocation",
"ClientTraceLevel": "clientTraceLevel",
Expand Down Expand Up @@ -140,6 +141,21 @@ def AllowProtocolSessionStateLog(self, value):
# type: (bool) -> None
self._set_attribute(self._SDM_ATT_MAP["AllowProtocolSessionStateLog"], value)

@property
def AutoCleanLogs(self):
# type: () -> bool
"""
Returns
-------
- bool: If true, this will fire auto log deletion everyday, bound by other properties such as client/chassis days etc under /globals/diagnostics/cleanup
"""
return self._get_attribute(self._SDM_ATT_MAP["AutoCleanLogs"])

@AutoCleanLogs.setter
def AutoCleanLogs(self, value):
# type: (bool) -> None
self._set_attribute(self._SDM_ATT_MAP["AutoCleanLogs"], value)

@property
def AutoSaveIntervalMin(self):
# type: () -> int
Expand Down Expand Up @@ -652,6 +668,7 @@ def TransmitMode(self, value):
def update(
self,
AllowProtocolSessionStateLog=None,
AutoCleanLogs=None,
AutoSaveIntervalMin=None,
AutoSaveLocation=None,
ClientTraceLevel=None,
Expand Down Expand Up @@ -686,12 +703,13 @@ def update(
SyslogPort=None,
TransmitMode=None,
):
# type: (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
# 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
"""Updates preferences resource on the server.
Args
----
- AllowProtocolSessionStateLog (bool): Enables logging each protocol session state change. This option is very heavy for performance.
- AutoCleanLogs (bool): If true, this will fire auto log deletion everyday, bound by other properties such as client/chassis days etc under /globals/diagnostics/cleanup
- AutoSaveIntervalMin (number): Set the interval time in minutes in which the configuration will be saved automatically
- AutoSaveLocation (str): Set the location where the configuration will be saved automatically
- ClientTraceLevel (str(debug | error | fatal | info | warn)): Set the IxNetwork Client side Log/Trace level
Expand Down Expand Up @@ -735,6 +753,7 @@ def update(
def find(
self,
AllowProtocolSessionStateLog=None,
AutoCleanLogs=None,
AutoSaveIntervalMin=None,
AutoSaveLocation=None,
ClientTraceLevel=None,
Expand Down Expand Up @@ -770,7 +789,7 @@ def find(
SyslogPort=None,
TransmitMode=None,
):
# type: (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
# 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
"""Finds and retrieves preferences resources from the server.
All named parameters are evaluated on the server using regex. The named parameters can be used to selectively retrieve preferences resources from the server.
Expand All @@ -780,6 +799,7 @@ def find(
Args
----
- AllowProtocolSessionStateLog (bool): Enables logging each protocol session state change. This option is very heavy for performance.
- AutoCleanLogs (bool): If true, this will fire auto log deletion everyday, bound by other properties such as client/chassis days etc under /globals/diagnostics/cleanup
- AutoSaveIntervalMin (number): Set the interval time in minutes in which the configuration will be saved automatically
- AutoSaveLocation (str): Set the location where the configuration will be saved automatically
- ClientTraceLevel (str(debug | error | fatal | info | warn)): Set the IxNetwork Client side Log/Trace level
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ class Scriptgen(Base):
"ConnectHostname": "connectHostname",
"ConnectPort": "connectPort",
"ConnectVersion": "connectVersion",
"IncludeAPIKey": "includeAPIKey",
"IncludeConnect": "includeConnect",
"IncludeSessionId": "includeSessionId",
"IncludeTestComposer": "includeTestComposer",
"IncludeUsernamePasswd": "includeUsernamePasswd",
"Language": "language",
"LinePerAttribute": "linePerAttribute",
"OverwriteScriptFilename": "overwriteScriptFilename",
Expand Down Expand Up @@ -139,6 +142,21 @@ def ConnectVersion(self, value):
# type: (str) -> None
self._set_attribute(self._SDM_ATT_MAP["ConnectVersion"], value)

@property
def IncludeAPIKey(self):
# type: () -> bool
"""
Returns
-------
- bool: API-Key argument will be generated as part of HLT connect call
"""
return self._get_attribute(self._SDM_ATT_MAP["IncludeAPIKey"])

@IncludeAPIKey.setter
def IncludeAPIKey(self, value):
# type: (bool) -> None
self._set_attribute(self._SDM_ATT_MAP["IncludeAPIKey"], value)

@property
def IncludeConnect(self):
# type: () -> bool
Expand All @@ -154,6 +172,21 @@ def IncludeConnect(self, value):
# type: (bool) -> None
self._set_attribute(self._SDM_ATT_MAP["IncludeConnect"], value)

@property
def IncludeSessionId(self):
# type: () -> bool
"""
Returns
-------
- bool: Session-ID argument will be generated as part of HLT connect call
"""
return self._get_attribute(self._SDM_ATT_MAP["IncludeSessionId"])

@IncludeSessionId.setter
def IncludeSessionId(self, value):
# type: (bool) -> None
self._set_attribute(self._SDM_ATT_MAP["IncludeSessionId"], value)

@property
def IncludeTestComposer(self):
# type: () -> bool
Expand All @@ -169,6 +202,21 @@ def IncludeTestComposer(self, value):
# type: (bool) -> None
self._set_attribute(self._SDM_ATT_MAP["IncludeTestComposer"], value)

@property
def IncludeUsernamePasswd(self):
# type: () -> bool
"""
Returns
-------
- bool: Username-password argument will be generated as part of HLT connect call
"""
return self._get_attribute(self._SDM_ATT_MAP["IncludeUsernamePasswd"])

@IncludeUsernamePasswd.setter
def IncludeUsernamePasswd(self, value):
# type: (bool) -> None
self._set_attribute(self._SDM_ATT_MAP["IncludeUsernamePasswd"], value)

@property
def Language(self):
# type: () -> str
Expand Down Expand Up @@ -249,24 +297,30 @@ def update(
ConnectHostname=None,
ConnectPort=None,
ConnectVersion=None,
IncludeAPIKey=None,
IncludeConnect=None,
IncludeSessionId=None,
IncludeTestComposer=None,
IncludeUsernamePasswd=None,
Language=None,
LinePerAttribute=None,
OverwriteScriptFilename=None,
ScriptFilename=None,
SerializationType=None,
):
# type: (str, int, str, bool, bool, str, bool, bool, str, str) -> Scriptgen
# type: (str, int, str, bool, bool, bool, bool, bool, str, bool, bool, str, str) -> Scriptgen
"""Updates scriptgen resource on the server.
Args
----
- ConnectHostname (str): The hostname to be used in the connect command
- ConnectPort (number): The port number to be used in the connect command
- ConnectVersion (str): The version number to be used in the connect command
- IncludeAPIKey (bool): API-Key argument will be generated as part of HLT connect call
- IncludeConnect (bool): Flag to include the connect command
- IncludeSessionId (bool): Session-ID argument will be generated as part of HLT connect call
- IncludeTestComposer (bool): Flag to include test composer code
- IncludeUsernamePasswd (bool): Username-password argument will be generated as part of HLT connect call
- Language (str(perl | python | ruby | tcl)): Select the target scriptgen language
- LinePerAttribute (bool): If true the scriptgen output will show each attribute on a separate line
- OverwriteScriptFilename (bool): If true the file indicated by the script filename will be overwritten
Expand All @@ -284,15 +338,18 @@ def find(
ConnectHostname=None,
ConnectPort=None,
ConnectVersion=None,
IncludeAPIKey=None,
IncludeConnect=None,
IncludeSessionId=None,
IncludeTestComposer=None,
IncludeUsernamePasswd=None,
Language=None,
LinePerAttribute=None,
OverwriteScriptFilename=None,
ScriptFilename=None,
SerializationType=None,
):
# type: (str, int, str, bool, bool, str, bool, bool, str, str) -> Scriptgen
# type: (str, int, str, bool, bool, bool, bool, bool, str, bool, bool, str, str) -> Scriptgen
"""Finds and retrieves scriptgen resources from the server.
All named parameters are evaluated on the server using regex. The named parameters can be used to selectively retrieve scriptgen resources from the server.
Expand All @@ -304,8 +361,11 @@ def find(
- ConnectHostname (str): The hostname to be used in the connect command
- ConnectPort (number): The port number to be used in the connect command
- ConnectVersion (str): The version number to be used in the connect command
- IncludeAPIKey (bool): API-Key argument will be generated as part of HLT connect call
- IncludeConnect (bool): Flag to include the connect command
- IncludeSessionId (bool): Session-ID argument will be generated as part of HLT connect call
- IncludeTestComposer (bool): Flag to include test composer code
- IncludeUsernamePasswd (bool): Username-password argument will be generated as part of HLT connect call
- Language (str(perl | python | ruby | tcl)): Select the target scriptgen language
- LinePerAttribute (bool): If true the scriptgen output will show each attribute on a separate line
- OverwriteScriptFilename (bool): If true the file indicated by the script filename will be overwritten
Expand Down
Loading

0 comments on commit 78313c6

Please sign in to comment.