Here is a code snippet:

def _get_connection(self):

        try:
            conn = None
            conn = pywbem.WBEMConnection(self.url, (self.user, self.passwd),
                                         default_namespace='root/emc',
                                         x509=None,
                                         verify_callback=None,
                                         ca_certs=self.cert,
                                         no_verification=False)
        except TypeError:
            LOG.info(_LI("CA certificates not supported by the pywbem "
                         "library."))
            conn = pywbem.WBEMConnection(self.url, (self.user, self.passwd),
                                         default_namespace='root/emc')
        
        if conn is None:
            exception_message = (_("Cannot connect to ECOM server"))
            raise exception.VolumeBackendAPIException(data=exception_message)

        return conn

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1385469

Title:
  pywbem library on Ubuntu doesn't support CA certificate verification

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pywbem/+bug/1385469/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to