Loading charm-helpers @ 8a90d2cc Original line number Diff line number Diff line Subproject commit 8a90d2cc3aa0ba170756bdc87b4499903ac86fe5 charms.osm @ 623ba0d8 Original line number Diff line number Diff line Subproject commit 623ba0d8e6d3ff7a01067a0e09f15fc98ef6bec5 operator @ a3918e1d Original line number Diff line number Diff line Subproject commit a3918e1db40edac88a5250c46d7ef3156e8853d3 magma/hackfest_magma-agw-enb_vnfd/charms/enodeb.zip 0 → 100644 +103 KiB File added.No diff preview for this file type. View file magma/hackfest_magma-agw-enb_vnfd/charms/enodeb/src/charm.py +7 −2 Original line number Diff line number Diff line Loading @@ -28,7 +28,10 @@ import subprocess import logging import asyncio import random logger = logging.getLogger(__name__) class EnodebCharm(CharmBase): state = StoredState() def __init__(self, *args): Loading Loading @@ -93,7 +96,7 @@ class EnodebCharm(CharmBase): process = self._run_daemon(command, log_file) logger.debug("Register action: executed") event.set_results( {"status": "ok", "pid": process.pid, "log_file": log_file} {"status": "ok", "pid": process.pid, "log-file": log_file} ) except subprocess.CalledProcessError as e: event.fail("Command error: {}".format(e.output)) Loading @@ -114,9 +117,11 @@ class EnodebCharm(CharmBase): event.fail("Command error: {}".format(e.output)) except Exception as e: event.fail(e) def _run_daemon(self, cmd, stdout_file): with open(stdout_file, "wb") as f: return subprocess.Popen(cmd, shell=True, stdout=f) def on_attach_ue_action(self, event): """Attach User Emulator to EnodeB.""" try: Loading @@ -142,7 +147,7 @@ class EnodebCharm(CharmBase): process = self._run_daemon(command, log_file) logger.debug("Attach UE action: executed") event.set_results( {"status": "ok", "pid": process.pid, "log_file": log_file} {"status": "ok", "pid": process.pid, "log-file": log_file} ) except subprocess.CalledProcessError as ex: event.fail(ex) Loading Loading
charm-helpers @ 8a90d2cc Original line number Diff line number Diff line Subproject commit 8a90d2cc3aa0ba170756bdc87b4499903ac86fe5
charms.osm @ 623ba0d8 Original line number Diff line number Diff line Subproject commit 623ba0d8e6d3ff7a01067a0e09f15fc98ef6bec5
operator @ a3918e1d Original line number Diff line number Diff line Subproject commit a3918e1db40edac88a5250c46d7ef3156e8853d3
magma/hackfest_magma-agw-enb_vnfd/charms/enodeb.zip 0 → 100644 +103 KiB File added.No diff preview for this file type. View file
magma/hackfest_magma-agw-enb_vnfd/charms/enodeb/src/charm.py +7 −2 Original line number Diff line number Diff line Loading @@ -28,7 +28,10 @@ import subprocess import logging import asyncio import random logger = logging.getLogger(__name__) class EnodebCharm(CharmBase): state = StoredState() def __init__(self, *args): Loading Loading @@ -93,7 +96,7 @@ class EnodebCharm(CharmBase): process = self._run_daemon(command, log_file) logger.debug("Register action: executed") event.set_results( {"status": "ok", "pid": process.pid, "log_file": log_file} {"status": "ok", "pid": process.pid, "log-file": log_file} ) except subprocess.CalledProcessError as e: event.fail("Command error: {}".format(e.output)) Loading @@ -114,9 +117,11 @@ class EnodebCharm(CharmBase): event.fail("Command error: {}".format(e.output)) except Exception as e: event.fail(e) def _run_daemon(self, cmd, stdout_file): with open(stdout_file, "wb") as f: return subprocess.Popen(cmd, shell=True, stdout=f) def on_attach_ue_action(self, event): """Attach User Emulator to EnodeB.""" try: Loading @@ -142,7 +147,7 @@ class EnodebCharm(CharmBase): process = self._run_daemon(command, log_file) logger.debug("Attach UE action: executed") event.set_results( {"status": "ok", "pid": process.pid, "log_file": log_file} {"status": "ok", "pid": process.pid, "log-file": log_file} ) except subprocess.CalledProcessError as ex: event.fail(ex) Loading