Commit fb31fb52 authored by Xavier Thompson's avatar Xavier Thompson

erp5testnode: Shorten instance partition paths

`inst/test0-0`  ->  `i/0`

See merge request !1441
parent 3db46412
...@@ -53,7 +53,7 @@ class SlapOSControler(object): ...@@ -53,7 +53,7 @@ class SlapOSControler(object):
createFolder(shared) createFolder(shared)
self.shared_part_list = self.shared_part_list + [shared] self.shared_part_list = self.shared_part_list + [shared]
self.instance_root = os.path.join(working_directory, 'inst') self.instance_root = os.path.join(working_directory, 'i')
self.slapos_config = os.path.join(working_directory, 'slapos.cfg') self.slapos_config = os.path.join(working_directory, 'slapos.cfg')
self.proxy_database = os.path.join(working_directory, 'proxy.db') self.proxy_database = os.path.join(working_directory, 'proxy.db')
self.instance_config = {} self.instance_config = {}
...@@ -287,7 +287,7 @@ class SlapOSControler(object): ...@@ -287,7 +287,7 @@ class SlapOSControler(object):
# create partition and configure computer # create partition and configure computer
# XXX: at the moment all partitions do share same virtual interface address # XXX: at the moment all partitions do share same virtual interface address
# this is not a problem as usually all services are on different ports # this is not a problem as usually all services are on different ports
partition_reference = '%s-%s' %(config['partition_reference'], i) partition_reference = '%s%s' %(config['partition_reference'], i)
partition_path = os.path.join(instance_root, partition_reference) partition_path = os.path.join(instance_root, partition_reference)
if not(os.path.exists(partition_path)): if not(os.path.exists(partition_path)):
os.mkdir(partition_path) os.mkdir(partition_path)
......
...@@ -62,7 +62,7 @@ def main(*args): ...@@ -62,7 +62,7 @@ def main(*args):
logger.disable(logging.CRITICAL) logger.disable(logging.CRITICAL)
CONFIG = { CONFIG = {
'partition_reference': 'test0', 'partition_reference': '',
} }
config = configparser.SafeConfigParser() config = configparser.SafeConfigParser()
# do not change case of option keys # do not change case of option keys
......
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