<div dir="ltr">Recently I compared vdsmapi-schema.json file and the engine code (IVdsServer interface). I wanted to understand how to build json messages from parameters which are provided by the engine interface. <div><br>
</div><div>I would like to understand which interface definition is more accurate and update the other to have consistent information. <br><div><br></div><div>I am not sure how to map following engine methods to vdsm commands:</div>
<div><span style="color:rgb(51,51,51);font-family:monospace;font-size:13px;background-color:rgb(253,253,253)">getHardwareInfo, </span><span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">getAllVmStats, </span><span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">heartBeat, </span><span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">startSpice, </span><span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">getStorageConnectionsList, </span><span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">getStorageDomainsList, </span><span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">getVGList, </span><span style="font-size:13px;background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace">changeDisk </span>(maybe <span style="font-size:13px;background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace">VM.changeCD?)</span></div>
<div><br></div><div style>I noticed parameter differences between the schema and the engine code:</div><div style>- for <span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">Host.getVMList command </span>there is <span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">isFull</span> attribute in the engine code but it is not in the schema</div>
<div style>- for <span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">VM.changeCD </span>and <span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">VM.changeFloppy </span><span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">commands </span>the schema contains <span style="font-size:13px;background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace">DriveSpec </span>whereas in the engine code there is <span style="font-size:13px;background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace">imageLocation</span></div>
<div style>- for <span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">VM.setTicket </span>command in the engine <span style="font-size:13px;color:rgb(51,51,51);font-family:monospace;background-color:rgb(253,253,253)">existingConnAction and </span><span style="font-size:13px;color:rgb(51,51,51);font-family:monospace;background-color:rgb(253,253,253)">params</span> parameters are optional whereas in the schema are mendatory</div>
<div style>- for <span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">Host.delNetwork </span>command parameter<span style="font-size:13px;background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace"> </span><span style="font-size:13px;background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace">options </span>is not there in the engine whereas in the schema it is optional</div>
<div style>- for <span style="color:rgb(51,51,51);font-family:monospace;font-size:13px;background-color:rgb(253,253,253)">StorageDomain.format</span><span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px"> </span>command there is no <span style="font-size:13px;background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace">autoDetach</span> parameter in the engine code</div>
<div style>- for <span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">StoragePool.disconnect</span> command there is no <span style="font-size:13px;background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace">remove</span> parametere in the engine code</div>
<div style>- for <span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">StoragePool.create</span> command there is no <span style="font-size:13px;background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace">lockPolicy</span> parameter in the schema</div>
<div style>- for <span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">StoragePool.reconstructMaster</span> command there are no <span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">lockPolicy and hostSpmId</span> parameters in the schema</div>
<div style>- for <span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">StoragePool.getIsoList</span> command there is no <span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">filenameExtension</span> parameter in the engine code</div>
<div style>- for <span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">StoragePool.spmStart</span> command there are no <span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">storagePoolFormatType</span> and <span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">domVersion </span>parameters in the schema</div>
<div style>- for <span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">StoragePool.fence</span> command  there are no <span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">prevID and prevLVER</span> parameters in the schema</div>
<div style><br></div><div style>There are some type mismatches:</div><div style>-  for <span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">StorageDomainType</span> type is missing some values in the schema</div>
<div style>-  for <span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">Host.getDeviceList</span> command there are different storage types in the schema and the engine code</div>
<div><br></div><div style>In the schema there is vmID parameter multiple times for following commands:</div><div style><span style="color:rgb(51,51,51);font-family:monospace;font-size:13px;background-color:rgb(253,253,253)">VM.create, </span><span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">VM.migrate, </span><span style="background-color:rgb(253,253,253);color:rgb(51,51,51);font-family:monospace;font-size:13px">VM.hotplugDisk, VM.hotunplugDisk, VM.hotplugNic and VM.hotunplugNic</span><br>
</div><div><br></div><div style>Where can I find schema like information about all gluster commands?</div></div></div>