Joerg Steffens於 2018年11月16日星期五 UTC+8下午4時23分58秒寫道: > Hi Alan, > > I not sure how your "Test plugin class" corresponds to the console log > you attached, as this show problems in ovirtsdk. > > If you're testing ovirt: have you seen the promising ovirt plugin in > https://github.com/bareos/bareos-contrib/pull/34 ? I hope, that this > gets integrated into baroes/bareos-contrib soon. > > On 16.11.18 at 08:11 wrote Alan Lee: > > Hi all, > > > > I am working on bareos plugin with as below coding: > > > > ==================Test plugin class========================= > > import requests > > > > r = requests.get('https://www.example.com.hk/api', > > auth=('admin@internal','123456'),verify='/root/apache-ca.pem') > > > > print r.text > > > > class PluginTesting(object): > > .... > > > > ======================Test plugin class End============== > > > > However, while I run the plugin job ,bareos return following errors in > > console log. > > > > ========================bareos console log==================== > > bareos-fd JobId 588: Fatal error: python-fd: Traceback (most recent call > > last): > > File "/usr/lib64/bareos/plugins/TestPlugWrapper.py", line 11, in > > handle_plugin_event > > return bareos_fd_plugin_object.handle_plugin_event(context, event) > > File "/usr/lib64/bareos/plugins/PluginTesting.py", line 203, in > > handle_plugin_event > > return self.start_backup_job(context) > > File "/usr/lib64/bareos/plugins/PluginTesting.py", line 269, in > > start_backup_job > > self.connect() > > File "/usr/lib64/bareos/plugins/PluginTesting.py", line 337, in connect > > debug=False > > File "/usr/lib/python2.7/site-packages/ovirtsdk/api.py", line 191, in > > __init__ > > url='' > > File "/usr/lib/python2.7/site-packages/ovirtsdk/infrastructure/proxy.py", > > line 125, in request > > return self.__xml2py(response, cls) > > File "/usr/lib/python2.7/site-packages/ovirtsdk/infrastructure/proxy.py", > > line 137, in __xml2py > > return params.parseClass(obj, cls) > > File "/usr/lib/python2.7/site-packages/ovirtsdk/xml/params.py", line 50243, > > in parseClass > > rootObj.build(rootNode) > > File "/usr/lib/python2.7/site-packages/ovirtsdk/xml/params.py", line 47024, > > in build > > self.buildChildren(child, node, nodeName_) > > File "/usr/lib/python2.7/site-packages/ovirtsdk/xml/params.py", line 47043, > > in buildChildren > > dval_ = self.gds_parse_datetime(sval_) > > File "/usr/lib/python2.7/site-packages/ovirtsdk/xml/params.py", line 226, > > in gds_parse_datetime > > input_data, '%Y-%m-%dT%H:%M:%S.%f') > > TypeError: attribute of type 'NoneType' is not callable > > ===========================bareos console log End=============== > > > > Can anyone know what is the root cause for this error? > > > > Thanks a lot. > > > > > -- > Jörg Steffens joerg.steff...@bareos.com > Bareos GmbH & Co. KG Phone: +49 221 630693-91 > http://www.bareos.com Fax: +49 221 630693-10 > > 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örg Steffens, P. Storz
Hi Joerg, A Big Thank you for your reply. For the plugin that you provided, I tried input my oVirt VM name or snapshot name as parameter "vm_name" but I cannot create an snapshot with following errors: ==============Console_log================= bareos-fd JobId 604: Error: python-fd: Nothing to backup. My config file setting as below: ================Configure file============= Plugin = "python:module_path=/usr/lib64/bareos/plugins:module_name=bareos-fd-ovirt:ca=/root/apache-ca.pem:server=example.com.hk:username=admin@internal:password=123456:uuid=7e959d05-d9e0-46ad-b4cc-0777050ca7d3:vm_name=CentOS:storage_domain=ovirt-export" The vm name should be the VM name of oVirt not the snapshot name, right? Could you explain is there any wrong setup in my configure file? Thanks a lot. -- You received this message because you are subscribed to the Google Groups "bareos-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to bareos-devel+unsubscr...@googlegroups.com. To post to this group, send email to bareos-devel@googlegroups.com. For more options, visit https://groups.google.com/d/optout.