File gcp-vpc-move-disable-google-api-cache-discovery.patch of Package resource-agents.21849

From 958f7410cc2cfc486f91a91419b940f91df34e14 Mon Sep 17 00:00:00 2001
From: Xabier Arbulu Insausti <xarbulu@suse.com>
Date: Mon, 13 Apr 2020 10:58:00 +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
---
 heartbeat/gcp-vpc-move-route.in | 2 +-
 heartbeat/gcp-vpc-move-vip.in   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/heartbeat/gcp-vpc-move-route.in b/heartbeat/gcp-vpc-move-route.in
index 7dd47150d..d8e8ea8dd 100644
--- a/heartbeat/gcp-vpc-move-route.in
+++ b/heartbeat/gcp-vpc-move-route.in
@@ -202,7 +202,7 @@ def validate(ctx):
     sys.exit(OCF_ERR_PERM)
 
   try:
-    ctx.conn = googleapiclient.discovery.build('compute', 'v1')
+    ctx.conn = googleapiclient.discovery.build('compute', 'v1', cache_discovery=False)
   except Exception as e:
     logger.error('Couldn\'t connect with google api: ' + str(e))
     sys.exit(OCF_ERR_CONFIGURED)
diff --git a/heartbeat/gcp-vpc-move-vip.in b/heartbeat/gcp-vpc-move-vip.in
index 953d61ed7..d76b7f53b 100755
--- a/heartbeat/gcp-vpc-move-vip.in
+++ b/heartbeat/gcp-vpc-move-vip.in
@@ -274,7 +274,7 @@ def validate():
 
   # Populate global vars
   try:
-    CONN = googleapiclient.discovery.build('compute', 'v1')
+    CONN = googleapiclient.discovery.build('compute', 'v1', cache_discovery=False)
   except Exception as e:
     logger.error('Couldn\'t connect with google api: ' + str(e))
     sys.exit(OCF_ERR_CONFIGURED)
openSUSE Build Service is sponsored by