Commit e3cc3fec authored by Xavier Thompson's avatar Xavier Thompson

slap/standalone: Remove redundant format code

Now that `StandaloneSlapOS.format` calls `slapos node format`, remove
redundant operations in `StandaloneSlapOS.format`, such as updating
the slapproxy.
parent fa571549
...@@ -654,7 +654,6 @@ class StandaloneSlapOS(object): ...@@ -654,7 +654,6 @@ class StandaloneSlapOS(object):
unknown_partition_set.add(path) unknown_partition_set.add(path)
# create partitions and configure computer # create partitions and configure computer
partition_list = []
for i in range(partition_count): for i in range(partition_count):
partition_reference = '%s%s' % (partition_base_name, i) partition_reference = '%s%s' % (partition_base_name, i)
...@@ -663,25 +662,6 @@ class StandaloneSlapOS(object): ...@@ -663,25 +662,6 @@ class StandaloneSlapOS(object):
if not (os.path.exists(partition_path)): if not (os.path.exists(partition_path)):
os.mkdir(partition_path) os.mkdir(partition_path)
os.chmod(partition_path, 0o750) os.chmod(partition_path, 0o750)
ipv6_addr, ipv6_range = self._getPartitionIpv6(i)
partition_list.append({
'address_list': [
{
'addr': ipv4_address,
'netmask': NETMASK_IPV4_FULL
},
{
'addr': ipv6_addr,
'netmask': NETMASK_IPV6_FULL
}
],
'ipv6_range' : ipv6_range,
'path': partition_path,
'reference': partition_reference,
'tap': {
'name': partition_reference
},
})
if unknown_partition_set: if unknown_partition_set:
# sanity check that we are not removing partitions in use # sanity check that we are not removing partitions in use
...@@ -699,16 +679,6 @@ class StandaloneSlapOS(object): ...@@ -699,16 +679,6 @@ class StandaloneSlapOS(object):
"Cannot reformat to remove busy partition at {part_id}".format( "Cannot reformat to remove busy partition at {part_id}".format(
**locals())) **locals()))
self.computer.updateConfiguration(
dumps({
'address': ipv4_address,
'netmask': NETMASK_IPV4_FULL,
'partition_list': partition_list,
'reference': self._computer_id,
'instance_root': self._instance_root,
'software_root': self._software_root
}))
for part in unknown_partition_set: for part in unknown_partition_set:
self._logger.debug( self._logger.debug(
"removing partition no longer part of format spec %s", part) "removing partition no longer part of format spec %s", part)
......
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