aboutsummaryrefslogtreecommitdiffstats
path: root/test/mocks/pmsh-pnf-sim/docker-compose/schedulepmjob.py
diff options
context:
space:
mode:
authorrajendrajaiswal <rajendra.jaiswal@ericsson.com>2019-12-16 14:24:02 +0000
committerMorgan Richomme <morgan.richomme@orange.com>2020-01-21 14:34:09 +0000
commit6a61ad84e1df33bec201df43dc0b217d892f91b9 (patch)
tree0c340af84099a65e49ec44b8c53d51b13f79aa3e /test/mocks/pmsh-pnf-sim/docker-compose/schedulepmjob.py
parentf2ec458f12c470552462a75f26ef7e1704482a72 (diff)
PNF Simulator to support Control Loop subscription model
Change-Id: I9919edb32f3f68f86fad28c908f808fcee3fc548 Issue-ID: INT-1312 Signed-off-by: rajendrajaiswal <rajendra.jaiswal@ericsson.com>
Diffstat (limited to 'test/mocks/pmsh-pnf-sim/docker-compose/schedulepmjob.py')
-rw-r--r--test/mocks/pmsh-pnf-sim/docker-compose/schedulepmjob.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/mocks/pmsh-pnf-sim/docker-compose/schedulepmjob.py b/test/mocks/pmsh-pnf-sim/docker-compose/schedulepmjob.py
new file mode 100644
index 000000000..ecbd74417
--- /dev/null
+++ b/test/mocks/pmsh-pnf-sim/docker-compose/schedulepmjob.py
@@ -0,0 +1,14 @@
+import time
+import schedule
+from pnf import PNF
+import pnfconfig
+
+if __name__ == "__main__":
+ try:
+ pnf = PNF()
+ schedule.every(pnfconfig.rop).seconds.do(lambda: pnf.pm_job(pnfconfig.VES_IP, pnfconfig.VES_PORT))
+ while True:
+ schedule.run_pending()
+ time.sleep(1)
+ except Exception as error:
+ print(error)