Skip to content

Commit

Permalink
Merge pull request #111 from intracom-telecom-sdn/release
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
konstantinos-papadopoulos authored Feb 15, 2017
2 parents 43bfbc4 + 4ad2cf9 commit 7736578
Show file tree
Hide file tree
Showing 23 changed files with 180 additions and 249 deletions.
3 changes: 1 addition & 2 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@ ratings:
- "**.md"
exclude_paths:
- "jenkins_jobs/*"
- "emulators/cbench/*"
- "emulators/mt_cbench/*"
- "emulators/sbemu/mtcbench/*"
- "controllers/*"
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ script:
# - coverage run --omit='/usr/local/lib/python3.4/*' --include='./util/*.py' --parallel-mode ./util/unittests/test_html.py
# - coverage run --omit='/usr/local/lib/python3.4/*' --include='./util/*.py' --parallel-mode ./util/unittests/test_process.py
# - coverage run --omit='/usr/local/lib/python3.4/*' --include='./util/*.py' --parallel-mode ./util/unittests/test_netutil.py
- coverage run --omit='/usr/local/lib/python3.4/*' --include='./util/*.py' --parallel-mode ./stress_test/nstat_orchestrator.py --help
- coverage run --omit='/usr/local/lib/python3.4/*' --include='./util/*.py' --parallel-mode ./stress_test/nstat.py --help
- coverage combine
after_success:
coveralls
Expand Down
8 changes: 4 additions & 4 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ qthelp:
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/nstatsrc.qhcp"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/nstat_src.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/nstatsrc.qhc"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/nstat_src.qhc"

.PHONY: applehelp
applehelp:
Expand All @@ -112,8 +112,8 @@ devhelp:
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/nstatsrc"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/nstatsrc"
@echo "# mkdir -p $$HOME/.local/share/devhelp/nstat_src"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/nstat_src"
@echo "# devhelp"

.PHONY: epub
Expand Down
7 changes: 7 additions & 0 deletions docs/conf.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
conf module
===========

.. automodule:: conf
:members:
:undoc-members:
:show-inheritance:
7 changes: 4 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
.. nstat.src documentation master file, created by
sphinx-quickstart on Sun Jan 29 11:26:04 2017.
.. nstat_src documentation master file, created by
sphinx-quickstart on Wed Feb 15 13:38:32 2017.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to NSTAT's documentation!
Welcome to nstat_src's documentation!
=====================================

.. toctree::
:maxdepth: 4
:caption: Contents:

conf
stress_test
util

Expand Down
4 changes: 2 additions & 2 deletions docs/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ if "%1" == "qthelp" (
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in %BUILDDIR%/qthelp, like this:
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\nstatsrc.qhcp
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\nstat_src.qhcp
echo.To view the help file:
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\nstatsrc.ghc
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\nstat_src.ghc
goto end
)

Expand Down
44 changes: 22 additions & 22 deletions docs/stress_test.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,6 @@ stress_test.controller_exceptions module
:undoc-members:
:show-inheritance:

stress_test.emulator module
---------------------------

.. automodule:: stress_test.emulator
:members:
:undoc-members:
:show-inheritance:

stress_test.emulator_exceptions module
--------------------------------------

.. automodule:: stress_test.emulator_exceptions
:members:
:undoc-members:
:show-inheritance:

stress_test.html_generation module
----------------------------------

Expand All @@ -52,18 +36,18 @@ stress_test.monitor module
:undoc-members:
:show-inheritance:

stress_test.nb_generator module
-------------------------------
stress_test.nbemu module
------------------------

.. automodule:: stress_test.nb_generator
.. automodule:: stress_test.nbemu
:members:
:undoc-members:
:show-inheritance:

stress_test.nb_generator_exceptions module
------------------------------------------
stress_test.nbemu_exceptions module
-----------------------------------

.. automodule:: stress_test.nb_generator_exceptions
.. automodule:: stress_test.nbemu_exceptions
:members:
:undoc-members:
:show-inheritance:
Expand Down Expand Up @@ -116,6 +100,22 @@ stress_test.report_spec_templates module
:undoc-members:
:show-inheritance:

stress_test.sbemu module
------------------------

.. automodule:: stress_test.sbemu
:members:
:undoc-members:
:show-inheritance:

stress_test.sbemu_exceptions module
-----------------------------------

.. automodule:: stress_test.sbemu_exceptions
:members:
:undoc-members:
:show-inheritance:

