diff --git a/magma/hackfest_gateway_pnf/charms/vyos-config/mod/charm-helpers b/magma/hackfest_gateway_pnf/charms/vyos-config/mod/charm-helpers new file mode 160000 index 0000000000000000000000000000000000000000..8a90d2cc3aa0ba170756bdc87b4499903ac86fe5 --- /dev/null +++ b/magma/hackfest_gateway_pnf/charms/vyos-config/mod/charm-helpers @@ -0,0 +1 @@ +Subproject commit 8a90d2cc3aa0ba170756bdc87b4499903ac86fe5 diff --git a/magma/hackfest_gateway_pnf/charms/vyos-config/mod/charms.osm b/magma/hackfest_gateway_pnf/charms/vyos-config/mod/charms.osm new file mode 160000 index 0000000000000000000000000000000000000000..623ba0d8e6d3ff7a01067a0e09f15fc98ef6bec5 --- /dev/null +++ b/magma/hackfest_gateway_pnf/charms/vyos-config/mod/charms.osm @@ -0,0 +1 @@ +Subproject commit 623ba0d8e6d3ff7a01067a0e09f15fc98ef6bec5 diff --git a/magma/hackfest_gateway_pnf/charms/vyos-config/mod/operator b/magma/hackfest_gateway_pnf/charms/vyos-config/mod/operator new file mode 160000 index 0000000000000000000000000000000000000000..a3918e1db40edac88a5250c46d7ef3156e8853d3 --- /dev/null +++ b/magma/hackfest_gateway_pnf/charms/vyos-config/mod/operator @@ -0,0 +1 @@ +Subproject commit a3918e1db40edac88a5250c46d7ef3156e8853d3 diff --git a/magma/hackfest_magma-agw-enb_vnfd/charms/enodeb.zip b/magma/hackfest_magma-agw-enb_vnfd/charms/enodeb.zip new file mode 100644 index 0000000000000000000000000000000000000000..c46bcf3b4d966e513712297bd9fbbbff27df341b Binary files /dev/null and b/magma/hackfest_magma-agw-enb_vnfd/charms/enodeb.zip differ diff --git a/magma/hackfest_magma-agw-enb_vnfd/charms/enodeb/src/charm.py b/magma/hackfest_magma-agw-enb_vnfd/charms/enodeb/src/charm.py index b113ac0c1b970ce60c55c60d22d46a8604df0436..69b74cd6f10d410361eccb496af5657cbe4c3d9f 100755 --- a/magma/hackfest_magma-agw-enb_vnfd/charms/enodeb/src/charm.py +++ b/magma/hackfest_magma-agw-enb_vnfd/charms/enodeb/src/charm.py @@ -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): @@ -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)) @@ -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: @@ -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) diff --git a/magma/hackfest_magma-agw-enb_vnfd/charms/magmagw/mod/charms.osm b/magma/hackfest_magma-agw-enb_vnfd/charms/magmagw/mod/charms.osm index cf167cf041a3d4ca9b8dd90e9f575c9c4e99b8ad..623ba0d8e6d3ff7a01067a0e09f15fc98ef6bec5 160000 --- a/magma/hackfest_magma-agw-enb_vnfd/charms/magmagw/mod/charms.osm +++ b/magma/hackfest_magma-agw-enb_vnfd/charms/magmagw/mod/charms.osm @@ -1 +1 @@ -Subproject commit cf167cf041a3d4ca9b8dd90e9f575c9c4e99b8ad +Subproject commit 623ba0d8e6d3ff7a01067a0e09f15fc98ef6bec5 diff --git a/magma/hackfest_magma-agw-enb_vnfd/cloud_init/srslte_init b/magma/hackfest_magma-agw-enb_vnfd/cloud_init/srslte_init index 76bfa77f1b143055ed6d9f5243187011bf3a372f..bad58af8087c728a4f0dfd81c07b8033607ea17f 100644 --- a/magma/hackfest_magma-agw-enb_vnfd/cloud_init/srslte_init +++ b/magma/hackfest_magma-agw-enb_vnfd/cloud_init/srslte_init @@ -3,7 +3,6 @@ password: osm2020 chpasswd: { expire: False } ssh_pwauth: True runcmd: - - route delete -net 0.0.0.0/0 gw 172.21.251.254 - route add -net 10.0.0.0/8 gw 172.21.251.254 - route add -net 172.21.0.0/16 gw 172.21.251.254 - route add -net 172.22.0.0/16 gw 172.21.251.254