Description of problem: cannot add openstackimage provider using python-ovirt-sdk. Below is the code i am trying to run . connection = sdk.Connection(url=conf["URL"],username=conf["UI_USERNAME"], password=conf["UI_PASSWORD"], insecure=True, debug=True) def create_external_providers(): openstack_services = connection.system_service().openstack_image_providers_service() openstack_s = openstack_services.add(types.OpenStackImageProvider(name='my_glance_instance', description='new', url='http://glance.ovirt.org:9292/')) openstack_service = openstack_services.openstack_service(openstack_s.id) I am facing the following error below: ======================================= /home/ramakasturinarra/PycharmProjects/hosted_engine_deploy_hc/addresource.py Traceback (most recent call last): File "/home/ramakasturinarra/PycharmProjects/hosted_engine_deploy_hc/addresource.py", line 169, in <module> create_external_providers() File "/home/ramakasturinarra/PycharmProjects/hosted_engine_deploy_hc/addresource.py", line 162, in create_external_providers openstack_s = openstack_services.add(types.OpenStackImageProvider(name='my_glance_instance', description='new', url='http://glance.ovirt.org:9292/')) File "/usr/lib64/python2.7/site-packages/ovirtsdk4/services.py", line 10265, in add self._check_fault(response) File "/usr/lib64/python2.7/site-packages/ovirtsdk4/service.py", line 95, in _check_fault Service._raise_error(response, fault) File "/usr/lib64/python2.7/site-packages/ovirtsdk4/service.py", line 69, in _raise_error raise Error(msg) ovirtsdk4.Error: Fault reason is "Request syntactically incorrect.". Fault detail is "For correct usage, see: https://rhev-engine1.lab.eng.blr.redhat.com/ovirt-engine/api/v4/model#services/openstack-image-providers/methods/add". HTTP response code is 400. Process finished with exit code 1 Version-Release number of selected component (if applicable): python-ovirt-engine-sdk4-4.0.0-0.6.a6.fc23.x86_64 How reproducible: Always Steps to Reproduce: 1. Run the code which is present in the description 2. 3. Actual results: User cannot add OpenStack Image provider to ovirt Expected results: User should be able to add OpenStack Image provider to ovirt. Additional info:
Following error is seen in the engine logs. I see the following in the engine logs. 2016-09-13 07:11:09,882 ERROR [org.ovirt.engine.api.restapi.resource.validation.IOExceptionMapper] (default task-11) [] IO exception while processing "POST" request for path "/openstackimageproviders" Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"open_stack_image_provider"). Expected elements are <{}action>,<{}affinity_group>,<{}affinity _groups>,<{}affinity_label>,<{}affinity_labels>,<{}agent>,<{}agent_configuration>,<{}agent_configurations>,<{}agents>,<{}api>,<{}api_summaries>,<{}api_summary>,<{}api_summar y_item>,<{}api_summary_items>,<{}apis>,<{}application>,<{}applications>,<{}authorized_key>,<{}authorized_keys>,<{}balance>,<{}balances>,<{}bios>,<{}bioss>,<{}block_statistic >,<{}block_statistics>,<{}body>,<{}bonding>,<{}bondings>,<{}bookmark>,<{}bookmarks>,<{}boot>,<{}boot_menu>,<{}boot_menus>,<{}boots>,<{}brick>,<{}brick_memoryinfo>,<{}brick_p rofile_detail>,<{}brick_profile_details>,<{}bricks>,<{}cdrom>,<{}cdroms>,<{}certificate>,<{}certificates>,<{}cloud_init>,<{}cloud_inits>,<{}cluster>,<{}cluster_level>,<{}clu ster_levels>,<{}clusters>,<{}configuration>,<{}configurations>,<{}console>,<{}consoles>,<{}core>,<{}cores>,<{}cpu>,<{}cpu_profile>,<{}cpu_profiles>,<{}cpu_topologies>,<{}cpu _topology>,<{}cpu_tune>,<{}cpu_tunes>,<{}cpu_type>,<{}cpu_types>,<{}cpus>,<{}creation>,<{}creation_states>,<{}custom_properties>,<{}custom_property>,<{}data_center>,<{}data_ centers>,<{}detailedLink>,<{}detailedLinks>,<{}device>,<{}devices>,<{}disk>,<{}disk_attachment>,<{}disk_attachments>,<{}disk_profile>,<{}disk_profiles>,<{}disk_snapshot>,<{} disk_snapshots>,<{}disks>,<{}display>,<{}displays>,<{}dns>,<{}dnss>,<{}domain>,<{}domains>,<{}entity_profile_detail>,<{}entity_profile_details>,<{}error_handling>,<{}error_h andlings>,<{}event>,<{}events>,<{}external_compute_resource>,<{}external_compute_resources>,<{}external_discovered_host>,<{}external_discovered_hosts>,<{}external_host>,<{}e <kasturi> xternal_host_group>,<{}external_host_groups>,<{}external_host_provider>,<{}external_host_providers>,<{}external_hosts>,<{}external_provider>,<{}external_providers>,<{}fault> ,<{}faults>,<{}fencing_policies>,<{}fencing_policy>,<{}file>,<{}files>,<{}filter>,<{}filters>,
Verified on 4.0.5-1