Commit 8cb92d3e authored by Joanne Hugé's avatar Joanne Hugé

WIP

parent 72db605e
......@@ -16,7 +16,7 @@
[template]
filename = instance.cfg
md5sum = 06331958afaaeb200e4d7f48b417cde8
md5sum = 496f19765e507275e89f79625c068e3e
[template-lte-enb-epc]
_update_hash_filename_ = instance-enb-epc.jinja2.cfg
......@@ -40,7 +40,7 @@ md5sum = 7d25976008c3aa588527db2b461ad72c
[template-lte-mme]
_update_hash_filename_ = instance-mme.jinja2.cfg
md5sum = eed24ef6943a1f3ab49329c8f8519e93
md5sum = 6696d9cd236b0c5a42901bc3907bb9c7
[ue_db.jinja2.cfg]
filename = config/ue_db.jinja2.cfg
......@@ -76,4 +76,4 @@ md5sum = 2353f90918ea72df77c5823ed7cbaf77
[interface-up-promise]
_update_hash_filename_ = promise/check_interface_up.jinja2.py
md5sum = f2618cb03b163a29c60d37de61a22269
md5sum = 3f52fadd0da1d3975991a62cec0b03e6
......@@ -164,3 +164,4 @@ recipe = slapos.cookbook:promise.plugin
eggs = slapos.core
file = ${tun-up-promise-template:output}
output = ${directory:plugins}/check-tun-up.py
config-testing = {{ testing }}
......@@ -39,6 +39,12 @@ init =
options['mme'] = path + "/mme"
options['ims'] = path + "/ims"
[testing]
recipe = slapos.recipe.build
path = ${buildout:directory}
init =
options['testing'] = path.count("slappart") == 2
[switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype
enb-epc = dynamic-template-lte-enb-epc:output
......@@ -135,6 +141,7 @@ extra-context =
raw openssl_location ${openssl:location}
raw nghttp2_location ${nghttp2:location}
key ue_db_path ue-db-config:output
key testing testing:testing
[ue-db-config]
recipe = slapos.recipe.template:jinja2
......
......@@ -28,8 +28,9 @@ class RunPromise(GenericPromise):
In this case, check whether the file exists.
"""
ifname = "{{ slap_configuration.get('tun-name', '') }}"
testing = self.getConfig('testing')
if ifname:
if not testing:
f = open('/sys/class/net/%s/operstate' % ifname, 'r')
if f.read() == 'up\n':
self.logger.info("%s is up", ifname)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment