pulumi-vsphere 4.11.0a1__py3-none-any.whl → 4.11.0a1711033215__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pulumi-vsphere might be problematic. Click here for more details.
- pulumi_vsphere/__init__.py +0 -28
- pulumi_vsphere/_inputs.py +230 -554
- pulumi_vsphere/compute_cluster.py +1477 -747
- pulumi_vsphere/compute_cluster_vm_affinity_rule.py +16 -28
- pulumi_vsphere/datacenter.py +12 -26
- pulumi_vsphere/datastore_cluster.py +350 -154
- pulumi_vsphere/distributed_port_group.py +175 -70
- pulumi_vsphere/distributed_virtual_switch.py +805 -308
- pulumi_vsphere/file.py +24 -16
- pulumi_vsphere/folder.py +7 -7
- pulumi_vsphere/get_compute_cluster.py +4 -0
- pulumi_vsphere/get_compute_cluster_host_group.py +10 -8
- pulumi_vsphere/get_content_library.py +4 -0
- pulumi_vsphere/get_custom_attribute.py +4 -0
- pulumi_vsphere/get_datacenter.py +4 -0
- pulumi_vsphere/get_datastore.py +4 -0
- pulumi_vsphere/get_datastore_cluster.py +4 -0
- pulumi_vsphere/get_datastore_stats.py +12 -4
- pulumi_vsphere/get_distributed_virtual_switch.py +4 -2
- pulumi_vsphere/get_dynamic.py +8 -4
- pulumi_vsphere/get_folder.py +6 -10
- pulumi_vsphere/get_guest_os_customization.py +4 -0
- pulumi_vsphere/get_host.py +4 -0
- pulumi_vsphere/get_host_pci_device.py +12 -4
- pulumi_vsphere/get_host_thumbprint.py +4 -0
- pulumi_vsphere/get_host_vgpu_profile.py +8 -0
- pulumi_vsphere/get_license.py +4 -0
- pulumi_vsphere/get_network.py +4 -0
- pulumi_vsphere/get_policy.py +4 -0
- pulumi_vsphere/get_resource_pool.py +10 -2
- pulumi_vsphere/get_role.py +4 -0
- pulumi_vsphere/get_tag.py +4 -0
- pulumi_vsphere/get_tag_category.py +4 -0
- pulumi_vsphere/get_vapp_container.py +4 -0
- pulumi_vsphere/get_virtual_machine.py +8 -0
- pulumi_vsphere/get_vmfs_disks.py +4 -0
- pulumi_vsphere/guest_os_customization.py +0 -50
- pulumi_vsphere/ha_vm_override.py +378 -189
- pulumi_vsphere/host.py +20 -0
- pulumi_vsphere/host_port_group.py +24 -12
- pulumi_vsphere/host_virtual_switch.py +287 -140
- pulumi_vsphere/license.py +32 -0
- pulumi_vsphere/outputs.py +230 -543
- pulumi_vsphere/pulumi-plugin.json +1 -2
- pulumi_vsphere/resource_pool.py +22 -48
- pulumi_vsphere/virtual_machine.py +807 -578
- pulumi_vsphere/virtual_machine_snapshot.py +10 -6
- pulumi_vsphere/vm_storage_policy.py +84 -72
- pulumi_vsphere/vnic.py +20 -8
- {pulumi_vsphere-4.11.0a1.dist-info → pulumi_vsphere-4.11.0a1711033215.dist-info}/METADATA +1 -1
- pulumi_vsphere-4.11.0a1711033215.dist-info/RECORD +82 -0
- pulumi_vsphere/get_host_base_images.py +0 -97
- pulumi_vsphere/offline_software_depot.py +0 -180
- pulumi_vsphere/supervisor.py +0 -858
- pulumi_vsphere/virtual_machine_class.py +0 -440
- pulumi_vsphere-4.11.0a1.dist-info/RECORD +0 -86
- {pulumi_vsphere-4.11.0a1.dist-info → pulumi_vsphere-4.11.0a1711033215.dist-info}/WHEEL +0 -0
- {pulumi_vsphere-4.11.0a1.dist-info → pulumi_vsphere-4.11.0a1711033215.dist-info}/top_level.txt +0 -0
|
@@ -260,6 +260,7 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
|
|
|
260
260
|
then creates an affinity rule for these two virtual machines, ensuring they
|
|
261
261
|
will run on the same host whenever possible.
|
|
262
262
|
|
|
263
|
+
<!--Start PulumiCodeChooser -->
|
|
263
264
|
```python
|
|
264
265
|
import pulumi
|
|
265
266
|
import pulumi_vsphere as vsphere
|
|
@@ -274,7 +275,6 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
|
|
|
274
275
|
vm = []
|
|
275
276
|
for range in [{"value": i} for i in range(0, 2)]:
|
|
276
277
|
vm.append(vsphere.VirtualMachine(f"vm-{range['value']}",
|
|
277
|
-
name=f"foo-{range['value']}",
|
|
278
278
|
resource_pool_id=cluster.resource_pool_id,
|
|
279
279
|
datastore_id=datastore.id,
|
|
280
280
|
num_cpus=1,
|
|
@@ -287,16 +287,17 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
|
|
|
287
287
|
label="disk0",
|
|
288
288
|
size=20,
|
|
289
289
|
)]))
|
|
290
|
-
vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("
|
|
291
|
-
name="vm-affinity-rule",
|
|
290
|
+
vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vmAffinityRule",
|
|
292
291
|
compute_cluster_id=cluster.id,
|
|
293
292
|
virtual_machine_ids=[v.id for k, v in vm])
|
|
294
293
|
```
|
|
294
|
+
<!--End PulumiCodeChooser -->
|
|
295
295
|
|
|
296
296
|
The following example creates an affinity rule for a set of virtual machines
|
|
297
297
|
in the cluster by looking up the virtual machine UUIDs from the
|
|
298
298
|
`VirtualMachine` data source.
|
|
299
299
|
|
|
300
|
+
<!--Start PulumiCodeChooser -->
|
|
300
301
|
```python
|
|
301
302
|
import pulumi
|
|
302
303
|
import pulumi_vsphere as vsphere
|
|
@@ -308,21 +309,14 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
|
|
|
308
309
|
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
309
310
|
cluster = vsphere.get_compute_cluster(name="cluster-01",
|
|
310
311
|
datacenter_id=datacenter.id)
|
|
311
|
-
|
|
312
|
+
vms_virtual_machine = [vsphere.get_virtual_machine(name=vms[__index],
|
|
312
313
|
datacenter_id=datacenter.id) for __index in range(len(vms))]
|
|
313
|
-
vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("
|
|
314
|
-
name="vm-affinity-rule",
|
|
314
|
+
vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vmAffinityRule",
|
|
315
315
|
enabled=True,
|
|
316
316
|
compute_cluster_id=cluster.id,
|
|
317
|
-
virtual_machine_ids=[__item.id for __item in
|
|
317
|
+
virtual_machine_ids=[__item.id for __item in vms_virtual_machine])
|
|
318
318
|
```
|
|
319
|
-
|
|
320
|
-
## Importing
|
|
321
|
-
|
|
322
|
-
An existing rule can be imported into this resource by supplying
|
|
323
|
-
both the path to the cluster, and the name the rule. If the name or cluster is
|
|
324
|
-
not found, or if the rule is of a different type, an error will be returned. An
|
|
325
|
-
example is below:
|
|
319
|
+
<!--End PulumiCodeChooser -->
|
|
326
320
|
|
|
327
321
|
:param str resource_name: The name of the resource.
|
|
328
322
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -378,6 +372,7 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
|
|
|
378
372
|
then creates an affinity rule for these two virtual machines, ensuring they
|
|
379
373
|
will run on the same host whenever possible.
|
|
380
374
|
|
|
375
|
+
<!--Start PulumiCodeChooser -->
|
|
381
376
|
```python
|
|
382
377
|
import pulumi
|
|
383
378
|
import pulumi_vsphere as vsphere
|
|
@@ -392,7 +387,6 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
|
|
|
392
387
|
vm = []
|
|
393
388
|
for range in [{"value": i} for i in range(0, 2)]:
|
|
394
389
|
vm.append(vsphere.VirtualMachine(f"vm-{range['value']}",
|
|
395
|
-
name=f"foo-{range['value']}",
|
|
396
390
|
resource_pool_id=cluster.resource_pool_id,
|
|
397
391
|
datastore_id=datastore.id,
|
|
398
392
|
num_cpus=1,
|
|
@@ -405,16 +399,17 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
|
|
|
405
399
|
label="disk0",
|
|
406
400
|
size=20,
|
|
407
401
|
)]))
|
|
408
|
-
vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("
|
|
409
|
-
name="vm-affinity-rule",
|
|
402
|
+
vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vmAffinityRule",
|
|
410
403
|
compute_cluster_id=cluster.id,
|
|
411
404
|
virtual_machine_ids=[v.id for k, v in vm])
|
|
412
405
|
```
|
|
406
|
+
<!--End PulumiCodeChooser -->
|
|
413
407
|
|
|
414
408
|
The following example creates an affinity rule for a set of virtual machines
|
|
415
409
|
in the cluster by looking up the virtual machine UUIDs from the
|
|
416
410
|
`VirtualMachine` data source.
|
|
417
411
|
|
|
412
|
+
<!--Start PulumiCodeChooser -->
|
|
418
413
|
```python
|
|
419
414
|
import pulumi
|
|
420
415
|
import pulumi_vsphere as vsphere
|
|
@@ -426,21 +421,14 @@ class ComputeClusterVmAffinityRule(pulumi.CustomResource):
|
|
|
426
421
|
datacenter = vsphere.get_datacenter(name="dc-01")
|
|
427
422
|
cluster = vsphere.get_compute_cluster(name="cluster-01",
|
|
428
423
|
datacenter_id=datacenter.id)
|
|
429
|
-
|
|
424
|
+
vms_virtual_machine = [vsphere.get_virtual_machine(name=vms[__index],
|
|
430
425
|
datacenter_id=datacenter.id) for __index in range(len(vms))]
|
|
431
|
-
vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("
|
|
432
|
-
name="vm-affinity-rule",
|
|
426
|
+
vm_affinity_rule = vsphere.ComputeClusterVmAffinityRule("vmAffinityRule",
|
|
433
427
|
enabled=True,
|
|
434
428
|
compute_cluster_id=cluster.id,
|
|
435
|
-
virtual_machine_ids=[__item.id for __item in
|
|
429
|
+
virtual_machine_ids=[__item.id for __item in vms_virtual_machine])
|
|
436
430
|
```
|
|
437
|
-
|
|
438
|
-
## Importing
|
|
439
|
-
|
|
440
|
-
An existing rule can be imported into this resource by supplying
|
|
441
|
-
both the path to the cluster, and the name the rule. If the name or cluster is
|
|
442
|
-
not found, or if the rule is of a different type, an error will be returned. An
|
|
443
|
-
example is below:
|
|
431
|
+
<!--End PulumiCodeChooser -->
|
|
444
432
|
|
|
445
433
|
:param str resource_name: The name of the resource.
|
|
446
434
|
:param ComputeClusterVmAffinityRuleArgs args: The arguments to use to populate this resource's properties.
|
pulumi_vsphere/datacenter.py
CHANGED
|
@@ -241,32 +241,25 @@ class Datacenter(pulumi.CustomResource):
|
|
|
241
241
|
|
|
242
242
|
### Create datacenter on the root folder
|
|
243
243
|
|
|
244
|
+
<!--Start PulumiCodeChooser -->
|
|
244
245
|
```python
|
|
245
246
|
import pulumi
|
|
246
247
|
import pulumi_vsphere as vsphere
|
|
247
248
|
|
|
248
|
-
prod_datacenter = vsphere.Datacenter("
|
|
249
|
+
prod_datacenter = vsphere.Datacenter("prodDatacenter")
|
|
249
250
|
```
|
|
251
|
+
<!--End PulumiCodeChooser -->
|
|
250
252
|
|
|
251
253
|
### Create datacenter on a subfolder
|
|
252
254
|
|
|
255
|
+
<!--Start PulumiCodeChooser -->
|
|
253
256
|
```python
|
|
254
257
|
import pulumi
|
|
255
258
|
import pulumi_vsphere as vsphere
|
|
256
259
|
|
|
257
|
-
research_datacenter = vsphere.Datacenter("
|
|
258
|
-
name="my_research_datacenter",
|
|
259
|
-
folder="/research/")
|
|
260
|
+
research_datacenter = vsphere.Datacenter("researchDatacenter", folder="/research/")
|
|
260
261
|
```
|
|
261
|
-
|
|
262
|
-
## Importing
|
|
263
|
-
|
|
264
|
-
An existing datacenter can be [imported][docs-import] into this resource
|
|
265
|
-
via supplying the full path to the datacenter. An example is below:
|
|
266
|
-
|
|
267
|
-
[docs-import]: /docs/import/index.html
|
|
268
|
-
|
|
269
|
-
The above would import the datacenter named `dc1`.
|
|
262
|
+
<!--End PulumiCodeChooser -->
|
|
270
263
|
|
|
271
264
|
:param str resource_name: The name of the resource.
|
|
272
265
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
@@ -302,32 +295,25 @@ class Datacenter(pulumi.CustomResource):
|
|
|
302
295
|
|
|
303
296
|
### Create datacenter on the root folder
|
|
304
297
|
|
|
298
|
+
<!--Start PulumiCodeChooser -->
|
|
305
299
|
```python
|
|
306
300
|
import pulumi
|
|
307
301
|
import pulumi_vsphere as vsphere
|
|
308
302
|
|
|
309
|
-
prod_datacenter = vsphere.Datacenter("
|
|
303
|
+
prod_datacenter = vsphere.Datacenter("prodDatacenter")
|
|
310
304
|
```
|
|
305
|
+
<!--End PulumiCodeChooser -->
|
|
311
306
|
|
|
312
307
|
### Create datacenter on a subfolder
|
|
313
308
|
|
|
309
|
+
<!--Start PulumiCodeChooser -->
|
|
314
310
|
```python
|
|
315
311
|
import pulumi
|
|
316
312
|
import pulumi_vsphere as vsphere
|
|
317
313
|
|
|
318
|
-
research_datacenter = vsphere.Datacenter("
|
|
319
|
-
name="my_research_datacenter",
|
|
320
|
-
folder="/research/")
|
|
314
|
+
research_datacenter = vsphere.Datacenter("researchDatacenter", folder="/research/")
|
|
321
315
|
```
|
|
322
|
-
|
|
323
|
-
## Importing
|
|
324
|
-
|
|
325
|
-
An existing datacenter can be [imported][docs-import] into this resource
|
|
326
|
-
via supplying the full path to the datacenter. An example is below:
|
|
327
|
-
|
|
328
|
-
[docs-import]: /docs/import/index.html
|
|
329
|
-
|
|
330
|
-
The above would import the datacenter named `dc1`.
|
|
316
|
+
<!--End PulumiCodeChooser -->
|
|
331
317
|
|
|
332
318
|
:param str resource_name: The name of the resource.
|
|
333
319
|
:param DatacenterArgs args: The arguments to use to populate this resource's properties.
|