Code Review
/
oam.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Update ves-collector deployment
[oam.git]
/
solution
/
dev
/
client-scripts-ves-v7
/
globalVesEventEmitter.py
diff --git
a/solution/dev/client-scripts-ves-v7/globalVesEventEmitter.py
b/solution/dev/client-scripts-ves-v7/globalVesEventEmitter.py
index
9f44a5c
..
26c3879
100644
(file)
--- a/
solution/dev/client-scripts-ves-v7/globalVesEventEmitter.py
+++ b/
solution/dev/client-scripts-ves-v7/globalVesEventEmitter.py
@@
-44,11
+44,12
@@
def sendVesEvent(data):
except requests.exceptions.RequestException as e:
# catastrophic error. bail.
raise SystemExit(e)
except requests.exceptions.RequestException as e:
# catastrophic error. bail.
raise SystemExit(e)
-
- if response.status_code >= 200 and response.status_code <=
5
00:
+
+ if response.status_code >= 200 and response.status_code <=
3
00:
print(response)
else:
print(response)
else:
- sys.exit('Reading VES "stndDefined" message template failed.')
+ print(response.status_code)
+ sys.exit('Sending VES "stndDefined" message template failed with code %d.' % response.status_code)
def sendHttpGet(url):
try:
def sendHttpGet(url):
try:
@@
-60,7
+61,7
@@
def sendHttpGet(url):
except requests.exceptions.RequestException as e:
# catastrophic error. bail.
raise SystemExit(e)
except requests.exceptions.RequestException as e:
# catastrophic error. bail.
raise SystemExit(e)
-
+
if response.status_code >= 200 and response.status_code < 300:
return response.json()
else:
if response.status_code >= 200 and response.status_code < 300:
return response.json()
else: