File: LicenseManager.rst

package info (click to toggle)
python-pyvmomi 6.7.1-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 14,984 kB
  • sloc: python: 9,206; xml: 77; makefile: 9
file content (479 lines) | stat: -rw-r--r-- 13,655 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
.. _str: https://docs.python.org/2/library/stdtypes.html

.. _bool: https://docs.python.org/2/library/stdtypes.html

.. _vim.Task: ../vim/Task.rst

.. _VI API 2.5: ../vim/version.rst#vimversionversion2

.. _AddLicense: ../vim/LicenseManager.rst#addLicense

.. _vim.KeyValue: ../vim/KeyValue.rst

.. _RemoveLicense: ../vim/LicenseManager.rst#removeLicense

.. _vim.HostSystem: ../vim/HostSystem.rst

.. _vSphere API 4.0: ../vim/version.rst#vimversionversion5

.. _SetLicenseEdition: ../vim/LicenseManager.rst#setEdition

.. _vim.fault.InvalidState: ../vim/fault/InvalidState.rst

.. _vim.fault.InvalidLicense: ../vim/fault/InvalidLicense.rst

.. _vmodl.fault.InvalidArgument: ../vmodl/fault/InvalidArgument.rst

.. _vim.LicenseAssignmentManager: ../vim/LicenseAssignmentManager.rst

.. _vmodl.fault.NotEnoughLicenses: ../vmodl/fault/NotEnoughLicenses.rst

.. _vim.LicenseManager.LicenseInfo: ../vim/LicenseManager/LicenseInfo.rst

.. _vim.LicenseManager.FeatureInfo: ../vim/LicenseManager/FeatureInfo.rst

.. _vim.LicenseManager.LicenseSource: ../vim/LicenseManager/LicenseSource.rst

.. _vim.LicenseManager.DiagnosticInfo: ../vim/LicenseManager/DiagnosticInfo.rst

.. _vim.LicenseManager.EvaluationInfo: ../vim/LicenseManager/EvaluationInfo.rst

.. _vim.fault.CannotAccessLocalSource: ../vim/fault/CannotAccessLocalSource.rst

.. _vim.fault.LicenseServerUnavailable: ../vim/fault/LicenseServerUnavailable.rst

.. _vim.LicenseManager.AvailabilityInfo: ../vim/LicenseManager/AvailabilityInfo.rst

.. _vim.LicenseManager.LicenseUsageInfo: ../vim/LicenseManager/LicenseUsageInfo.rst


vim.LicenseManager
==================
  This managed object type controls entitlements for a given VMware platform. VMware platforms include VirtualCenter, ESX Server, VMware Server, Workstation and Player. Entitlements define what software capabilities this host may use.Entitlements are identified by a short string 'key'. Keys can represent either a particular edition (Full, Starter) or a particular feature/function (featureKey) (backup, nas). An edition implies zero one or more functions which are express, denied or optional. For example a 'Full' edition includes 'iscsi' function but a Starter edition might disallow it.Which edition a given VMware platform uses can be defined at any time. Generally this is done right after first install and boot as installation software may not set it. For editions that are similar in nature, any future changes to edition type will only impact future requests for functionality. Current functionality is left unaffected. The same is true for optional functions enabled/disabled after some period of time. For dissimilar editions, such transitions may require entering maintenance mode first else an exception of InvalidState will be thrown.To specify the edition type and any optional functions, use updateLicense for ESX Server and addLicense follow by LicenseAssingmentManager.updateAssignedLicense for VirtualCenter.When an edition is specified for a given host, the cost of that edition (how many licenses are needed) is determined. The cost is computed using the license's CostUnit value multiplied by the number of units activated. For example, when a VMware platform is set to an edition which uses a 'cpuPackage' on a two socket server, two licenses would be needed to successfully install that edition.Here is a diagram of the unit costs supported by this API and their relationships.+------------------------------+ +--------+ +-------+ | +-----------+ +-----------+ | | Server | | Host | | | | | | | +--------+ +-------+ | | cpuCore | | cpuCore | | +-------+ | +-----------+ +-----------+ | +--------+ | Host | | cpuPackage | | VM | +-------+ +------------------------------+ +--------+




