diff --git a/LICENSE b/LICENSE index 9017c698..e27c3586 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2016-2023 VMware, Inc. +Copyright (c) 2016-2024 Broadcom, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/README.md b/README.md index 6417f0ca..df9caa7d 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ## Table of Contents - [Abstract](#abstract) -- [Supported vCenter Releases](#supported-vcenter-releases) +- [Supported vCenter Releases](#supported-onprem-vcenter-releases) - [Supported NSX-T Releases](#supported-nsx-t-releases) - [VMware Cloud on AWS Support](#vmware-cloud-on-aws-support) - [Quick Start Guide](#quick-start-guide) @@ -22,11 +22,11 @@ samples require the vSphere Management SDK packages (pyVmomi) to be installed on The samples have been developed to work with python 3.8+ ## Supported OnPrem vCenter Releases -vCenter 7.0, 7.0U1, 7.0U2, 7.0U3 , 8.0, 8.0U1, 8.0U2 +vCenter 7.0, 7.0U1, 7.0U2, 7.0U3 , 8.0, 8.0U1, 8.0U2, 8.0U3 Please refer to the notes in each sample for detailed compatibility information. ## Supported NSX-T Releases -NSX-T 2.2 - 4.1.2 and VMC 1.7 - 1.24 +NSX-T 2.2 - 4.2.0 and VMC 1.7 - 1.24 ## Latest VMware Cloud on AWS Release: VMC M24 (1.24) ([Release Notes](https://docs.vmware.com/en/VMware-Cloud-on-AWS/0/rn/vmc-on-aws-relnotes.html)) @@ -264,9 +264,10 @@ $ python samples/vsphere/vcenter/vm/list_vms.py -v ### vSphere API Documentation -* [VMware vSphere REST API Reference documentation](https://developer.vmware.com/docs/vsphere-automation/latest/) -* [vSphere 8.0 U2 Python APIs (latest)](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/8.0.2.0/) -* Previous Releases: vSphere [8.0 U1](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/8.0.1.0/) +* [VMware vSphere REST API Reference documentation](https://developer.broadcom.com/xapis/vsphere-automation-api/latest/) +* [vSphere 8.0 U3 Python APIs (latest)](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/8.0.3.0/) +* Previous Releases: vSphere [8.0 U2](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/8.0.2.0/) +[8.0 U1](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/8.0.1.0/) [8.0 GA](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/8.0.0.1/) [8.0.0.0](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/8.0.0.0/), [7.0 U3](https://vmware.github.io/vsphere-automation-sdk-python/vsphere/7.0.3.0/) @@ -274,7 +275,7 @@ $ python samples/vsphere/vcenter/vm/list_vms.py -v ### VMware Cloud on AWS API Documentation -* [VMware Cloud on AWS REST APIs](http://developers.eng.vmware.com/docs/vmc/latest/) +* [VMware Cloud on AWS REST APIs](https://developer.broadcom.com/xapis/vmware-cloud-on-aws-api-reference/latest/) * [VMware Cloud on AWS Console Python APIs](https://vmware.github.io/vsphere-automation-sdk-python/vmc/index.html) * [VMware Cloud on AWS Disaster Recovery as a Service (DRaaS) Python APIs](https://vmware.github.io/vsphere-automation-sdk-python/vmc-draas/index.html) @@ -313,5 +314,5 @@ Members: * [VMware Sample Exchange](https://code.vmware.com/samples) It is highly recommended to add any and all submitted samples to the VMware Sample Exchange * [VMware Code](https://code.vmware.com/home) * [VMware Developer Community](https://communities.vmware.com/community/vmtn/developer) -* VMware vSphere [REST API Reference documentation](https://developer.vmware.com/docs/vsphere-automation/latest/). +* VMware vSphere [REST API Reference documentation](https://developer.broadcom.com/xapis/vsphere-automation-api/latest/). * [VMware Python forum](https://code.vmware.com/forums/7508/vsphere-automation-sdk-for-python) diff --git a/lib/README.md b/lib/README.md index 27fab67f..0a24f37a 100644 --- a/lib/README.md +++ b/lib/README.md @@ -4,11 +4,8 @@ For python developers, client libraries are supplied for testing and development Name | Description ------------------------------------| ------------- -vapi_runtime | vAPI runtime responsible for serialization/de-serialization of objects and wire protocol -vcenter_bindings | Client stubs for vSphere Automation APIs vmwarecloud_aws | Client stubs for VMware Cloud on AWS Console APIs vmwarecloud_draas | Client stubs for VMware Cloud (VMC) Disaster Recovery as a Service (DRaaS) APIs nsx-python-sdk | Client stubs for VMware NSX-T APIs nsx-vmc-policy-python-sdk | Client stubs for VMware NSX-T on VMC Policy APIs nsx-vmc-aws-integration-python-sdk | Client stubs for VMware NSX-T AWS integration app APIs (for AWS underlay management) -vapi-common-client | Common client code libraries diff --git a/lib/index.html b/lib/index.html index c49a2eaf..18a903cd 100644 --- a/lib/index.html +++ b/lib/index.html @@ -3,10 +3,8 @@ -vcenter-bindings
vmwarecloud-aws
vmwarecloud-draas
-vapi-runtime
nsx-python-sdk
nsx-policy-python-sdk
nsx-vmc-policy-python-sdk
diff --git a/lib/nsx-policy-python-sdk/index.html b/lib/nsx-policy-python-sdk/index.html index 3c915355..50164606 100644 --- a/lib/nsx-policy-python-sdk/index.html +++ b/lib/nsx-policy-python-sdk/index.html @@ -1 +1 @@ -nsx_policy_python_sdk-4.1.2.0.0-py2.py3-none-any.whl
+nsx_policy_python_sdk-4.2.0-py2.py3-none-any.whl
diff --git a/lib/nsx-policy-python-sdk/nsx_policy_python_sdk-4.1.2.0.0-py2.py3-none-any.whl b/lib/nsx-policy-python-sdk/nsx_policy_python_sdk-4.1.2.0.0-py2.py3-none-any.whl deleted file mode 100644 index f7b1e179..00000000 Binary files a/lib/nsx-policy-python-sdk/nsx_policy_python_sdk-4.1.2.0.0-py2.py3-none-any.whl and /dev/null differ diff --git a/lib/nsx-policy-python-sdk/nsx_policy_python_sdk-4.2.0-py2.py3-none-any.whl b/lib/nsx-policy-python-sdk/nsx_policy_python_sdk-4.2.0-py2.py3-none-any.whl new file mode 100644 index 00000000..e0615d38 Binary files /dev/null and b/lib/nsx-policy-python-sdk/nsx_policy_python_sdk-4.2.0-py2.py3-none-any.whl differ diff --git a/lib/nsx-python-sdk/index.html b/lib/nsx-python-sdk/index.html index 5d92bc49..e7440a6f 100644 --- a/lib/nsx-python-sdk/index.html +++ b/lib/nsx-python-sdk/index.html @@ -1 +1 @@ -nsx_python_sdk-4.1.2.0.0-py2.py3-none-any.whl
+nsx_python_sdk-4.2.0-py2.py3-none-any.whl
diff --git a/lib/nsx-python-sdk/nsx_python_sdk-4.1.2.0.0-py2.py3-none-any.whl b/lib/nsx-python-sdk/nsx_python_sdk-4.1.2.0.0-py2.py3-none-any.whl deleted file mode 100644 index 7b582a0d..00000000 Binary files a/lib/nsx-python-sdk/nsx_python_sdk-4.1.2.0.0-py2.py3-none-any.whl and /dev/null differ diff --git a/lib/nsx-python-sdk/nsx_python_sdk-4.2.0-py2.py3-none-any.whl b/lib/nsx-python-sdk/nsx_python_sdk-4.2.0-py2.py3-none-any.whl new file mode 100644 index 00000000..5643dd56 Binary files /dev/null and b/lib/nsx-python-sdk/nsx_python_sdk-4.2.0-py2.py3-none-any.whl differ diff --git a/lib/nsx-vmc-aws-integration-python-sdk/index.html b/lib/nsx-vmc-aws-integration-python-sdk/index.html index 9a371de3..0166cc33 100644 --- a/lib/nsx-vmc-aws-integration-python-sdk/index.html +++ b/lib/nsx-vmc-aws-integration-python-sdk/index.html @@ -1 +1 @@ -nsx_vmc_aws_integration_python_sdk-4.1.2.0.0-py2.py3-none-any.whl
+nsx_vmc_aws_integration_python_sdk-4.1.2.0.1-py2.py3-none-any.whl
diff --git a/lib/nsx-vmc-aws-integration-python-sdk/nsx_vmc_aws_integration_python_sdk-4.1.2.0.0-py2.py3-none-any.whl b/lib/nsx-vmc-aws-integration-python-sdk/nsx_vmc_aws_integration_python_sdk-4.1.2.0.1-py2.py3-none-any.whl similarity index 90% rename from lib/nsx-vmc-aws-integration-python-sdk/nsx_vmc_aws_integration_python_sdk-4.1.2.0.0-py2.py3-none-any.whl rename to lib/nsx-vmc-aws-integration-python-sdk/nsx_vmc_aws_integration_python_sdk-4.1.2.0.1-py2.py3-none-any.whl index 485cc049..9190eb56 100644 Binary files a/lib/nsx-vmc-aws-integration-python-sdk/nsx_vmc_aws_integration_python_sdk-4.1.2.0.0-py2.py3-none-any.whl and b/lib/nsx-vmc-aws-integration-python-sdk/nsx_vmc_aws_integration_python_sdk-4.1.2.0.1-py2.py3-none-any.whl differ diff --git a/lib/nsx-vmc-policy-python-sdk/index.html b/lib/nsx-vmc-policy-python-sdk/index.html index 124897a5..8d5035d8 100644 --- a/lib/nsx-vmc-policy-python-sdk/index.html +++ b/lib/nsx-vmc-policy-python-sdk/index.html @@ -1 +1 @@ -nsx_vmc_policy_python_sdk-4.1.2.0.0-py2.py3-none-any.whl
+nsx_vmc_policy_python_sdk-4.1.2.0.1-py2.py3-none-any.whl
diff --git a/lib/nsx-vmc-policy-python-sdk/nsx_vmc_policy_python_sdk-4.1.2.0.0-py2.py3-none-any.whl b/lib/nsx-vmc-policy-python-sdk/nsx_vmc_policy_python_sdk-4.1.2.0.1-py2.py3-none-any.whl similarity index 92% rename from lib/nsx-vmc-policy-python-sdk/nsx_vmc_policy_python_sdk-4.1.2.0.0-py2.py3-none-any.whl rename to lib/nsx-vmc-policy-python-sdk/nsx_vmc_policy_python_sdk-4.1.2.0.1-py2.py3-none-any.whl index aab87b2a..cf6e66b3 100644 Binary files a/lib/nsx-vmc-policy-python-sdk/nsx_vmc_policy_python_sdk-4.1.2.0.0-py2.py3-none-any.whl and b/lib/nsx-vmc-policy-python-sdk/nsx_vmc_policy_python_sdk-4.1.2.0.1-py2.py3-none-any.whl differ diff --git a/lib/src/vapi-common-client/vapi_common_client-2.44.0.zip b/lib/src/vapi-common-client/vapi_common_client-2.44.0.zip deleted file mode 100644 index 6dadad0a..00000000 Binary files a/lib/src/vapi-common-client/vapi_common_client-2.44.0.zip and /dev/null differ diff --git a/lib/src/vapi-runtime/vapi_runtime-2.44.0.zip b/lib/src/vapi-runtime/vapi_runtime-2.44.0.zip deleted file mode 100644 index 99d6b8a4..00000000 Binary files a/lib/src/vapi-runtime/vapi_runtime-2.44.0.zip and /dev/null differ diff --git a/lib/src/vcenter-bindings/vcenter_bindings-4.2.0.zip b/lib/src/vcenter-bindings/vcenter_bindings-4.2.0.zip deleted file mode 100644 index 37d54c5b..00000000 Binary files a/lib/src/vcenter-bindings/vcenter_bindings-4.2.0.zip and /dev/null differ diff --git a/lib/src/vmwarecloud-aws/vmwarecloud_aws-1.64.0.zip b/lib/src/vmwarecloud-aws/vmwarecloud_aws-1.64.0.zip deleted file mode 100644 index 2271babe..00000000 Binary files a/lib/src/vmwarecloud-aws/vmwarecloud_aws-1.64.0.zip and /dev/null differ diff --git a/lib/src/vmwarecloud-aws/vmwarecloud_aws-1.64.1.zip b/lib/src/vmwarecloud-aws/vmwarecloud_aws-1.64.1.zip new file mode 100644 index 00000000..5f6e52fa Binary files /dev/null and b/lib/src/vmwarecloud-aws/vmwarecloud_aws-1.64.1.zip differ diff --git a/lib/src/vmwarecloud-draas/vmwarecloud_draas-1.23.0.zip b/lib/src/vmwarecloud-draas/vmwarecloud_draas-1.23.0.zip deleted file mode 100644 index b998f7d1..00000000 Binary files a/lib/src/vmwarecloud-draas/vmwarecloud_draas-1.23.0.zip and /dev/null differ diff --git a/lib/src/vmwarecloud-draas/vmwarecloud_draas-1.23.1.zip b/lib/src/vmwarecloud-draas/vmwarecloud_draas-1.23.1.zip new file mode 100644 index 00000000..f66811a9 Binary files /dev/null and b/lib/src/vmwarecloud-draas/vmwarecloud_draas-1.23.1.zip differ diff --git a/lib/vapi-common-client/vapi_common_client-2.44.0-py2.py3-none-any.whl b/lib/vapi-common-client/vapi_common_client-2.44.0-py2.py3-none-any.whl deleted file mode 100644 index 96dfc358..00000000 Binary files a/lib/vapi-common-client/vapi_common_client-2.44.0-py2.py3-none-any.whl and /dev/null differ diff --git a/lib/vapi-runtime/vapi_runtime-2.44.0-py2.py3-none-any.whl b/lib/vapi-runtime/vapi_runtime-2.44.0-py2.py3-none-any.whl deleted file mode 100644 index e3ce6d10..00000000 Binary files a/lib/vapi-runtime/vapi_runtime-2.44.0-py2.py3-none-any.whl and /dev/null differ diff --git a/lib/vcenter-bindings/vcenter_bindings-4.2.0-py2.py3-none-any.whl b/lib/vcenter-bindings/vcenter_bindings-4.2.0-py2.py3-none-any.whl deleted file mode 100644 index eceb1f09..00000000 Binary files a/lib/vcenter-bindings/vcenter_bindings-4.2.0-py2.py3-none-any.whl and /dev/null differ diff --git a/lib/vmwarecloud-aws/index.html b/lib/vmwarecloud-aws/index.html index 570d26d4..25351abd 100644 --- a/lib/vmwarecloud-aws/index.html +++ b/lib/vmwarecloud-aws/index.html @@ -1 +1 @@ -vmwarecloud_aws-1.64.0-py2.py3-none-any.whl
+vmwarecloud_aws-1.64.1-py2.py3-none-any.whl
diff --git a/lib/vmwarecloud-aws/vmwarecloud_aws-1.64.0-py2.py3-none-any.whl b/lib/vmwarecloud-aws/vmwarecloud_aws-1.64.1-py2.py3-none-any.whl similarity index 88% rename from lib/vmwarecloud-aws/vmwarecloud_aws-1.64.0-py2.py3-none-any.whl rename to lib/vmwarecloud-aws/vmwarecloud_aws-1.64.1-py2.py3-none-any.whl index ce0a8d9b..12cc7a0f 100644 Binary files a/lib/vmwarecloud-aws/vmwarecloud_aws-1.64.0-py2.py3-none-any.whl and b/lib/vmwarecloud-aws/vmwarecloud_aws-1.64.1-py2.py3-none-any.whl differ diff --git a/lib/vmwarecloud-draas/index.html b/lib/vmwarecloud-draas/index.html index d330d735..02599785 100644 --- a/lib/vmwarecloud-draas/index.html +++ b/lib/vmwarecloud-draas/index.html @@ -1 +1 @@ -vmwarecloud_draas-1.23.0-py3.py3-none-any.whl
+vmwarecloud_draas-1.23.1-py3.py3-none-any.whl
diff --git a/lib/vmwarecloud-draas/vmwarecloud_draas-1.23.0-py2.py3-none-any.whl b/lib/vmwarecloud-draas/vmwarecloud_draas-1.23.1-py2.py3-none-any.whl similarity index 68% rename from lib/vmwarecloud-draas/vmwarecloud_draas-1.23.0-py2.py3-none-any.whl rename to lib/vmwarecloud-draas/vmwarecloud_draas-1.23.1-py2.py3-none-any.whl index a52c207d..3b61a23f 100644 Binary files a/lib/vmwarecloud-draas/vmwarecloud_draas-1.23.0-py2.py3-none-any.whl and b/lib/vmwarecloud-draas/vmwarecloud_draas-1.23.1-py2.py3-none-any.whl differ diff --git a/open_source_licenses.txt b/open_source_licenses.txt index e7246cf3..d00ed20f 100644 --- a/open_source_licenses.txt +++ b/open_source_licenses.txt @@ -1,20 +1,38 @@ -open_source_licenses.txt +open_source_license.txt -vSphere Automation SDK for Python 8.0U2 GA +vSphere Automation SDK for Python 8.0U3 GA ====================================================================== -The following copyright statements and licenses apply to various open -source software packages (or portions thereof) that are distributed with -this VMware Product. +The following copyright statements and licenses apply to open source +software ("OSS") distributed with the Broadcom product (the "Licensed +Product"). The term "Broadcom" refers solely to the Broadcom Inc. +corporate affiliate that distributes the Licensed Product. The +Licensed Product does not necessarily use all the OSS referred to +below and may also only use portions of a given OSS component. -The VMware Product may also include other VMware components, which may -contain additional open source software packages. One or more such -open_source_licenses.txt files may therefore accompany this VMware -Product. +To the extent required under an applicable open source license, +Broadcom will make source code available for applicable OSS upon +request. Please send an inquiry to opensource@broadcom.com including +your name, address, the product name and version, operating system, +and the place of purchase. -The VMware Product that includes this file does not necessarily use all -the open source software packages referred to below and may also only -use portions of a given package. +To the extent the Licensed Product includes OSS, the OSS is typically +not owned by Broadcom. THE OSS IS PROVIDED AS IS WITHOUT WARRANTY OR +CONDITION OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT +LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE. To the full extent permitted under applicable +law, Broadcom and its corporate affiliates disclaim all warranties +and liability arising from or related to any use of the OSS. + +To the extent the Licensed Product includes OSS licensed under the +GNU General Public License ("GPL") or the GNU Lesser General Public +License (“LGPL”), the use, copying, distribution and modification of +the GPL OSS or LGPL OSS is governed, respectively, by the GPL or LGPL. +A copy of the GPL or LGPL license may be found with the applicable OSS. +Additionally, a copy of the GPL License or LGPL License can be found +at https://www.gnu.org/licenses or obtained by writing to the Free +Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, +MA 02111-1307 USA. ==================== TABLE OF CONTENTS ==================== @@ -23,27 +41,26 @@ this document. This list is provided for your convenience; please read further if you wish to review the copyright notice(s) and the full text of the license associated with each component. +PART 1. APPLICATION LAYER + SECTION 1: Apache License, V2.0 - >>> requests-2.31.0 - >>> pyOpenSSL-23.2.0 - >>> pyvmomi-8.0.1.0.2 + >>> pyOpenSSL-24.1.0 + >>> requests-v2.32.3 SECTION 2: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES >>> six-1.16.0 - >>> pycparser-2.21 - >>> cffi-1.15.1 - >>> idna-3.4 - >>> charset-normalizer-3.2.0 - >>> lxml-4.9.3 - >>> urllib3-2.0.4 - >>> cryptography-41.0.3 - >>> setuptools-68.1.2 + >>> cffi-1.16.0 + >>> charset-normalizer-3.3.2 + >>> idna-3.7 + >>> pycparser-2.22 + >>> lxml-5.2.2 + >>> cryptography-42.0.8 SECTION 3: Mozilla Public License, V2.0 - >>> certifi-2023.07.22 + >>> certifi-2024.6.2 APPENDIX. Standard License Files @@ -51,65 +68,26 @@ APPENDIX. Standard License Files >>> Apache License, V2.0 >>> Mozilla Public License, V2.0 +==================== PART 1. APPLICATION LAYER ==================== + -------------------- SECTION 1: Apache License, V2.0 -------------------- - >>> requests-2.31.0 + >>> pyOpenSSL-24.1.0 - License: Apache 2.0 + Copyright (C) Jean-Paul Calderone - >>> pyOpenSSL-23.2.0 - - License: Apache 2.0 - - ADDITIONAL LICENSE INFORMATION - - > Apache2.0 - - pyopenssl-23.2.0/setup.py - - Copyright (c) Jean-Paul Calderone 2008-2015 - - See SECTION 15 in 'LICENSE TEXT REFERENCE TABLE' - - pyopenssl-23.2.0/src/OpenSSL/version.py - - Copyright 2001-2023 - - See SECTION 25 in 'LICENSE TEXT REFERENCE TABLE' - - > Unknown License file reference - - pyopenssl-23.2.0/src/OpenSSL/__init__.py - - Copyright (c) AB - - See SECTION 30 in 'LICENSE TEXT REFERENCE TABLE' - - pyopenssl-23.2.0/src/OpenSSL/version.py - - Copyright (c) Jean-Paul Calderone - - See SECTION 30 in 'LICENSE TEXT REFERENCE TABLE' + Copyright (C) AB Strakt - >>> pyvmomi-8.0.1.0.2 + Copyright 2001-2024 - Found in: pyvmomi-8.0.1.0.2/pyVmomi/_typeinfo_core.py - Copyright (c) 2008-2020 VMware, Inc. - # Licensed under the Apache License, Version 2.0 (the "License"); - # you may not use this file except in compliance with the License. - # You may obtain a copy of the License at - # - # http://www.apache.org/licenses/LICENSE-2.0 - # - # Unless required by applicable law or agreed to in writing, software - # distributed under the License is distributed on an "AS IS" BASIS, - # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - # See the License for the specific language governing permissions and - # limitations under the License. + + + >>> requests-v2.32.3 + -------------------- SECTION 2: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES -------------------- @@ -137,538 +115,169 @@ APPENDIX. Standard License Files IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - ADDITIONAL LICENSE INFORMATION - > MIT + >>> cffi-1.16.0 - six-master/setup.py + Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc. - Copyright (c) 2010-2020 Benjamin Peterson + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + ``Software''), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: - See SECTION 4 in 'LICENSE TEXT REFERENCE TABLE' + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. - six-master/six.py - - Copyright (c) 2010-2020 Benjamin Peterson - - See SECTION 4 in 'LICENSE TEXT REFERENCE TABLE' - - six-master/test_six.py - - Copyright (c) 2010-2020 Benjamin Peterson - - See SECTION 4 in 'LICENSE TEXT REFERENCE TABLE' + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. - >>> pycparser-2.21 + >>> charset-normalizer-3.3.2 - pycparser -- A C parser in Python - Copyright (c) 2008-2020, Eli Bendersky + + >>> idna-3.7 + + Copyright (c) 2013-2023, Kim Davies and contributors. All rights reserved. - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of Eli Bendersky nor the names of its contributors may - be used to endorse or promote products derived from this software without - specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE - GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - >>> cffi-1.15.1 - - The MIT License - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL - THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR - OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - OTHER DEALINGS IN THE SOFTWARE. - - ADDITIONAL LICENSE INFORMATION - - > MIT - - cffi-1.15.1/c/libffi_arm64/include/ffi.h - - Copyright (c) 1996-2003, 2007, 2008 Red Hat, Inc. - - See SECTION 8 in 'LICENSE TEXT REFERENCE TABLE' - - cffi-1.15.1/c/libffi_arm64/include/ffitarget.h - - Copyright (c) 2009, 2010, 2011, 2012 ARM Ltd. - - See SECTION 7 in 'LICENSE TEXT REFERENCE TABLE' - - cffi-1.15.1/c/libffi_x86_x64/ffi.c - - Copyright (c) 2002 Roger Sayle - - See SECTION 12 in 'LICENSE TEXT REFERENCE TABLE' - - cffi-1.15.1/c/libffi_x86_x64/ffi.h - - Copyright (c) 1996-2003 Red Hat, Inc. - - See SECTION 12 in 'LICENSE TEXT REFERENCE TABLE' - - cffi-1.15.1/c/libffi_x86_x64/ffitarget.h - - Copyright (c) 1996-2003 Red Hat, Inc. - - See SECTION 12 in 'LICENSE TEXT REFERENCE TABLE' - - cffi-1.15.1/c/libffi_x86_x64/prep_cif.c - - Copyright (c) 1996, 1998 Red Hat, Inc. - - See SECTION 12 in 'LICENSE TEXT REFERENCE TABLE' - - cffi-1.15.1/c/libffi_x86_x64/types.c - - Copyright (c) 1996, 1998 Red Hat, Inc. - - See SECTION 12 in 'LICENSE TEXT REFERENCE TABLE' - - cffi-1.15.1/c/libffi_x86_x64/win32.c - - Copyright (c) 2002 Ranjit Mathew - - See SECTION 16 in 'LICENSE TEXT REFERENCE TABLE' - - - >>> idna-3.4 - - BSD 3-Clause License - - Copyright (c) 2013-2021, Kim Davies - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - 3. Neither the name of the copyright holder nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - ADDITIONAL LICENSE INFORMATION - - > BSD-3 - - LICENSE.md - - Copyright (c) 2013-2021, Kim Davies - - See SECTION 9 in 'LICENSE TEXT REFERENCE TABLE' - - - >>> charset-normalizer-3.2.0 - - Copyright (c) 2019 TAHRI Ahmed R. - - MIT.LICENSE - - Permission is hereby granted, free of charge, to any - person obtaining a copy of this software and associated - documentation files (the "Software"), to deal in the - Software without restriction, including without - limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of - the Software, and to permit persons to whom the Software - is furnished to do so, subject to the following - conditions: - - The above copyright notice and this permission notice - shall be included in all copies or substantial portions - of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF - ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED - TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT - SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR - IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - - ADDITIONAL LICENSE INFORMATION - - > MIT - - charset_normalizer-3.2.0/charset_normalizer/__init__.py - - copyright (c) 2021 by Ahmed TAHRI - - See SECTION 27 in 'LICENSE TEXT REFERENCE TABLE' - - > Generic Bare Warranty Disclaimer - - charset_normalizer-3.2.0/docs/index.rst - - Copyright (c) 2019 Ahmed TAHRI Ousret - - See SECTION 28 in 'LICENSE TEXT REFERENCE TABLE' - - - >>> lxml-4.9.3 - - Copyright (c) 2004 Infrae - Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. - 3. Neither the name of Infrae nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INFRAE OR - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. - ADDITIONAL LICENSE INFORMATION - > BSD-3 - lxml-lxml-4.9.3/doc/licenses/BSD.txt - Copyright (c) 2004 Infrae - See SECTION 21 in 'LICENSE TEXT REFERENCE TABLE' - lxml-lxml-4.9.3/doc/performance.txt + >>> pycparser-2.22 - (c) ET. Where + (c) > 1: + self.log.error('Invalid literal %s. Must be a single character', repr(c)) + self.error = True - See SECTION 20 in 'LICENSE TEXT REFERENCE TABLE' + except TypeError: - lxml-lxml-4.9.3/doc/s5/rst2s5.py - Copyright 2006-2009 by the Pygments team + Copyright (C) 2001-2017 + # David M. Beazley (Dabeaz LLC) + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright notice, + # this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above copyright notice, + # this list of conditions and the following disclaimer in the documentation + # and/or other materials provided with the distribution. + # * Neither the name of the David Beazley or Dabeaz LLC may be used to + # endorse or promote products derived from this software without + # specific prior written permission. + # - See SECTION 3 in 'LICENSE TEXT REFERENCE TABLE' - lxml-lxml-4.9.3/LICENSES.txt + (c) + tok = self.lexer.token() + if not tok or tok.value != c: - copyright Ian Bicking - See SECTION 23 in 'LICENSE TEXT REFERENCE TABLE' - - lxml-lxml-4.9.3/LICENSE.txt - - Copyright (c) 2004 Infrae - - See SECTION 21 in 'LICENSE TEXT REFERENCE TABLE' - - lxml-lxml-4.9.3/src/lxml/html/__init__.py - - Copyright (c) 2004 Ian Bicking - - See SECTION 22 in 'LICENSE TEXT REFERENCE TABLE' - - > MIT - - lxml-lxml-4.9.3/src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl - - Copyright (c) 2004-2010 Rick Jellife - - See SECTION 2 in 'LICENSE TEXT REFERENCE TABLE' - - lxml-lxml-4.9.3/src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl - - Copyright (c) 2008 Rick Jelliffe - - See SECTION 24 in 'LICENSE TEXT REFERENCE TABLE' - - lxml-lxml-4.9.3/src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl - - Copyright (c) 2000,2001 Rick Jelliffe - - See SECTION 19 in 'LICENSE TEXT REFERENCE TABLE' - - lxml-lxml-4.9.3/src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl - - Copyright (c) 2000-2008 Rick Jelliffe - - See SECTION 19 in 'LICENSE TEXT REFERENCE TABLE' - - lxml-lxml-4.9.3/src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl - - Copyright (c) 2001, 2006 Rick Jelliffe - - See SECTION 19 in 'LICENSE TEXT REFERENCE TABLE' - - > Secret Labs License 2011 - - lxml-lxml-4.9.3/doc/licenses/elementtree.txt - - Copyright (c) 1999-2003 by Fredrik Lundh - - See SECTION 14 in 'LICENSE TEXT REFERENCE TABLE' - - lxml-lxml-4.9.3/src/lxml/builder.py - - Copyright (c) 1999-2004 by Fredrik Lundh - - See SECTION 13 in 'LICENSE TEXT REFERENCE TABLE' - - lxml-lxml-4.9.3/src/lxml/ElementInclude.py - - Copyright (c) 1999-2004 by Fredrik Lundh - - See SECTION 13 in 'LICENSE TEXT REFERENCE TABLE' - - lxml-lxml-4.9.3/src/lxml/_elementpath.py - - Copyright (c) 1999-2009 by Fredrik Lundh - - See SECTION 13 in 'LICENSE TEXT REFERENCE TABLE' - - - >>> urllib3-2.0.4 - - Copyright (c) 2008-2020 Andrey Petrov and contributors - - Permission is hereby granted, free of charge, to any - person obtaining a copy of this software and associated - documentation files (the "Software"), to deal in the - Software without restriction, including without - limitation the rights to use, copy, modify, merge, - publish, distribute, sublicense, and/or sell copies of - the Software, and to permit persons to whom the Software - is furnished to do so, subject to the following - conditions: - - - - The above copyright notice and this permission notice - shall be included in all copies or substantial portions - of the Software. - - - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF - ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED - TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A - PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT - SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR - IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - - ADDITIONAL LICENSE INFORMATION - - > MIT - - urllib3-2.0.4/dummyserver/proxy.py - - Copyright (c) 2012 Senko Rasic - - See SECTION 6 in 'LICENSE TEXT REFERENCE TABLE' - - urllib3-2.0.4/LICENSE.txt - - Copyright (c) 2008-2020 Andrey Petrov and contributors - - See SECTION 1 in 'LICENSE TEXT REFERENCE TABLE' - - urllib3-2.0.4/src/urllib3/contrib/_securetransport/bindings.py - - Copyright (c) 2015-2016 Will Bond - - See SECTION 10 in 'LICENSE TEXT REFERENCE TABLE' - - urllib3-2.0.4/src/urllib3/contrib/securetransport.py - - Copyright (c) 2015-2016 Will Bond - - See SECTION 10 in 'LICENSE TEXT REFERENCE TABLE' - - - >>> cryptography-41.0.3 + Copyright (C) 2001-2017 + David M. Beazley (Dabeaz LLC) + All rights reserved. Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: + modification, are permitted provided that the following conditions are + met: - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - 3. Neither the name of PyCA Cryptography nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ADDITIONAL LICENSE INFORMATION - - > BSD - - cryptography-41.0.3/docs/conf.py - [NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS SUBPACKAGE UNDER THE TERMS OF THE BSD LICENSE, THE TEXT OF WHICH IS SET FORTH BELOW. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] - - copyright 2013-2023, Individual - - See SECTION 17 in 'LICENSE TEXT REFERENCE TABLE' - - cryptography-41.0.3/src/cryptography/__about__.py - [NOTE: VMWARE, INC. ELECTS TO USE AND DISTRIBUTE THIS SUBPACKAGE UNDER THE TERMS OF THE BSD LICENSE, THE TEXT OF WHICH IS SET FORTH BELOW. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] - - Copyright 2013-2023 - - See SECTION 17 in 'LICENSE TEXT REFERENCE TABLE' - - > BSD-3 - - cryptography-41.0.3/docs/_ext/linkcode_res.py - - Copyright (c) 2005-2020, NumPy Developers - - See SECTION 26 in 'LICENSE TEXT REFERENCE TABLE' - - cryptography-41.0.3/LICENSE.BSD - - Copyright (c) Individual contributors - - See SECTION 18 in 'LICENSE TEXT REFERENCE TABLE' - - cryptography-41.0.3/vectors/LICENSE.BSD - - Copyright (c) Individual contributors - - See SECTION 18 in 'LICENSE TEXT REFERENCE TABLE' + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of the David Beazley or Dabeaz LLC may be used to + endorse or promote products derived from this software without + specific prior written permission. - >>> setuptools-68.1.2 - > Apache2.0 + (C) + C.append(g) - setuptools-68.1.2/pkg_resources/_vendor/packaging/__init__.py + return C - copyright 2014-2019 s - See SECTION 11 in 'LICENSE TEXT REFERENCE TABLE' + (C) - setuptools-68.1.2/setuptools/_vendor/packaging/__init__.py + # Compute read sets + readsets = self.compute_read_sets(C, trans, nullable) - copyright 2014-2019 s + # Compute lookback/includes relations + lookd, included = self.compute_lookback_includes(C, trans, nullable) - See SECTION 11 in 'LICENSE TEXT REFERENCE TABLE' - > MIT + (c) > 1): + raise GrammarError('%s:%d: Literal token %s in rule %r may only be a single character' % + (file, line, s, prodname)) + if c not in self.Terminals: - setuptools-68.1.2/docs/artwork.rst - Copyright (c) Anderson Bravalheri + Copyright (C) 2017 + # All rights reserved + # + # This module implements an ANSI-C style lexical preprocessor for PLY. - See SECTION 29 in 'LICENSE TEXT REFERENCE TABLE' - setuptools-68.1.2/setuptools/_vendor/tomli/__init__.py + (c) for c_name, c in node.children()) - Copyright 2021 Taneli Hukkinen + def visit_Constant(self, n): - See SECTION 5 in 'LICENSE TEXT REFERENCE TABLE' - setuptools-68.1.2/setuptools/_vendor/tomli/_parser.py - Copyright 2021 Taneli Hukkinen - See SECTION 5 in 'LICENSE TEXT REFERENCE TABLE' - setuptools-68.1.2/setuptools/_vendor/tomli/_re.py + >>> lxml-5.2.2 - Copyright 2021 Taneli Hukkinen + Copyright for the status of this software. + * + * Author: Daniel Veillard - See SECTION 5 in 'LICENSE TEXT REFERENCE TABLE' - setuptools-68.1.2/setuptools/_vendor/tomli/_types.py + Copyright for the status of this software. + */ - Copyright 2021 Taneli Hukkinen - See SECTION 5 in 'LICENSE TEXT REFERENCE TABLE' + + + + >>> cryptography-42.0.8 + -------------------- SECTION 3: Mozilla Public License, V2.0 -------------------- - >>> certifi-2023.07.22 + >>> certifi-2024.6.2 - License : MPL2.0 ==================== APPENDIX. Standard License Files ==================== @@ -1235,395 +844,4 @@ Exhibit B - “Incompatible With Secondary Licenses” Notice -This Source Code Form is “Incompatible With Secondary Licenses”, as defined by the Mozilla Public License, v. 2.0. -==================== LICENSE TEXT REFERENCE TABLE ==================== - --------------------- SECTION 1 -------------------- -MIT.LICENSE --------------------- SECTION 2 -------------------- -the MIT License --------------------- SECTION 3 -------------------- - :license: BSD, see LICENSE for details. --------------------- SECTION 4 -------------------- -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. --------------------- SECTION 5 -------------------- -# SPDX-License-Identifier: MIT --------------------- SECTION 6 -------------------- -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. --------------------- SECTION 7 -------------------- -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -``Software''), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ --------------------- SECTION 8 -------------------- - Permission is hereby granted, free of charge, to any person - obtaining a copy of this software and associated documentation - files (the ``Software''), to deal in the Software without - restriction, including without limitation the rights to use, copy, - modify, merge, publish, distribute, sublicense, and/or sell copies - of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. --------------------- SECTION 9 -------------------- -BSD 3-Clause License --------------------- SECTION 10 -------------------- - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. --------------------- SECTION 11 -------------------- -__license__ = "BSD-2-Clause or Apache-2.0" --------------------- SECTION 12 -------------------- - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - ``Software''), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR - OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - OTHER DEALINGS IN THE SOFTWARE. --------------------- SECTION 13 -------------------- -# By obtaining, using, and/or copying this software and/or its -# associated documentation, you agree that you have read, understood, -# and will comply with the following terms and conditions: -# -# Permission to use, copy, modify, and distribute this software and -# its associated documentation for any purpose and without fee is -# hereby granted, provided that the above copyright notice appears in -# all copies, and that both that copyright notice and this permission -# notice appear in supporting documentation, and that the name of -# Secret Labs AB or the author not be used in advertising or publicity -# pertaining to distribution of the software without specific, written -# prior permission. -# -# SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD -# TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT- -# ABILITY AND FITNESS. IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR -# BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY -# DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -# WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -# OF THIS SOFTWARE. --------------------- SECTION 14 -------------------- -By obtaining, using, and/or copying this software and/or its -associated documentation, you agree that you have read, understood, -and will comply with the following terms and conditions: - -Permission to use, copy, modify, and distribute this software and its -associated documentation for any purpose and without fee is hereby -granted, provided that the above copyright notice appears in all -copies, and that both that copyright notice and this permission notice -appear in supporting documentation, and that the name of Secret Labs -AB or the author not be used in advertising or publicity pertaining to -distribution of the software without specific, written prior -permission. - -SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO -THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR BE LIABLE FOR -ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --------------------- SECTION 15 -------------------- - "License :: OSI Approved :: Apache Software License", --------------------- SECTION 16 -------------------- - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - ``Software''), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR - OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - OTHER DEALINGS IN THE SOFTWARE. --------------------- SECTION 17 -------------------- -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. --------------------- SECTION 18 -------------------- -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - 1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - 3. Neither the name of PyCA Cryptography nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------- SECTION 19 -------------------- - This software is provided 'as-is', without any express or implied warranty. - In no event will the authors be held liable for any damages arising from - the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it freely, - subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not claim - that you wrote the original software. If you use this software in a product, - an acknowledgment in the product documentation would be appreciated but is - not required. - - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source distribution. --------------------- SECTION 20 -------------------- -the lxml source distribution. They are distributed under the same BSD license --------------------- SECTION 21 -------------------- -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - - 3. Neither the name of Infrae nor the names of its contributors may - be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INFRAE OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------- SECTION 22 -------------------- -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# -# 3. Neither the name of Ian Bicking nor the names of its contributors may -# be used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IAN BICKING OR -# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------- SECTION 23 -------------------- -lxml.cssselect and lxml.html are copyright Ian Bicking and distributed -under the BSD license (see doc/licenses/BSD.txt). --------------------- SECTION 24 -------------------- - This software is provided 'as-is', without any express or implied warranty. - In no event will the authors be held liable for any damages arising from - the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it freely, - subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not claim - that you wrote the original software. If you use this software in a product, - an acknowledgment in the product documentation would be appreciated but is - not required. - - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source distribution. --------------------- SECTION 25 -------------------- -__license__ = "Apache License, Version 2.0" --------------------- SECTION 26 -------------------- -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# -# * Neither the name of the NumPy Developers nor the names of any -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------- SECTION 27 -------------------- -:license: MIT, see LICENSE for more details. --------------------- SECTION 28 -------------------- -details. Be aware that no warranty of any kind is provided with this package. --------------------- SECTION 29 -------------------- - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to - deal in the Software without restriction, including without limitation the - rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - sell copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - IN THE SOFTWARE. --------------------- SECTION 30 -------------------- -# See LICENSE for details. - - -====================================================================== - -To the extent any open source components are licensed under the GPL -and/or LGPL, or other similar licenses that require the source code -and/or modifications to source code to be made available (as would be -noted above), you may obtain a copy of the source code corresponding to -the binaries for such open source components and modifications thereto, -if any, (the "Source Files"), by downloading the Source Files from -VMware's website at http://www.vmware.com/download/open_source.html, or -by sending a request, with your name and address to: VMware, Inc., 3401 -Hillview Avenue, Palo Alto, CA 94304, United States of America. All such -requests should clearly specify: OPEN SOURCE FILES REQUEST, Attention -General Counsel. VMware shall mail a copy of the Source Files to you on -a CD or equivalent physical medium. This offer to obtain a copy of the -Source Files is valid for three years from the date you acquired this -Software product. Alternatively, the Source Files may accompany the -VMware product. - -[VSPHEREAUTOMATIONSDKPYTHON80U2GASY082223] \ No newline at end of file +This Source Code Form is “Incompatible With Secondary Licenses”, as defined by the Mozilla Public License, v. 2.0. \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 4354b534..fdfe5483 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ ###### Common requirements ###### lxml >= 4.3.0 -pyVmomi >=6.7 six (>=1.12) requests (>=2.27.1) @@ -8,7 +7,8 @@ pyOpenSSL (>=22.0.0) cryptography (>=37.0.2) setuptools (>=62.3.2) ###### SDK requirements ###### -vcenter-bindings == 4.2.0 +pyVmomi >=8.0.3.0.1 +vmware-vcenter == 8.0.3.0 vmwarecloud-aws nsx-python-sdk nsx-policy-python-sdk diff --git a/requirements_pypi.txt b/requirements_pypi.txt index c96d245a..01bb35d8 100644 --- a/requirements_pypi.txt +++ b/requirements_pypi.txt @@ -1,9 +1,13 @@ ###### This requirements file is used for local installation where access to GitHub is restricted ###### ###### Common requirements ###### lxml >= 4.3.0 -pyVmomi >=6.7 six (>=1.12) requests (>=2.27.1) pyOpenSSL (>=22.0.0) cryptography (>=37.0.2) -setuptools (>=62.3.2) \ No newline at end of file +setuptools (>=62.3.2) +###### SDK requirements ###### +pyVmomi >= 8.0.3.0.1 +vmware-vcenter == 8.0.3.0 +vmware-vapi-runtime == 2.52.0 +vmware-vapi-common-client == 2.52.0 \ No newline at end of file diff --git a/samples/vsan/snapservice/README.md b/samples/vsan/snapservice/README.md new file mode 100644 index 00000000..a3a0156b --- /dev/null +++ b/samples/vsan/snapservice/README.md @@ -0,0 +1,37 @@ +This directory contains samples for snapservice APIs: +1. Protection Group Create, List and Delete operations: + Sample | Description + -------------------------------------|--------------------------------------------------- + list_protection_groups.py | Demonstrates listing protection groups + create_protection_group.py | Demonstrates creating protection group + delete_protection_groups.py | Demonstrates deleting protection groups + +2. Protection Group Snapshot Delete operations: + Sample | Description + -------------------------------------|--------------------------------------------------- + delete_protection_group_snapshots.py | Demonstrates deleting protection group snapshots + +### To view the available command-line options: + $ python protection_group/list_protection_groups.py --help + $ python protection_group/create_protection_group.py --help + $ python protection_group/delete_protection_groups.py --help + $ python snapshot/delete_protection_group_snapshots.py --help + +### Running the samples: + Fill "Snapservice protection group creation spec" section in vcenter/setup/testbed.py when calling create_pg.py + + $ python protection_group/list_protection_groups.py --server --username --password --snapservice --cluster -v + + $ python protection_group/create_protection_group.py --server --username --password --snapservice --cluster -v + $ python protection_group/create_protection_group.py --server --username --password --snapservice --cluster -v -c + + $ python protection_group/delete_protection_groups.py --server --username --password --snapservice --cluster --pgnames -v + $ python protection_group/delete_protection_groups.py --server --username --password --snapservice --cluster --pgnames -v --force + + $ python snapshot/delete_protection_group_snapshots.py --server --username --password --snapservice --cluster --pgname --remain -v + +### Testbed Requirement: + - vCenter Server >= 8.0.3+ + - vSAN ESA disk + - vSAN Cluster + - Snapservice = 8.0.3 \ No newline at end of file diff --git a/samples/vsan/snapservice/__init__.py b/samples/vsan/snapservice/__init__.py new file mode 100644 index 00000000..8f4b4e47 --- /dev/null +++ b/samples/vsan/snapservice/__init__.py @@ -0,0 +1,25 @@ +""" +* ******************************************************* +* Copyright (c) 2024 Broadcom. All Rights Reserved. +* SPDX-License-Identifier: MIT +* ******************************************************* +* +* DISCLAIMER. THIS PROGRAM IS PROVIDED TO YOU "AS IS" WITHOUT +* WARRANTIES OR CONDITIONS OF ANY KIND, WHETHER ORAL OR WRITTEN, +* EXPRESS OR IMPLIED. THE AUTHOR SPECIFICALLY DISCLAIMS ANY IMPLIED +* WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, +* NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +""" + +__author__ = 'Broadcom, Inc.' +__copyright__ = 'Copyright (c) 2024 Broadcom. All Rights Reserved.' + + +# Required to distribute different parts of this +# package as multiple distribution +try: + import pkg_resources + pkg_resources.declare_namespace(__name__) +except ImportError: + from pkgutil import extend_path + __path__ = extend_path(__path__, __name__) # @ReservedAssignment diff --git a/samples/vsan/snapservice/protection_group/__init__.py b/samples/vsan/snapservice/protection_group/__init__.py new file mode 100644 index 00000000..8f4b4e47 --- /dev/null +++ b/samples/vsan/snapservice/protection_group/__init__.py @@ -0,0 +1,25 @@ +""" +* ******************************************************* +* Copyright (c) 2024 Broadcom. All Rights Reserved. +* SPDX-License-Identifier: MIT +* ******************************************************* +* +* DISCLAIMER. THIS PROGRAM IS PROVIDED TO YOU "AS IS" WITHOUT +* WARRANTIES OR CONDITIONS OF ANY KIND, WHETHER ORAL OR WRITTEN, +* EXPRESS OR IMPLIED. THE AUTHOR SPECIFICALLY DISCLAIMS ANY IMPLIED +* WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, +* NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +""" + +__author__ = 'Broadcom, Inc.' +__copyright__ = 'Copyright (c) 2024 Broadcom. All Rights Reserved.' + + +# Required to distribute different parts of this +# package as multiple distribution +try: + import pkg_resources + pkg_resources.declare_namespace(__name__) +except ImportError: + from pkgutil import extend_path + __path__ = extend_path(__path__, __name__) # @ReservedAssignment diff --git a/samples/vsan/snapservice/protection_group/create_protection_group.py b/samples/vsan/snapservice/protection_group/create_protection_group.py new file mode 100644 index 00000000..b9ae86c2 --- /dev/null +++ b/samples/vsan/snapservice/protection_group/create_protection_group.py @@ -0,0 +1,148 @@ +#!/usr/bin/env python + +""" +* ******************************************************* +* Copyright (c) 2024 Broadcom. All Rights Reserved. +* SPDX-License-Identifier: MIT +* ******************************************************* +* +* DISCLAIMER. THIS PROGRAM IS PROVIDED TO YOU "AS IS" WITHOUT +* WARRANTIES OR CONDITIONS OF ANY KIND, WHETHER ORAL OR WRITTEN, +* EXPRESS OR IMPLIED. THE AUTHOR SPECIFICALLY DISCLAIMS ANY IMPLIED +* WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, +* NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +""" + +__author__ = 'Broadcom, Inc.' +__vcenter_version__ = '8.0.3+' + +import time + +from samples.vsphere.common import sample_cli +from samples.vsphere.common import sample_util +from samples.vsphere.common.ssl_helper import get_unverified_session +from samples.vsphere.vcenter.setup import testbed +from samples.vsan.snapservice.vsan_snapservice_client import create_snapservice_client + +from vmware.vapi.vsphere.client import create_vsphere_client +from com.vmware.vcenter_client import (Cluster, VM) +from com.vmware.snapservice_client import * +from com.vmware.snapservice.clusters_client import * +from com.vmware.snapservice.tasks_client import Status + + +class CreateProtectionGroup(object): + """ + Description: Demonstrates creating protection group. + + """ + def __init__(self): + parser = sample_cli.build_arg_parser() + + required_args = parser.add_argument_group( + 'snapservice required arguments') + required_args.add_argument('--snapservice', + action='store', + required=True, + help='Snapservice IP/hostname to connect to') + required_args.add_argument('--cluster', + action='store', + required=True, + help='Cluster where the protection group locates') + + args = sample_util.process_cli_args(parser.parse_args()) + self.cluster = args.cluster + self.cleardata = args.cleardata + + skipverification = True if args.skipverification else False + vcSession = get_unverified_session() if skipverification else None + self.vcClient = create_vsphere_client(server=args.server, + username=args.username, + password=args.password, + session=vcSession) + + ssSession = get_unverified_session() if skipverification else None + self.ssClient = create_snapservice_client(server=args.snapservice, + vc=args.server, + username=args.username, + password=args.password, + session=ssSession, + skip_verification=skipverification) + + def run(self): + # Get cluster identifier + cluster_spec = set([self.cluster]) + cluster_list = self.vcClient.vcenter.Cluster.list( + Cluster.FilterSpec(names=cluster_spec)) + + clusterId = cluster_list[0].cluster + self.clusterId = clusterId + print("\nGot cluster '{}' id: {}".format(self.cluster, clusterId)) + + # Get vm identifier + vm_names = set(testbed.config["VM_NAMES"].split(",")) + vm_list = self.vcClient.vcenter.VM.list(VM.FilterSpec(names=vm_names)) + + vm_ids = [] + for vm_info in vm_list: + vm_ids.append(vm_info.vm) + print("\nGot VM list: {}".format(vm_ids)) + + # Get vm formats + vm_formats = testbed.config["VM_FORMATS"].split(",") + + # Build protection group Spec + target_entities = TargetEntities(vm_name_patterns=vm_formats, vms=set(vm_ids)) + snapshot_policies = [SnapshotPolicy(name='policy1', + schedule=SnapshotSchedule( + TimeUnit(testbed.config["SCHEDULE_UNIT"]), + testbed.config["SCHEDULE"]), + retention=RetentionPeriod( + TimeUnit(testbed.config["RETENTION_UNIT"]), + testbed.config["RETENTION"]))] + locked = testbed.config["LOCK"] + + spec = ProtectionGroupSpec(name=testbed.config["PG_NAME"], + target_entities=target_entities, + snapshot_policies=snapshot_policies, + locked=locked) + print("\n###Creating protection group with spec:\n") + print(spec) + + # Wait for task to complete. + task = self.ssClient.snapservice.clusters.ProtectionGroups.create_task(clusterId, spec=spec) + + while True: + task_info = self.ssClient.snapservice.Tasks.get(task.get_task_id()) + + if task_info.status == Status.SUCCEEDED: + print("\n###Creation task {} succeeds.".format(task_info.description.id)) + return + elif task_info.status == Status.FAILED: + print("\n###Creation task {} fails.\nError:\n".format(task_info.description.id)) + print(task_info.error) + return + else: + print("\n###Creation task {} progress: {}".format(task_info.description.id, + task_info.progress.completed)) + time.sleep(5) + + def cleanup(self): + pgs_info = self.ssClient.snapservice.clusters.ProtectionGroups.list(self.clusterId) + + for pg_info in pgs_info.items: + if pg_info.info.name == testbed.config["PG_NAME"] and not testbed.config["LOCK"]: + print("\n###Deleting created PG {}".format(testbed.config["PG_NAME"])) + self.ssClient.snapservice.clusters.ProtectionGroups.delete_task( + self.clusterId, pg_info.pg, ProtectionGroups.DeleteSpec(force=True)) + + +def main(): + create_pg = CreateProtectionGroup() + create_pg.run() + if create_pg.cleardata: + create_pg.cleanup() + + +if __name__ == '__main__': + main() diff --git a/samples/vsan/snapservice/protection_group/delete_protection_groups.py b/samples/vsan/snapservice/protection_group/delete_protection_groups.py new file mode 100644 index 00000000..17cd52dd --- /dev/null +++ b/samples/vsan/snapservice/protection_group/delete_protection_groups.py @@ -0,0 +1,141 @@ +#!/usr/bin/env python + +""" +* ******************************************************* +* Copyright (c) 2024 Broadcom. All Rights Reserved. +* SPDX-License-Identifier: MIT +* ******************************************************* +* +* DISCLAIMER. THIS PROGRAM IS PROVIDED TO YOU "AS IS" WITHOUT +* WARRANTIES OR CONDITIONS OF ANY KIND, WHETHER ORAL OR WRITTEN, +* EXPRESS OR IMPLIED. THE AUTHOR SPECIFICALLY DISCLAIMS ANY IMPLIED +* WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, +* NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +""" + +__author__ = 'Broadcom, Inc.' +__vcenter_version__ = '8.0.3+' + +import time + +from samples.vsphere.common import sample_cli +from samples.vsphere.common import sample_util +from samples.vsphere.common.ssl_helper import get_unverified_session +from samples.vsan.snapservice.vsan_snapservice_client import create_snapservice_client + +from vmware.vapi.vsphere.client import create_vsphere_client +from com.vmware.vcenter_client import Cluster +from com.vmware.snapservice_client import * +from com.vmware.snapservice.clusters_client import * +from com.vmware.snapservice.tasks_client import Status + + +class DeleteProtectionGroups(object): + """ + Description: Demonstrates deleting protection groups. + + """ + def __init__(self): + parser = sample_cli.build_arg_parser() + + required_args = parser.add_argument_group( + 'snapservice required arguments') + required_args.add_argument('--snapservice', + action='store', + required=True, + help='Snapservice IP/hostname to connect to') + required_args.add_argument('--cluster', + action='store', + required=True, + help='Cluster where the protection group locates') + required_args.add_argument('--pgnames', + action='store', + required=True, + help='Protection groups to delete, separate with comma.') + + parser.add_argument_group('snapservice optional arguments')\ + .add_argument('--force', + action='store_true', + help='Whether delete protection group snapshots') + + args = sample_util.process_cli_args(parser.parse_args()) + self.cluster = args.cluster + self.pgnames = args.pgnames + self.force = True if args.force else False + + skipverification = True if args.skipverification else False + vcSession = get_unverified_session() if skipverification else None + self.vcClient = create_vsphere_client(server=args.server, + username=args.username, + password=args.password, + session=vcSession) + + ssSession = get_unverified_session() if skipverification else None + self.ssClient = create_snapservice_client(server=args.snapservice, + vc=args.server, + username=args.username, + password=args.password, + session=ssSession, + skip_verification=skipverification) + + def run(self): + # Get cluster identifier + cluster_spec = set([self.cluster]) + cluster_list = self.vcClient.vcenter.Cluster.list( + Cluster.FilterSpec(names=cluster_spec)) + + clusterId = cluster_list[0].cluster + print("\nGot cluster '{}' id: {}".format(self.cluster, clusterId)) + + pg_names = self.pgnames.split(",") + pgs_info = self.ssClient.snapservice.clusters.ProtectionGroups.list(clusterId) + tasks = [] + for pg_info in pgs_info.items: + if pg_info.info.name in pg_names: + if pg_info.info.locked: + print("\nProtection group '{}' is mutabl, skip the deletion." + .format(pg_info.info.name)) + + elif pg_info.info.status == ProtectionGroupStatus.MARKED_FOR_DELETE: + print("\nProtection group '{}' is marked as deleted, skip the " + "deletion.".format(pg_info.info.name)) + + else: + print("\nDeleting protection group '{}' : '{}'" + .format(pg_info.info.name, pg_info.pg)) + + task = self.ssClient.snapservice.clusters.ProtectionGroups.delete_task( + clusterId, pg_info.pg, ProtectionGroups.DeleteSpec(force=self.force)) + print("Task id: {}\n".format(task.get_task_id())) + tasks.append(task.get_task_id()) + + taskCompleted = 0 + while True: + + for taskId in tasks: + task_info = self.ssClient.snapservice.Tasks.get(taskId) + + if task_info.status == Status.SUCCEEDED: + print("\n###Deletion task {} succeeds.".format(task_info.description.id)) + taskCompleted += 1 + elif task_info.status == Status.FAILED: + print("\n###Deletion task {} fails.\nError:\n".format(task_info.description.id)) + print(task_info.getResult()) + taskCompleted += 1 + else: + print("\n###Deletion task {} progress: ".format(task_info.description.progress)) + + if taskCompleted >= len(tasks): + print("\n\n###All protection group deletion jobs are completed") + break + + time.sleep(5) + + +def main(): + delete_pg = DeleteProtectionGroups() + delete_pg.run() + + +if __name__ == '__main__': + main() diff --git a/samples/vsan/snapservice/protection_group/list_protection_groups.py b/samples/vsan/snapservice/protection_group/list_protection_groups.py new file mode 100644 index 00000000..a04da87c --- /dev/null +++ b/samples/vsan/snapservice/protection_group/list_protection_groups.py @@ -0,0 +1,89 @@ +#!/usr/bin/env python + +""" +* ******************************************************* +* Copyright (c) 2024 Broadcom. All Rights Reserved. +* SPDX-License-Identifier: MIT +* ******************************************************* +* +* DISCLAIMER. THIS PROGRAM IS PROVIDED TO YOU "AS IS" WITHOUT +* WARRANTIES OR CONDITIONS OF ANY KIND, WHETHER ORAL OR WRITTEN, +* EXPRESS OR IMPLIED. THE AUTHOR SPECIFICALLY DISCLAIMS ANY IMPLIED +* WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, +* NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +""" + +__author__ = 'Broadcom, Inc.' +__vcenter_version__ = '8.0.3+' + +from samples.vsphere.common import sample_cli +from samples.vsphere.common import sample_util +from samples.vsphere.common.ssl_helper import get_unverified_session +from samples.vsan.snapservice.vsan_snapservice_client import create_snapservice_client + +from vmware.vapi.vsphere.client import create_vsphere_client +from com.vmware.vcenter_client import Cluster +from com.vmware.snapservice_client import * +from com.vmware.snapservice.clusters_client import * + + +class ListProtectionGroups(object): + """ + Description: Demonstrates listing protection groups. + + """ + def __init__(self): + parser = sample_cli.build_arg_parser() + + required_args = parser.add_argument_group( + 'snapservice required arguments') + required_args.add_argument('--snapservice', + action='store', + required=True, + help='Snapservice IP/hostname to connect to') + required_args.add_argument('--cluster', + action='store', + required=True, + help='Cluster where the protection group locates') + + args = sample_util.process_cli_args(parser.parse_args()) + self.cluster = args.cluster + + skipverification = True if args.skipverification else False + vcSession = get_unverified_session() if skipverification else None + self.vcClient = create_vsphere_client(server=args.server, + username=args.username, + password=args.password, + session=vcSession) + + ssSession = get_unverified_session() if skipverification else None + self.ssClient = create_snapservice_client(server=args.snapservice, + vc=args.server, + username=args.username, + password=args.password, + session=ssSession, + skip_verification=skipverification) + + def run(self): + # Get cluster identifier + cluster_spec = set([self.cluster]) + cluster_list = self.vcClient.vcenter.Cluster.list( + Cluster.FilterSpec(names=cluster_spec)) + + clusterId = cluster_list[0].cluster + print("\nGot cluster '{}' id: {}".format(self.cluster, clusterId)) + + pgs_info = self.ssClient.snapservice.clusters.ProtectionGroups.list(clusterId) + print("\n\nList of protection groups:\n") + for pg_info in pgs_info.items: + print(pg_info) + print("----------------------------------------\n") + + +def main(): + list_pg = ListProtectionGroups() + list_pg.run() + + +if __name__ == '__main__': + main() diff --git a/samples/vsan/snapservice/snapshot/__init__.py b/samples/vsan/snapservice/snapshot/__init__.py new file mode 100644 index 00000000..8f4b4e47 --- /dev/null +++ b/samples/vsan/snapservice/snapshot/__init__.py @@ -0,0 +1,25 @@ +""" +* ******************************************************* +* Copyright (c) 2024 Broadcom. All Rights Reserved. +* SPDX-License-Identifier: MIT +* ******************************************************* +* +* DISCLAIMER. THIS PROGRAM IS PROVIDED TO YOU "AS IS" WITHOUT +* WARRANTIES OR CONDITIONS OF ANY KIND, WHETHER ORAL OR WRITTEN, +* EXPRESS OR IMPLIED. THE AUTHOR SPECIFICALLY DISCLAIMS ANY IMPLIED +* WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, +* NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +""" + +__author__ = 'Broadcom, Inc.' +__copyright__ = 'Copyright (c) 2024 Broadcom. All Rights Reserved.' + + +# Required to distribute different parts of this +# package as multiple distribution +try: + import pkg_resources + pkg_resources.declare_namespace(__name__) +except ImportError: + from pkgutil import extend_path + __path__ = extend_path(__path__, __name__) # @ReservedAssignment diff --git a/samples/vsan/snapservice/snapshot/delete_protection_group_snapshots.py b/samples/vsan/snapservice/snapshot/delete_protection_group_snapshots.py new file mode 100644 index 00000000..e5b98033 --- /dev/null +++ b/samples/vsan/snapservice/snapshot/delete_protection_group_snapshots.py @@ -0,0 +1,126 @@ +#!/usr/bin/env python + +""" +* ******************************************************* +* Copyright (c) 2024 Broadcom. All Rights Reserved. +* SPDX-License-Identifier: MIT +* ******************************************************* +* +* DISCLAIMER. THIS PROGRAM IS PROVIDED TO YOU "AS IS" WITHOUT +* WARRANTIES OR CONDITIONS OF ANY KIND, WHETHER ORAL OR WRITTEN, +* EXPRESS OR IMPLIED. THE AUTHOR SPECIFICALLY DISCLAIMS ANY IMPLIED +* WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, +* NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +""" + +__author__ = 'Broadcom, Inc.' +__vcenter_version__ = '8.0.3+' + +from samples.vsphere.common import sample_cli +from samples.vsphere.common import sample_util +from samples.vsphere.common.ssl_helper import get_unverified_session +from samples.vsan.snapservice.vsan_snapservice_client import create_snapservice_client + +from vmware.vapi.vsphere.client import create_vsphere_client +from com.vmware.vcenter_client import Cluster +from com.vmware.snapservice_client import * +from com.vmware.snapservice.clusters_client import * + + +class DeleteProtectionGroupSnapshots(object): + """ + Description: Demonstrates deleting protection group snapshots. + + """ + def __init__(self): + parser = sample_cli.build_arg_parser() + + required_args = parser.add_argument_group( + 'snapservice required arguments') + required_args.add_argument('--snapservice', + action='store', + required=True, + help='Snapservice IP/hostname to connect to') + required_args.add_argument('--cluster', + action='store', + required=True, + help='Cluster where the protection group locates') + required_args.add_argument('--pgname', + action='store', + required=True, + help='Protection group to delete snapshot') + + parser.add_argument_group('snapservice optional arguments')\ + .add_argument('--remain', + action='store', + help='How many protection group snapshots to leave') + + args = sample_util.process_cli_args(parser.parse_args()) + self.cluster = args.cluster + self.pgname = args.pgname + self.remain = int(args.remain) if int(args.remain) > 0 else 0 + + skipverification = True if args.skipverification else False + vcSession = get_unverified_session() if skipverification else None + self.vcClient = create_vsphere_client(server=args.server, + username=args.username, + password=args.password, + session=vcSession) + + ssSession = get_unverified_session() if skipverification else None + self.ssClient = create_snapservice_client(server=args.snapservice, + vc=args.server, + username=args.username, + password=args.password, + session=ssSession, + skip_verification=skipverification) + + def run(self): + # Get cluster identifier + cluster_spec = set([self.cluster]) + cluster_list = self.vcClient.vcenter.Cluster.list( + Cluster.FilterSpec(names=cluster_spec)) + + clusterId = cluster_list[0].cluster + print("\nGot cluster '{}' id: {}".format(self.cluster, clusterId)) + + # Get protection group identifier + pgs_info = self.ssClient.snapservice.clusters.ProtectionGroups.list(clusterId) + pgId = 0 + for pg_info in pgs_info.items: + if pg_info.info.name == self.pgname: + pgId = pg_info.pg + print("\nProtection groups '{}': '{}'\n".format(self.pgname, pgId)) + + # Get protection group snapshots + snapshots_info = self.ssClient.snapservice.clusters.protection_groups\ + .Snapshots.list(clusterId, pgId) + print("\n\nGet snapshots:\n{}".format(snapshots_info)) + + # Get snapshot to delete + snapshotTimeMap = {} + for snapshot in snapshots_info.snapshots: + snapshotTimeMap[snapshot.info.expires_at] = snapshot.snapshot + + timeToDel = [] + if self.remain == 0: + timeToDel = sorted(snapshotTimeMap) + elif self.remain < len(snapshotTimeMap): + timeToDel = sorted(snapshotTimeMap)[0:-self.remain] + else: + print("\n\n No snapshot to delete.\n") + + for time in timeToDel: + print("\n\n##Deleting pg snapshot '{}' which will expire at '{}'" + .format(snapshotTimeMap[time], time)) + task = self.ssClient.snapservice.clusters.protection_groups\ + .Snapshots.delete(clusterId, pgId, snapshotTimeMap[time]) + + +def main(): + delete_pg_snapshot = DeleteProtectionGroupSnapshots() + delete_pg_snapshot.run() + + +if __name__ == '__main__': + main() diff --git a/samples/vsan/snapservice/vsan_snapservice_client.py b/samples/vsan/snapservice/vsan_snapservice_client.py new file mode 100644 index 00000000..cb249073 --- /dev/null +++ b/samples/vsan/snapservice/vsan_snapservice_client.py @@ -0,0 +1,137 @@ +#!/usr/bin/env python + +""" +* ******************************************************* +* Copyright (c) 2024 Broadcom. All Rights Reserved. +* SPDX-License-Identifier: MIT +* ******************************************************* +* +* DISCLAIMER. THIS PROGRAM IS PROVIDED TO YOU "AS IS" WITHOUT +* WARRANTIES OR CONDITIONS OF ANY KIND, WHETHER ORAL OR WRITTEN, +* EXPRESS OR IMPLIED. THE AUTHOR SPECIFICALLY DISCLAIMS ANY IMPLIED +* WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, +* NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +""" + +__author__ = 'Broadcom, Inc.' +__vcenter_version__ = '8.0.3+' + +import requests +import ssl +from pyVim import sso + +from com.vmware.snapservice.clusters_client import StubFactory as clusters_factory +from com.vmware.snapservice.info_client import StubFactory as info_factory +from com.vmware.snapservice.tasks_client import StubFactory as tasks_factory + +from vmware.vapi.bindings.stub import ApiClient +from vmware.vapi.bindings.stub import StubFactoryBase +from vmware.vapi.lib.connect import get_requests_connector +from vmware.vapi.security.client.security_context_filter import \ + LegacySecurityContextFilter +from vmware.vapi.security.sso import create_saml_bearer_security_context +from vmware.vapi.stdlib.client.factories import StubConfigurationFactory + +JSON_RPC_ENDPOINT = '/api' + + +class StubFactory(StubFactoryBase): + + def __init__(self, stub_config): + StubFactoryBase.__init__(self, stub_config) + self.snapservice.clusters = clusters_factory(stub_config) + self.snapservice.info = info_factory(stub_config) + self.snapservice.tasks = tasks_factory(stub_config) + + _attrs = { + 'snapservice': 'com.vmware.snapservice_client.StubFactory', + } + + +class SnapserviceClient(ApiClient): + """ + Snapservice Client class that provides access to stubs for all services in + the snapservice API + """ + + def __init__(self, session, server, bearer_token): + """ + Initialize SnapserviceClient by creating a parent stub factory instance + of all snapservice components. + + :type session: :class:`requests.Session` + :param session: Requests HTTP session instance. If not specified, + then one is automatically created and used + :type server: :class:`str` + :param server: snapservice appliance host name or IP address + :type bearer_token: :class:`str` + :param bearer_token: SAML Bearer Token + """ + if not session: + session = requests.Session() + self.session = session + + host_url = "https://" + server + JSON_RPC_ENDPOINT + + if bearer_token is None: + raise "Please provide bearer_token to authenticate snapservice" + sec_ctx = create_saml_bearer_security_context(bearer_token) + + stub_config = StubConfigurationFactory.new_std_configuration( + get_requests_connector( + session=session, url=host_url, + provider_filter_chain=[ + LegacySecurityContextFilter( + security_context=sec_ctx)])) + + stub_factory = StubFactory(stub_config) + ApiClient.__init__(self, stub_factory) + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + self.__del__() + + def __del__(self): + if hasattr(self, 'session'): + self.session.close() + + +def create_snapservice_client(server, vc, username, password, session, + skip_verification=True): + """ + Helper method to create an instance of the snapservice client. + Currently, snapservice only support bearer token to authenticate. So + acqure bearer token from sso and then create the snapservice client. + + :type server: :class:`str` + :param server: snapservice appliance host name or IP address + :type vc: :class:`str` + :param vc: vCenter server host name or IP address + :type username: :class:`str` + :param username: username to the vCenter server + :type password: :class:`str` + :param password: password of the username + :type session: :class:`requests.Session` or ``None`` + :param session: Requests HTTP session instance. If not specified, + then one is automatically created and used + """ + # Acquire token from sso. + sso_url = 'https://' + vc + '/sts/STSService' + authenticator = sso.SsoAuthenticator(sso_url) + + context = None + if skip_verification: + if hasattr(ssl, '_create_unverified_context'): + context = ssl._create_unverified_context() + + # The token lifetime is 30 minutes. + print("\n\nAcquire SAML token from PSC.\n") + saml_token = authenticator.get_bearer_saml_assertion(username, + password, + token_duration=30 * 60, + delegatable=True, + ssl_context=context) + + return SnapserviceClient(session=session, server=server, bearer_token=saml_token) diff --git a/samples/vsphere/common/lookup_service_helper.py b/samples/vsphere/common/lookup_service_helper.py index fe3b3d2f..373be829 100644 --- a/samples/vsphere/common/lookup_service_helper.py +++ b/samples/vsphere/common/lookup_service_helper.py @@ -1,6 +1,8 @@ """ * ******************************************************* -* Copyright (c) VMware, Inc. 2013. All Rights Reserved. +* Copyright (c) 2013, 2024 Broadcom. All Rights Reserved. +* The term "Broadcom" refers to Broadcom Inc. +* and/or its subsidiaries. * SPDX-License-Identifier: MIT * ******************************************************* * @@ -11,13 +13,14 @@ * NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. """ -__author__ = 'VMware, Inc.' -__copyright__ = 'Copyright 2013 VMware, Inc. All rights reserved.' +__author__ = 'Broadcom, Inc.' +__copyright__ = 'Copyright 2013, 2024 Broadcom, Inc. All rights reserved.' import os +from deprecated import deprecated from suds.client import Client - +@deprecated(version='8.0U3', reason='Use well-known endpoint URLs instead of looking them up.') class LookupServiceHelper(object): def __init__(self, wsdl_url, soap_url, skip_verification): self.wsdl_url = wsdl_url diff --git a/samples/vsphere/common/platform_service_controller.py b/samples/vsphere/common/platform_service_controller.py index def7408b..41249214 100644 --- a/samples/vsphere/common/platform_service_controller.py +++ b/samples/vsphere/common/platform_service_controller.py @@ -1,6 +1,8 @@ """ * ******************************************************* -* Copyright (c) VMware, Inc. 2013, 2016. All Rights Reserved. +* Copyright (c) 2024 Broadcom. All Rights Reserved. +* Broadcom Confidential. The term "Broadcom" refers to Broadcom Inc. +* and/or its subsidiaries. * SPDX-License-Identifier: MIT * ******************************************************* * @@ -11,8 +13,10 @@ * NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. """ -__author__ = 'VMware, Inc.' -__copyright__ = 'Copyright 2013, 2016 VMware, Inc. All rights reserved.' +__author__ = 'Broadcom, Inc.' +__copyright__ = 'Copyright 2013, 2016, 2024 Broadcom, Inc. All rights reserved.' + +from deprecated import deprecated from vmware.vapi.security.sso import create_saml_bearer_security_context from samples.vsphere.common import sso @@ -20,7 +24,7 @@ from samples.vsphere.common.lookup_service_helper import LookupServiceHelper from samples.vsphere.common.ssl_helper import get_unverified_context - +@deprecated(version='8.0U3', reason='External PSC is no longer supported since vCenter 7.0. Use well-known endpoint URLs instead of looking them up.') class PlatformServiceController(object): """ Manages services on the infrastructure node (e.g. lookup service, SSO etc.) diff --git a/samples/vsphere/hardwaretpm/README.md b/samples/vsphere/hardwaretpm/README.md new file mode 100644 index 00000000..bdc17487 --- /dev/null +++ b/samples/vsphere/hardwaretpm/README.md @@ -0,0 +1,37 @@ +This directory contains sample for getting TPM information using Trust Authority APIs added in __vcenter_version__ = '8.0+' + * Get ESX TPM information - tpm_info.py + +Running the samples + $ python /.py --server --username --password + +* Testbed Requirement: + - 1 vCenter Server + - 1 ESX host with TPM enabled + +* Sample output +python samples/vsphere/hardwaretpm/tpm_info.py -s -u -p --skipverification +vcenter server = +vc username = +---------------------------- +TPM Information +---------------------------- +'major_version: 2' +'minor_version: 0' +'active: True' +'manufacturer: NTC' +'model: rls' +'firmware_version: 1.3.1.0' +---------------------------- +---------------------------- +TPM Endorsement key +---------------------------- +('-----BEGIN PUBLIC KEY-----\n' + 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1I65uMJU5MugQzl3K6yg\n' + 'Zjzed6aP7MX1Cl670NsvMSXs4FRdNZ1wkJHFUHrSG6ihBmHoziqWKhMjv3g9qrmJ\n' + 'tGR6uGsDi2nFsjn0/AK5epDQsQC6FffE6OotqAMtx+MocuU6XOacZ0lyjUcVGZRX\n' + 'RLK1TmRL3ugupFDe0XLcQZPNzv4cYNLub3prYEgEcpac89xVEn/TCyRK/nMGTHxs\n' + 'Z1oMI+FjpKMh5Vj/6c2gwhoX7tYQFXZOLy6S9prok5fWgHssZAjQNLjp1rihVpp3\n' + '6BIkCBRw+LSEdz47naOsZN7NEYO78It3JGlPt2fpYVJ6+/8ObUa5Sv8svzFOb0Qq\n' + 'rQIDAQAB\n' + '-----END PUBLIC KEY-----\n') +---------------------------- diff --git a/samples/vsphere/hardwaretpm/tpm_info.py b/samples/vsphere/hardwaretpm/tpm_info.py new file mode 100644 index 00000000..53eb520d --- /dev/null +++ b/samples/vsphere/hardwaretpm/tpm_info.py @@ -0,0 +1,96 @@ +#!/usr/bin/env python + +""" +* ******************************************************* +* Copyright (c) 2024 Broadcom. All Rights Reserved. +* Broadcom Confidential. The term "Broadcom" refers to Broadcom Inc. +* and/or its subsidiaries. +* SPDX-License-Identifier: MIT +* ******************************************************* +""" + +__author__ = 'Broadcom, Inc.' +__vcenter_version__ = '8.0+' + +from pprint import pprint + +from com.vmware.vcenter.trusted_infrastructure.hosts.hardware_client import Tpm +from com.vmware.vcenter.trusted_infrastructure.hosts.hardware.tpm_client import EndorsementKeys +from vmware.vapi.vsphere.client import create_vsphere_client + +from samples.vsphere.common import sample_cli +from samples.vsphere.common import sample_util +from samples.vsphere.common import vapiconnect +from samples.vsphere.common.ssl_helper import get_unverified_session + + +class TPMInfo(object): + """ + Demonstrates how to get TPM Information for the Host + attached to vCenter. + + Sample Prerequisites: + vCenter/ESX(TPM enabled) + """ + def __init__(self): + self.stub_config = None + self.hostId = None + + parser = sample_cli.build_arg_parser() + args = sample_util.process_cli_args(parser.parse_args()) + session = get_unverified_session() if args.skipverification else None + + # Login to vSphere client to get attached Host information. + self.client = create_vsphere_client(server=args.server, + username=args.username, + password=args.password, + session=session) + for host in self.client.vcenter.Host.list(): + self.hostId = host.host + + # Connect to the trusted infrastructure services. + self.stub_config = vapiconnect.connect(host=args.server, + user=args.username, + pwd=args.password, + skip_verification=args.skipverification) + self.tpm_svc = Tpm(self.stub_config) + self.ek_svc = EndorsementKeys(self.stub_config) + + def run(self): + tpmList = self.tpm_svc.list(self.hostId) + for tpm in tpmList: + tpmId = tpm.tpm + tpmInfo = self.tpm_svc.get(self.hostId, tpmId) + print("----------------------------") + print("TPM Information") + print("----------------------------") + pprint("major_version: %s" % tpmInfo.major_version) + pprint("minor_version: %s" % tpmInfo.minor_version) + pprint("active: %s" % tpmInfo.active) + if tpmInfo.manufacturer: + pprint("manufacturer: %s" % tpmInfo.manufacturer) + if tpmInfo.model: + pprint("model: %s" % tpmInfo.model) + if tpmInfo.firmware_version: + pprint("firmware_version: %s" % tpmInfo.firmware_version) + print("----------------------------") + + eksList = self.ek_svc.list(self.hostId, tpmId) + for ek in eksList: + keyId = ek.key + ekInfo = self.ek_svc.get(self.hostId, tpmId, keyId) + if ekInfo.public_key: + print("----------------------------") + print("TPM Endorsement key") + print("----------------------------") + pprint(ekInfo.public_key) + print("----------------------------") + + +def main(): + tpm_info = TPMInfo() + tpm_info.run() + + +if __name__ == '__main__': + main() diff --git a/samples/vsphere/sso/README.md b/samples/vsphere/sso/README.md index 6e569261..de6d5c3b 100644 --- a/samples/vsphere/sso/README.md +++ b/samples/vsphere/sso/README.md @@ -11,3 +11,17 @@ $ python external_psc_sso_workflow.py --lsurl https:///lookupservice/sdk ``` * Testbed Requirement: - 1 vCenter Server + +### Deprecation Notice +Starting vCenter server release 7.0, External Platform Services Controller (PSC) is no longer supported. All PSC services are consolidated into vCenter Server. +https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vcenter.configuration.doc/GUID-135F2607-DA51-47A5-BB7A-56AD141113D4.html +In view of the above, related samples (ex: external_psc_sso_workflow) and other related files are deprecated and will be removed in next major SDK release. + +Consequently, lookupservice WSDL files will also be removed in next major SDK release. Use well known URL path (https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-apis-sdks-introduction/GUID-B625C8FE-5E15-4918-98C0-69313E5880FB.html) instead of lookupservice. + +For SSO, service endpoint is: "https://{domain}/sts/STSService" +https://docs.vmware.com/en/VMware-vSphere/8.0/vsphere-apis-sdks-introduction/GUID-5384662C-CD05-4CAE-894E-972F14A7ECB7.html + +### Package Dependency Note +To run the deprecated samples, users need "Deprecated" package installed in their environment. +https://pypi.org/project/Deprecated/ diff --git a/samples/vsphere/sso/external_psc_sso_workflow.py b/samples/vsphere/sso/external_psc_sso_workflow.py index 200a6fe5..4214c36d 100644 --- a/samples/vsphere/sso/external_psc_sso_workflow.py +++ b/samples/vsphere/sso/external_psc_sso_workflow.py @@ -2,7 +2,9 @@ """ * ******************************************************* -* Copyright (c) VMware, Inc. 2017, 2018. All Rights Reserved. +* Copyright (c) 2024 Broadcom. All Rights Reserved. +* The term "Broadcom" refers to Broadcom Inc. +* and/or its subsidiaries. * SPDX-License-Identifier: MIT * ******************************************************* * @@ -13,11 +15,12 @@ * NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. """ -__author__ = 'VMware, Inc.' +__author__ = 'Broadcom, Inc.' __vcenter_version__ = '6.0+' import os import argparse +from deprecated import deprecated from six.moves.urllib import request, parse @@ -30,6 +33,7 @@ from samples.vsphere.common.ssl_helper import get_unverified_context from samples.vsphere.common.ssl_helper import get_unverified_session +@deprecated(version='8.0U3', reason='External PSC is no longer supported since vCenter 7.0. Use well-known endpoint URLs instead of looking them up.') class ExternalPscSsoWorkflow(object): """ Demonstrates how to Login to vCenter vAPI service with diff --git a/samples/vsphere/vcenter/setup/testbed.py b/samples/vsphere/vcenter/setup/testbed.py index c7b137ca..048159de 100644 --- a/samples/vsphere/vcenter/setup/testbed.py +++ b/samples/vsphere/vcenter/setup/testbed.py @@ -86,6 +86,15 @@ config["FLOPPY_DATACENTER_NAME"] = config["VM_DATACENTER_NAME"] config["FLOPPY_DATASTORE_ROOT_PATH"] = config["BACKENDS_DATASTORE_ROOT_PATH"] + "/floppy" config["FLOPPY_DATASTORE_PATH"] = config["FLOPPY_DATASTORE_ROOT_PATH"] + "/fdboot.img" +# Snapservice protection group creation spec +config["PG_NAME"] = "PG_NAME" +config["VM_NAMES"] = "VM_NAME1,VM_NAME2,..." +config["VM_FORMATS"] = "VM_FORMAT1,VM_FORMAT2,..." +config["SCHEDULE_UNIT"] = "MINUTE" +config["SCHEDULE"] = 30 +config["RETENTION_UNIT"] = "HOUR" +config["RETENTION"] = 6 +config["LOCK"] = False class Testbed(object): def __init__(self): diff --git a/samples/vsphere/vcenter/single_session/pyvmomi_to_vapi_transfer.py b/samples/vsphere/vcenter/single_session/pyvmomi_to_vapi_transfer.py new file mode 100644 index 00000000..4cc2b369 --- /dev/null +++ b/samples/vsphere/vcenter/single_session/pyvmomi_to_vapi_transfer.py @@ -0,0 +1,69 @@ +#!/usr/bin/env python + +""" +* ******************************************************* +* Copyright (c) 2024 Broadcom. All Rights Reserved. +* The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. +* SPDX-License-Identifier: MIT +* ******************************************************* +* +* DISCLAIMER. THIS PROGRAM IS PROVIDED TO YOU "AS IS" WITHOUT +* WARRANTIES OR CONDITIONS OF ANY KIND, WHETHER ORAL OR WRITTEN, +* EXPRESS OR IMPLIED. THE AUTHOR SPECIFICALLY DISCLAIMS ANY IMPLIED +* WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, +* NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +""" + +__author__ = 'Broadcom' +__copyright__ = 'Copyright (c) 2024 Broadcom. All Rights Reserved.' +__vcenter_version__ = '8.0.3+' + +from pyVim.connect import SmartConnect + +from samples.vsphere.common import sample_cli +from samples.vsphere.common import sample_util +from vmware.vapi.vsphere.client import create_vsphere_client + +from samples.vsphere.common.ssl_helper import get_unverified_session + +""" +With the single session functionality introduction, +in version 8.0.3, users are enabled to login only once and reuse +the session in vAPI and pyVmomi. + +Demonstrates transfer of an authenticated session from pyVmomi +to a vAPI stub. The sample includes post transfer verification +via invocation of `vcenter.compute.Policies.list` operation, +which requires authenticated access. + +Sample Prerequisites: + - vCenter +""" + + +if __name__ == '__main__': + parser = sample_cli.build_arg_parser() + args = sample_util.process_cli_args(parser.parse_args()) + + # Login with pyvmomi + si = SmartConnect(host=args.server, + user=args.username, + pwd=args.password, + disableSslCertValidation=args.skipverification) + print("Logged in through pyVmomi") + + # Acquire session_id + session_id = si._GetStub().GetSessionId() + print("Session ID acquired") + + # Reuse session_id in create_vsphere_client + # A login will not be attempted when session_id is provided + session = get_unverified_session() if args.skipverification else None + client = create_vsphere_client(args.server, + session=session, + session_id=session_id) + print("Created vAPI client utilizing the pyVmomi session") + + result = client.vcenter.compute.Policies.list() + if type(result) is list: + print("Session has been successfully reused") diff --git a/samples/vsphere/vcenter/single_session/vapi_to_pyvmomi_transfer.py b/samples/vsphere/vcenter/single_session/vapi_to_pyvmomi_transfer.py new file mode 100644 index 00000000..992901d7 --- /dev/null +++ b/samples/vsphere/vcenter/single_session/vapi_to_pyvmomi_transfer.py @@ -0,0 +1,71 @@ +#!/usr/bin/env python + +""" +* ******************************************************* +* Copyright (c) 2024 Broadcom. All Rights Reserved. +* The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. +* SPDX-License-Identifier: MIT +* ******************************************************* +* +* DISCLAIMER. THIS PROGRAM IS PROVIDED TO YOU "AS IS" WITHOUT +* WARRANTIES OR CONDITIONS OF ANY KIND, WHETHER ORAL OR WRITTEN, +* EXPRESS OR IMPLIED. THE AUTHOR SPECIFICALLY DISCLAIMS ANY IMPLIED +* WARRANTIES OR CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, +* NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. +""" + +__author__ = 'Broadcom' +__copyright__ = 'Copyright (c) 2024 Broadcom. All Rights Reserved.' +__vcenter_version__ = '8.0.3+' + +from pyVim.connect import SmartConnect + +from samples.vsphere.common import sample_cli +from samples.vsphere.common import sample_util +from vmware.vapi.vsphere.client import create_vsphere_client + +from samples.vsphere.common.ssl_helper import get_unverified_session + +""" +With the single session functionality introduction, +in version 8.0.3, users are enabled to login only once and reuse +the session in vAPI and pyVmomi. + +Demonstrates transfer of an authenticated session from vAPI to +a pyVmomi stub. The sample includes post transfer verification +via invocation of `sessionManager.SessionIsActive` operation, +which requires authenticated access. + +Sample Prerequisites: + - vCenter +""" + + +if __name__ == '__main__': + parser = sample_cli.build_arg_parser() + args = sample_util.process_cli_args(parser.parse_args()) + + # Create session through vAPI + session = get_unverified_session() if args.skipverification else None + client = create_vsphere_client(server=args.server, + username=args.username, + password=args.password, + session=session) + print("Logged in through vAPI vSphere client") + + # Acquire session_id + session_id = client.get_session_id() + print("Session ID acquired") + + # Reuse session_id in SmartConnect + # A login will not be attempted when session_id is provided + si = SmartConnect(host=args.server, + disableSslCertValidation=args.skipverification, + sessionId=session_id) + print("Created pyVmomi stub utilizing the vAPI session") + + content = si.RetrieveContent() + reused_session = content.sessionManager.currentSession + result = content.sessionManager.SessionIsActive(reused_session.key, args.username) + if result: + print("Session has been successfully reused") diff --git a/samples/vsphere/vcenter/vlcm/cluster/installed_images/README.md b/samples/vsphere/vcenter/vlcm/cluster/installed_images/README.md new file mode 100644 index 00000000..6876d22f --- /dev/null +++ b/samples/vsphere/vcenter/vlcm/cluster/installed_images/README.md @@ -0,0 +1,26 @@ +# vLCM/Cluster/Installed_Images + +This directory contains samples of the cluster-level vLCM installed images API + +The installed images API provides a way to easily see the software running on hosts in a given cluster. This API will scan the hosts in the target cluster and generate a report detailing what images are being run. These images are organized into three categories: "highest versioned image", "most widely used image", and "hostImageList" which just contains the rest of the images. + +## APIs +POST + - The extract POST method triggers the installed images workflow, which is an asynchronous operation. This API returns a task ID which can be used to monitor the progress of the task. + +GET + - This GET method is a synchronous operation and it returns the most recently generated installed images report for the cluster corresponding to the provided MoID. + +## Running the samples + +To view the available command-line options: + + ``` + python samples/vsphere/vcenter/vlcm/cluster/installed_images/installed_images.py -h + ``` + +To run the sample: + + ``` + $ python samples/vsphere/vcenter/vlcm/cluster/installed_images/installed_images.py -v -s -u -p --cluster + ``` \ No newline at end of file diff --git a/samples/vsphere/vcenter/vlcm/cluster/installed_images/__init__.py b/samples/vsphere/vcenter/vlcm/cluster/installed_images/__init__.py new file mode 100644 index 00000000..11cd3373 --- /dev/null +++ b/samples/vsphere/vcenter/vlcm/cluster/installed_images/__init__.py @@ -0,0 +1,21 @@ +""" +* ******************************************************* +* Copyright (c) 2024 Broadcom. All Rights Reserved. +* Broadcom Confidential. The term "Broadcom" refers to Broadcom Inc. +* and/or its subsidiaries. +* SPDX-License-Identifier: MIT +* ******************************************************* +""" + +__author__ = 'Broadcom, Inc.' +__copyright__ = 'Copyright 2024 Broadcom, Inc. All rights reserved.' + + +# Required to distribute different parts of this +# package as multiple distribution +try: + import pkg_resources + pkg_resources.declare_namespace(__name__) +except ImportError: + from pkgutil import extend_path + __path__ = extend_path(__path__, __name__) # @ReservedAssignment diff --git a/samples/vsphere/vcenter/vlcm/cluster/installed_images/installed_images.py b/samples/vsphere/vcenter/vlcm/cluster/installed_images/installed_images.py new file mode 100644 index 00000000..a362b8fc --- /dev/null +++ b/samples/vsphere/vcenter/vlcm/cluster/installed_images/installed_images.py @@ -0,0 +1,82 @@ +#!/usr/bin/env python +""" +* ******************************************************* +* Copyright (c) 2024 Broadcom. All Rights Reserved. +* Broadcom Confidential. The term "Broadcom" refers to Broadcom Inc. +* and/or its subsidiaries. +* SPDX-License-Identifier: MIT +* ******************************************************* +""" + +__author__ = 'Broadcom, Inc.' +__vcenter_version__ = '8.0.3+' + +import time + +from com.vmware.esx.settings.clusters_client import InstalledImages +from samples.vsphere.common import sample_cli, sample_util +from samples.vsphere.vcenter.hcl.utils import get_configuration + +SUCCEEDED_KEY = "SUCCEEDED" +FAILED_KEY = "FAILED" + +# With a 1 second sleep this is equal to roughly 5 minutes +TIME_OUT_ITERATIONS = 300 + + +class InstalledImagesSvc: + """ + Demonstrates triggering the "extract" workflow for the cluster Installed Images + feature, waiting for the task to complete, and getting the result. + + Prerequisites: + - A datacenter + - A vSAN cluster with at least one host + """ + def __init__(self): + parser = sample_cli.build_arg_parser() + parser.add_argument("--cluster", + required=True, + help="MoID of the target cluster") + args = sample_util.process_cli_args(parser.parse_args()) + + self.cluster = args.cluster + + config = get_configuration(args.server, args.username, + args.password, + args.skipverification) + + self.apiClient = InstalledImages(config) + + def run(self): + task = self.apiClient.extract_task(self.cluster) + + if self.waitForTask(task): + print("Successfully got installed images report:") + print(self.apiClient.get(self.cluster)) + + def waitForTask(self, task): + i = 0 + try: + while True: + i += 1 + status = task.get_info().status + if status == SUCCEEDED_KEY or status == FAILED_KEY: + return True + if i > TIME_OUT_ITERATIONS: + print("Timeout reached waiting for task--cancelling operation") + return False + + time.sleep(1) + except Exception as e: + print(f"Error occurred waiting for task: {e}") + return False + + +def main(): + installedImagesSvc = InstalledImagesSvc() + installedImagesSvc.run() + + +if __name__ == "__main__": + main() diff --git a/setup.py b/setup.py index 5704b02e..07f7bd7e 100644 --- a/setup.py +++ b/setup.py @@ -5,23 +5,23 @@ import os from setuptools import setup setup(name='vsphere-automation-sdk', - version='1.86.0', + version='1.87.0', description='VMware vSphere Automation SDK for Python', url='https://github.com/vmware/vsphere-automation-sdk-python', - author='VMware, Inc.', + author='Broadcom, Inc.', license='MIT', packages=[], install_requires=[ 'lxml >= 4.3.0', - 'pyVmomi >=6.7', - 'vapi-runtime @ file://localhost/{}/lib/vapi-runtime/vapi_runtime-2.44.0-py2.py3-none-any.whl'.format(os.getcwd()), - 'vcenter-bindings @ file://localhost/{}/lib/vcenter-bindings/vcenter_bindings-4.2.0-py2.py3-none-any.whl'.format(os.getcwd()), - 'vapi-common-client @ file://localhost/{}/lib/vapi-common-client/vapi_common_client-2.44.0-py2.py3-none-any.whl'.format(os.getcwd()), - 'vmwarecloud-aws @ file://localhost/{}/lib/vmwarecloud-aws/vmwarecloud_aws-1.64.0-py2.py3-none-any.whl'.format(os.getcwd()), - 'nsx-python-sdk @ file://localhost/{}/lib/nsx-python-sdk/nsx_python_sdk-4.1.2.0.0-py2.py3-none-any.whl'.format(os.getcwd()), - 'nsx-policy-python-sdk @ file://localhost/{}/lib/nsx-policy-python-sdk/nsx_policy_python_sdk-4.1.2.0.0-py2.py3-none-any.whl'.format(os.getcwd()), - 'nsx-vmc-policy-python-sdk @ file://localhost/{}/lib/nsx-vmc-policy-python-sdk/nsx_vmc_policy_python_sdk-4.1.2.0.0-py2.py3-none-any.whl'.format(os.getcwd()), - 'nsx-vmc-aws-integration-python-sdk @ file://localhost/{}/lib/nsx-vmc-aws-integration-python-sdk/nsx_vmc_aws_integration_python_sdk-4.1.2.0.0-py2.py3-none-any.whl'.format(os.getcwd()), - 'vmwarecloud-draas @ file://localhost/{}/lib/vmwarecloud-draas/vmwarecloud_draas-1.23.0-py2.py3-none-any.whl'.format(os.getcwd()), + 'pyVmomi == 8.0.3.0.1', + 'vmware-vapi-runtime == 2.52.0', + 'vmware-vcenter == 8.0.3.0', + 'vmware-vapi-common-client == 2.52.0', + 'vmwarecloud-aws @ file://localhost/{}/lib/vmwarecloud-aws/vmwarecloud_aws-1.64.1-py2.py3-none-any.whl'.format(os.getcwd()), + 'nsx-python-sdk @ file://localhost/{}/lib/nsx-python-sdk/nsx_python_sdk-4.2.0-py2.py3-none-any.whl'.format(os.getcwd()), + 'nsx-policy-python-sdk @ file://localhost/{}/lib/nsx-policy-python-sdk/nsx_policy_python_sdk-4.2.0-py2.py3-none-any.whl'.format(os.getcwd()), + 'nsx-vmc-policy-python-sdk @ file://localhost/{}/lib/nsx-vmc-policy-python-sdk/nsx_vmc_policy_python_sdk-4.1.2.0.1-py2.py3-none-any.whl'.format(os.getcwd()), + 'nsx-vmc-aws-integration-python-sdk @ file://localhost/{}/lib/nsx-vmc-aws-integration-python-sdk/nsx_vmc_aws_integration_python_sdk-4.1.2.0.1-py2.py3-none-any.whl'.format(os.getcwd()), + 'vmwarecloud-draas @ file://localhost/{}/lib/vmwarecloud-draas/vmwarecloud_draas-1.23.1-py2.py3-none-any.whl'.format(os.getcwd()), ] )