Merge "Demote three warning messages"
This commit is contained in:
commit
ef5c1a3a44
ironic
conductor
drivers/modules
tests/unit
@ -238,9 +238,9 @@ def _can_skip_state_change(task, new_state):
|
||||
notify_utils.emit_power_set_notification(
|
||||
task, fields.NotificationLevel.INFO,
|
||||
fields.NotificationStatus.END, new_state)
|
||||
LOG.warning("Not going to change node %(node)s power state because "
|
||||
"current state = requested state = '%(state)s'.",
|
||||
{'node': node.uuid, 'state': curr_state})
|
||||
LOG.debug("Not going to change node %(node)s power state because "
|
||||
"current state = requested state = '%(state)s'.",
|
||||
{'node': node.uuid, 'state': curr_state})
|
||||
|
||||
try:
|
||||
curr_state = task.driver.power.get_power_state(task)
|
||||
|
@ -106,8 +106,8 @@ def check_image_size(task):
|
||||
image_disk_format = node.instance_info.get('image_disk_format')
|
||||
# skip check if 'memory_mb' is not defined
|
||||
if 'memory_mb' not in properties:
|
||||
LOG.warning('Skip the image size check as memory_mb is not '
|
||||
'defined in properties on node %s.', node.uuid)
|
||||
LOG.debug('Skip the image size check as memory_mb is not '
|
||||
'defined in properties on node %s.', node.uuid)
|
||||
return
|
||||
|
||||
image_show = images.image_show(task.context, image_source)
|
||||
|
@ -47,6 +47,5 @@ def create_ports_if_not_exist(
|
||||
LOG.info("Port created for MAC address %(address)s for node "
|
||||
"%(node)s", {'address': mac, 'node': node.uuid})
|
||||
except exception.MACAlreadyExists:
|
||||
LOG.warning("Port already exists for MAC address %(address)s "
|
||||
"for node %(node)s",
|
||||
{'address': mac, 'node': node.uuid})
|
||||
LOG.info("Port already exists for MAC address %(address)s "
|
||||
"for node %(node)s", {'address': mac, 'node': node.uuid})
|
||||
|
@ -454,7 +454,7 @@ class NodePowerActionTestCase(db_base.DbTestCase):
|
||||
self.assertEqual(states.POWER_ON, node['power_state'])
|
||||
self.assertIsNone(node['target_power_state'])
|
||||
self.assertIsNone(node['last_error'])
|
||||
log_mock.warning.assert_called_once_with(
|
||||
log_mock.debug.assert_called_once_with(
|
||||
u"Not going to change node %(node)s power state because "
|
||||
u"current state = requested state = '%(state)s'.",
|
||||
{'state': states.POWER_ON, 'node': node.uuid})
|
||||
@ -753,7 +753,7 @@ class NodePowerActionTestCase(db_base.DbTestCase):
|
||||
self.assertEqual(states.POWER_ON, node['power_state'])
|
||||
self.assertEqual(states.NOSTATE, node['target_power_state'])
|
||||
self.assertIsNone(node['last_error'])
|
||||
mock_log.warning.assert_called_once_with(
|
||||
mock_log.debug.assert_called_once_with(
|
||||
u"Not going to change node %(node)s power state because "
|
||||
u"current state = requested state = '%(state)s'.",
|
||||
{'state': states.POWER_ON, 'node': node.uuid})
|
||||
|
@ -55,8 +55,7 @@ class InspectFunctionTestCase(db_base.DbTestCase):
|
||||
port_obj1.create.assert_called_once_with()
|
||||
port_obj2.create.assert_called_once_with()
|
||||
|
||||
@mock.patch.object(utils.LOG, 'warning',
|
||||
spec_set=True, autospec=True)
|
||||
@mock.patch.object(utils.LOG, 'info', spec_set=True, autospec=True)
|
||||
@mock.patch.object(objects.Port, 'create', spec_set=True, autospec=True)
|
||||
def test_create_ports_if_not_exist_mac_exception(self,
|
||||
create_mock,
|
||||
|
Loading…
x
Reference in New Issue
Block a user