File gcp-vpc-move-disable-google-api-cache-discovery.patch of Package fence-agents.14952
From 271294c5ac040e8e2889fcbe8d0ee94c4f425b1c Mon Sep 17 00:00:00 2001
From: Xabier Arbulu Insausti <xarbulu@suse.com>
Date: Mon, 13 Apr 2020 11:00:52 +0100
Subject: [PATCH] Disable google api cache discovery
The underlying google api code cache discovery process
uses deprecated code. In order to avoid the usage of that
code and the related warning messages the cache usage is
disabled
---
agents/gce/fence_gce.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/agents/gce/fence_gce.py b/agents/gce/fence_gce.py
index b171710d..df3b48b3 100644
--- a/agents/gce/fence_gce.py
+++ b/agents/gce/fence_gce.py
@@ -230,7 +230,8 @@ def main():
if tuple(googleapiclient.__version__) < tuple("1.6.0"):
import oauth2client.client
credentials = oauth2client.client.GoogleCredentials.get_application_default()
- conn = googleapiclient.discovery.build('compute', 'v1', credentials=credentials)
+ conn = googleapiclient.discovery.build(
+ 'compute', 'v1', credentials=credentials, cache_discovery=False)
except Exception as err:
fail_usage("Failed: Create GCE compute v1 connection: {}".format(str(err)))