Change to use node resource_class
Currently, we use node_type property to link with the flavors, but ironic node's resource_class field just want to do such thing, so we can just change to use it instead of adding a new node property. Change-Id: I535606ce05299037a7bd5aacdcd7869ca5f855c4 Closes-Bug: #1695819
This commit is contained in:
@@ -38,7 +38,7 @@ class NodeState(object):
|
||||
self.capabilities = node.extra_specs
|
||||
self.availability_zone = node.availability_zone \
|
||||
or CONF.engine.default_availability_zone
|
||||
self.flavor = node.node_type
|
||||
self.flavor = node.resource_class
|
||||
self.ports = node.ports
|
||||
|
||||
def consume_from_request(self, context):
|
||||
@@ -46,7 +46,7 @@ class NodeState(object):
|
||||
objects.ComputeNode.consume_node(context, self.node_uuid)
|
||||
|
||||
def __repr__(self):
|
||||
return "<Node:%s node_type:%s>" % (self.node_uuid, self.flavor)
|
||||
return "<Node:%s resource_class:%s>" % (self.node_uuid, self.flavor)
|
||||
|
||||
|
||||
class NodeManager(object):
|
||||
|
||||
Reference in New Issue
Block a user