Allow compute nodes without hugepages 96/696/1
authortierno <alfonso.tiernosepulveda@telefonica.com>
Tue, 22 Nov 2016 10:35:41 +0000 (11:35 +0100)
committertierno <alfonso.tiernosepulveda@telefonica.com>
Tue, 22 Nov 2016 10:35:41 +0000 (11:35 +0100)
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
httpserver.py
vim_schema.py

index 870d680..9f26737 100644 (file)
@@ -599,7 +599,6 @@ def http_post_hosts():
                                 sriov['source_name'] = index
                                 index += 1
                             interfaces.append  ({'pci':str(port_k), 'Mbps': port_v['speed']/1000000, 'sriovs': new_sriovs, 'mac':port_v['mac'], 'source_name':port_v['source_name']})
-            #@TODO LA memoria devuelta por el RAD es incorrecta, almenos para IVY1, NFV100
             memory=node['memory']['node_size'] / (1024*1024*1024)
             #memory=get_next_2pow(node['memory']['hugepage_nr'])
             host['numas'].append( {'numa_socket': node['id'], 'hugepages': node['memory']['hugepage_nr'], 'memory':memory, 'interfaces': interfaces, 'cores': cores } )
index 1a75dde..0a5929d 100644 (file)
@@ -273,7 +273,7 @@ host_data_schema={
                 "type": "object",
                 "properties":{
                     "admin_state_up":{"type":"boolean"},
-                    "hugepages":integer1_schema,
+                    "hugepages":integer0_schema,
                     "cores":{
                         "type": "array",
                         "minItems":2,
@@ -324,7 +324,7 @@ host_data_schema={
                     "memory":integer1_schema
                 },
                 "additionalProperties": False,
-                "required": ["hugepages","cores","numa_socket"]
+                "required": ["cores","numa_socket"]
             }
         }
     },