VirtualBox

Ignore:
Timestamp:
Aug 16, 2018 3:58:57 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
124395
Message:

Main/CloudProviderManager+CloudProvider+CloudProfile: Introduce CloudProfile as separate interface, and do a big cleanup. Adding synchronization and incomplete support for moving to an extension pack. Updated VBoxManage to list providers and touched up the GUI code slightly to deal with the changed interfaces.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r73664 r73716  
    19541954  <interface
    19551955    name="IVirtualBox" extends="$unknown"
    1956     uuid="9570b9d5-f1a1-448a-10c5-e12f5285adad"
     1956    uuid="176b85cd-4bc2-453e-9228-f408c5282267"
    19571957    wsmap="managed"
    19581958    reservedMethods="7" reservedAttributes="12"
     
    21652165    </attribute>
    21662166
     2167    <attribute name="cloudProviderManager" type="ICloudProviderManager" readonly="yes">
     2168      <desc>
     2169        The cloud provider manager (singleton).
     2170      </desc>
     2171    </attribute>
     2172
    21672173    <method name="composeMachineFilename">
    21682174      <desc>
     
    24482454      <param name="unattended" type="IUnattended" dir="return">
    24492455        <desc>New unattended object.</desc>
    2450       </param>
    2451     </method>
    2452 
    2453     <method name="createCloudProviderManager">
    2454       <desc>
    2455         Creates a new cloud provider manager object
    2456       </desc>
    2457       <param name="manager" type="ICloudProviderManager" dir="return">
    2458         <desc>New cloud user profile manager</desc>
    24592456      </param>
    24602457    </method>
     
    2486524862
    2486624863  <enum
    24867     name="CloudProviderId"
    24868     uuid="c3856743-aa5d-404d-847d-14b6cf523677"
    24869     >
    24870     <const name="Unknown" value="0"/>
    24871     <const name="OCI" value="1"/>
    24872     <const name="GCP" value="2"/>
    24873     <const name="AWS" value="3"/>
    24874     <const name="MicrosoftAzure" value="4"/>
    24875     <const name="IBMCloud" value="5"/>
    24876     <const name="DigitalOcean" value="6"/>
    24877   </enum>
    24878 
    24879   <enum
    2488024864    name="CloudCommand"
    2488124865    uuid="1c5cfa19-7754-4071-bf3e-6d21ad432655"
     
    2511025094
    2511125095  <!--
    25112   // ICloudProvider
     25096  // ICloudProfile
    2511325097  //////////////////////////////////////////////////////////////////////////
    2511425098  -->
    2511525099
    2511625100  <interface
    25117     name="ICloudProvider" extends="$unknown"
    25118     uuid="cfadfecb-ef89-41a9-abbd-9772d41baddb"
     25101    name="ICloudProfile" extends="$unknown"
     25102    uuid="011d1e9a-a48b-4d15-91a0-6101b087155c"
    2511925103    wsmap="managed" reservedMethods="4" reservedAttributes="4"
    2512025104    >
    25121     <method name="getProvider">
    25122       <desc>
    25123         Returns provider Id tied with these profiles
    25124       </desc>
    25125       <param name="provider" type="CloudProviderId" dir="return">
    25126       </param>
    25127     </method>
    25128 
    25129     <method name="createProfile">
    25130       <desc>
    25131         Creates an empty profile
    25132       </desc>
    25133       <param name="profileName" type="wstring" dir="in">
    25134         <desc>
    25135           The profile's name
    25136         </desc>
    25137       </param>
    25138       <param name="names" type="wstring" safearray="yes" dir="in">
    25139         <desc>Names of properties.</desc>
    25140       </param>
    25141       <param name="values" type="wstring" safearray="yes" dir="in">
    25142         <desc>Values of set properties.</desc>
    25143       </param>
    25144     </method>
    25145 
    25146     <method name="updateProfile">
    25147       <desc>
    25148         Updates active profile in memory
    25149       </desc>
    25150       <param name="profileName" type="wstring" dir="in">
    25151         <desc>
    25152           The profile's name
    25153         </desc>
    25154       </param>
    25155       <param name="names" type="wstring" safearray="yes" dir="in">
    25156         <desc>Names of properties.</desc>
    25157       </param>
    25158       <param name="values" type="wstring" safearray="yes" dir="in">
    25159         <desc>Values of set properties.</desc>
    25160       </param>
    25161     </method>
    25162 
    25163     <method name="getStoredProfilesNames" const="yes">
    25164       <desc>
    25165         Returns the names\IDs for the existing profiles in one call.
    25166       </desc>
    25167       <param name="profilesNames" type="wstring" safearray="yes" dir="return">
    25168         <desc>Names of the existing profiles.</desc>
    25169       </param>
    25170     </method>
    25171 
    25172     <method name="getProfileProperties" const="yes">
    25173       <desc>
    25174         Returns values for a profile's properties in one call.
    25175 
    25176         The list of all properties supported by the given profile.
     25105
     25106    <attribute name="name" type="wstring" readonly="yes">
     25107      <desc>
     25108        Returns the profile name.
     25109      </desc>
     25110    </attribute>
     25111
     25112    <attribute name="providerId" type="uuid" mod="string" readonly="yes">
     25113      <desc>
     25114        Returns provider identifier tied with this profile.
     25115      </desc>
     25116    </attribute>
     25117
     25118    <attribute name="supportedPropertyNames" type="wstring" safearray="yes" readonly="yes">
     25119      <desc>
     25120        Returns the supported property names.
     25121      </desc>
     25122    </attribute>
     25123
     25124    <method name="getProperty" const="yes">
     25125      <desc>
     25126        Returns the value of the cloud profile property with the given name.
     25127
     25128        If the requested data @a name does not exist, this function will
     25129        succeed and return an empty string in the @a value argument.
     25130
     25131        <result name="E_INVALIDARG">@a name is @c null or empty.</result>
     25132      </desc>
     25133      <param name="name" type="wstring" dir="in">
     25134        <desc>Name of the property to get.</desc>
     25135      </param>
     25136      <param name="value" type="wstring" dir="return">
     25137        <desc>Current property value.</desc>
     25138      </param>
     25139    </method>
     25140
     25141    <method name="setProperty" const="yes">
     25142      <desc>
     25143        Sets the value of the cloud profile property with the given name.
     25144
     25145        Setting the property value to @c null or an empty string is equivalent
     25146        to deleting the existing value.
     25147
     25148        <result name="E_INVALIDARG">@a name is @c null or empty.</result>
     25149      </desc>
     25150      <param name="name" type="wstring" dir="in">
     25151        <desc>Name of the property to set.</desc>
     25152      </param>
     25153      <param name="value" type="wstring" dir="in">
     25154        <desc>Property value to set.</desc>
     25155      </param>
     25156    </method>
     25157
     25158    <method name="getProperties" const="yes">
     25159      <desc>
     25160        Returns values for a group of properties in one call.
     25161
     25162        The names of the properties to get are specified using the @a names
     25163        argument which is a list of comma-separated property names or
     25164        an empty string if all properties are to be returned.
     25165        <note>Currently the value of this argument is ignored and the method
     25166        always returns all existing properties.</note>
    2517725167
    2517825168        The method returns two arrays, the array of property names corresponding
     
    2518125171        given index in the first array corresponds to an element at the same
    2518225172        index in the second array.
    25183 
    25184         For properties that do not have assigned values, an empty string is
    25185         returned at the appropriate index in the @a returnValues array.
    25186 
    25187       </desc>
    25188       <param name="profileName" type="wstring" dir="in">
    25189         <desc>
    25190           Name of profile.
     25173      </desc>
     25174      <param name="names" type="wstring" dir="in">
     25175        <desc>
     25176          Names of properties to get.
    2519125177        </desc>
    2519225178      </param>
     
    2519925185    </method>
    2520025186
     25187    <method name="setProperties">
     25188      <desc>
     25189        Updates profile, changing/adding/removing properties.
     25190
     25191        The names of the properties to set are passed in the @a names
     25192        array along with the new values for them in the @a values array. Both
     25193        arrays have the same number of elements with each element at the given
     25194        index in the first array corresponding to an element at the same index
     25195        in the second array.
     25196
     25197        If there is at least one property name in @a names that is not valid,
     25198        the method will fail before changing the values of any other properties
     25199        from the @a names array.
     25200
     25201        Using this method over <link to="#setProperty"/> is preferred if you
     25202        need to set several properties at once since it is more efficient.
     25203
     25204        Setting the property value to @c null or an empty string is equivalent
     25205        to deleting the existing value.
     25206      </desc>
     25207      <param name="names" type="wstring" safearray="yes" dir="in">
     25208        <desc>Names of properties.</desc>
     25209      </param>
     25210      <param name="values" type="wstring" safearray="yes" dir="in">
     25211        <desc>Values of set properties.</desc>
     25212      </param>
     25213    </method>
     25214
     25215    <!--- @todo r=klaus Is this the best placement of this method? To me it's
     25216         not obvious that it processes the object's state at all, and could be
     25217         moved up to ICloudProvider unless there's any chance that the
     25218         description changes with the profile. -->
    2520125219    <method name="getPropertyDescription" const="yes">
    2520225220      <param name="name" type="wstring" dir="in">
    25203         <desc>Property name</desc>
     25221        <desc>Property name.</desc>
    2520425222      </param>
    2520525223      <param name="description" type="wstring" dir="return">
    25206         <desc>Property description</desc>
     25224        <desc>Property description.</desc>
    2520725225      </param>
    2520825226    </method>
     
    2521025228    <method name="createCloudClient">
    2521125229      <desc>
    25212         Creates a cloud client for this cloud provider
     25230        Creates a cloud client for this cloud profile.
     25231      </desc>
     25232      <param name="cloudClient" type="ICloudClient" dir="return">
     25233        <desc>
     25234          The cloud client object reference.
     25235        </desc>
     25236      </param>
     25237    </method>
     25238
     25239  </interface>
     25240
     25241  <!--
     25242  // ICloudProvider
     25243  //////////////////////////////////////////////////////////////////////////
     25244  -->
     25245
     25246  <interface
     25247    name="ICloudProvider" extends="$unknown"
     25248    uuid="6e500583-602c-49bc-894d-2f53b8e371e9"
     25249    wsmap="managed" reservedMethods="4" reservedAttributes="4"
     25250    >
     25251
     25252    <attribute name="name" type="wstring" readonly="yes">
     25253      <desc>Returns the long name of the provider. Includes vendor and precise
     25254        product name spelled out in the preferred way.</desc>
     25255    </attribute>
     25256
     25257    <attribute name="shortName" type="wstring" readonly="yes">
     25258      <desc>Returns the short name of the provider. Less than 8 ASCII chars,
     25259        using acronyms. No vendor name, but can contain a hint if it's a 3rd
     25260        party implementation for this cloud provider, to keep it unique.</desc>
     25261    </attribute>
     25262
     25263    <attribute name="id" type="uuid" mod="string" readonly="yes">
     25264      <desc>Returns the UUID of this cloud provider.</desc>
     25265    </attribute>
     25266
     25267    <!-- if there are any generally useful, static pieces of information about
     25268         a particular cloud provider, please add them here. Maybe a description
     25269         of the functionality of the cloud provider implementation?-->
     25270
     25271    <attribute name="profiles" type="ICloudProfile" safearray="yes" readonly="yes">
     25272      <desc>Returns all profiles for this cloud provider.</desc>
     25273    </attribute>
     25274
     25275    <attribute name="profileNames" type="wstring" safearray="yes" readonly="yes">
     25276      <desc>Returns all profile names for this cloud provider.</desc>
     25277    </attribute>
     25278
     25279    <method name="createProfile">
     25280      <desc>
     25281        Creates a new profile.
    2521325282      </desc>
    2521425283      <param name="profileName" type="wstring" dir="in">
    25215       </param>
    25216       <param name="cloudClient" type="ICloudClient" dir="return">
    25217         <desc>
    25218           returns interface to the cloud client object
    25219         </desc>
    25220       </param>
     25284        <desc>
     25285          The profile name. Must not exist, otherwise an error is raised.
     25286        </desc>
     25287      </param>
     25288      <param name="names" type="wstring" safearray="yes" dir="in">
     25289        <desc>Names of properties.</desc>
     25290      </param>
     25291      <param name="values" type="wstring" safearray="yes" dir="in">
     25292        <desc>Values of set properties.</desc>
     25293      </param>
     25294    </method>
     25295
     25296    <method name="getProfileByName">
     25297      <param name="profileName" type="wstring" dir="in"/>
     25298      <param name="profile" type="ICloudProfile" dir="return"/>
    2522125299    </method>
    2522225300
     
    2522925307  <interface
    2523025308    name="ICloudProviderManager" extends="$unknown"
    25231     uuid="64e276a7-cfd1-48ed-aad3-19368197f3b2"
     25309    uuid="95533d5b-20ec-4089-b461-f2794c9512df"
    2523225310    wsmap="managed" reservedMethods="4" reservedAttributes="4"
    2523325311    >
    2523425312
    25235     <attribute name="supportedProviders" type="wstring" readonly="yes" safearray="yes">
    25236       <desc>Returns a predefined list of all supported cloud providers.</desc>
    25237     </attribute>
    25238 
    25239     <method name="getAllProfiles" const="yes">
    25240       <desc>
    25241         Returns the list of the ICloudProvider in one call.
    25242       </desc>
    25243       <param name="profileList" type="ICloudProvider" safearray="yes" dir="return">
    25244         <desc>Returns the list of ICloudProvider.</desc>
    25245       </param>
    25246     </method>
    25247 
    25248     <method name="getProfilesByProvider" const="yes">
    25249       <desc>
    25250         Returns the ICloudProvider for the particular provider.
    25251       </desc>
    25252       <param name="providerName" type="wstring" dir="in">
    25253       </param>
    25254       <param name="profile" type="ICloudProvider" dir="return">
    25255         <desc>Returns the ICloudProvider.</desc>
    25256       </param>
     25313    <attribute name="providers" type="ICloudProvider" safearray="yes" readonly="yes">
     25314      <desc>Returns all supported cloud providers.</desc>
     25315    </attribute>
     25316
     25317    <method name="getProviderById">
     25318      <param name="providerId" type="uuid" mod="string" dir="in"/>
     25319      <param name="provider" type="ICloudProvider" dir="return"/>
     25320    </method>
     25321
     25322    <method name="getProviderByShortName">
     25323      <param name="providerName" type="wstring" dir="in"/>
     25324      <param name="provider" type="ICloudProvider" dir="return"/>
     25325    </method>
     25326
     25327    <method name="getProviderByName">
     25328      <param name="providerName" type="wstring" dir="in"/>
     25329      <param name="provider" type="ICloudProvider" dir="return"/>
    2525725330    </method>
    2525825331
    2525925332  </interface>
     25333
    2526025334
    2526125335  <module name="VBoxSVC" context="LocalServer">
Note: See TracChangeset for help on using the changeset viewer.

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