How can you test to see if a Netwok is ready for devices to be claimed?

mrpackethead_
Comes here often

How can you test to see if a Netwok is ready for devices to be claimed?

I am creating a network and then attempting to claim devices for it..   

```

response = dashboard.organizations.createOrganizationNetwork(
        ORGANISATION_ID,
        props['NetworkName'],
        props['ProductTypes'],
        tags=props['Tags'],
        timeZone=props['TimeZone'],
        notes=props['Notes']
    )
```

  The networks create ok, but I get an error  ( "error: devices, updateDevice - 404 Not Found, please wait a minute if the key or org was just newly created."  when  i try to immediately claim devices...

```

dashboard.networks.claimNetworkDevices(
        props['NetworkId'],
        [props["Serial"]],
    )

```

The error suggests that the creation of the network is async... And i need to wait untill its ready.     How can i test to see if the network is in fact ready and can have devices added to it?


If i run these calls manually and allow some time between them, it works.. I dont' really want to just build in an arbitory wait...  


0 Replies 0
Get notified when there are additional replies to this discussion.