VirtualBox

Changeset 79727 in vbox


Ignore:
Timestamp:
Jul 12, 2019 11:37:46 AM (6 years ago)
Author:
vboxsync
Message:

bugre:9481. OCICloudClient::getImageInfo(): removed the parameter "const std::vector<com::Utf8Str> &aParameters". It's not needed for now. OCICloudClient::importImage(): added the parameter "const com::Utf8Str &aUid" - OCI image id. It's better than pass the image id in the "const std::vector<com::Utf8Str> &aParameters".

Location:
trunk/src/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageCloud.cpp

    r79605 r79727  
    138138    }
    139139
    140     com::SafeArray<CloudMachineState_T> machimeStates;
     140    com::SafeArray<CloudMachineState_T> machineStates;
    141141    if (strState.isNotEmpty())
    142142    {
    143143        if (strState.equals("running"))
    144             machimeStates.push_back(CloudMachineState_Running);
     144            machineStates.push_back(CloudMachineState_Running);
    145145        else if (strState.equals("paused"))
    146             machimeStates.push_back(CloudMachineState_Stopped);
     146            machineStates.push_back(CloudMachineState_Stopped);
    147147        else if (strState.equals("terminated"))
    148             machimeStates.push_back(CloudMachineState_Terminated);
     148            machineStates.push_back(CloudMachineState_Terminated);
    149149    }
    150150
     
    204204
    205205    CHECK_ERROR2_RET(hrc, oCloudClient,
    206                      ListInstances(ComSafeArrayAsInParam(machimeStates),
     206                     ListInstances(ComSafeArrayAsInParam(machineStates),
    207207                                   pVMNamesHolder.asOutParam(),
    208208                                   pVMIdsHolder.asOutParam(),
     
    284284        else if (strState.equals("deleted"))
    285285            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);
    286290    }
    287291
     
    878882        { "--bucket-name",    'b', RTGETOPT_REQ_STRING },
    879883        { "--object-name",    'o', RTGETOPT_REQ_STRING },
    880         { "--image-id",       'i', RTGETOPT_REQ_STRING }
     884        { "--id",             'i', RTGETOPT_REQ_STRING }
    881885    };
    882886    RTGETOPTSTATE GetState;
     
    982986    static const RTGETOPTDEF s_aOptions[] =
    983987    {
    984         { "--image-id",       'i', RTGETOPT_REQ_STRING },
     988        { "--id",             'i', RTGETOPT_REQ_STRING },
    985989        { "--bucket-name",    'b', RTGETOPT_REQ_STRING },
    986990        { "--object-name",    'o', RTGETOPT_REQ_STRING }
     
    10051009            case 'i':
    10061010                strImageId=ValueUnion.psz;
    1007                 Bstr(Utf8Str("image-id=").append(ValueUnion.psz)).detachTo(parameters.appendedRaw());
    10081011                break;
    10091012            case 'b':
     
    10271030
    10281031    ComPtr<IVirtualBox> pVirtualBox = a->virtualBox;
    1029     Bstr bstrImageId;
    10301032    ComObjPtr<ICloudClient> oCloudClient;
    10311033    CHECK_ERROR2_RET(hrc, pCloudProfile,
     
    10361038    ComPtr<IProgress> progress;
    10371039    CHECK_ERROR2_RET(hrc, oCloudClient,
    1038                      ImportImage(pVirtualBox, ComSafeArrayAsInParam(parameters), progress.asOutParam()),
     1040                     ImportImage(Bstr(strImageId.c_str()).raw(), pVirtualBox, ComSafeArrayAsInParam(parameters), progress.asOutParam()),
    10391041                     RTEXITCODE_FAILURE);
    10401042    hrc = showProgress(progress);
     
    10601062    static const RTGETOPTDEF s_aOptions[] =
    10611063    {
    1062         { "--image-id", 'i', RTGETOPT_REQ_STRING }
     1064        { "--id", 'i', RTGETOPT_REQ_STRING }
    10631065    };
    10641066    RTGETOPTSTATE GetState;
     
    10941096    RTPrintf("Getting information about the cloud image with id \'%s\'...\n", strImageId.c_str());
    10951097
    1096     com::SafeArray<BSTR> parameters;
    10971098    ComPtr<IStringArray> infoArray;
    10981099    com::SafeArray<BSTR> pStrInfoArray;
     
    11021103    CHECK_ERROR2_RET(hrc, oCloudClient,
    11031104                     GetImageInfo(Bstr(strImageId.c_str()).raw(),
    1104                                   ComSafeArrayAsInParam(parameters),
    11051105                                  infoArray.asOutParam(),
    11061106                                  pProgress.asOutParam()),
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r79676 r79727  
    2606626066  <interface
    2606726067    name="ICloudClient" extends="$unknown"
    26068     uuid="7ec55937-3152-4e06-8192-c3828aadc7ab"
     26068    uuid="949f8c85-c689-40fa-a6b2-14425ccdfc0d"
    2606926069    wsmap="managed" reservedMethods="16" reservedAttributes="8"
    2607026070    >
     
    2626626266        Returns the information about an instance in the Cloud.
    2626726267      </desc>
    26268       <param name="instanceId" type="wstring" dir="in">
    26269         <desc>What to search for. This is the instance ID.</desc>
     26268      <param name="uid" type="wstring" dir="in">
     26269        <desc>The id of instance in the Cloud.</desc>
    2627026270      </param>
    2627126271      <param name="description" type="IVirtualSystemDescription" dir="in">
     
    2628426284      </desc>
    2628526285      <param name="uid" type="wstring" dir="in">
    26286         <desc>the id of instance in the Cloud.</desc>
     26286        <desc>The id of instance in the Cloud.</desc>
    2628726287      </param>
    2628826288      <param name="progress" type="IProgress" dir="return">
     
    2629626296      </desc>
    2629726297      <param name="uid" type="wstring" dir="in">
    26298         <desc>the id of instance in the Cloud.</desc>
     26298        <desc>The id of instance in the Cloud.</desc>
    2629926299      </param>
    2630026300      <param name="progress" type="IProgress" dir="return">
     
    2634726347    <method name="importImage">
    2634826348      <desc>
    26349         Import an existing image in the Cloud into the VirtualBox.
    26350       </desc>
     26349        Import an existing image in the Cloud to the local host.
     26350      </desc>
     26351      <param name="uid" type="wstring" dir="in">
     26352        <desc>the id of image in the Cloud.</desc>
     26353      </param>
    2635126354      <param name="virtualBox" type="IVirtualBox" dir="in">
    2635226355        <desc>Reference to the server-side API root object.</desc>
     
    2636526368      </desc>
    2636626369      <param name="uid" type="wstring" dir="in">
    26367         <desc>the id of image in the Cloud.</desc>
     26370        <desc>The id of image in the Cloud.</desc>
    2636826371      </param>
    2636926372      <param name="progress" type="IProgress" dir="return">
     
    2637626379        Returns the information about an image in the Cloud.
    2637726380      </desc>
    26378       <param name="imageId" type="wstring" dir="in">
    26379         <desc>What to search for. This is the image ID.</desc>
    26380       </param>
    26381       <param name="parameters" type="wstring" dir="in" safearray="yes">
    26382         <desc>Each parameter in the array must be in the form "name=value".</desc>
     26381      <param name="uid" type="wstring" dir="in">
     26382        <desc>The id of image in the Cloud.</desc>
    2638326383      </param>
    2638426384      <param name="infoArray" type="IStringArray" dir="out">
    26385         <desc>Each parameter in the array must be in the form "name=value".</desc>
     26385        <desc>
     26386          An array where the image settings or properties is returned.
     26387          Each parameter in the array must be in the form "name=value".
     26388        </desc>
    2638626389      </param>
    2638726390      <param name="progress" type="IProgress" dir="return">
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette