Closed brownmk closed 8 years ago
Yes, this is a bit confusing, but here is how:
all_suid = cy.network.get_all()
net1 = cy.network.create(all_suid[0])
Now net1 is the CyNetwork object and you have access to all API available for the network.
This does not seem to work, NetworkClient.create() calls CyNetwork(network_id). However, CyNetwork still has its BASE_URL set to localhost. We somehow need to pass "remote.host.org" to CyNetwork class. Thanks.
cy = CyRestClient(ip="remote.host.org", port="1234", version="v1") X=cy.network.get_all() for x in X: print cy.network.get(x) # okay, we can get the network in json format
The question is how can be obtain the network as a CyNetwork() object instead. How do I set the ip to "remote.host.org" for the CyNetwork() class? It connects to localhost by default. Thanks!