Changeset 79797 in vbox
- Timestamp:
- Jul 15, 2019 3:39:19 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 132164
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageCloud.cpp
r79727 r79797 255 255 AssertRCReturn(vrc, RTEXITCODE_FAILURE); 256 256 257 com::SafeArray<CloudImageState_T> imageStates; 258 257 259 Utf8Str strCompartmentId; 258 Utf8Str strState;259 260 int c; 260 261 while ((c = RTGetOpt(&GetState, &ValueUnion)) != 0) … … 265 266 strCompartmentId = ValueUnion.psz; 266 267 break; 268 267 269 case 's': 268 strState = ValueUnion.psz; 269 break; 270 case VINF_GETOPT_NOT_OPTION: 271 return errorUnknownSubcommand(ValueUnion.psz); 272 default: 273 return errorGetOpt(c, &ValueUnion); 274 } 275 } 276 277 com::SafeArray<CloudImageState_T> imageStates; 278 if (strState.isNotEmpty()) 279 { 280 if (strState.equals("available")) 281 imageStates.push_back(CloudImageState_Available); 282 else if (strState.equals("disabled")) 283 imageStates.push_back(CloudImageState_Disabled); 284 else if (strState.equals("deleted")) 285 imageStates.push_back(CloudImageState_Deleted); 286 else if (strState.equals("exporting")) 287 imageStates.push_back(CloudImageState_Exporting); 288 else if (strState.equals("importing")) 289 imageStates.push_back(CloudImageState_Importing); 290 } 270 { 271 const char * const pszState = ValueUnion.psz; 272 273 if (RTStrICmp(pszState, "available") == 0) 274 imageStates.push_back(CloudImageState_Available); 275 else if (RTStrICmp(pszState, "deleted") == 0) 276 imageStates.push_back(CloudImageState_Deleted); 277 else if (RTStrICmp(pszState, "disabled") == 0) 278 imageStates.push_back(CloudImageState_Disabled); 279 else if (RTStrICmp(pszState, "exporting") == 0) 280 imageStates.push_back(CloudImageState_Exporting); 281 else if (RTStrICmp(pszState, "importing") == 0) 282 imageStates.push_back(CloudImageState_Importing); 283 else if (RTStrICmp(pszState, "provisioning") == 0) 284 imageStates.push_back(CloudImageState_Provisioning); 285 else 286 return errorArgument("Unknown cloud image state \"%s\"", pszState); 287 break; 288 } 289 290 case VINF_GETOPT_NOT_OPTION: 291 return errorUnknownSubcommand(ValueUnion.psz); 292 293 default: 294 return errorGetOpt(c, &ValueUnion); 295 } 296 } 297 291 298 292 299 HRESULT hrc = S_OK; 293 300 ComPtr<IVirtualBox> pVirtualBox = a->virtualBox; 301 294 302 ComPtr<ICloudProviderManager> pCloudProviderManager; 295 303 CHECK_ERROR2_RET(hrc, pVirtualBox, 296 304 COMGETTER(CloudProviderManager)(pCloudProviderManager.asOutParam()), 297 305 RTEXITCODE_FAILURE); 306 298 307 ComPtr<ICloudProvider> pCloudProvider; 299 300 308 CHECK_ERROR2_RET(hrc, pCloudProviderManager, 301 309 GetProviderByShortName(Bstr(pCommonOpts->provider.pszProviderName).raw(), pCloudProvider.asOutParam()), 302 310 RTEXITCODE_FAILURE); 311 303 312 ComPtr<ICloudProfile> pCloudProfile; 304 305 313 CHECK_ERROR2_RET(hrc, pCloudProvider, 306 314 GetProfileByName(Bstr(pCommonOpts->profile.pszProfileName).raw(), pCloudProfile.asOutParam()), 307 315 RTEXITCODE_FAILURE); 316 308 317 if (strCompartmentId.isNotEmpty()) 309 318 {
Note:
See TracChangeset
for help on using the changeset viewer.