- fence_vmware_soap: fix python3-suds issue

This commit is contained in:
Oyvind Albrigtsen 2018-06-18 13:32:58 +02:00
parent d107f2f1c9
commit bdd2631bbb
2 changed files with 32 additions and 7 deletions

View File

@ -16,14 +16,14 @@
Name: fence-agents
Summary: Fence Agents for Red Hat Cluster
Version: 4.2.1
Release: 1%{?alphatag:.%{alphatag}}%{?dist}
Release: 2%{?alphatag:.%{alphatag}}%{?dist}
License: GPLv2+ and LGPLv2+
Group: System Environment/Base
URL: https://github.com/ClusterLabs/fence-agents
Source0: https://fedorahosted.org/releases/f/e/fence-agents/%{name}-%{version}.tar.xz
Patch0: fence_vmware_soap-fix-python-3-suds-issue.patch
%if 0%{?fedora} || 0%{?rhel} > 7
%global testagents zvm virsh raritan rcd_serial
%global allfenceagents fence-agents-alom fence-agents-amt fence-agents-amt-ws fence-agents-apc fence-agents-apc-snmp fence-agents-aws fence-agents-azure-arm fence-agents-bladecenter fence-agents-brocade fence-agents-cisco-mds fence-agents-cisco-ucs fence-agents-compute fence-agents-docker fence-agents-drac fence-agents-drac5 fence-agents-eaton-snmp fence-agents-emerson fence-agents-eps fence-agents-gce fence-agents-hds-cb fence-agents-heuristics-ping fence-agents-hpblade fence-agents-ibmblade fence-agents-ifmib fence-agents-ilo2 fence-agents-ilo-mp fence-agents-ilo-ssh fence-agents-ilo-moonshot fence-agents-mpath fence-agents-intelmodular fence-agents-ipdu fence-agents-ipmilan fence-agents-ironic fence-agents-kdump fence-agents-ldom fence-agents-lpar fence-agents-netio fence-agents-ovh fence-agents-rhevm fence-agents-rsa fence-agents-rsb fence-agents-sanbox2 fence-agents-sbd fence-agents-scsi fence-agents-vbox fence-agents-vmware fence-agents-vmware-rest fence-agents-vmware-soap fence-agents-vmware-vcloud fence-agents-wti fence-agents-xenapi fence-agents-zvm
%endif
@ -41,9 +41,6 @@ BuildRequires: autoconf automake libtool
%setup -q -n %{name}-%{version}
%autopatch -p1
# use Python2 until python3-suds bug is fixed
sed -i -e "/^#\!/c#\!\/usr\/bin\/python2 -tt" agents/vmware_soap/fence_vmware_soap.py agents/ovh/fence_ovh.py
%build
./autogen.sh
export PYTHON="/usr/bin/python3" %{configure}
@ -624,7 +621,7 @@ The fence-agents-netio package contains a fence agent for Koukaam NETIO devices
License: GPLv2+ and LGPLv2+
Group: System Environment/Base
Summary: Fence agent for OVH provider
Requires: python2-suds
Requires: python3-suds
Requires: fence-agents-common = %{version}-%{release}
%description ovh
Red Hat Fence Agent for OVH hosting provider
@ -817,7 +814,7 @@ The fence-agents-vmware-rest package contains a fence agent for VMWare with REST
License: GPLv2+ and LGPLv2+
Group: System Environment/Base
Summary: Fence agent for VMWare with SOAP API v4.1+
Requires: python2-suds
Requires: python3-suds
Requires: fence-agents-common = %{version}-%{release}
%description vmware-soap
The fence-agents-vmware-soap package contains a fence agent for VMWare with SOAP API v4.1+
@ -882,6 +879,9 @@ The fence-agents-zvm package contains a fence agent for IBM z/VM over IP.
%{_mandir}/man8/fence_zvmip.8*
%changelog
* Mon Jun 18 2018 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.2.1-2
- fence_vmware_soap: fix python3-suds issue
* Thu May 31 2018 Oyvind Albrigtsen <oalbrigt@redhat.com> - 4.2.1-1
- new upstream release

View File

@ -0,0 +1,25 @@
From 9b763accb5c4c4a1cf60a19592a4033bcedec500 Mon Sep 17 00:00:00 2001
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
Date: Fri, 15 Jun 2018 15:15:36 +0200
Subject: [PATCH] fence_vmware_soap: fix Python 3 suds issue
---
agents/vmware_soap/fence_vmware_soap.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/agents/vmware_soap/fence_vmware_soap.py b/agents/vmware_soap/fence_vmware_soap.py
index 6a3b592f..b90edc9b 100644
--- a/agents/vmware_soap/fence_vmware_soap.py
+++ b/agents/vmware_soap/fence_vmware_soap.py
@@ -56,7 +56,7 @@ def soap_login(options):
atexit.register(remove_tmp_dir, tmp_dir)
try:
- headers = {"Content-Type" : "text/xml;charset=UTF-8", "SOAPAction" : ""}
+ headers = {"Content-Type" : "text/xml;charset=UTF-8", "SOAPAction" : "vim25"}
conn = Client(url + "/vimService.wsdl", location=url, transport=RequestsTransport(verify=verify), headers=headers)
mo_ServiceInstance = Property('ServiceInstance')
--
2.17.1