Skip to content

Commit

Permalink
"version 1.1.5"
Browse files Browse the repository at this point in the history
  • Loading branch information
ajbalogh committed Apr 14, 2022
1 parent 0169164 commit 974520e
Show file tree
Hide file tree
Showing 4,100 changed files with 540,694 additions and 272,451 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
13 changes: 12 additions & 1 deletion RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Release Notes

### Apr 2022
* 1.1.5
* support ixnetwork version 9.20.2199.45 (9.20 patch-1)
* introduction of batch operations (improves performance)
* Batch Find - helps users to find multiples nodes in a single rest call
* samples - batch_find.py
* Batch Update - helps users to update multiple restpy objects in a single rest call
* samples - batch_update.py, load_config_with_batch_update.py
* Batch Add - adds a whole configuration in single rest call
* samples - batch_add.py, traffic_with_batch_add.py
* includes Timeline class
* logging module now has thread ids
### Feb 2022
* 1.1.4
* support uhd version 1.4.1
Expand Down
4 changes: 1 addition & 3 deletions ixnetwork_restpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@
SessionAssistant,
)
from ixnetwork_restpy.assistants.watch.watchassistant import WatchAssistant
from ixnetwork_restpy.assistants.config.configassistant import (
ConfigAssistant,
)
from ixnetwork_restpy.assistants.batch.batchupdate import BatchUpdate
from ixnetwork_restpy.assistants.batch.batchfind import BatchFind
from ixnetwork_restpy.assistants.batch.batchadd import BatchAdd
except:
pass
519 changes: 519 additions & 0 deletions ixnetwork_restpy/assistants/batch/batchadd.py

Large diffs are not rendered by default.

11 changes: 2 additions & 9 deletions ixnetwork_restpy/assistants/batch/batchfind.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,7 @@ def __exit__(self, *exc_info):
count = []
for key, value in self._results.__dict__.items():
count.append(".{} {}".format(key, len(value)))
t.info(
"{}.results: {}".format(
self.__class__.__name__, ", ".join(count)
)
)
t.info("{}.results: {}".format(self.__class__.__name__, ", ".join(count)))

def _process_results(self, parent, results):
for key, value in results.items():
Expand All @@ -115,10 +111,7 @@ def _copy_results(self, parent, key, value):
obj._parent = parent
obj_values = {}
for attr_name, attr_value in value.items():
if (
attr_name == "href"
or attr_name in obj._SDM_ATT_MAP.values()
):
if attr_name == "href" or attr_name in obj._SDM_ATT_MAP.values():
obj_values[attr_name] = attr_value
elif attr_name in BatchFind._OBJECTS:
self._process_results(obj, {attr_name: attr_value})
Expand Down
9 changes: 7 additions & 2 deletions ixnetwork_restpy/assistants/batch/batchupdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from ixnetwork_restpy.testplatform.sessions.ixnetwork.ixnetwork import Ixnetwork
from ixnetwork_restpy.timer import Timer


class Batch(object):
"""Base batch functionality"""

Expand Down Expand Up @@ -116,7 +117,9 @@ def _process_batch_add(self):
response = self._send_recv("POST", url, batch["payload"])
responses = len(response["links"])
for i in range(responses):
batch["base"]._set_properties({"href": response["links"][responses - i - 1]["href"]})
batch["base"]._set_properties(
{"href": response["links"][responses - i - 1]["href"]}
)
batch["base"].refresh()

def __enter__(self):
Expand All @@ -131,7 +134,9 @@ def __exit__(self, *exc_info):
"""
start = time.time()
self._process_batch_add()
self._ixnetwork.info("Batch commit of %s adds in %.3fs" % (self._total_adds, time.time() - start))
self._ixnetwork.info(
"Batch commit of %s adds in %.3fs" % (self._total_adds, time.time() - start)
)
self._ixnetwork._connection._create = self._original_add


Expand Down
81 changes: 0 additions & 81 deletions ixnetwork_restpy/assistants/config/configassistant.py

This file was deleted.

0 comments on commit 974520e

Please sign in to comment.