Changeset 74886 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- Oct 17, 2018 3:21:01 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/ApplianceImplExport.cpp
r74873 r74886 659 659 i_parseURI(aPath, m->locInfo); 660 660 661 /** @todo r=klaus all of this code should be made fully generic, applicable 662 * to any cloud provider. This implies changing the method names accordingly 663 * and (more importantly) moving all the cloud specific checking code to the 664 * actual ICloudClient implementation in the corresponding extpack. It will 665 * move the check to the async task, but that's a bearable cost, not getting 666 * the error straight from the API call but a tiny bit later through the 667 * Progress object. */ 661 668 if (m->locInfo.storageType == VFSType_OCI)//(isCloudDestination(aPath)) 662 669 { … … 857 864 try 858 865 { 866 /** @todo r=klaus all of this code should be made fully generic, 867 * doing only what is common for all cloud providers, i.e. pretty 868 * much nothing. The logic and data types need to be moved to the 869 * extension pack, anything else will not work. */ 870 859 871 //remove all disks from the VirtualSystemDescription exept one 860 872 for (list<ComObjPtr<VirtualSystemDescription> >::const_iterator … … 875 887 itSkipped = skipped.begin(); 876 888 877 ComObjPtr<Medium> ptrSourceDisk;889 Utf8Str strBootLocation; 878 890 while (itSkipped != skipped.end()) 879 891 { 880 Utf8Str path = (*itSkipped)->strVBoxCurrent; 881 // Locate the Medium object for this entry (by location/path). 882 Log(("Finding source disk \"%s\"\n", path.c_str())); 883 rc = mVirtualBox->i_findHardDiskByLocation(path, true , &ptrSourceDisk); 884 if (SUCCEEDED(rc)) 885 break; 892 if (strBootLocation.isEmpty()) 893 strBootLocation = (*itSkipped)->strVBoxCurrent; 886 894 else 887 ++itSkipped;888 }889 890 ComPtr<IMedium> pBootableBaseMedium;891 // returns pBootableMedium if there are no diff images892 rc = ptrSourceDisk->COMGETTER(Base)(pBootableBaseMedium.asOutParam());893 if (FAILED(rc))894 throw rc;895 896 //Get base bootable disk location897 Bstr bstrBootLocation;898 rc = pBootableBaseMedium->COMGETTER(Location)(bstrBootLocation.asOutParam());899 if (FAILED(rc)) throw rc;900 Utf8Str strBootLocation = bstrBootLocation;901 902 skipped = vsdescThis->i_findByType(VirtualSystemDescriptionType_HardDiskImage);903 itSkipped = skipped.begin();904 while (itSkipped != skipped.end())905 {906 Utf8Str path = (*itSkipped)->strVBoxCurrent;907 // Locate the Medium object for this entry (by location/path).908 Log(("Finding disk \"%s\"\n", path.c_str()));909 ComObjPtr<Medium> ptrDisk;910 rc = mVirtualBox->i_findHardDiskByLocation(path, true , &ptrDisk);911 if (FAILED(rc))912 throw rc;913 914 if (!path.equalsIgnoreCase(strBootLocation))915 895 (*itSkipped)->skipIt = true; 916 917 896 ++itSkipped; 918 897 }
Note:
See TracChangeset
for help on using the changeset viewer.