Commit 21fdbbc4 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

slapgrid: wip continue working on new API

parent d37500fe
......@@ -1730,7 +1730,6 @@ stderr_logfile_backups=1
self.checkEnvironmentAndCreateStructure()
self._launchSupervisord()
slap_computer_usage = self.slap.registerComputer(self.computer_id)
computer_partition_usage_list = []
self.logger.info('Aggregating and sending usage reports...')
......@@ -1760,7 +1759,7 @@ stderr_logfile_backups=1
clean_run = True
# Loop over the different computer partitions
computer_partition_list = self.FilterComputerPartitionList(
slap_computer_usage.getComputerPartitionList())
self.getComputerPartitionList())
for computer_partition in computer_partition_list:
try:
......@@ -1895,7 +1894,7 @@ stderr_logfile_backups=1
if self.validateXML(usage, computer_consumption_model):
self.logger.info('XML file generated by asXML is valid')
slap_computer_usage.reportUsage(usage)
self.computer.reportUsage(usage)
filename_delete_list.append(filename)
else:
self.logger.info('XML file is invalid %s' % file_path)
......@@ -1915,7 +1914,7 @@ stderr_logfile_backups=1
# We test the XML report before sending it
if self.validateXML(computer_consumption, computer_consumption_model):
self.logger.info('XML file generated by asXML is valid')
slap_computer_usage.reportUsage(computer_consumption)
self.computer.reportUsage(computer_consumption)
else:
self.logger.info('XML file generated by asXML is not valid !')
raise ValueError('XML file generated by asXML is not valid !')
......@@ -1967,7 +1966,7 @@ stderr_logfile_backups=1
self.slap.jio_api_connector.put({
"portal_type": "Software Instance",
"reference": computer_partition.get("reference"),
"reported_state": "started"
"reported_state": "stopped"
})
else:
computer_partition["slap_partition"].stopped()
......
This diff is collapsed.
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