From 998db278f1a2ce128904a376b24518fa52dc849f Mon Sep 17 00:00:00 2001 From: Tianhao He Date: Fri, 10 Feb 2017 13:55:12 -0800 Subject: [PATCH] add supported vcenter_version to vcenter and tagging samples --- samples/vsphere/tagging/tagging_workflow.py | 1 + samples/vsphere/vcenter/helper/cluster_helper.py | 1 + samples/vsphere/vcenter/helper/datacenter_helper.py | 1 + samples/vsphere/vcenter/helper/datastore_helper.py | 1 + samples/vsphere/vcenter/helper/folder_helper.py | 1 + samples/vsphere/vcenter/helper/network_helper.py | 1 + samples/vsphere/vcenter/helper/resource_pool_helper.py | 1 + samples/vsphere/vcenter/helper/vm_helper.py | 1 + samples/vsphere/vcenter/helper/vm_placement_helper.py | 1 + samples/vsphere/vcenter/vm/__init__.py | 1 - samples/vsphere/vcenter/vm/create/create_basic_vm.py | 1 + samples/vsphere/vcenter/vm/create/create_default_vm.py | 1 + samples/vsphere/vcenter/vm/create/create_exhaustive_vm.py | 1 + samples/vsphere/vcenter/vm/hardware/adapter/sata.py | 1 + samples/vsphere/vcenter/vm/hardware/adapter/scsi.py | 1 + samples/vsphere/vcenter/vm/hardware/boot.py | 1 + samples/vsphere/vcenter/vm/hardware/boot_device.py | 1 + samples/vsphere/vcenter/vm/hardware/cdrom.py | 1 + samples/vsphere/vcenter/vm/hardware/cpu.py | 1 + samples/vsphere/vcenter/vm/hardware/disk.py | 1 + samples/vsphere/vcenter/vm/hardware/ethernet.py | 1 + samples/vsphere/vcenter/vm/hardware/floppy.py | 1 + samples/vsphere/vcenter/vm/hardware/main.py | 1 + samples/vsphere/vcenter/vm/hardware/memory.py | 1 + samples/vsphere/vcenter/vm/hardware/parallel.py | 1 + samples/vsphere/vcenter/vm/main.py | 1 + samples/vsphere/vcenter/vm/placement.py | 1 + samples/vsphere/vcenter/vm/power.py | 1 + 28 files changed, 27 insertions(+), 1 deletion(-) diff --git a/samples/vsphere/tagging/tagging_workflow.py b/samples/vsphere/tagging/tagging_workflow.py index bbcf05fb..310b2b06 100644 --- a/samples/vsphere/tagging/tagging_workflow.py +++ b/samples/vsphere/tagging/tagging_workflow.py @@ -14,6 +14,7 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2014, 2016 VMware, Inc. All rights reserved.' +__vcenter_version__ = '6.0+' import time diff --git a/samples/vsphere/vcenter/helper/cluster_helper.py b/samples/vsphere/vcenter/helper/cluster_helper.py index da229a9e..1191d934 100644 --- a/samples/vsphere/vcenter/helper/cluster_helper.py +++ b/samples/vsphere/vcenter/helper/cluster_helper.py @@ -12,6 +12,7 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2016 VMware, Inc. All rights reserved.' +__vcenter_version__ = '6.5+' from com.vmware.vcenter_client import Cluster diff --git a/samples/vsphere/vcenter/helper/datacenter_helper.py b/samples/vsphere/vcenter/helper/datacenter_helper.py index 542898fc..b9599be7 100644 --- a/samples/vsphere/vcenter/helper/datacenter_helper.py +++ b/samples/vsphere/vcenter/helper/datacenter_helper.py @@ -12,6 +12,7 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2016 VMware, Inc. All rights reserved.' +__vcenter_version__ = '6.5+' from com.vmware.vcenter_client import Datacenter diff --git a/samples/vsphere/vcenter/helper/datastore_helper.py b/samples/vsphere/vcenter/helper/datastore_helper.py index e76219f8..13c6d30a 100644 --- a/samples/vsphere/vcenter/helper/datastore_helper.py +++ b/samples/vsphere/vcenter/helper/datastore_helper.py @@ -12,6 +12,7 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2016 VMware, Inc. All rights reserved.' +__vcenter_version__ = '6.5+' from com.vmware.vcenter_client import Datastore diff --git a/samples/vsphere/vcenter/helper/folder_helper.py b/samples/vsphere/vcenter/helper/folder_helper.py index 2cb14907..7e1b178b 100644 --- a/samples/vsphere/vcenter/helper/folder_helper.py +++ b/samples/vsphere/vcenter/helper/folder_helper.py @@ -12,6 +12,7 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2016 VMware, Inc. All rights reserved.' +__vcenter_version__ = '6.5+' from com.vmware.vcenter_client import Folder diff --git a/samples/vsphere/vcenter/helper/network_helper.py b/samples/vsphere/vcenter/helper/network_helper.py index 22811b02..f728f11d 100644 --- a/samples/vsphere/vcenter/helper/network_helper.py +++ b/samples/vsphere/vcenter/helper/network_helper.py @@ -12,6 +12,7 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2016 VMware, Inc. All rights reserved.' +__vcenter_version__ = '6.5+' from com.vmware.vcenter_client import Network diff --git a/samples/vsphere/vcenter/helper/resource_pool_helper.py b/samples/vsphere/vcenter/helper/resource_pool_helper.py index b449b65b..b1c37f2c 100644 --- a/samples/vsphere/vcenter/helper/resource_pool_helper.py +++ b/samples/vsphere/vcenter/helper/resource_pool_helper.py @@ -12,6 +12,7 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2016 VMware, Inc. All rights reserved.' +__vcenter_version__ = '6.5+' from com.vmware.vcenter_client import ResourcePool diff --git a/samples/vsphere/vcenter/helper/vm_helper.py b/samples/vsphere/vcenter/helper/vm_helper.py index e7f4bdc7..200b3e37 100644 --- a/samples/vsphere/vcenter/helper/vm_helper.py +++ b/samples/vsphere/vcenter/helper/vm_helper.py @@ -12,6 +12,7 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2016 VMware, Inc. All rights reserved.' +__vcenter_version__ = '6.5+' from com.vmware.vcenter_client import VM diff --git a/samples/vsphere/vcenter/helper/vm_placement_helper.py b/samples/vsphere/vcenter/helper/vm_placement_helper.py index 5d6a9539..ff29d7d5 100644 --- a/samples/vsphere/vcenter/helper/vm_placement_helper.py +++ b/samples/vsphere/vcenter/helper/vm_placement_helper.py @@ -12,6 +12,7 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2016 VMware, Inc. All rights reserved.' +__vcenter_version__ = '6.5+' from com.vmware.vcenter_client import VM diff --git a/samples/vsphere/vcenter/vm/__init__.py b/samples/vsphere/vcenter/vm/__init__.py index 0613959c..97dffd8f 100644 --- a/samples/vsphere/vcenter/vm/__init__.py +++ b/samples/vsphere/vcenter/vm/__init__.py @@ -13,7 +13,6 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2016 VMware, Inc. All rights reserved.' - # Required to distribute different parts of this # package as multiple distribution try: diff --git a/samples/vsphere/vcenter/vm/create/create_basic_vm.py b/samples/vsphere/vcenter/vm/create/create_basic_vm.py index 767dbaa8..84e75ce4 100644 --- a/samples/vsphere/vcenter/vm/create/create_basic_vm.py +++ b/samples/vsphere/vcenter/vm/create/create_basic_vm.py @@ -14,6 +14,7 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2016 VMware, Inc. All rights reserved.' +__vcenter_version__ = '6.5+' from com.vmware.vcenter.vm.hardware.boot_client import Device as BootDevice from com.vmware.vcenter.vm.hardware_client import ( diff --git a/samples/vsphere/vcenter/vm/create/create_default_vm.py b/samples/vsphere/vcenter/vm/create/create_default_vm.py index c4677cb3..43a83ef4 100644 --- a/samples/vsphere/vcenter/vm/create/create_default_vm.py +++ b/samples/vsphere/vcenter/vm/create/create_default_vm.py @@ -14,6 +14,7 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2016 VMware, Inc. All rights reserved.' +__vcenter_version__ = '6.5+' from com.vmware.vcenter.vm_client import Power from com.vmware.vcenter_client import VM diff --git a/samples/vsphere/vcenter/vm/create/create_exhaustive_vm.py b/samples/vsphere/vcenter/vm/create/create_exhaustive_vm.py index 24e19590..ec83af27 100644 --- a/samples/vsphere/vcenter/vm/create/create_exhaustive_vm.py +++ b/samples/vsphere/vcenter/vm/create/create_exhaustive_vm.py @@ -14,6 +14,7 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2016 VMware, Inc. All rights reserved.' +__vcenter_version__ = '6.5+' from com.vmware.vcenter.vm.hardware.boot_client import Device as BootDevice from com.vmware.vcenter.vm.hardware_client import ( diff --git a/samples/vsphere/vcenter/vm/hardware/adapter/sata.py b/samples/vsphere/vcenter/vm/hardware/adapter/sata.py index b9512950..cf105030 100644 --- a/samples/vsphere/vcenter/vm/hardware/adapter/sata.py +++ b/samples/vsphere/vcenter/vm/hardware/adapter/sata.py @@ -14,6 +14,7 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2016 VMware, Inc. All rights reserved.' +__vcenter_version__ = '6.5+' from com.vmware.vcenter.vm.hardware.adapter_client import Sata from samples.vsphere.common import vapiconnect diff --git a/samples/vsphere/vcenter/vm/hardware/adapter/scsi.py b/samples/vsphere/vcenter/vm/hardware/adapter/scsi.py index 2e7a1533..2b28fed1 100644 --- a/samples/vsphere/vcenter/vm/hardware/adapter/scsi.py +++ b/samples/vsphere/vcenter/vm/hardware/adapter/scsi.py @@ -14,6 +14,7 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2016 VMware, Inc. All rights reserved.' +__vcenter_version__ = '6.5+' from com.vmware.vcenter.vm.hardware.adapter_client import Scsi from samples.vsphere.common import vapiconnect diff --git a/samples/vsphere/vcenter/vm/hardware/boot.py b/samples/vsphere/vcenter/vm/hardware/boot.py index eb3a9627..0b880435 100644 --- a/samples/vsphere/vcenter/vm/hardware/boot.py +++ b/samples/vsphere/vcenter/vm/hardware/boot.py @@ -14,6 +14,7 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2016 VMware, Inc. All rights reserved.' +__vcenter_version__ = '6.5+' from com.vmware.vcenter.vm.hardware_client import Boot from samples.vsphere.common import vapiconnect diff --git a/samples/vsphere/vcenter/vm/hardware/boot_device.py b/samples/vsphere/vcenter/vm/hardware/boot_device.py index c2ef34ec..28836213 100644 --- a/samples/vsphere/vcenter/vm/hardware/boot_device.py +++ b/samples/vsphere/vcenter/vm/hardware/boot_device.py @@ -14,6 +14,7 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2016 VMware, Inc. All rights reserved.' +__vcenter_version__ = '6.5+' from com.vmware.vcenter.vm.hardware.boot_client import Device as BootDevice from com.vmware.vcenter.vm.hardware_client import (Disk, Ethernet) diff --git a/samples/vsphere/vcenter/vm/hardware/cdrom.py b/samples/vsphere/vcenter/vm/hardware/cdrom.py index 480a515a..b058dd95 100644 --- a/samples/vsphere/vcenter/vm/hardware/cdrom.py +++ b/samples/vsphere/vcenter/vm/hardware/cdrom.py @@ -14,6 +14,7 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2016 VMware, Inc. All rights reserved.' +__vcenter_version__ = '6.5+' from com.vmware.vcenter.vm.hardware.adapter_client import Sata from com.vmware.vcenter.vm.hardware_client import (Cdrom, diff --git a/samples/vsphere/vcenter/vm/hardware/cpu.py b/samples/vsphere/vcenter/vm/hardware/cpu.py index 859b59b7..61834bb5 100644 --- a/samples/vsphere/vcenter/vm/hardware/cpu.py +++ b/samples/vsphere/vcenter/vm/hardware/cpu.py @@ -14,6 +14,7 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2016 VMware, Inc. All rights reserved.' +__vcenter_version__ = '6.5+' from com.vmware.vcenter.vm.hardware_client import Cpu from samples.vsphere.common import vapiconnect diff --git a/samples/vsphere/vcenter/vm/hardware/disk.py b/samples/vsphere/vcenter/vm/hardware/disk.py index faed3360..b61a3b36 100644 --- a/samples/vsphere/vcenter/vm/hardware/disk.py +++ b/samples/vsphere/vcenter/vm/hardware/disk.py @@ -14,6 +14,7 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2016 VMware, Inc. All rights reserved.' +__vcenter_version__ = '6.5+' import atexit diff --git a/samples/vsphere/vcenter/vm/hardware/ethernet.py b/samples/vsphere/vcenter/vm/hardware/ethernet.py index 18db864a..426fd6b6 100644 --- a/samples/vsphere/vcenter/vm/hardware/ethernet.py +++ b/samples/vsphere/vcenter/vm/hardware/ethernet.py @@ -14,6 +14,7 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2016 VMware, Inc. All rights reserved.' +__vcenter_version__ = '6.5+' from com.vmware.vcenter.vm.hardware_client import Ethernet from com.vmware.vcenter.vm_client import Power diff --git a/samples/vsphere/vcenter/vm/hardware/floppy.py b/samples/vsphere/vcenter/vm/hardware/floppy.py index 2d3d3449..7face627 100644 --- a/samples/vsphere/vcenter/vm/hardware/floppy.py +++ b/samples/vsphere/vcenter/vm/hardware/floppy.py @@ -14,6 +14,7 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2016 VMware, Inc. All rights reserved.' +__vcenter_version__ = '6.5+' from com.vmware.vcenter.vm.hardware_client import Floppy from com.vmware.vcenter.vm_client import Power diff --git a/samples/vsphere/vcenter/vm/hardware/main.py b/samples/vsphere/vcenter/vm/hardware/main.py index d789eac8..b9406b0b 100644 --- a/samples/vsphere/vcenter/vm/hardware/main.py +++ b/samples/vsphere/vcenter/vm/hardware/main.py @@ -12,6 +12,7 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2016 VMware, Inc. All rights reserved.' +__vcenter_version__ = '6.5+' import samples.vsphere.vcenter.vm.hardware.adapter.sata import samples.vsphere.vcenter.vm.hardware.adapter.scsi diff --git a/samples/vsphere/vcenter/vm/hardware/memory.py b/samples/vsphere/vcenter/vm/hardware/memory.py index 7d599635..675195e6 100644 --- a/samples/vsphere/vcenter/vm/hardware/memory.py +++ b/samples/vsphere/vcenter/vm/hardware/memory.py @@ -14,6 +14,7 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2016 VMware, Inc. All rights reserved.' +__vcenter_version__ = '6.5+' from com.vmware.vcenter.vm.hardware_client import Memory from samples.vsphere.common import vapiconnect diff --git a/samples/vsphere/vcenter/vm/hardware/parallel.py b/samples/vsphere/vcenter/vm/hardware/parallel.py index 443ae378..0ca7e7b4 100644 --- a/samples/vsphere/vcenter/vm/hardware/parallel.py +++ b/samples/vsphere/vcenter/vm/hardware/parallel.py @@ -14,6 +14,7 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2016 VMware, Inc. All rights reserved.' +__vcenter_version__ = '6.5+' from com.vmware.vcenter.vm.hardware_client import Parallel from com.vmware.vcenter.vm_client import Power diff --git a/samples/vsphere/vcenter/vm/main.py b/samples/vsphere/vcenter/vm/main.py index 1ab85c3d..fa1a030c 100644 --- a/samples/vsphere/vcenter/vm/main.py +++ b/samples/vsphere/vcenter/vm/main.py @@ -12,6 +12,7 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2016 VMware, Inc. All rights reserved.' +__vcenter_version__ = '6.5+' import samples.vsphere.vcenter.helper.network_helper import samples.vsphere.vcenter.vm.hardware.main diff --git a/samples/vsphere/vcenter/vm/placement.py b/samples/vsphere/vcenter/vm/placement.py index 553c8df3..11254877 100644 --- a/samples/vsphere/vcenter/vm/placement.py +++ b/samples/vsphere/vcenter/vm/placement.py @@ -12,6 +12,7 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2016 VMware, Inc. All rights reserved.' +__vcenter_version__ = '6.5+' from com.vmware.vcenter_client import (Cluster, Datastore, Folder, ResourcePool, VM) diff --git a/samples/vsphere/vcenter/vm/power.py b/samples/vsphere/vcenter/vm/power.py index 5867d95f..0d0f04f3 100644 --- a/samples/vsphere/vcenter/vm/power.py +++ b/samples/vsphere/vcenter/vm/power.py @@ -14,6 +14,7 @@ __author__ = 'VMware, Inc.' __copyright__ = 'Copyright 2016 VMware, Inc. All rights reserved.' +__vcenter_version__ = '6.5+' import atexit