Attributes
----------
    source (`vim.LicenseManager.LicenseSource`_):
       Set or return a data object type of LocalLicense or LicenseServer.
    sourceAvailable (`bool`_):
       Current state of the license source. License sources that are LocalSource are always available.
    diagnostics (`vim.LicenseManager.DiagnosticInfo`_):
       Return current diagnostic information.
    featureInfo ([`vim.LicenseManager.FeatureInfo`_]):
       The list of features that can be licensed.
    licensedEdition (`str`_):
       The product's license edition. The edition defines which product license the server requires. This, in turn, determines the core set of functionalities provided by the product and the additional features that can be licensed. If no edition is set the property is set to the empty string (""). To set the edition use `SetLicenseEdition`_ .
    licenses ([`vim.LicenseManager.LicenseInfo`_]):
      privilege: dynamic
       Get information about all the licenses avaiable.
    licenseAssignmentManager (`vim.LicenseAssignmentManager`_):
      privilege: System.View
       License Assignment Manager
    evaluation (`vim.LicenseManager.EvaluationInfo`_):
      privilege: System.Read
       


Methods
-------


QuerySupportedFeatures(host):
   Queries the current license source for a list of available licenses that can be licensed from this system.
  since: `VI API 2.5`_


  Privilege:
               Global.Licenses



  Args:
    host (`vim.HostSystem`_, optional):
       Use the license source of the specified host.




  Returns:
    [`vim.LicenseManager.FeatureInfo`_]:
         


QueryLicenseSourceAvailability(host):
   Queries the current license source for total and available licenses available for each feature known to this system.


  Privilege:
               Global.Licenses



  Args:
    host (`vim.HostSystem`_, optional):
       Use the license source of the specified host.




  Returns:
    [`vim.LicenseManager.AvailabilityInfo`_]:
         


QueryLicenseUsage(host):
   Returns the license usage. The license usage is a list of supported features and the number of licenses that have been reserved.PLATFORM Specific Notes:VirtualCenter - Empty string returns the usage of non-host specific features. Must specify managed host to query. ESX Server - Host argument ignored.


  Privilege:
               System.Read



  Args:
    host (`vim.HostSystem`_, optional):
       Host to query for usage. If missing, query the server the `LicenseManager`_ is on.




  Returns:
    `vim.LicenseManager.LicenseUsageInfo`_:
         


SetLicenseEdition(host, featureKey):
   Defines the product's license edition. The edition defines which product license the server requires. This, in turn, determines the core set of functionality provided by the product and the additional features that can be licensed.To determine what featureKey the current platform will accept, use querySourceAvailablity() at runtime, or consult the documentation for the current platform.


  Privilege:
               Global.Licenses



  Args:
    host (`vim.HostSystem`_, optional):
       Host to act on if LicenseManager is not on a host.


    featureKey (`str`_, optional):
       Name of edition feature to select. If featureKey is not set or set to empty string, the product becomes unlicensed.




  Returns:
    None
         

  Raises:

    `vim.fault.InvalidState`_: 
       If the feature cannot be supported on the platform, potentially because the hardware configuration does not support it.

    `vim.fault.LicenseServerUnavailable`_: 
       If the license server is unavailable.

    `vmodl.fault.InvalidArgument`_: 
       If a feature key is not an edition feature key.


CheckLicenseFeature(host, featureKey):
   Returns whether or not a given feature is enabled.


  Privilege:
               System.Read



  Args:
    host (`vim.HostSystem`_, optional):
       Host to act on if LicenseManager is not on a host.


    featureKey (`str`_):
       Name of the feature to enable.




  Returns:
    `bool`_:
         Returns true if the feature is enabled and false if it is not.

  Raises:

    `vim.fault.InvalidState`_: 
       If the feature cannot be supported on the platform, potentially because the hardware configuration does not support it.

    `vmodl.fault.InvalidArgument`_: 
       If a feature name is not found.


EnableFeature(host, featureKey):
   Enable a feature that has an optional state.


  Privilege:
               Global.Licenses



  Args:
    host (`vim.HostSystem`_, optional):
       Host to act on if LicenseManager is not on a host.


    featureKey (`str`_):
       Name of the feature to enable.




  Returns:
    `bool`_:
         Returns true if enabling the feature was successful, false otherwise.

  Raises:

    `vim.fault.InvalidState`_: 
       If the feature cannot be supported on the platform, potentially because the hardware configuration does not support it.

    `vim.fault.LicenseServerUnavailable`_: 
       If the license server is unavailable.

    `vmodl.fault.InvalidArgument`_: 
       If a feature name is not found or it is not optional.


