File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,7 @@ This creates a demo network named "BibbidiBobbidiBoo" with your API account stor
1010Learn about getting an API account by reading the [ Authentication Guide] ( https://developer.netfoundry.io/v2/guides/authentication/ )
1111
1212``` bash
13- $ python3 -m netfoundry.demo BibbidiBobbidiBoo
14- INFO: running demo script in /home/alice/.pyenv/versions/3.9.0/lib/python3.9/site-packages/netfoundry/demo.py
13+ python3 -m netfoundry.demo --network=BibbidiBobbidiBoo
1514```
1615
1716## Create network snippet from demo.py
@@ -20,15 +19,15 @@ INFO: running demo script in /home/alice/.pyenv/versions/3.9.0/lib/python3.9/sit
2019# !/usr/bin/env python3
2120import netfoundry
2221
23- # default API account credential file is ~/.netfoundry/credentials.json
24- Organization = netfoundry.Organization(credentials = " credentials.json" )
22+ # user- default path is ~/.netfoundry/
23+ organization = netfoundry.Organization(credentials = " credentials.json" )
2524
2625# use some Network Group, default is to use the first and there's typically only one
27- network_group = netfoundry.NetworkGroup(Organization )
26+ network_group = netfoundry.NetworkGroup(organization )
2827
2928# create a Network
3029network_name = " BibbidiBobbidiBoo"
31- if network_name in network_group.networks_by_name.keys():
30+ if network_name in network_group.networks_by_name() .keys():
3231 # use the Network
3332 network = netfoundry.Network(network_group, network_name = network_name)
3433 network.wait_for_status(" PROVISIONED" ,wait = 999 ,progress = True )
You can’t perform that action at this time.
0 commit comments