File paa_12_sp5_rdma_no_ext_driver.patch of Package python-azure-agent.37778

Index: WALinuxAgent-2.12.0.4/azurelinuxagent/pa/rdma/suse.py
===================================================================
--- WALinuxAgent-2.12.0.4.orig/azurelinuxagent/pa/rdma/suse.py
+++ WALinuxAgent-2.12.0.4/azurelinuxagent/pa/rdma/suse.py
@@ -31,8 +31,17 @@ class SUSERDMAHandler(RDMAHandler):
     def install_driver(self):  # pylint: disable=R1710
         """Install the appropriate driver package for the RDMA firmware"""
 
+        suport_pci_passthrough = False
+        if DistroVersion(DISTRO_VERSION) == DistroVersion('12'):
+            release_data = open('/etc/os-release').read()
+            if 'SP5' in release_data:
+                suport_pci_passthrough = True
+
         if DistroVersion(DISTRO_VERSION) >= DistroVersion('15'):
-            msg = 'SLE 15 and later only supports PCI pass through, no '
+            suport_pci_passthrough = True
+
+        if suport_pci_passthrough:
+            msg = 'SLE 12 SP5 and later only supports PCI pass through, no '
             msg += 'special driver needed for IB interface'
             logger.info(msg)
             return True
openSUSE Build Service is sponsored by