From a696fe7c6bb0752308d13a60bbea31da685a14f4 Mon Sep 17 00:00:00 2001 From: Devananda van der Veen Date: Tue, 15 Jul 2014 17:35:13 -0700 Subject: [PATCH] Import a few more fixes from the Nova driver Import a few fixes based on comments on rev 4 of https://review.openstack.org/#/c/103167/ Change-Id: Ic7f6b54e9b4b94b4cb3108dd7d4ea808a99fa382 --- ironic/nova/virt/ironic/driver.py | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/ironic/nova/virt/ironic/driver.py b/ironic/nova/virt/ironic/driver.py index 0a35445655..1ac7d4eb08 100644 --- a/ironic/nova/virt/ironic/driver.py +++ b/ironic/nova/virt/ironic/driver.py @@ -125,19 +125,6 @@ def validate_instance_and_node(icli, instance): raise exception.InstanceNotFound(instance_id=instance['uuid']) -def _get_required_value(key, value): - """Return the requested value.""" - if '/' in value: - # we need to split the value - split_value = value.split('/') - eval_string = 'key' - for value in split_value: - eval_string = "%s['%s']" % (eval_string, value) - return eval(eval_string) - else: - return key[value] - - def _get_nodes_supported_instances(cpu_arch=''): """Return supported instances for a node.""" return [(cpu_arch, 'baremetal', 'baremetal')] @@ -534,10 +521,10 @@ class IronicDriver(virt_driver.ComputeDriver): instance.default_ephemeral_device = '/dev/sda1' instance.save() - #validate we ready to do the deploy + # validate we are ready to do the deploy validate_chk = icli.call("node.validate", node_uuid) if not validate_chk.deploy or not validate_chk.power: - # something is wrong. undo we we have done + # something is wrong. undo what we have done self._cleanup_deploy(node, instance, network_info) raise exception.ValidationError(_( "Ironic node: %(id)s failed to validate." @@ -723,17 +710,6 @@ class IronicDriver(virt_driver.ComputeDriver): caps.append(data) return caps - def get_console_output(self, context, instance): - """Get console log for an instance. - - Not Implemented Yet. - - :param context: The security context. - :param instance: The instance object. - - """ - raise NotImplementedError() - def refresh_security_group_rules(self, security_group_id): """Refresh security group rules from data store.