Changeset 79062 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- Jun 10, 2019 11:38:45 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageCloud.cpp
r79057 r79062 141 141 if (strState.isNotEmpty()) 142 142 { 143 if (strState.equals("run "))143 if (strState.equals("running")) 144 144 machimeStates.push_back(CloudMachineState_Running); 145 else if (strState.equals(" stop"))145 else if (strState.equals("paused")) 146 146 machimeStates.push_back(CloudMachineState_Stopped); 147 else if (strState.equals("terminate "))147 else if (strState.equals("terminated")) 148 148 machimeStates.push_back(CloudMachineState_Terminated); 149 149 } … … 247 247 static const RTGETOPTDEF s_aOptions[] = 248 248 { 249 { "--compartment-id", 'c', RTGETOPT_REQ_STRING } 249 { "--compartment-id", 'c', RTGETOPT_REQ_STRING }, 250 { "--state", 's', RTGETOPT_REQ_STRING } 250 251 }; 251 252 RTGETOPTSTATE GetState; … … 255 256 256 257 Utf8Str strCompartmentId; 258 Utf8Str strState; 257 259 int c; 258 260 while ((c = RTGetOpt(&GetState, &ValueUnion)) != 0) … … 261 263 { 262 264 case 'c': 263 strCompartmentId = ValueUnion.psz; 265 strCompartmentId = ValueUnion.psz; 266 break; 267 case 's': 268 strState = ValueUnion.psz; 264 269 break; 265 270 case VINF_GETOPT_NOT_OPTION: … … 268 273 return errorGetOpt(c, &ValueUnion); 269 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); 270 286 } 271 287 … … 324 340 RTPrintf("Reply is in the form \'image name\' = \'image id\'\n"); 325 341 CHECK_ERROR2_RET(hrc, oCloudClient, 326 ListImages(C loudImageState_Available,342 ListImages(ComSafeArrayAsInParam(imageStates), 327 343 pVMNamesHolder.asOutParam(), 328 344 pVMIdsHolder.asOutParam(), … … 339 355 RTEXITCODE_FAILURE); 340 356 341 RTPrintf("List of availableimages for the cloud profile \'%ls\' \nand compartment \'%s\':\n",357 RTPrintf("List of images for the cloud profile \'%ls\' \nand compartment \'%s\':\n", 342 358 bstrProfileName.raw(), strCompartmentId.c_str()); 343 359 size_t cNames = arrayVMNames.size();
Note:
See TracChangeset
for help on using the changeset viewer.