{ "info": { "author": "Cloudbase Solutions Srl", "author_email": "info@cloudbasesolutions.com", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "Python Oracle VM Client\n=======================\n\n* Author: Cloudbase Solutions\n* Contact: info@cloudbasesolutions.com\n* Home page: https://cloudbase.it\n* Source: https://github.com/cloudbase/python-ovmclient\n* License: Apache 2.0\n\nUsage\n-----\n\nVM lifecycle\n~~~~~~~~~~~~\n\nHow to create, modify, start, stop and delete a VM::\n\n import ovmclient\n from ovmclient import constants\n\n client = ovmclient.Client(\n 'https://host:7002/ovm/core/wsapi/rest', 'admin', 'yadayada')\n\n # Make sure the manager is running\n client.managers.wait_for_manager_state()\n\n repo_id = client.repositories.get_id_by_name('repo1')\n pool_id = client.server_pools.get_id_by_name('pool1')\n network_id = client.networks.get_id_by_name('management')\n\n # Create a virtual disk\n disk_data = {\n 'diskType': constants.DISK_TYPE_VIRTUAL_DISK,\n 'size': 1024 * 1024 * 1024,\n 'shareable': False,\n 'name': 'dummy.img',\n }\n\n job = client.jobs.wait_for_job(\n client.repository_virtual_disks(repo_id).create(disk_data, sparse='true'))\n disk_id = job['resultId']\n\n # Create a VM\n vm_data = {\n 'name': 'vm1',\n 'description': 'Blah',\n 'vmDomainType': constants.VM_DOMAIN_TYPE_XEN_HVM_PV_DRIVERS,\n 'repositoryId': repo_id,\n 'serverPoolId': pool_id,\n 'cpuCount': 4,\n 'cpuCountLimit': 4,\n 'hugePagesEnabled': False,\n 'memory': 1024,\n 'memoryLimit': 1024,\n 'osType': 'Oracle Linux 7',\n }\n\n job = client.jobs.wait_for_job(client.vms.create(vm_data))\n vm_id = job['resultId']\n\n # Map the virtual disk\n vm_disk_mapping_data = {\n 'virtualDiskId': disk_id,\n 'diskWriteMode': constants.DISK_WRITE_MODE_READ_WRITE,\n 'emulatedBlockDevice': False,\n 'storageElementId': None,\n 'diskTarget': 0,\n }\n\n job = client.jobs.wait_for_job(\n client.vm_disk_mappings(vm_id).create(vm_disk_mapping_data))\n\n # Add a vnic\n vnic_data = {\n 'networkId': network_id,\n }\n\n client.jobs.wait_for_job(client.vm_virtual_nics(vm_id).create(vnic_data))\n\n # Retrieve the VM\n vm = client.vms.get_by_id(vm_id)\n\n # Update the VM, e.g. setting a new name\n vm['name'] = 'vm2'\n client.jobs.wait_for_job(client.vms.update(vm_id, vm))\n\n # Start the VM\n client.jobs.wait_for_job(client.vms.start(vm_id))\n\n # Kill the VM\n client.jobs.wait_for_job(client.vms.kill(vm_id))\n\n # Delete the VM\n client.jobs.wait_for_job(client.vms.delete(vm_id))\n\n # Delete the virtual disk\n client.jobs.wait_for_job(\n client.repository_virtual_disks(repo_id).delete(disk_id))\n\n\nCloning a VM\n~~~~~~~~~~~~\n\nHow to clone a VM or a VM template::\n\n import ovmclient\n\n client = ovmclient.Client(\n 'https://host:7002/ovm/core/wsapi/rest', 'admin', 'yadayada')\n\n # Make sure the manager is running\n client.managers.wait_for_manager_state()\n\n pool_id = client.server_pools.get_id_by_name('pool1')\n\n # Get an existing VM or a VM template\n vm_id = client.vms.get_id_by_name('vm1')\n\n # Set to True to create a VM template, False for a regular VM\n create_template = True\n\n # Clone the VM\n job = client.jobs.wait_for_job(\n client.vms.clone(vm_id, pool_id, create_template=create_template))\n new_vm_id = job['resultId']\n\n # Rename the VM template\n data = client.vms.get_by_id(new_vm_id)\n data[\"name\"] = 'new_name'\n client.jobs.wait_for_job(client.vms.update(new_vm_id, data))\n\n # Delete the VM template\n client.jobs.wait_for_job(client.vms.delete(new_vm_id))\n\n\nDiscovering servers\n~~~~~~~~~~~~~~~~~~~\n\nHow to discover and take ownership of an unowned Oracle VM host::\n\n import ovmclient\n\n client = ovmclient.Client(\n 'https://host:7002/ovm/core/wsapi/rest', 'admin', 'yadayada')\n\n # Make sure the manager is running\n client.managers.wait_for_manager_state()\n\n # Discover a new host and take ownership\n client.servers.discover('newovmhost')", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://cloudbase.it", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "python-ovmclient", "package_url": "https://pypi.org/project/python-ovmclient/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/python-ovmclient/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://cloudbase.it" }, "release_url": "https://pypi.org/project/python-ovmclient/1.0.3/", "requires_dist": null, "requires_python": null, "summary": "Python Oracle VM Client", "version": "1.0.3" }, "last_serial": 2815589, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "e128d8662d282acdf82f9c76f91de299", "sha256": "484b1e26a3ecb33dfef4c3d72fb76f74e583a2f8b1583fc2e499804fb10d3280" }, "downloads": -1, "filename": "python-ovmclient-1.0.0.tar.gz", "has_sig": false, "md5_digest": "e128d8662d282acdf82f9c76f91de299", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9417, "upload_time": "2017-04-12T01:13:10", "url": "https://files.pythonhosted.org/packages/9a/4a/3f2fb316b21a53550d2fc49eef1376ce856a96f263682ee123acf362814f/python-ovmclient-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "adb7b362b40b40b68068121ccc341fd8", "sha256": "c52304172df78957131f7484aee2aaf6c917107eb3f46bd3b67b6fa4058cae84" }, "downloads": -1, "filename": "python-ovmclient-1.0.1.tar.gz", "has_sig": false, "md5_digest": "adb7b362b40b40b68068121ccc341fd8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9555, "upload_time": "2017-04-16T21:18:35", "url": "https://files.pythonhosted.org/packages/11/f5/5e74edada331d682a569c1fe0e2bd4ef7b6d166132370474d1d5f605e252/python-ovmclient-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "f1347cf85f165ae5dcb3153c187c4239", "sha256": "175eeee8c84d610c1921d76e409d49c8204ad3482537e0ca14a083c8f690c2ce" }, "downloads": -1, "filename": "python-ovmclient-1.0.2.tar.gz", "has_sig": false, "md5_digest": "f1347cf85f165ae5dcb3153c187c4239", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9663, "upload_time": "2017-04-19T21:26:02", "url": "https://files.pythonhosted.org/packages/db/d2/956ec2acc5949d4528910194dfb0d4ba920ebdec899dcfd377899e766e6a/python-ovmclient-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "97dccd321a9bf268e1c5e49eb0ba6c21", "sha256": "318bad55404afc9360e412b9dd9755be0b8799d3cac06cd36c11a2bcf927767c" }, "downloads": -1, "filename": "python-ovmclient-1.0.3.tar.gz", "has_sig": false, "md5_digest": "97dccd321a9bf268e1c5e49eb0ba6c21", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9739, "upload_time": "2017-04-19T23:21:14", "url": "https://files.pythonhosted.org/packages/dd/c9/92ccc89fa22c70562175c6bb7187905bfb6f3d48807b63f6ba410d0698d1/python-ovmclient-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "97dccd321a9bf268e1c5e49eb0ba6c21", "sha256": "318bad55404afc9360e412b9dd9755be0b8799d3cac06cd36c11a2bcf927767c" }, "downloads": -1, "filename": "python-ovmclient-1.0.3.tar.gz", "has_sig": false, "md5_digest": "97dccd321a9bf268e1c5e49eb0ba6c21", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9739, "upload_time": "2017-04-19T23:21:14", "url": "https://files.pythonhosted.org/packages/dd/c9/92ccc89fa22c70562175c6bb7187905bfb6f3d48807b63f6ba410d0698d1/python-ovmclient-1.0.3.tar.gz" } ] }