Commit 835777ba authored by Marco Mariani's avatar Marco Mariani

slapgrid: grammar nazi, added comment

parent fcf5ea3e
...@@ -230,6 +230,9 @@ def create_slapgrid_object(options, logger): ...@@ -230,6 +230,9 @@ def create_slapgrid_object(options, logger):
def check_required_only_partitions(existing, required): def check_required_only_partitions(existing, required):
"""
Verify the existence of partitions specified by the --only parameter
"""
missing = set(required) - set(existing) missing = set(required) - set(existing)
if missing: if missing:
plural = ['s', ''][len(missing) == 1] plural = ['s', ''][len(missing) == 1]
...@@ -886,7 +889,7 @@ class Slapgrid(object): ...@@ -886,7 +889,7 @@ class Slapgrid(object):
'../../../../slapos/slap/doc/partition_consumption.xsd') '../../../../slapos/slap/doc/partition_consumption.xsd')
clean_run = True clean_run = True
# Loop on the different computer partitions # Loop over the different computer partitions
computer_partition_list = self.FilterComputerPartitionList( computer_partition_list = self.FilterComputerPartitionList(
slap_computer_usage.getComputerPartitionList()) slap_computer_usage.getComputerPartitionList())
...@@ -894,7 +897,7 @@ class Slapgrid(object): ...@@ -894,7 +897,7 @@ class Slapgrid(object):
try: try:
computer_partition_id = computer_partition.getId() computer_partition_id = computer_partition.getId()
#We want execute all the script in the report folder #We want to execute all the script in the report folder
instance_path = os.path.join(self.instance_root, instance_path = os.path.join(self.instance_root,
computer_partition.getId()) computer_partition.getId())
report_path = os.path.join(instance_path, 'etc', 'report') report_path = os.path.join(instance_path, 'etc', 'report')
...@@ -915,7 +918,7 @@ class Slapgrid(object): ...@@ -915,7 +918,7 @@ class Slapgrid(object):
invocation_list = [] invocation_list = []
invocation_list.append(os.path.join(instance_path, 'etc', 'report', invocation_list.append(os.path.join(instance_path, 'etc', 'report',
script)) script))
#We add the xml_file name in the invocation_list #We add the xml_file name to the invocation_list
#f = tempfile.NamedTemporaryFile() #f = tempfile.NamedTemporaryFile()
#name_xml = '%s.%s' % ('slapreport', os.path.basename(f.name)) #name_xml = '%s.%s' % ('slapreport', os.path.basename(f.name))
#path_to_slapreport = os.path.join(instance_path, 'var', name_xml) #path_to_slapreport = os.path.join(instance_path, 'var', name_xml)
...@@ -1026,8 +1029,8 @@ class Slapgrid(object): ...@@ -1026,8 +1029,8 @@ class Slapgrid(object):
try: try:
computer_partition_id = computer_partition.getId() computer_partition_id = computer_partition.getId()
try: try:
software_url = computer_partition.getSoftwareRelease().getURI() software_url = computer_partition.getSoftwareRelease().getURI()
software_path = os.path.join(self.software_root, md5digest(software_url)) software_path = os.path.join(self.software_root, md5digest(software_url))
except (NotFoundError, TypeError): except (NotFoundError, TypeError):
software_url = None software_url = None
software_path = None software_path = None
......
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