Created
October 21, 2015 22:43
-
-
Save jathanism/bced45430baf6bfd7e62 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import copy | |
from pynsot.client import get_api_client() | |
api = get_api_client() | |
site = api.sites(api.default_site) | |
objects = site.networks.get(network_address='192.168.0.0')['data']['networks'] | |
to_update = copy.deepcopy(objects) | |
[t['attributes'] = {} for t in to_update] # Strip the attributes | |
result = site.networks.put(to_update) | |
# result will be a list of the updated objects and be a 200 OK response |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment