Revert "Add NUMA topology validation for Node"

This reverts commit a2e90e6b85.

Change-Id: I227b25edc655b686b461d68cfc541e51e5e02be8
Closes-Bug: #1551955
This commit is contained in:
tatyana-leontovich 2016-03-01 21:38:39 +00:00
parent a2e90e6b85
commit a1d9d35992
2 changed files with 0 additions and 105 deletions

View File

@ -119,47 +119,6 @@ single_schema = {
"fqdn": {"type": "string"},
}
},
"numa_topology": {
"type": "object",
"properties": {
"supported_hugepages": {
"type": "array",
"items": {"type": "integer"},
},
"numa_nodes": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"id": {"type": "integer"},
"cpus": {
"type": "array",
"items": {"type": "integer"},
},
"memory": {"type": "integer"},
},
"required": [
"id",
"cpus",
"memory",
]
}
},
"distances": {
"type": "array",
"items": {
"type": "array",
"items": {"type": "string"},
}
}
},
"required": [
"supported_hugepages",
"numa_nodes",
"distances",
]
}
}
},
"id": {"type": "integer"},

View File

@ -80,67 +80,3 @@ class TestNodeJsonSchemaValidation(base.BaseValidatorTest):
self.validator,
data,
node_schema.single_schema)
def test_cpu_pinning(self):
data = {
'meta': {
'numa_topology': {
'supported_hugepages': [2048, 1048576],
'numa_nodes': [
{'id': 1, 'cpus': [0, 1, 2, 3], 'memory': 1024},
{'id': 2, 'cpus': [4, 5, 6, 7], 'memory': 1024},
],
'distances': [
['1.0', '2.1'],
['2.1', '1.0'],
]
},
}
}
self.assertNotRaises(
errors.InvalidData,
self.validator,
data,
node_schema.single_schema
)
def test_cpu_pinning_fail(self):
tests_data = [
{
'data': {
'meta': {
'numa_topology': {},
'distances': []}},
'message': "'supported_hugepages' is a required property"
},
{
'data': {
'meta': {
'numa_topology': {
'numa_nodes': [],
'supported_hugepages': [],
'distances': []}}},
'message': "[] is too short"
},
{
'data': {
'meta': {
'numa_topology': {
'numa_nodes': [
{'id': 0, 'cpus': [0, 1, 2, 3]},
],
'supported_hugepages': [],
'distances': []}}},
'message': "'memory' is a required property"
}
]
for test in tests_data:
self.assertRaisesWithMessageIn(
errors.InvalidData,
test['message'],
self.validator,
test['data'],
node_schema.single_schema
)