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

WIP

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