Hi,

the sslContext option for SmartConnect has only been added in pyvmomi
after version 5.5.0.2014.1.1, compare the following:
https://github.com/vmware/pyvmomi/blob/v5.5.0.2014.1.1/pyVim/connect.py
and
https://github.com/vmware/pyvmomi/blob/master/pyVim/connect.py

The Bareos project relies either on the pyvmomi package from EPEL (v. 
5.5.0.2014.1.1)
or provides pyvmomi 5.5.0.2014.1.1 for SLES 11 and SLES 12.
Debian 8 also has version 5.5.0-2014.1.1 pyvmomi packages.

So generally adding this option would break all normal installations.

Which version of pyvmomi are you using?
And which Linux distribution?

Regards,

Stephan


On 04/11/2016 02:18 PM, [email protected] wrote:
> I have found the problem with the connection of the vcenter.
> The vcenter have an unverified ssl certificate.
> If you connect with pyvmomi to the vcenter, then you will get an warning of 
> this unverified certificate.
> 
> I have fix the problem with adding some code in the function connect_vmware, 
> from the BareosFdPluginVMware.py
> Try :
>        import ssl
> 
>             context = ssl.SSLContext(ssl.PROTOCOL_TLSv1) # add this
>           context.verify_mode = ssl.CERT_NONE          # add this
> 
>          self.si = SmartConnect(host=self.options['vcserver'],
>                                    user=self.options['vcuser'],
>                                    pwd=self.options['vcpass'],
>                                  port=443, sslContext=context)  # add the 
> sslContext                           
> 
> This will ignore the unverified certified.
> 


-- 
  Stephan Dühr                              [email protected]
  Bareos GmbH & Co. KG                      Phone: +49 221-630693-90
  http://www.bareos.com

  Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRA 29646
  Komplementär: Bareos Verwaltungs-GmbH
  Geschäftsführer: S. Dühr, M. Außendorf,
  J. Steffens, Philipp Storz, M. v. Wieringen

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to