get_of_rules corrected 39/1139/1
authorgarciaana <naiara.garciaa@ehu.eus>
Mon, 20 Feb 2017 13:42:18 +0000 (14:42 +0100)
committergarciaana <naiara.garciaa@ehu.eus>
Mon, 20 Feb 2017 13:42:18 +0000 (14:42 +0100)
Change-Id: I4b3d6d2f035765f595b797320d8f42d7dddac09f
Signed-off-by: garciaana <naiara.garciaa@ehu.eus>
onos.py

diff --git a/onos.py b/onos.py
index 53def9d..86fbac7 100644 (file)
--- a/onos.py
+++ b/onos.py
@@ -212,6 +212,7 @@ class OF_conn():
                 return r, c
         # get rules
         try:
+           self.headers['content-type'] = 'text/plain'
             of_response = requests.get(self.url + "flows/" + self.id, headers=self.headers)
             error_text = "Openflow response %d: %s" % (of_response.status_code, of_response.text)