vmware-vcenter-9.0.0.0


توضیحات

Client library for vmware-vcenter Automation APIs
ویژگی مقدار
سیستم عامل Unix
نام فایل vmware-vcenter-9.0.0.0
نام vmware-vcenter
نسخه کتابخانه 9.0.0.0
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Broadcom
ایمیل نویسنده -
آدرس صفحه اصلی -
آدرس اینترنتی https://pypi.org/project/vmware-vcenter/
مجوز License :: OSI Approved :: MIT License
# VMware vCenter Server VMware vCenter Server library contains client bindings for VMware vCenter Server Automation APIs. [Package (PyPI)](https://pypi.org/project/vmware-vcenter/) | [REST API documentation](https://developer.broadcom.com/xapis/vsphere-automation-api/latest/) ## Getting started ### Prerequisites - Supported Python versions: 3.9, 3.10, 3.11, 3.12 and 3.13 ### Install the package ```bash pip install vmware-vcenter ``` ### Connect to a vCenter Server ```python import requests import urllib3 from vmware.vapi.vsphere.client import create_vsphere_client session = requests.session() # Disable cert verification for demo purpose. # This is not recommended in a production environment. session.verify = False # Disable the secure connection warning for demo purpose. # This is not recommended in a production environment. urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) # Connect to a vCenter Server using username and password vsphere_client = create_vsphere_client(server='<vc_ip>', username='<vc_username>', password='<vc_password>', session=session) # List all VMs inside the vCenter Server vsphere_client.vcenter.VM.list() ``` Output in a Python Interpreter: ```shell (venv) john-doe:vsphere-automation-sdk-python john$ python Python 3.9.8 (main, Nov 10 2021, 06:03:50) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import requests >>> import urllib3 >>> from vmware.vapi.vsphere.client import create_vsphere_client >>> session = requests.session() >>> session.verify = False >>> urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) >>> vsphere_client = create_vsphere_client(server='<vc_ip>', username='<vc_username>', password='<vc_password>', session=session) >>> vsphere_client.vcenter.VM.list() [Summary(vm='vm-58', name='standalone-20e4bd3af-esx.0-vm.0', power_state=State(string='POWERED_OFF'), cpu_count=1, memory_size_mib=256), ...] ``` **NOTE:** If you are using Bash, be sure to use single quote for username and password to preserve the values. If you use double quote, you will have to escape special characters, such as "$". See [Bash manual](http://www.gnu.org/software/bash/manual/html_node/Double-Quotes.html)


نیازمندی

مقدار نام
- vmware_vapi_common_client==2.61.2
- vmware_vapi_runtime==2.61.2


نحوه نصب


نصب پکیج whl vmware-vcenter-9.0.0.0:

    pip install vmware-vcenter-9.0.0.0.whl


نصب پکیج tar.gz vmware-vcenter-9.0.0.0:

    pip install vmware-vcenter-9.0.0.0.tar.gz