{ "info": { "author": "Thomas Senay", "author_email": "tsenay.consulting@icloud.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries" ], "description": "# terraformvspherevm\n\nThis tool create and delete machine with terraform on vSphere infrastructure. \n\n## System Requirements\n\n - python3\n - terraform\n\n## Installation\n\npip install terraformvspherevm\n\n## Develop\n\n## Usage\n\n### Command line\n\nUsage\n\n```bash\n$ terraformvspherevm --help\nusage: terraformvspherevm [-h] --action {create,destroy} --datacenter DATACENTER \n --datastore DATASTORE --pool POOL --folder FOLDER\n --template TEMPLATE --guestid GUESTID --name NAME\n [--nic NIC] [--ip IP] [--cidr CIDR] [--gateway GATEWAY] \n --cpu CPU --ram RAM [--disk DISK] [--dns DNS] --esxhost\n ESXHOST --esxuser ESXUSER --esxpassvar ESXPASSVAR --domain\n DOMAIN --timezone TIMEZONE [-debug]\n\nManage vSphere Virtual Machines\n\noptional arguments:\n -h, --help show this help message and exit\n --action {create,destroy}\n Action to Execute against vSphere\n --datacenter DATACENTER\n ESXi Datacenter\n --datastore DATASTORE\n ESXi Datastore\n --pool POOL ESXi Resource Pool\n --folder FOLDER ESXi VM Folder\n --template TEMPLATE Template Name\n --guestid GUESTID Guest ID\n --name NAME Virtual Machine Name\n --nic NIC Network Interface. Repeat option for several NICs\n --ip IP NIC IP address. Repeat option for several NICs\n --cidr CIDR NIC CIDR. Repeat option for several NICs\n --gateway GATEWAY Default gateway\n --cpu CPU CPUs\n --ram RAM Memory\n --disk DISK Additionnal disk in GB. Repeat option for several\n disks\n --dns DNS DNS server\n --esxhost ESXHOST ESXi host\n --esxuser ESXUSER ESXi Username\n --esxpassvar ESXPASSVAR\n Environment variable that contain ESXi password\n --domain DOMAIN DNS domain\n --timezone TIMEZONE TimeZone\n -debug Verbose Output\n\nWhen you want to destroy a VM, tfstate file is not required\n```\n\n### Examples \n\nCreate a VM\n```bash\nterraformvspherevm --name terrascript-test --datacenter \"DC\" --datastore \"MyDatastore\" \\\n--pool \"ressource_pool\" --template \"rhel-7.5-vmw6.0\" --guestid \"rhel7_64Guest\" --nic DvP_Nmae \\\n--ip 10.0.123.123 --cidr 24 --gateway 10.0.123.1 --cpu 1 --ram 1024 --disk 10 --dns 10.0.123.50 \\\n--dns 10.0.123.100 --esxhost esxhost.domain.com --esxuser \"esxusername\" --folder \"terraformed\" \\\n--domain my.domaon --timezone \"Etc/UTC\" --esxpassvar ESXPASS --action create\n```\n\nDestroy a VM\n```bash\nterraformvspherevm --name terrascript-test --datacenter \"DC\" --datastore \"MyDatastore\" \\\n--pool \"ressource_pool\" --template \"rhel-7.5-vmw6.0\" --guestid \"rhel7_64Guest\" --cpu 1 \\\n--ram 1024 --esxhost esxhost.domain.com --esxuser \"esxusername\" --folder \"terraformed\" \\\n--esxpassvar ESXPASS --action destroy\n```\n\n### In Python Code\n\n```python\nfrom terraformvspherevm import TerraformVM\n\nvmProperties = {'name': 'myVM', ...}\n\ntvm = TerraformVM()\ntvm.addVirtualMachine(vmProperties)\ntvm.createVM('myVM')\ntvm.destroyVM('myVM')\n```\n\n## Development\n\nVirtualenv and dependencies\n\n```bash\npython -m venv venv\nsource ./venv/bin/activate\npython -m pip install -r requirements.txt\n```\n\nRun command\n\n```bash\n$ python\nPython 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n>>> import terraformvm\n>>> terraformvm.main(['--help'])\n```\n## Build\n\n```bash\npython setup.py sdist bdist_wheel\n```\n\n## Upload PyPi\n\n```bash\ntwine upload dist/*\n```\n\n# TODOLIST\n\n - Code documentation\n - arguments validation\n - Error management\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tsenay/python-terraformvpsherevm", "keywords": "vpshere terraform", "license": "", "maintainer": "", "maintainer_email": "", "name": "terraformvspherevm", "package_url": "https://pypi.org/project/terraformvspherevm/", "platform": "", "project_url": "https://pypi.org/project/terraformvspherevm/", "project_urls": { "Bug Reports": "https://github.com/tsenay/python-terraformvpsherevm/issues", "Homepage": "https://github.com/tsenay/python-terraformvpsherevm", "Source": "https://github.com/tsenay/python-terraformvpsherevm" }, "release_url": "https://pypi.org/project/terraformvspherevm/0.0.13/", "requires_dist": [ "terrascript", "python-terraform" ], "requires_python": ">=3.6", "summary": "Create VSphere resources using terraform", "version": "0.0.13" }, "last_serial": 5266631, "releases": { "0.0.12": [ { "comment_text": "", "digests": { "md5": "aeb1568abb01b142729b80afba91703b", "sha256": "1e4e9d93a9ea6aa6d4b43ccdd013e6c61043c3d28a9147aa227391438c9847e0" }, "downloads": -1, "filename": "terraformvspherevm-0.0.12-py3-none-any.whl", "has_sig": false, "md5_digest": "aeb1568abb01b142729b80afba91703b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 8656, "upload_time": "2019-05-13T11:39:35", "url": "https://files.pythonhosted.org/packages/17/7e/e49d7399b9aed25bc1efd521406ff345885353b1580cd8258326de97cbf9/terraformvspherevm-0.0.12-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f7cd95853ccb7b06fe2ee6f84b483e3e", "sha256": "d22b8fb2de6f2ad074867298cbcf3fcda6d0b7e6c2febd452117c4288878ef2b" }, "downloads": -1, "filename": "terraformvspherevm-0.0.12.tar.gz", "has_sig": false, "md5_digest": "f7cd95853ccb7b06fe2ee6f84b483e3e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 7811, "upload_time": "2019-05-13T11:39:36", "url": "https://files.pythonhosted.org/packages/c8/cf/9ab0fd8f125be99ceab14405b06c9e619b62f4f32d9ee75dbcf755b550c1/terraformvspherevm-0.0.12.tar.gz" } ], "0.0.13": [ { "comment_text": "", "digests": { "md5": "536516f09c786a49e35b79e2b8900b26", "sha256": "041758feafa133d723016b5770d31cee8c4ec00d5ff1047936f402a1b3ab1f36" }, "downloads": -1, "filename": "terraformvspherevm-0.0.13-py3-none-any.whl", "has_sig": false, "md5_digest": "536516f09c786a49e35b79e2b8900b26", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 8665, "upload_time": "2019-05-14T10:11:04", "url": "https://files.pythonhosted.org/packages/b0/03/cbe2bc89ebd018a7ec6bd9ac265b784d41720e18f6fc174a256d17d8212b/terraformvspherevm-0.0.13-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "774f1ca4a4bedb0373db99e8ac9745bc", "sha256": "70d128be36dccb3d932efcc6d4a706efb753b3dba49a054baa744aa6f7ba42ad" }, "downloads": -1, "filename": "terraformvspherevm-0.0.13.tar.gz", "has_sig": false, "md5_digest": "774f1ca4a4bedb0373db99e8ac9745bc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 7810, "upload_time": "2019-05-14T10:11:05", "url": "https://files.pythonhosted.org/packages/69/27/f35562daa8a06e9faa1c39eb1c0d19d3de74691edeee7c89ca1e63e7b79c/terraformvspherevm-0.0.13.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "536516f09c786a49e35b79e2b8900b26", "sha256": "041758feafa133d723016b5770d31cee8c4ec00d5ff1047936f402a1b3ab1f36" }, "downloads": -1, "filename": "terraformvspherevm-0.0.13-py3-none-any.whl", "has_sig": false, "md5_digest": "536516f09c786a49e35b79e2b8900b26", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 8665, "upload_time": "2019-05-14T10:11:04", "url": "https://files.pythonhosted.org/packages/b0/03/cbe2bc89ebd018a7ec6bd9ac265b784d41720e18f6fc174a256d17d8212b/terraformvspherevm-0.0.13-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "774f1ca4a4bedb0373db99e8ac9745bc", "sha256": "70d128be36dccb3d932efcc6d4a706efb753b3dba49a054baa744aa6f7ba42ad" }, "downloads": -1, "filename": "terraformvspherevm-0.0.13.tar.gz", "has_sig": false, "md5_digest": "774f1ca4a4bedb0373db99e8ac9745bc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 7810, "upload_time": "2019-05-14T10:11:05", "url": "https://files.pythonhosted.org/packages/69/27/f35562daa8a06e9faa1c39eb1c0d19d3de74691edeee7c89ca1e63e7b79c/terraformvspherevm-0.0.13.tar.gz" } ] }