DisableFeature(host, featureKey):
   Release licenses for an optional feature.


  Privilege:
               Global.Licenses



  Args:
    host (`vim.HostSystem`_, optional):
       Host to act on if LicenseManager is not on a host.


    featureKey (`str`_):
       key of the feature to disable.




  Returns:
    `bool`_:
         Returns true if the feature was disabled and false if not.

  Raises:

    `vim.fault.InvalidState`_: 
       If the feature is in use.

    `vim.fault.LicenseServerUnavailable`_: 
       If the license server is unavailable.

    `vmodl.fault.InvalidArgument`_: 
       If a feature name is not found or it is not optional.


ConfigureLicenseSource(host, licenseSource):
   Allows for reconfiguration of the License Manager license source.This changes the licensing source to be either served or local. Before changing the license source location, the API checks the number of licenses available at the new potential source to ensure there are at least as many licenses there as have been issued by the current source. If there are an equal or greater number of licenses at the new source, all licenses on the current source are released and then reacquired from the new source. If there are not enough licenses available on the new source to reissue all licenses, the operation fails.This is used to configure the license source on an individual host.PLATFORM Specific Notes:VirtualCenter - only supports a served source. the host parameter is mandatory. ESX Server - the host parameter is optional.


  Privilege:
               Global.Licenses



  Args:
    host (`vim.HostSystem`_, optional):
       Host for which the license manager should be reconfigured.


    licenseSource (`vim.LicenseManager.LicenseSource`_):
       ServedSource or LocalSource.




  Returns:
    None
         

  Raises:

    `vim.fault.CannotAccessLocalSource`_: 
       if the local source cannot be accessed.

    `vim.fault.InvalidLicense`_: 
       if the new license source is LocalLicenseSource and the license file is not valid.

    `vim.fault.LicenseServerUnavailable`_: 
       if the license server is unreachable.

    `vmodl.fault.NotEnoughLicenses`_: 
       if the new license source does not have enough licenses.


UpdateLicense(licenseKey, labels):
   Updates the available licenses to the one provided in licenseKey. This is the same as removing all the licenses using `RemoveLicense`_ and adding licenseKey using `AddLicense`_ If the optional parameter labels is specify this is the same as calling updateLicense without the optioal parameter and calling updateLabel for each pair in the labels array.
  since: `vSphere API 4.0`_


  Privilege:
               Global.Licenses



  Args:
    licenseKey (`str`_):
       A license. E.g. a serial license.


    labels (`vim.KeyValue`_, optional):
       array of key-value labels.




  Returns:
    `vim.LicenseManager.LicenseInfo`_:
         Returns information about the license specified in licenseKey.


AddLicense(licenseKey, labels):
   Adds a license to the inventory of available licenses.
  since: `vSphere API 4.0`_


  Privilege:
               Global.Licenses



  Args:
    licenseKey (`str`_):
       A license. E.g. a serial license.


    labels (`vim.KeyValue`_, optional):
       array of key-value labels. Ignored by ESX Server.




  Returns:
    `vim.LicenseManager.LicenseInfo`_:
         Returns information about the license specified in licenseKey.


RemoveLicense(licenseKey):
   Remove license from the available set.
  since: `vSphere API 4.0`_


  Privilege:
               Global.Licenses



  Args:
    licenseKey (`str`_):
       A licenses. E.g. a serial license.




  Returns:
    None
         


DecodeLicense(licenseKey):
   Decodes licensing information on the license specified.
  since: `vSphere API 4.0`_


  Privilege:
               Global.Licenses



  Args:
    licenseKey (`str`_):
       A license. E.g. a serial license.




  Returns:
    `vim.LicenseManager.LicenseInfo`_:
         Returns information about the license specified in licenseKey.


UpdateLicenseLabel(licenseKey, labelKey, labelValue):
   Update a license's label. It creates a label entry if the labelKey doesn't already exist
  since: `vSphere API 4.0`_


  Privilege:
               Global.Licenses



  Args:
    licenseKey (`str`_):
       A license.


    labelKey (`str`_):
       A label key.


    labelValue (`str`_):
       Value for the label.




  Returns:
    None
         


RemoveLicenseLabel(licenseKey, labelKey):
   Removed a license's label.
  since: `vSphere API 4.0`_


  Privilege:
               Global.Licenses



  Args:
    licenseKey (`str`_):
       A license.


    labelKey (`str`_):
       A label key.




  Returns:
    None