Commit 44c69be8 authored by Xavier Thompson's avatar Xavier Thompson

slapgrid: Provide requested state in buildout

Add a 'requested-state' entry in the slap-connection section set
to the requested state of the computer partition being processed.
parent f140191f
......@@ -605,6 +605,7 @@ class Partition(object):
'software_release_url': self.software_release_url,
'key_file': self.key_file,
'cert_file': self.cert_file,
'requested_state': self.computer_partition.getState(),
'storage_home': self.instance_storage_home,
'global_ipv4_network_prefix': self.ipv4_global_network,
}
......
......@@ -13,6 +13,7 @@ server-url = %(server_url)s
software-release-url = %(software_release_url)s
key-file = %(key_file)s
cert-file = %(cert_file)s
requested-state = %(requested_state)s
[slap_connection]
# Kept for backward compatiblity
......
......@@ -147,6 +147,10 @@ class MasterMixin(BasicMixin, unittest.TestCase):
computer_id='bidon',
partition_id=partition_id)
# XXX ensure the partition has a state
slap_computer_partition._requested_state = getattr(
slap_computer_partition, '_requested_state', 'started')
instance_path = os.path.join(self.instance_root, partition_id)
os.mkdir(instance_path)
os.chmod(instance_path, 0o750)
......
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