stress_test.test_run module
---------------------------

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
34 changes: 17 additions & 17 deletions stress_test/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,35 +742,35 @@ def __poll_flows_ds(self, t_start, expected_flows):
while True:
if (time.time() - t_discovery_start) > \
self.nbgen.flows_ds_discovery_deadline:
logging.info('[NB_generator] [Poll_flows thread] Deadline of '
logging.info('[NB_emulator] [Poll_flows thread] Deadline of '
'{0} seconds passed'
.format(self.nbgen.flows_ds_discovery_deadline))
self.nbgen.e2e_installation_time = -1.0
self.nbgen_queue.put({'end_to_end_flows_operation_time': -1.0},
block=True)
logging.info('[NB_generator] [Poll_flows thread] End to End '
logging.info('[NB_emulator] [Poll_flows thread] End to End '
'installation time monitor FAILED')

return
else:
new_ssh = self.controller.init_ssh()
oper_ds_found_flows = self.controller.get_oper_flows(new_ssh)
logging.debug('[NB_generator] [Poll_flows thread] Found {0}'
logging.debug('[NB_emulator] [Poll_flows thread] Found {0}'
' flows at inventory'.
format(oper_ds_found_flows))
if (oper_ds_found_flows - previous_discovered_flows) != 0:
t_discovery_start = time.time()
previous_discovered_flows = oper_ds_found_flows
if oper_ds_found_flows == expected_flows:
time_interval = time.time() - t_start
logging.debug('[NB_generator] [Poll_flows thread] '
logging.debug('[NB_emulator] [Poll_flows thread] '
'Flow-Master {0} flows found in {1} seconds'
.format(expected_flows, time_interval))
self.nbgen.e2e_installation_time = time_interval
self.nbgen_queue.put(
{'end_to_end_flows_operation_time': time_interval},
block=True)
logging.info('[NB_generator] [Poll_flows thread] '
logging.info('[NB_emulator] [Poll_flows thread] '
'End to End installation time is: {0}'
.format(self.nbgen.e2e_installation_time))
return
Expand All @@ -795,34 +795,34 @@ def __poll_flows_ds_confirm(self, expected_flows):
while True:
if (time.time() - t_discovery_start) > \
self.nbgen.flows_ds_discovery_deadline:
logging.info('[NB_generator] [Poll_flows_confirm thread] '
logging.info('[NB_emulator] [Poll_flows_confirm thread] '
' Deadline of {0} seconds passed'
.format(self.flows_ds_discovery_deadline))
self.nbgen.confirm_time = -1.0
self.nbgen_queue.put({'confirm_time': -1.0}, block=True)
logging.info('[NB_generator] [Poll_flows_confirm thread] '
logging.info('[NB_emulator] [Poll_flows_confirm thread] '
'Confirmation time monitoring FAILED')

return
else:
new_ssh = self.controller.init_ssh()
oper_ds_found_flows = self.controller.get_oper_flows(new_ssh)
logging.debug('[NB_generator] [Poll_flows_confirm thread] '
logging.debug('[NB_emulator] [Poll_flows_confirm thread] '
'Found {0} flows at inventory'
.format(oper_ds_found_flows))
if (oper_ds_found_flows - previous_discovered_flows) != 0:
t_discovery_start = time.time()
previous_discovered_flows = oper_ds_found_flows
if oper_ds_found_flows == expected_flows:
time_interval = time.time() - t_start
logging.debug('[NB_generator] [Poll_flows_confirm thread] '
logging.debug('[NB_emulator] [Poll_flows_confirm thread] '
'Flow-Master {0} flows found in {1} seconds'
.format(expected_flows,
time_interval))
self.nbgen.confirm_time = time_interval
self.nbgen_queue.put({'confirm_time': time_interval},
block=True)
logging.info('[NB_generator] [Poll_flows_confirm thread] '
logging.info('[NB_emulator] [Poll_flows_confirm thread] '
'Confirmation time is: {0}'
.format(self.nbgen.confirm_time))

Expand Down Expand Up @@ -851,35 +851,35 @@ def __poll_flows_switches(self, t_start, expected_flows):
while True:
if (time.time() - t_discovery_start) > \
self.nbgen.flows_ds_discovery_deadline:
logging.info('[NB_generator] [Poll_flows_switches thread] '
logging.info('[NB_emulator] [Poll_flows_switches thread] '
'Deadline of {0} seconds passed'
.format(self.flows_ds_discovery_deadline))
self.nbgen.discover_flows_on_switches_time = -1.0
self.nbgen_queue.put({'switch_operation_time': -1.0},
block=True)
logging.info('[NB_generator] [Poll_flows_switches thread] '
logging.info('[NB_emulator] [Poll_flows_switches thread] '
'Discovering flows on switches FAILED')

return
else:
new_ssh = self.sbemu.init_ssh()
discovered_flows = self.sbemu.get_flows(new_ssh)
logging.debug('[NB_generator] [Poll_flows_switches thread] '
logging.debug('[NB_emulator] [Poll_flows_switches thread] '
'Found {0} flows at topology switches'
.format(discovered_flows))
if (discovered_flows - previous_discovered_flows) != 0:
t_discovery_start = time.time()
previous_discovered_flows = discovered_flows
if discovered_flows == expected_flows:
time_interval = time.time() - t_start
logging.debug('[NB_generator] [Poll_flows_switches thread]'
logging.debug('[NB_emulator] [Poll_flows_switches thread]'
' expected flows = {0} \n '
'discovered flows = {1}'
.format(expected_flows, discovered_flows))
self.discover_flows_on_switches_time = time_interval
self.nbgen_queue.put(
{'switch_operation_time': time_interval}, block=True)
logging.info('[NB_generator] [Poll_flows_switches thread] '
logging.info('[NB_emulator] [Poll_flows_switches thread] '
'Time to discover flows on switches is: {0}'
.format(self.nbgen.
discover_flows_on_switches_time))
Expand Down Expand Up @@ -924,7 +924,7 @@ def monitor_threads_run(self, t_start, total_failed_flows,
:type expected_flows: int
:type flow_delete_flag: boolean
"""
logging.info('[NB_generator] Start polling measurements')
logging.info('[NB_emulator] Start polling measurements')
monitor_ds = gevent.spawn(self.__poll_flows_ds,
t_start,
expected_flows)
Expand All @@ -940,7 +940,7 @@ def monitor_threads_run(self, t_start, total_failed_flows,
controller_time = self.__controller_time(t_start)
discovered_flows = self.sbemu.get_flows()
flow_measurement_latency_interval = time.time() - time_start
logging.info('[NB_generator] Flows measurement latency '
logging.info('[NB_emulator] Flows measurement latency '
'interval: {0} sec. | Discovered flows: {1}'
.format(flow_measurement_latency_interval,
discovered_flows))
Expand Down
Loading

0 comments on commit 7736578

Please sign in to comment.