Merge pull request #50 from sh8121att/dryd30_kernel_params

Dryd30 kernel params
This commit is contained in:
Felipe Monteiro 2017-07-07 12:04:54 -04:00 committed by GitHub
commit 91d18d1004
4 changed files with 10 additions and 6 deletions

View File

@ -1038,7 +1038,7 @@ class MaasTaskRunner(drivers.DriverTaskRunner):
# Render the string of all kernel params for the node
kp_string = ""
for k,v in getattr(node, 'kernel_params', {}).items():
for k, v in getattr(node, 'kernel_params', {}).items():
if v == 'True':
kp_string = kp_string + " %s" % (k)
else:
@ -1093,7 +1093,9 @@ class MaasTaskRunner(drivers.DriverTaskRunner):
self.logger.error("Error configuring static tags for node %s: %s" % (node.name, str(ex3)))
continue
if failed:
if worked and failed:
final_result = hd_fields.ActionResult.PartialSuccess
elif failed:
final_result = hd_fields.ActionResult.Failure
else:
final_result = hd_fields.ActionResult.Success

View File

@ -42,7 +42,9 @@ class Tag(model_base.ResourceBase):
system_id_list = []
for n in resp_json:
system_id_list.append(n.get('system_id'))
system_id = n.get('system_id', None)
if system_id is not None:
system_id_list.append(system_id)
return system_id_list
else:
@ -100,7 +102,7 @@ class Tag(model_base.ResourceBase):
refined_dict = {k: obj_dict.get(k, None) for k in cls.fields}
if 'name' in obj_dict.keys():
if 'name' in obj_dict:
refined_dict['resource_id'] = obj_dict.get('name')
i = cls(api_client, **refined_dict)

View File

@ -310,7 +310,7 @@ class YamlIngester(IngesterPlugin):
model.kernel = platform.get('kernel', None)
model.kernel_params = {}
for k,v in platform.get('kernel_params', {}).items():
for k, v in platform.get('kernel_params', {}).items():
model.kernel_params[k] = v
model.primary_network = spec.get('primary_network', None)

View File

@ -483,7 +483,7 @@ class Orchestrator(object):
if node_platform_task.get_result() in [hd_fields.ActionResult.Success,
hd_fields.ActionResult.PartialSuccess]:
worked = True
elif node_platform_task.get_result() in [hd_fields.ActionResult.Failure,
if node_platform_task.get_result() in [hd_fields.ActionResult.Failure,
hd_fields.ActionResult.PartialSuccess]:
failed = True
else: