{ "info": { "author": "Cloudbase Solutions Srl", "author_email": "acoman@cloudbasesolutions.com", "bugtrack_url": null, "classifiers": [ "Environment :: OpenStack", "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.3", "Programming Language :: Python :: 3.4" ], "description": "================\npython-hnvclient\n================\n\n.. image:: https://travis-ci.org/cloudbase/python-hnvclient.svg?branch=master\n :target: https://travis-ci.org/cloudbase/python-hnvclient\n\nPython client for the HNV (Hyper-V Network Virtualization) REST API.\n\n\n* Free software: Apache license\n* Documentation: http://docs.openstack.org/developer/python-hnvclient\n* Source: http://git.openstack.org/cgit/openstack/python-hnvclient\n* Bugs: http://bugs.launchpad.net/python-hnvclient\n\n\nFeatures\n--------\n\nThe Python interface matches the underlying REST API and can be employed in 3rd party projects.\n\n.. code:: python\n\n >>> from hnvclient import client\n >>> logical_networks = client.LogicalNetworks.get()\n >>> for logical_network in logical_networks:\n ... print(logical_network.resource_id)\n ...\n \"63606911-e053-42cf-842e-29f67c90d5c6\"\n \"c4cd42ff-5efb-4006-ac56-479730557926\"\n \"cd804db3-df59-4f57-8a7d-11cc3f3c4d98\"\n\n >>> logical_network = client.LogicalNetworks.get(resource_id=\"cd804db3-df59-4f57-8a7d-11cc3f3c4d98\")\n >>> logical_network\n \n >>> logical_network.provisioning_state\n u'Succeeded'\n >>> logical_network.subnetworks\n []\n >>> logical_network.subnetworks[0].resource_id\n u'4390e3d8-c527-4534-882f-906c47ffd0bb'\n\n.. code:: python\n\n from __future__ import print_function\n\n import json\n import sys\n\n from hnvclient import client\n\n\n def view_logical_networks():\n \"\"\"List all the available logical networks.\"\"\"\n logical_networks = client.LogicalNetworks.get()\n print(\"Logical networks:\")\n for logical_network in logical_networks:\n print(\"\\t - \", logical_network.resource_ref)\n print(\"\\t\\t\", \"Logical subnetworks:\")\n for logical_subnetwork in logical_network.subnetworks:\n print(\"\\t\\t - %s (%s)\" % (logical_subnetwork.resource_id,\n logical_subnetwork.address_prefix))\n\n print(\"\\t\\t\", \"Virtual networks:\")\n for virtual_network in logical_network.virtual_networks:\n print(\"\\t\\t - %s\" % virtual_network.resource_ref)\n\n\n def create_virtual_network():\n \"\"\"Create a new virtual network on the first logical network.\"\"\"\n print(\"Creating a new virtual network.\")\n address_space = client.AddressSpace(\n address_prefixes=[\"192.168.133.0/24\"])\n\n logical_network = client.Resource(\n resource_ref=client.LogicalNetworks.get()[0].resource_ref)\n\n virtual_network = client.VirtualNetworks(\n resource_id=\"hvn-test\",\n address_space=address_space,\n logical_network=logical_network,\n )\n virtual_network.commit()\n\n print(\"The raw content of the new Virtual Network\")\n print(json.dumps(virtual_network.dump(), indent=4))\n\n\n def remove_virtual_network():\n \"\"\"Remove the new virtual network.\"\"\"\n print(\"Remove the new virtual network\")\n client.VirtualNetworks.remove(resource_id=\"hvn-test\")\n\n\n def main():\n \"\"\"Logical networks sample entry point.\"\"\"\n client.setup()\n view_logical_networks()\n create_virtual_network()\n view_logical_networks()\n remove_virtual_network()\n view_logical_networks()\n\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cloudbase/python-hnvclient", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "python-hnvclient", "package_url": "https://pypi.org/project/python-hnvclient/", "platform": "", "project_url": "https://pypi.org/project/python-hnvclient/", "project_urls": { "Homepage": "https://github.com/cloudbase/python-hnvclient" }, "release_url": "https://pypi.org/project/python-hnvclient/0.1.0/", "requires_dist": [ "oslo.i18n (>=2.1.0)", "oslo.log (>=3.11.0)", "pbr (>=1.8)", "requests", "requests-ntlm", "six (>=1.7.0)" ], "requires_python": "", "summary": "Python client for the HNV (Hyper-V Network Virtualization) REST API.", "version": "0.1.0" }, "last_serial": 2735519, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "c6af100e90ceeca6cfba536ad7612825", "sha256": "5f478c926e1d8262d8a8a593b1de6b481e362b0c319dc996f4f39131f67daa23" }, "downloads": -1, "filename": "python_hnvclient-0.1.0-py2-none-any.whl", "has_sig": false, "md5_digest": "c6af100e90ceeca6cfba536ad7612825", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 79919, "upload_time": "2017-03-28T08:35:36", "url": "https://files.pythonhosted.org/packages/e5/19/a6f762f677ded653adf7b2971145cc0de03912f46f15ac2cf930df6fdab6/python_hnvclient-0.1.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d4e1037ce3692de15cce46cb4bbc28fa", "sha256": "77b09e1cc7f28ade7a15976a34ff85a244fd358641fc19ad4a6618de541f74f7" }, "downloads": -1, "filename": "python-hnvclient-0.1.0.tar.gz", "has_sig": false, "md5_digest": "d4e1037ce3692de15cce46cb4bbc28fa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 75831, "upload_time": "2017-03-28T08:35:38", "url": "https://files.pythonhosted.org/packages/a9/c8/f8b8e19c12910b9fb918724fe722410a462a644aabfef614d638ed9e2b51/python-hnvclient-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c6af100e90ceeca6cfba536ad7612825", "sha256": "5f478c926e1d8262d8a8a593b1de6b481e362b0c319dc996f4f39131f67daa23" }, "downloads": -1, "filename": "python_hnvclient-0.1.0-py2-none-any.whl", "has_sig": false, "md5_digest": "c6af100e90ceeca6cfba536ad7612825", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 79919, "upload_time": "2017-03-28T08:35:36", "url": "https://files.pythonhosted.org/packages/e5/19/a6f762f677ded653adf7b2971145cc0de03912f46f15ac2cf930df6fdab6/python_hnvclient-0.1.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d4e1037ce3692de15cce46cb4bbc28fa", "sha256": "77b09e1cc7f28ade7a15976a34ff85a244fd358641fc19ad4a6618de541f74f7" }, "downloads": -1, "filename": "python-hnvclient-0.1.0.tar.gz", "has_sig": false, "md5_digest": "d4e1037ce3692de15cce46cb4bbc28fa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 75831, "upload_time": "2017-03-28T08:35:38", "url": "https://files.pythonhosted.org/packages/a9/c8/f8b8e19c12910b9fb918724fe722410a462a644aabfef614d638ed9e2b51/python-hnvclient-0.1.0.tar.gz" } ] }