{ "info": { "author": "NetFoundry", "author_email": "ops-mgmt@netfoundry.io", "bugtrack_url": null, "classifiers": [], "description": "import netfoundry\nimport requests\nimport json\n\nCLIENT_ID = \"9jJ38zA6OZfN4A0nJPLfQnAeBvm2jqnM\"\nCLIENT_SECRET = \"9uIjiifcyr8nZMq_63jaNlHqZp1N7kfpg_z3IZ61bIYyzBwtucrFOHDpK43F_j3d\"\nREGION = \"us-east-1\"\n\napi = netfoundry.nfapi()\n\nAUTH_ENDPOINT = api.authEndpoints[\"production\"]\nHEADERS = { 'content-type': \"application/json\" }\nREQUEST = {\n \"client_id\": CLIENT_ID,\n \"client_secret\": CLIENT_SECRET,\n \"audience\": \"https://gateway.production.netfoundry.io/\",\n \"grant_type\": \"client_credentials\"\n}\n\nRESPONSE = requests.post(AUTH_ENDPOINT,\n json=REQUEST,\n headers=HEADERS)\nTOKEN = json.loads(RESPONSE.text)['access_token']\n\n# construct the MOP client\napi.client(auth=TOKEN)\n\nDCID = api.dataCentersByRegion[REGION]\n\n# create a network with controller in a particular datacenter region\nNETID = api.createNetwork(name=\"helloNetwork\",\n region=REGION)\n\n# create client and serving gateway endpoints\nhelloClientGwId = api.createGateway(name=\"helloClientGateway\",\n netId=NETID,\n dataCenterId=DCID)\n\nhelloServingGwId = api.createGateway(name=\"helloServingGateway\",\n netId=NETID,\n dataCenterId=DCID)\n# create a client service\nhelloClientServiceId = api.createClientService(name=\"helloClientService\",\n netId=NETID,\n networkIp=\"208.67.222.222\",\n networkFirstPort=53,\n networkLastPort=53,\n interceptIp=\"5.3.5.3\",\n interceptFirstPort=53,\n interceptLastPort=53,\n protocolType=\"udp\")\n\n# create an AppWAN\nhelloAppWanId = api.createAppWan(name=\"helloAppWan\",\n netId=NETID)\n\n# add the endpoints and service to the AppWAN\ntry:\n appWanResult = api.updateAppWan(netId=NETID,\n appWanId=helloAppWanId,\n services=[ helloClientServiceId ],\n endpoints=[ helloClientGwId, helloServingGwId ])\nexcept:\n raise\n\n# store existing network resources as a lookup object that resolves names to identifying UUIDs\nhelloNetworkNVirginia = api.walkNetwork(NETID)\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://netfoundry.atlassian.net/wiki/spaces/PUB/blog/2017/10/15/11829509/MOP+for+Python", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "netfoundry", "package_url": "https://pypi.org/project/netfoundry/", "platform": "", "project_url": "https://pypi.org/project/netfoundry/", "project_urls": { "Homepage": "https://netfoundry.atlassian.net/wiki/spaces/PUB/blog/2017/10/15/11829509/MOP+for+Python" }, "release_url": "https://pypi.org/project/netfoundry/2.0.0/", "requires_dist": null, "requires_python": "", "summary": "API wrappers and configuration for NetFoundry's Management Orchestration Platform", "version": "2.0.0" }, "last_serial": 5777161, "releases": { "1.0.10": [ { "comment_text": "", "digests": { "md5": "edcd9f00a6a2b477b4bbc9b02eab52d7", "sha256": "ed83bf9ed22b333057ccbe58f03c6935f9c587466286a4de7f54dfb07a78f051" }, "downloads": -1, "filename": "netfoundry-1.0.10.tar.gz", "has_sig": false, "md5_digest": "edcd9f00a6a2b477b4bbc9b02eab52d7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8119, "upload_time": "2018-06-15T11:37:24", "url": "https://files.pythonhosted.org/packages/0e/48/00148be5d6a314ac92e4ba47e22834c46cb6d6f1ce76dca3fcbdf04389cc/netfoundry-1.0.10.tar.gz" } ], "1.0.11": [ { "comment_text": "", "digests": { "md5": "2381e95d6701318fa76261ad060dbb30", "sha256": "a60dbf11493de358f3dfc2513718cc8c18e82e30eb11c6327d39f3a98a535e09" }, "downloads": -1, "filename": "netfoundry-1.0.11.tar.gz", "has_sig": false, "md5_digest": "2381e95d6701318fa76261ad060dbb30", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8252, "upload_time": "2018-06-15T11:55:38", "url": "https://files.pythonhosted.org/packages/6f/91/759aaec8407b580cc409feee3f807f46aef862dff8a0b409e5210babb00d/netfoundry-1.0.11.tar.gz" } ], "1.0.12": [ { "comment_text": "", "digests": { "md5": "bf4348802e8294d2cbcd6a4c5a71aaf0", "sha256": "ae2879c31e7451b1569f187493e57e3d7b0f9118c227f12f48a529a16caae01b" }, "downloads": -1, "filename": "netfoundry-1.0.12.tar.gz", "has_sig": false, "md5_digest": "bf4348802e8294d2cbcd6a4c5a71aaf0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8512, "upload_time": "2018-06-15T11:58:16", "url": "https://files.pythonhosted.org/packages/4f/89/5872330cf7b28a6160c6f41f62cab88d2cc981fb75b902f33b6d7060ac0b/netfoundry-1.0.12.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "a687fe43b2e402d18b3dce66beb3caa5", "sha256": "1544bda15f57e09dc2be8c6e7886c2e8dc7d26ea68104690d437a633060445f6" }, "downloads": -1, "filename": "netfoundry-1.1.0.tar.gz", "has_sig": false, "md5_digest": "a687fe43b2e402d18b3dce66beb3caa5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9319, "upload_time": "2018-09-14T16:35:34", "url": "https://files.pythonhosted.org/packages/60/6e/6b5830678bb4b8885a1a738584379c79cac8f52fd34603113d51d36d5d16/netfoundry-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "01b29aabe0a553340ba0dfb05e6b3ed4", "sha256": "e3ab798fe56f98be4fd160605cb7d3ba3fc0d90a1650e53b48e00fc327e093b4" }, "downloads": -1, "filename": "netfoundry-1.2.0.tar.gz", "has_sig": false, "md5_digest": "01b29aabe0a553340ba0dfb05e6b3ed4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8298, "upload_time": "2019-02-26T19:40:57", "url": "https://files.pythonhosted.org/packages/f2/cf/896de4ad1d309101861586c843c931bc71569f63f58ea784f576c111d924/netfoundry-1.2.0.tar.gz" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "8e699f959629d82adc7ed82907252d1d", "sha256": "ef7fbad152add8b1003c5715f0a71df98e1a59820a868c1456c954f4f9b11632" }, "downloads": -1, "filename": "netfoundry-1.3.0.tar.gz", "has_sig": false, "md5_digest": "8e699f959629d82adc7ed82907252d1d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8401, "upload_time": "2019-02-27T16:23:22", "url": "https://files.pythonhosted.org/packages/b6/6e/42427d22ef61e88c117245f6f9a2eb6c266d7f7ad15d330000eafe93b959/netfoundry-1.3.0.tar.gz" } ], "1.3.1": [ { "comment_text": "", "digests": { "md5": "6455d6b8b2b3578b0a3f0f4f2077ef34", "sha256": "08b26972368fd1aeccedee95dff13e6e009ee2cc35fb0229f12255f755124adb" }, "downloads": -1, "filename": "netfoundry-1.3.1.tar.gz", "has_sig": false, "md5_digest": "6455d6b8b2b3578b0a3f0f4f2077ef34", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8325, "upload_time": "2019-02-28T16:37:52", "url": "https://files.pythonhosted.org/packages/46/a2/63bdcf8f2260a3c6ded13fb31ee7a4120502d39b89c655aeb893ed1a0463/netfoundry-1.3.1.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "50ef15d9ce4404b9133e7b8ba3cdf078", "sha256": "6378b73eb1c15eea1d1e9a8dac39e663ff9a246c4d0fa201514bf7aec689df95" }, "downloads": -1, "filename": "netfoundry-2.0.0.tar.gz", "has_sig": false, "md5_digest": "50ef15d9ce4404b9133e7b8ba3cdf078", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8622, "upload_time": "2019-04-29T16:24:52", "url": "https://files.pythonhosted.org/packages/d1/59/ddddd98103cc2745da1c858b05e9c18cd020732265569c40305be5910dfe/netfoundry-2.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "50ef15d9ce4404b9133e7b8ba3cdf078", "sha256": "6378b73eb1c15eea1d1e9a8dac39e663ff9a246c4d0fa201514bf7aec689df95" }, "downloads": -1, "filename": "netfoundry-2.0.0.tar.gz", "has_sig": false, "md5_digest": "50ef15d9ce4404b9133e7b8ba3cdf078", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8622, "upload_time": "2019-04-29T16:24:52", "url": "https://files.pythonhosted.org/packages/d1/59/ddddd98103cc2745da1c858b05e9c18cd020732265569c40305be5910dfe/netfoundry-2.0.0.tar.gz" } ] }