summaryrefslogtreecommitdiffstats
path: root/dcae-policy/dcaepolicyplugin/discovery.py
diff options
context:
space:
mode:
authorSchmalzried, Terry (ts862m) <ts862m@att.com>2019-11-14 13:07:56 -0500
committerSchmalzried, Terry (ts862m) <ts862m@att.com>2019-11-14 15:26:45 -0500
commit77e27adeab5ff155b690f2e058c06f0a7812e225 (patch)
treec67450b92793ba2b503ddc596188e8f1319f43fe /dcae-policy/dcaepolicyplugin/discovery.py
parent6b7857037b8c82471395a929aba950677693d151 (diff)
DCAEGEN2-1920 enhance policy plugin for error conditions
Issue-ID: DCAEGEN2-1920 Change-Id: I7e1b08cb008f60d7f08ed2db41236a03b8490287 Signed-off-by: Schmalzried, Terry (ts862m) <ts862m@att.com>
Diffstat (limited to 'dcae-policy/dcaepolicyplugin/discovery.py')
-rw-r--r--dcae-policy/dcaepolicyplugin/discovery.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/dcae-policy/dcaepolicyplugin/discovery.py b/dcae-policy/dcaepolicyplugin/discovery.py
index 0517377..8612160 100644
--- a/dcae-policy/dcaepolicyplugin/discovery.py
+++ b/dcae-policy/dcaepolicyplugin/discovery.py
@@ -1,5 +1,5 @@
# ================================================================================
-# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2017-2019 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -40,7 +40,7 @@ def discover_service_url(service_name):
ctx.logger.info("getting service_url at {0}".format(service_url))
try:
- response = requests.get(service_url)
+ response = requests.get(service_url, timeout=60)
except requests.ConnectionError as ex:
raise NonRecoverableError(
"ConnectionError - failed to get {0}: {1}".format(service_url, str(ex)))
@@ -63,7 +63,7 @@ def discover_value(key):
ctx.logger.info("getting kv at {0}".format(kv_url))
try:
- response = requests.get(kv_url)
+ response = requests.get(kv_url, timeout=60)
except requests.ConnectionError as ex:
raise NonRecoverableError(
"ConnectionError - failed to get {0}: {1}".format(kv_url, str(ex)))