Blame SOURCES/bz1568753-4-fence_gce-bundled-libs.patch
|
|
2d8bb4 |
diff -uNr a/agents/gce/fence_gce.py b/agents/gce/fence_gce.py
|
|
|
2d8bb4 |
--- a/agents/gce/fence_gce.py 2018-07-12 09:54:53.121993715 +0200
|
|
|
2d8bb4 |
+++ b/agents/gce/fence_gce.py 2018-07-12 09:57:42.580699588 +0200
|
|
|
2d8bb4 |
@@ -15,9 +15,14 @@
|
|
|
2d8bb4 |
import urllib2 as urlrequest
|
|
|
2d8bb4 |
sys.path.append("@FENCEAGENTSLIBDIR@")
|
|
|
2d8bb4 |
|
|
|
2d8bb4 |
-import googleapiclient.discovery
|
|
|
2d8bb4 |
from fencing import fail_usage, run_delay, all_opt, atexit_handler, check_input, process_input, show_docs, fence_action
|
|
|
2d8bb4 |
|
|
|
2d8bb4 |
+try:
|
|
|
2d8bb4 |
+ sys.path.insert(0, '/usr/lib/fence-agents/bundled/gce')
|
|
|
2d8bb4 |
+ import googleapiclient.discovery
|
|
|
2d8bb4 |
+except ImportError:
|
|
|
2d8bb4 |
+ pass
|
|
|
2d8bb4 |
+
|
|
|
2d8bb4 |
|
|
|
2d8bb4 |
METADATA_SERVER = 'http://metadata.google.internal/computeMetadata/v1/'
|
|
|
2d8bb4 |
METADATA_HEADERS = {'Metadata-Flavor': 'Google'}
|