Remove cpus validation due inconsistency with inspection cpus count
This patch removes the validation for cpus due inconsistency of the value returned by the inspection process when processor supports hyper-threading technology. Change-Id: I0e389e9e8699749dd8a2267891c6649222e6e2e8
This commit is contained in:
parent
0cee89e7b8
commit
9c217f936b
|
@ -614,8 +614,6 @@ class Client(BaseClient):
|
|||
):
|
||||
node_sh_uri = node_info.get('server_hardware_uri')
|
||||
server_hardware = self.get_server_hardware(node_info)
|
||||
server_hardware_cpus = (server_hardware.processor_core_count
|
||||
* server_hardware.processor_count)
|
||||
if str(server_hardware.memory_mb) != str(node_memorymb):
|
||||
message = (
|
||||
"Node memory_mb is inconsistent with OneView's"
|
||||
|
@ -623,13 +621,6 @@ class Client(BaseClient):
|
|||
% {'server_hardware_uri': node_sh_uri}
|
||||
)
|
||||
raise exceptions.OneViewInconsistentResource(message)
|
||||
elif str(server_hardware_cpus) != str(node_cpus):
|
||||
message = (
|
||||
"Node cpus is inconsistent with OneView's"
|
||||
" server hardware %(server_hardware_uri)s cpus."
|
||||
% {'server_hardware_uri': node_sh_uri}
|
||||
)
|
||||
raise exceptions.OneViewInconsistentResource(message)
|
||||
|
||||
@auditing.audit
|
||||
def validate_node_server_hardware_type(self, node_info):
|
||||
|
|
|
@ -573,37 +573,6 @@ class OneViewClientTestCase(unittest.TestCase):
|
|||
node_cpus
|
||||
)
|
||||
|
||||
@mock.patch.object(client.Client, 'get_server_hardware', autospec=True)
|
||||
def test_validate_node_server_hardware_inconsistent_cpus_value(
|
||||
self, mock_get_server_hardware
|
||||
):
|
||||
server_hardware_mock = models.ServerHardware()
|
||||
setattr(server_hardware_mock, "processor_core_count", 2)
|
||||
setattr(server_hardware_mock, "processor_count", 3)
|
||||
setattr(server_hardware_mock, "memory_mb", 1)
|
||||
|
||||
mock_get_server_hardware.return_value = server_hardware_mock
|
||||
|
||||
driver_info = {
|
||||
"server_hardware_uri": "/any_uri",
|
||||
}
|
||||
node_memorymb = 1
|
||||
node_cpus = 3
|
||||
|
||||
exc_expected_msg = (
|
||||
"Node cpus is inconsistent with OneView's server"
|
||||
" hardware /any_uri cpus."
|
||||
)
|
||||
|
||||
self.assertRaisesRegexp(
|
||||
exceptions.OneViewInconsistentResource,
|
||||
exc_expected_msg,
|
||||
self.oneview_client.validate_node_server_hardware,
|
||||
driver_info,
|
||||
node_memorymb,
|
||||
node_cpus
|
||||
)
|
||||
|
||||
@mock.patch.object(client.Client, 'get_server_hardware', autospec=True)
|
||||
def test_validate_node_server_hardware_type_inconsistent_sht_uri(
|
||||
self, mock_get_server_hardware
|
||||
|
|
Loading…
Reference in New Issue