Changeset 79033 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- Jun 7, 2019 9:22:06 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageCloud.cpp
r78841 r79033 183 183 com::SafeArray<BSTR> arrayVMIds; 184 184 ComPtr<IProgress> pProgress; 185 186 RTPrintf("Getting a list of available cloud instances...\n"); 185 com::SafeArray<CloudMachineState_T> machimeStates; 186 187 187 RTPrintf("Reply is in the form \'instance name\' = \'instance id\'\n"); 188 188 189 CHECK_ERROR2_RET(hrc, oCloudClient, 189 ListInstances(C loudMachineState_Running,190 ListInstances(ComSafeArrayAsInParam(machimeStates), 190 191 pVMNamesHolder.asOutParam(), 191 192 pVMIdsHolder.asOutParam(), … … 202 203 RTEXITCODE_FAILURE); 203 204 204 RTPrintf("List of runninginstances for the cloud profile \'%ls\' \nand compartment \'%s\':\n",205 RTPrintf("List of instances for the cloud profile \'%ls\' \nand compartment \'%s\':\n", 205 206 bstrProfileName.raw(), strCompartmentId.c_str()); 206 207 size_t cIds = arrayVMIds.size(); … … 212 213 value = arrayVMIds[k]; 213 214 RTPrintf("\t%ls = %ls\n", arrayVMNames[k], value.raw()); 214 }215 216 pVMNamesHolder.setNull();217 pVMIdsHolder.setNull();218 arrayVMNames.setNull();219 arrayVMIds.setNull();220 pProgress.setNull();221 CHECK_ERROR2_RET(hrc, oCloudClient,222 ListInstances(CloudMachineState_Stopped,223 pVMNamesHolder.asOutParam(),224 pVMIdsHolder.asOutParam(),225 pProgress.asOutParam()),226 RTEXITCODE_FAILURE);227 showProgress(pProgress);228 CHECK_PROGRESS_ERROR_RET(pProgress, ("Failed to list instances"), RTEXITCODE_FAILURE);229 230 CHECK_ERROR2_RET(hrc,231 pVMNamesHolder, COMGETTER(Values)(ComSafeArrayAsOutParam(arrayVMNames)),232 RTEXITCODE_FAILURE);233 CHECK_ERROR2_RET(hrc,234 pVMIdsHolder, COMGETTER(Values)(ComSafeArrayAsOutParam(arrayVMIds)),235 RTEXITCODE_FAILURE);236 237 RTPrintf("List of paused instances for the cloud profile \'%ls\' \nand compartment \'%s\':\n",238 bstrProfileName.raw(), strCompartmentId.c_str());239 cNames = arrayVMNames.size();240 cIds = arrayVMIds.size();241 for (size_t k = 0; k < cNames; k++)242 {243 Bstr value;244 if (k < cIds)245 value = arrayVMIds[k];246 RTPrintf("\t%ls=%ls\n", arrayVMNames[k], value.raw());247 215 } 248 216
Note:
See TracChangeset
for help on using the changeset viewer.