blob: 6e309c2fad83d0f6fb74b5c2c84e8490fcf02c10 [file] [log] [blame]
Ray Milkeya0f983b2016-06-23 19:39:55 -07001#! /usr/bin/env python
2
3import requests
4
5from requests.auth import HTTPBasicAuth
6import sys
7
8
9
10if len(sys.argv) != 3:
11 print "usage: delete-netcfg onos-node config-name"
12 sys.exit(1)
13
14node = sys.argv[1]
15configName = sys.argv[2]
16
17intentRequest = requests.delete('http://' + node + ':8181/onos/v1/network/configuration/' + configName,
18 auth=HTTPBasicAuth('onos', 'rocks'))
19
20if intentRequest.status_code != 204:
21 print intentRequest.text
22 sys.exit(1)
23
24sys.exit(0)
25
26
27