Changeset 91157 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- Sep 8, 2021 2:24:32 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h
r91154 r91157 349 349 /* VBoxManageCloudMachine.cpp */ 350 350 RTEXITCODE handleCloudMachine(HandlerArg *a, int iFirst, 351 const char *p szProviderName,352 const char *p szProfileName);351 const char *pcszProviderName, 352 const char *pcszProfileName); 353 353 RTEXITCODE listCloudMachines(HandlerArg *a, int iFirst, 354 const char *pszProviderName, 355 const char *pszProfileName); 354 const char *pcszProviderName, 355 const char *pcszProfileName); 356 RTEXITCODE handleCloudShowVMInfo(HandlerArg *a, int iFirst, 357 const char *pcszProviderName, 358 const char *pcszProfileName); 356 359 357 360 /* VBoxManageUpdateCheck.cpp */ -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageCloud.cpp
r91154 r91157 2824 2824 kCloud_Network, 2825 2825 kCloud_Object, 2826 kCloud_ShowVMInfo, 2826 2827 kCloud_Volume, 2827 2828 }; … … 2839 2840 { "network", kCloud_Network, RTGETOPT_REQ_NOTHING }, 2840 2841 { "object", kCloud_Object, RTGETOPT_REQ_NOTHING }, 2842 { "showvminfo", kCloud_ShowVMInfo, RTGETOPT_REQ_NOTHING }, 2841 2843 { "volume", kCloud_Volume, RTGETOPT_REQ_NOTHING }, 2842 2844 }; … … 2879 2881 #endif /* VBOX_WITH_CLOUD_NET */ 2880 2882 2883 /* "cloud machine ..." handling is in VBoxManageCloudMachine.cpp */ 2881 2884 case kCloud_Machine: 2882 2885 return handleCloudMachine(a, GetState.iNext, … … 2884 2887 commonOpts.profile.pszProfileName); 2885 2888 2889 /* ... including aliases that mimic the local vm commands */ 2890 case kCloud_ShowVMInfo: 2891 return handleCloudShowVMInfo(a, GetState.iNext, 2892 commonOpts.provider.pszProviderName, 2893 commonOpts.profile.pszProfileName); 2894 2886 2895 case VINF_GETOPT_NOT_OPTION: 2887 2896 return errorUnknownSubcommand(ValueUnion.psz); -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageCloudMachine.cpp
r91156 r91157 70 70 * in handleCloud). 71 71 */ 72 static int 73 getCloudProfile(ComPtr<ICloudProfile> &aProfile, 74 HandlerArg *a, 75 const char *pcszProviderName, 76 const char *pcszProfileName) 77 { 78 int rc; 79 80 ComPtr<ICloudProvider> pProvider; 81 rc = selectCloudProvider(pProvider, a->virtualBox, pcszProviderName); 82 if (RT_FAILURE(rc)) 83 return rc; 84 85 ComPtr<ICloudProfile> pProfile; 86 rc = selectCloudProfile(pProfile, pProvider, pcszProfileName); 87 if (RT_FAILURE(rc)) 88 return rc; 89 90 aProfile = pProfile; 91 return VINF_SUCCESS; 92 } 93 94 72 95 RTEXITCODE 73 96 handleCloudMachine(HandlerArg *a, int iFirst, … … 75 98 const char *pcszProfileName) 76 99 { 77 int rc;78 79 ComPtr<ICloudProvider> pProvider;80 rc = selectCloudProvider(pProvider, a->virtualBox, pcszProviderName);81 if (RT_FAILURE(rc))82 return RTEXITCODE_FAILURE;83 84 100 ComPtr<ICloudProfile> pProfile; 85 rc = selectCloudProfile(pProfile, pProvider, pcszProfileName);101 int rc = getCloudProfile(pProfile, a, pcszProviderName, pcszProfileName); 86 102 if (RT_FAILURE(rc)) 87 103 return RTEXITCODE_FAILURE; … … 528 544 529 545 /* 546 * cloud showvminfo "id" 547 * 548 * Alias for "cloud machine info" that tries to match the local vm 549 * counterpart. 550 */ 551 RTEXITCODE 552 handleCloudShowVMInfo(HandlerArg *a, int iFirst, 553 const char *pcszProviderName, 554 const char *pcszProfileName) 555 { 556 ComPtr<ICloudProfile> pProfile; 557 int rc = getCloudProfile(pProfile, a, pcszProviderName, pcszProfileName); 558 if (RT_FAILURE(rc)) 559 return RTEXITCODE_FAILURE; 560 561 return handleCloudMachineInfo(a, iFirst, pProfile); 562 } 563 564 565 /* 530 566 * cloud machine info "id" ... 531 567 */
Note:
See TracChangeset
for help on using the changeset viewer.