netfoundry


Namenetfoundry JSON
Version 3.2.7 PyPI version JSON
download
home_pagehttps://developer.netfoundry.io/v2/tools/
SummaryInterface to the NetFoundry network-as-code orchestration Platform
upload_time2020-11-21 20:11:49
maintainer
docs_urlNone
authorKenneth Bingham
requires_python>=3.6
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
## Play the demo

This creates a demo network named "BibbidiBobbidiBoo" with your API account stored in ~/.netfoundry/credentials.json

Learn about getting an API account by reading the [Authentication Guide](https://developer.netfoundry.io/v2/guides/authentication/)

```bash
$ python3 -m netfoundry.demo BibbidiBobbidiBoo
INFO: running demo script in /home/alice/.pyenv/versions/3.9.0/lib/python3.9/site-packages/netfoundry/demo.py
```

## Create network snippet from demo.py

```python
#!/usr/bin/env python3
import netfoundry

# default API account credential file is ~/.netfoundry/credentials.json
Session = netfoundry.Session()

# yields a list of Network Groups in Organization.networkGroups[], but there's typically only one group
Organization = netfoundry.Organization(Session)

# use the default Network Group (the first Network Group ID known to the Organization)
NetworkGroup = netfoundry.NetworkGroup(Organization)

# create a Network
netName = "BibbidiBobbidiBoo"
if netName in NetworkGroup.networksByName.keys():
    # use the Network
    Network = netfoundry.Network(Session, networkName=netName)
    Network.waitForStatus("PROVISIONED",wait=999,progress=True)
else:
    netId = NetworkGroup.createNetwork(netName)
    Network = netfoundry.Network(Session, networkId=netId)
    Network.waitForStatus("PROVISIONED",wait=999,progress=True)
    Network = netfoundry.Network(Session, networkId=netId)
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://developer.netfoundry.io/v2/tools/",
    "name": "netfoundry",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "Kenneth Bingham",
    "author_email": "support@netfoundry.io",
    "download_url": "https://files.pythonhosted.org/packages/64/e6/5df77e5e8f274b66b89647287d96b6822b37f73489214cc45fffd404d590/netfoundry-3.2.7.tar.gz",
    "platform": "",
    "description": "\n## Play the demo\n\nThis creates a demo network named \"BibbidiBobbidiBoo\" with your API account stored in ~/.netfoundry/credentials.json\n\nLearn about getting an API account by reading the [Authentication Guide](https://developer.netfoundry.io/v2/guides/authentication/)\n\n```bash\n$ python3 -m netfoundry.demo BibbidiBobbidiBoo\nINFO: running demo script in /home/alice/.pyenv/versions/3.9.0/lib/python3.9/site-packages/netfoundry/demo.py\n```\n\n## Create network snippet from demo.py\n\n```python\n#!/usr/bin/env python3\nimport netfoundry\n\n# default API account credential file is ~/.netfoundry/credentials.json\nSession = netfoundry.Session()\n\n# yields a list of Network Groups in Organization.networkGroups[], but there's typically only one group\nOrganization = netfoundry.Organization(Session)\n\n# use the default Network Group (the first Network Group ID known to the Organization)\nNetworkGroup = netfoundry.NetworkGroup(Organization)\n\n# create a Network\nnetName = \"BibbidiBobbidiBoo\"\nif netName in NetworkGroup.networksByName.keys():\n    # use the Network\n    Network = netfoundry.Network(Session, networkName=netName)\n    Network.waitForStatus(\"PROVISIONED\",wait=999,progress=True)\nelse:\n    netId = NetworkGroup.createNetwork(netName)\n    Network = netfoundry.Network(Session, networkId=netId)\n    Network.waitForStatus(\"PROVISIONED\",wait=999,progress=True)\n    Network = netfoundry.Network(Session, networkId=netId)\n```\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Interface to the NetFoundry network-as-code orchestration Platform",
    "version": "3.2.7",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "dd70c63d39a5843a5f42c9e260710426",
                "sha256": "cdfccbc7c34bb67feff700a01da07a5d6bfbabcd2b1a27a3ba20f0b4ebb4fb60"
            },
            "downloads": -1,
            "filename": "netfoundry-3.2.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dd70c63d39a5843a5f42c9e260710426",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 19269,
            "upload_time": "2020-11-21T20:11:48",
            "upload_time_iso_8601": "2020-11-21T20:11:48.285838Z",
            "url": "https://files.pythonhosted.org/packages/b5/cd/43a738560fb4f68f098409cdcc43f98d58325ab8bb8cf4048ad3d5b0db34/netfoundry-3.2.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "7a2ef78482160548fdeecc9fd9a639bc",
                "sha256": "9ea25a99d62ca10ec16f00d37b05c938718f4ff6cfa8edcaa8d4110aff401dd4"
            },
            "downloads": -1,
            "filename": "netfoundry-3.2.7.tar.gz",
            "has_sig": false,
            "md5_digest": "7a2ef78482160548fdeecc9fd9a639bc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 17716,
            "upload_time": "2020-11-21T20:11:49",
            "upload_time_iso_8601": "2020-11-21T20:11:49.075592Z",
            "url": "https://files.pythonhosted.org/packages/64/e6/5df77e5e8f274b66b89647287d96b6822b37f73489214cc45fffd404d590/netfoundry-3.2.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2020-11-21 20:11:49",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "netfoundry"
}
        
Elapsed time: 0.18974s