Changeset 85222 in vbox for trunk/src/VBox/Main
- Timestamp:
- Jul 11, 2020 4:16:39 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 139199
- Location:
- trunk/src/VBox/Main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/ovfreader.h
r84532 r85222 335 335 bool fResourceRequired; 336 336 337 RTCString strHostResource; // "Abstractly specifies how a device shall connect to a resource on the deployment platform.338 // Not all devices need a backing." Used with disk items, for which this references a virtual339 //disk from the Disks section.337 RTCString strHostResource; ///< "Abstractly specifies how a device shall connect to a resource on the deployment platform. 338 /// Not all devices need a backing." Used with disk items, for which this 339 /// references a virtual disk from the Disks section. 340 340 bool fAutomaticAllocation; 341 341 bool fAutomaticDeallocation; 342 RTCString strConnection; // "All Ethernet adapters that specify the same abstract network connection name within an OVF343 344 345 346 RTCString strAddress; // "Device-specific. For an Ethernet adapter, this specifies the MAC address."347 int32_t lAddress; //strAddress as an integer, if applicable.348 RTCString strAddressOnParent; //"For a device, this specifies its location on the controller."349 RTCString strAllocationUnits; //"Specifies the units of allocation used. For example, “byte * 2^20”."350 uint64_t ullVirtualQuantity; //"Specifies the quantity of resources presented. For example, “256”."351 uint64_t ullReservation; //"Specifies the minimum quantity of resources guaranteed to be available."352 uint64_t ullLimit; //"Specifies the maximum quantity of resources that will be granted."353 uint64_t ullWeight; //"Specifies a relative priority for this allocation in relation to other allocations."342 RTCString strConnection; ///< "All Ethernet adapters that specify the same abstract network connection name within an OVF 343 /// package shall be deployed on the same network. The abstract network connection name shall be 344 /// listed in the NetworkSection at the outermost envelope level." We ignore this and only set up 345 /// a network adapter depending on the network name. 346 RTCString strAddress; ///< "Device-specific. For an Ethernet adapter, this specifies the MAC address." 347 int32_t lAddress; ///< strAddress as an integer, if applicable. 348 RTCString strAddressOnParent;///< "For a device, this specifies its location on the controller." 349 RTCString strAllocationUnits;///< "Specifies the units of allocation used. For example, “byte * 2^20”." 350 uint64_t ullVirtualQuantity; ///< "Specifies the quantity of resources presented. For example, “256”." 351 uint64_t ullReservation; ///< "Specifies the minimum quantity of resources guaranteed to be available." 352 uint64_t ullLimit; ///< "Specifies the maximum quantity of resources that will be granted." 353 uint64_t ullWeight; ///< "Specifies a relative priority for this allocation in relation to other allocations." 354 354 355 355 RTCString strConsumerVisibility; 356 356 RTCString strMappingBehavior; 357 357 RTCString strPoolID; 358 uint32_t ulBusNumber; //seen with IDE controllers, but not listed in OVF spec359 360 uint32_t ulLineNumber; // line number of <Item> element in XML source; cached for error messages358 uint32_t ulBusNumber; ///< seen with IDE controllers, but not listed in OVF spec 359 360 int m_iLineNumber; ///< line number of \<Item\> element in XML source; cached for error messages 361 361 362 362 VirtualHardwareItem() 363 : ulInstanceID(0) ,364 fResourceRequired(false),365 fAutomaticAllocation(false),366 fAutomaticDeallocation(false),367 ullVirtualQuantity(0),368 ullReservation(0),369 ullLimit(0),370 ullWeight(0),371 ulBusNumber(0),372 ulLineNumber(0),373 363 : ulInstanceID(0) 364 , fResourceRequired(false) 365 , fAutomaticAllocation(false) 366 , fAutomaticDeallocation(false) 367 , ullVirtualQuantity(0) 368 , ullReservation(0) 369 , ullLimit(0) 370 , ullWeight(0) 371 , ulBusNumber(0) 372 , m_iLineNumber(0) 373 , fDefault(false) 374 374 { 375 375 itemName = "Item"; 376 } ;376 } 377 377 378 378 virtual ~VirtualHardwareItem() { /* Makes MSC happy. */ } … … 417 417 StorageAccessType_T accessType; 418 418 RTCString strHostExtentName; 419 #if 0 /* unused */ 419 420 int16_t hostExtentNameFormat; 420 421 int16_t hostExtentNameNamespace; 421 422 int64_t hostExtentStartingAddress; 423 #endif 422 424 int64_t hostResourceBlockSize; 423 425 int64_t limit; … … 430 432 431 433 public: 432 StorageItem(): VirtualHardwareItem(), 433 accessType(StorageAccessType_Unknown), 434 hostExtentNameFormat(-1), 435 hostExtentNameNamespace(-1), 436 hostExtentStartingAddress(-1), 437 hostResourceBlockSize(-1), 438 limit(-1), 439 reservation(-1), 440 virtualQuantity(-1), 441 virtualResourceBlockSize(-1) 434 StorageItem() 435 : VirtualHardwareItem() 436 , accessType(StorageAccessType_Unknown) 437 #if 0 /* unused */ 438 , hostExtentNameFormat(-1) 439 , hostExtentNameNamespace(-1) 440 , hostExtentStartingAddress(-1) 441 #endif 442 , hostResourceBlockSize(-1) 443 , limit(-1) 444 , reservation(-1) 445 , virtualQuantity(-1) 446 , virtualResourceBlockSize(-1) 442 447 { 443 448 itemName = "StorageItem"; … … 461 466 { 462 467 //see DMTF Schema Documentation http://schemas.dmtf.org/wbem/cim-html/2/ 468 #if 0 /* unused */ 463 469 uint16_t DefaultPortVID; 464 470 uint16_t DefaultPriority; … … 466 472 uint32_t GroupID; 467 473 uint32_t ManagerID; 474 uint16_t NetworkPortProfileIDType; 475 #endif 468 476 RTCString strNetworkPortProfileID; 469 uint16_t NetworkPortProfileIDType;470 477 RTCString strOtherEndpointMode; 471 478 RTCString strOtherNetworkPortProfileIDTypeInfo; 472 479 RTCString strPortCorrelationID; 480 #if 0 /* unused */ 473 481 uint16_t PortVID; 474 482 bool Promiscuous; … … 479 487 uint8_t VSITypeIDVersion; 480 488 uint16_t AllowedPriorities[256]; 489 uint16_t AllowedToReceiveVLANs[256]; 490 uint16_t AllowedToTransmitVLANs[256]; 491 #endif 481 492 RTCString strAllowedToReceiveMACAddresses; 482 uint16_t AllowedToReceiveVLANs[256];483 493 RTCString strAllowedToTransmitMACAddresses; 484 uint16_t AllowedToTransmitVLANs[256];485 494 486 495 public: 487 EthernetPortItem() : VirtualHardwareItem()496 EthernetPortItem() : VirtualHardwareItem() 488 497 { 489 498 itemName = "EthernetPortItem"; -
trunk/src/VBox/Main/xml/ovfreader.cpp
r84532 r85222 447 447 continue; 448 448 vsys.vecHardwareItems.push_back(pItem); 449 pItem-> ulLineNumber = pelmItem->getLineNumber();449 pItem->m_iLineNumber = pelmItem->getLineNumber(); 450 450 pItem->fillItem(pelmItem); 451 451 … … 469 469 else 470 470 #if 1 471 LogRel(("OVFREADER: Warning reading '%s'! Duplicate ulInstanceID %u on line % u, previous at %u!\n",472 m_strPath.c_str(), pItem->ulInstanceID, pItem-> ulLineNumber, itDup->second->ulLineNumber));471 LogRel(("OVFREADER: Warning reading '%s'! Duplicate ulInstanceID %u on line %d, previous at %d!\n", 472 m_strPath.c_str(), pItem->ulInstanceID, pItem->m_iLineNumber, itDup->second->m_iLineNumber)); 473 473 #else 474 throw OVFLogicError(N_("Error reading '%s': Duplicate ulInstanceID %u on line % u, previous at %u"),474 throw OVFLogicError(N_("Error reading '%s': Duplicate ulInstanceID %u on line %d, previous at %d"), 475 475 m_strPath.c_str(), pItem->ulInstanceID, 476 pItem-> ulLineNumber, itDup->second->ulLineNumber);476 pItem->m_iLineNumber, itDup->second->m_iLineNumber); 477 477 #endif 478 478 } … … 507 507 i.ullVirtualQuantity, 508 508 UINT16_MAX, 509 i. ulLineNumber);509 i.m_iLineNumber); 510 510 break; 511 511 … … 520 520 m_strPath.c_str(), 521 521 i.strAllocationUnits.c_str(), 522 i. ulLineNumber);522 i.m_iLineNumber); 523 523 break; 524 524 … … 675 675 m_strPath.c_str(), 676 676 ResourceType_OtherStorageDevice, 677 i. ulLineNumber, i.strResourceSubType.c_str() );677 i.m_iLineNumber, i.strResourceSubType.c_str() ); 678 678 break; 679 679 } … … 712 712 m_strPath.c_str(), 713 713 i.resourceType, 714 i. ulLineNumber);714 i.m_iLineNumber); 715 715 } 716 716 } … … 757 757 i.ulInstanceID, 758 758 i.ulParent, 759 i. ulLineNumber);759 i.m_iLineNumber); 760 760 761 761 VirtualDisk vd; … … 778 778 i.ulInstanceID, 779 779 i.strHostResource.c_str(), 780 i. ulLineNumber);780 i.m_iLineNumber); 781 781 782 782 vsys.mapVirtualDisks[vd.strDiskId] = vd; … … 891 891 // throw OVFLogicError(N_("Unknown element \"%s\" under Item element, line %d"), 892 892 // pcszItemChildName, 893 // ulLineNumber);893 // m_iLineNumber); 894 894 } 895 895 } … … 900 900 if (resourceType == 0) 901 901 throw OVFLogicError(N_("Empty element ResourceType under %s element, line %d. see DMTF Schema Documentation %s"), 902 name.c_str(), ulLineNumber, DTMF_SPECS_URI);902 name.c_str(), m_iLineNumber, DTMF_SPECS_URI); 903 903 904 904 /* Don't be too uptight about the ulInstanceID value. There are OVAs out … … 913 913 || resourceType == ResourceType_IBHCA ) //?? 914 914 throw OVFLogicError(N_("Element InstanceID is absent under %s element, line %d. see DMTF Schema Documentation %s"), 915 name.c_str(), ulLineNumber, DTMF_SPECS_URI);915 name.c_str(), m_iLineNumber, DTMF_SPECS_URI); 916 916 else 917 917 LogRel(("OVFREADER: Warning: Ignoring missing or invalid ulInstanceID under element %s, line %u\n", 918 name.c_str(), ulLineNumber));918 name.c_str(), m_iLineNumber)); 919 919 } 920 920 } … … 995 995 { 996 996 //throw OVFLogicError(N_("Access type is unknown under %s element, line %d"), 997 // name.c_str(), ulLineNumber);997 // name.c_str(), m_iLineNumber); 998 998 } 999 999 … … 1002 1002 throw OVFLogicError(N_("Element HostResourceBlockSize is absent under %s element, line %d. " 1003 1003 "see DMTF Schema Documentation %s"), 1004 name.c_str(), ulLineNumber, DTMF_SPECS_URI);1004 name.c_str(), m_iLineNumber, DTMF_SPECS_URI); 1005 1005 } 1006 1006 … … 1009 1009 throw OVFLogicError(N_("Element VirtualResourceBlockSize is absent under %s element, line %d. " 1010 1010 "see DMTF Schema Documentation %s"), 1011 name.c_str(), ulLineNumber, DTMF_SPECS_URI);1011 name.c_str(), m_iLineNumber, DTMF_SPECS_URI); 1012 1012 } 1013 1013 … … 1016 1016 throw OVFLogicError(N_("Element VirtualQuantityUnits is absent under %s element, line %d. " 1017 1017 "see DMTF Schema Documentation %s"), 1018 name.c_str(), ulLineNumber, DTMF_SPECS_URI);1018 name.c_str(), m_iLineNumber, DTMF_SPECS_URI); 1019 1019 } 1020 1020 … … 1028 1028 "It's needed to change on \"byte\". " 1029 1029 "see DMTF Schema Documentation %s"), 1030 name.c_str(), ulLineNumber, DTMF_SPECS_URI);1030 name.c_str(), m_iLineNumber, DTMF_SPECS_URI); 1031 1031 } 1032 1032 }
Note:
See TracChangeset
for help on using the changeset viewer.