Commit 24fa6562 authored by Antoine Catton's avatar Antoine Catton

Slapcontainer: minor fix

Some slapos.cfg don't use interface_name but bridge_name in order
to specify the bridge.

This allow slapcontainer to support both.
parent 01024b86
...@@ -50,7 +50,10 @@ def run(args): ...@@ -50,7 +50,10 @@ def run(args):
partition_amount = slapos_conf.getint('slapformat', 'partition_amount') partition_amount = slapos_conf.getint('slapformat', 'partition_amount')
partition_base_name = slapos_conf.get('slapformat', 'partition_base_name') partition_base_name = slapos_conf.get('slapformat', 'partition_base_name')
bridge_name = slapos_conf.get('slapformat', 'interface_name') try:
bridge_name = slapos_conf.get('slapformat', 'interface_name')
except ConfigParser.NoOptionError:
bridge_name = slapos_conf.get('slapformat', 'bridge_name')
instance_root = slapos_conf.get('slapos', 'instance_root') instance_root = slapos_conf.get('slapos', 'instance_root')
partition_base_path = os.path.join(instance_root, partition_base_name) partition_base_path = os.path.join(instance_root, partition_base_name)
partition_list = ['%s%d' % (partition_base_path, i) partition_list = ['%s%d' % (partition_base_path, i)
......
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