{ "info": { "author": "oznu", "author_email": "dev@oz.nu", "bugtrack_url": null, "classifiers": [], "description": "pyHyperV\n========\n\n\n.. image:: https://pypip.in/v/pyHyperV/badge.png\n :target: https://crate.io/packages/pyHyperV\n\n.. image:: https://pypip.in/d/pyHyperV/badge.png\n :target: https://crate.io/packages/pyHyperV\n\nSimple client for calling HyperV orchestrator runbooks in python.\n\n.. contents::\n :local:\n \n.. _installation:\n\n============\nInstallation\n============\n\nUsing pip::\n\n $ pip install pyHyperV\n \n \n============================\nImport & Initialize pyHyperV\n============================\n\n.. code:: python\n\n import pyHyperV\n \n orchestratorEndpoint = \"http://hostname.local:81/Orchestrator2012/Orchestrator.svc\"\n username = \"domain\\\\username\"\n password = \"password\"\n \n o = pyHyperV.orchestrator(orchestratorEndpoint, username, password)\n \n\n===============\nExecute Runbook\n===============\n\n.. code:: python\n\n pyHyperV.orchestrator.Execute(runbookID, runbookParameters, dictionary=False)\n\n\nYou can send the parameters to orchestrator using the parameter ID or the parameter name.\n\nUsing Parameter IDs\n-------------------\n\nExample of sending using the parameter ID:\n\n.. code:: python\n\n runbookID = '285f017e-bc97-4b03-a999-64e08065769e'\n \n runbookParameters = {\n 'f90e6468-31d3-4aa8-9d50-f8bf5bf689e2' : 'value',\n 'edb8d27d-38ad-4d29-a255-30d8360a3852' : 'value',\n 'b61abea1-4001-42fd-99b5-470acc5c1386' : 'value',\n '32725695-0b25-47e0-abbe-b28e22eca8ad' : 'value',\n }\n \n o.Execute(runbookID, runbookParameters)\n \nUsing Parameter Names\n---------------------\n \nTo send a request using the parameter names indead of the IDs, add the **dictionary=True** flag. The parameter names must match the names for each parameter in orchestrator.\n\nExample:\n\n.. code:: python\n\n runbookID = '285f017e-bc97-4b03-a999-64e08065769e'\n \n runbookParameters = {\n 'HDD' : '50gb',\n 'CPU' : '2',\n 'RAM' : '2048',\n 'OS' : 'Server2012',\n }\n \n o.Execute(runbookID, runbookParameters, dictionary=True)\n \n \nResponse\n--------\n\nSuccessfully initiating a runbook execution will return a 201 status code, along with the orchestrator job ID. The job ID returned can be used to check the status of the job using the GetJobStatus function.\n\nExample Response:\n\n.. code:: python\n\n { \n 'status' : 201,\n 'result': {\n 'id' : '3c87fd6c-69f5-41c9-bd55-ec2aa6ec7c64',\n 'status' : 'pending',\n 'CreationTime' : '2014-04-02T12:11:05.617',\n 'LastModifiedTime' : '2014-04-02T12:19:08.963',\n }\n }\n \n \n============\nGet Runbooks\n============\n\n.. code:: python\n\n pyHyperV.orchestrator.GetRunbooks()\n pyHyperV.orchestrator.GetRunbookID(runbookName)\n \nReturns a list of runbooks and their IDs from orchestrator.\n\nExample:\n\n.. code:: python\n \n o.GetRunbooks()\n \n { \n 'status' : 200,\n 'result' : {\n 'Runbook_1' : 'e5944fe0-b600-45d2-a872-0c256594e394'\n 'Runbook_2' : 'fd6d6a4b-1e57-40a3-930a-f4eb56394d3f'\n 'Runbook_3' : '31451e20-5829-4323-9661-603ff826c852'\n }\n }\n \n\nIt is also possible to return a single runbook ID by it's name:\n\n.. code:: python\n\n o.GetRunbookID('Runbook_1')\n \n 'e5944fe0-b600-45d2-a872-0c256594e394'\n \n \n\n\n======================\nGet Runbook Parameters\n======================\n\n.. code:: python\n\n pyHyperV.orchestrator.GetParameters(runbookID)\n \nThis function returns the parameter names and paramater IDs required by the runbook specified.\n\nExample:\n\n.. code:: python\n\n runbookID = '285f017e-bc97-4b03-a999-64e08065769e'\n \n o.GetParameters(runbookID)\n \nExample Response:\n\n.. code:: python\n\n { \n 'status' : 200,\n 'result': {\n 'HDD' : 'f90e6468-31d3-4aa8-9d50-f8bf5bf689e2',\n 'CPU' : 'edb8d27d-38ad-4d29-a255-30d8360a3852',\n 'RAM' : 'b61abea1-4001-42fd-99b5-470acc5c1386',\n 'OS' : '32725695-0b25-47e0-abbe-b28e22eca8ad',\n }\n }\n \n \n==============\nGet Job Status\n==============\n\n.. code:: python\n\n pyHyperV.orchestrator.GetJobStatus(jobID)\n \n \nThis function allows you to check the status of an orchestrator job/task.\n\nExample:\n\n.. code:: python\n\n jobID = '285f017e-bc97-4b03-a999-64e08065769e'\n \n o.GetParameters(jobID)\n\nExample Response:\n\n.. code:: python\n\n { \n 'status' : 200,\n 'result': {\n 'id' : '3c87fd6c-69f5-41c9-bd55-ec2aa6ec7c64',\n 'status' : 'Complete',\n 'CreationTime' : '2014-04-02T12:11:05.617',\n 'LastModifiedTime' : '2014-04-02T12:19:08.963',\n }\n }\n \n===================\nGet Job Instance ID\n===================\n\n.. code:: python\n\n pyHyperV.orchestrator.GetJobInstance(jobID)\n \nReturns the job instance ID. This ID can then be used in other functions such as GetInstanceParameters.\n\nExample:\n\n.. code:: python\n\n jobID = '3c87fd6c-69f5-41c9-bd55-ec2aa6ec7c64'\n\n o.GetJobInstance(jobID)\n \n 'f4ac97ed-495b-44ae-b547-64611b0d8075'\n \n\n=======================\nGet Instance Parameters\n=======================\n\n.. code:: python\n\n pyHyperV.orchestrator.GetInstanceParameters(instanceID)\n \n \nReturns the instance parameters from orchestrator. This function can be used to get data returned from orchestrator.\n\nExample:\n\n.. code:: python\n\n instanceID = 'f4ac97ed-495b-44ae-b547-64611b0d8075'\n\n o.GetInstanceParameters(instanceID)\n \n {\n 'status' : 200,\n 'result' : {\n 'HDD' : '50gb',\n 'CPU' : '2',\n 'RAM' : '2048',\n 'OS' : 'Server2012',\n 'VM_ID' : 'edb8d27d-38ad-4d29-a255-30d8360a3852',\n 'VM_IP' : '127.0.0.1',\n }\n }", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/oznu/pyHyperV", "keywords": null, "license": "Apache License", "maintainer": null, "maintainer_email": null, "name": "pyHyperV", "package_url": "https://pypi.org/project/pyHyperV/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pyHyperV/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/oznu/pyHyperV" }, "release_url": "https://pypi.org/project/pyHyperV/0.0.4/", "requires_dist": null, "requires_python": null, "summary": "A simple client for calling HyperV orchestator runbooks in python", "version": "0.0.4" }, "last_serial": 1051959, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "6b39a81fe7ccea20e8a183cc11f96f32", "sha256": "4032c68e62b8e612663020e22469bbde7cc7829e86f1c89f06c11e2bd12f305d" }, "downloads": -1, "filename": "pyHyperV-0.0.2.macosx-10.8-x86_64.exe", "has_sig": false, "md5_digest": "6b39a81fe7ccea20e8a183cc11f96f32", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 68942, "upload_time": "2014-04-02T12:47:11", "url": "https://files.pythonhosted.org/packages/40/24/d91889c2d89a43b9a68e6de3b394d81bab0b70794ef35884bd96ab82cbdd/pyHyperV-0.0.2.macosx-10.8-x86_64.exe" }, { "comment_text": "", "digests": { "md5": "c651b1692ca4ede239a7c3481ef54f59", "sha256": "f8c8ff8884aae04caa76da751d65415f17e32bec1d234b98b7de807ba7ae9d12" }, "downloads": -1, "filename": "pyHyperV-0.0.2.tar.gz", "has_sig": false, "md5_digest": "c651b1692ca4ede239a7c3481ef54f59", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3162, "upload_time": "2014-04-02T12:47:06", "url": "https://files.pythonhosted.org/packages/a7/df/57c22e3f53f52c473eb69ee052f5bba214976f9ea564b16bc71d5cd78467/pyHyperV-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "4818f8ec2da460b1b6584b0856da7778", "sha256": "3ffeab1a4374a4c15a7526c4db4f2ed32e0679a9a6aa33ff2c961686dae2ea41" }, "downloads": -1, "filename": "pyHyperV-0.0.3.macosx-10.8-x86_64.exe", "has_sig": false, "md5_digest": "4818f8ec2da460b1b6584b0856da7778", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 69060, "upload_time": "2014-04-03T00:01:33", "url": "https://files.pythonhosted.org/packages/06/36/7501003fbf8210faa79548123ac83716d675230d758ecd6bbc69f8482340/pyHyperV-0.0.3.macosx-10.8-x86_64.exe" }, { "comment_text": "", "digests": { "md5": "e6d7386f475e194536353e2771810c6e", "sha256": "1ffb344c5785774515b4c2f6389620d56ad9fddf39ea2c5f81c9a59f749a1f5a" }, "downloads": -1, "filename": "pyHyperV-0.0.3.tar.gz", "has_sig": false, "md5_digest": "e6d7386f475e194536353e2771810c6e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3277, "upload_time": "2014-04-03T00:01:30", "url": "https://files.pythonhosted.org/packages/3f/46/6d6a3b4e4f0eefe6c425e151a7a85d41579bade2fe4b2abad560616e9c26/pyHyperV-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "8b527fbde6d47af4ddf1794dfc5f028f", "sha256": "0b6eb60346a64ef78ea1900618a56cad9f363277a424e9fb6dede75d25aeb644" }, "downloads": -1, "filename": "pyHyperV-0.0.4.macosx-10.8-x86_64.exe", "has_sig": false, "md5_digest": "8b527fbde6d47af4ddf1794dfc5f028f", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 71409, "upload_time": "2014-04-05T08:23:01", "url": "https://files.pythonhosted.org/packages/c0/96/f52d0dc40b502cf437a887a851aa5b6948f1f37548ba27c69fd5c0f7d5d8/pyHyperV-0.0.4.macosx-10.8-x86_64.exe" }, { "comment_text": "", "digests": { "md5": "bf64edf573f019439af831c2c50da6dd", "sha256": "04212bedb9665e20c61e0dae179b2718652151ed333bd99ac9ad69cf493b7463" }, "downloads": -1, "filename": "pyHyperV-0.0.4.tar.gz", "has_sig": false, "md5_digest": "bf64edf573f019439af831c2c50da6dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3947, "upload_time": "2014-04-05T08:22:56", "url": "https://files.pythonhosted.org/packages/3e/04/9bb3068818e991c2ca5580508165c4d3e604b66f1e4c73c07fe1568eeebf/pyHyperV-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8b527fbde6d47af4ddf1794dfc5f028f", "sha256": "0b6eb60346a64ef78ea1900618a56cad9f363277a424e9fb6dede75d25aeb644" }, "downloads": -1, "filename": "pyHyperV-0.0.4.macosx-10.8-x86_64.exe", "has_sig": false, "md5_digest": "8b527fbde6d47af4ddf1794dfc5f028f", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 71409, "upload_time": "2014-04-05T08:23:01", "url": "https://files.pythonhosted.org/packages/c0/96/f52d0dc40b502cf437a887a851aa5b6948f1f37548ba27c69fd5c0f7d5d8/pyHyperV-0.0.4.macosx-10.8-x86_64.exe" }, { "comment_text": "", "digests": { "md5": "bf64edf573f019439af831c2c50da6dd", "sha256": "04212bedb9665e20c61e0dae179b2718652151ed333bd99ac9ad69cf493b7463" }, "downloads": -1, "filename": "pyHyperV-0.0.4.tar.gz", "has_sig": false, "md5_digest": "bf64edf573f019439af831c2c50da6dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3947, "upload_time": "2014-04-05T08:22:56", "url": "https://files.pythonhosted.org/packages/3e/04/9bb3068818e991c2ca5580508165c4d3e604b66f1e4c73c07fe1568eeebf/pyHyperV-0.0.4.tar.gz" } ] }