Hi,

I've recently upgraded my test lab to ovirt-3.3 (el6) and trying to add additional target for iscsi domain. As described here - http://www.ovirt.org/Features/Manage_Storage_Connections , I'm trying first to add new connection via restapi, but operation fails with error "HTTP Status 400 - javax.xml.bind.UnmarshalException: unexpected element (uri:"", local:"storage_connection")" I'm not very familiar with restapi and maybe doing something wrong, so please help me to figure it out.

here's what i put and reply from server:
curl -k -v -u "admin@internal:pass" -H "Content-type: application/xml" -d '<storage_connection>
<type>iscsi</type>
<address>192.168.221.5</address>
<port>3260</port>
<target>iqn.2013-09.local.stone.spb:target3.disk</target>
</storage_connection>' 'https://ovirt.spb.stone.local/api/storageconnections'
* About to connect() to ovirt.spb.stone.local port 443 (#0)
*   Trying 192.168.220.13...
* connected
* Connected to ovirt.spb.stone.local (192.168.220.13) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* warning: ignoring value of ssl.verifyhost
* skipping SSL peer certificate verification
* SSL connection using TLS_DHE_RSA_WITH_AES_256_CBC_SHA
* Server certificate:
*     subject: CN=ovirt.spb.stone.local,O=spb.stone.local,C=US
*     start date: Aug 28 09:28:45 2013 GMT
*     expire date: Aug 03 09:28:47 2018 GMT
*     common name: ovirt.spb.stone.local
*     issuer: CN=CA-ovirt.spb.stone.local.95565,O=spb.stone.local,C=US
* Server auth using Basic with user 'admin@internal'
> POST /api/storageconnections HTTP/1.1
> Authorization: Basic YWRtaW5AaW50ZXJuYWw6bXAyMjFjMg==
> User-Agent: curl/7.24.0 (x86_64-redhat-linux-gnu) libcurl/7.24.0 NSS/3.14.3.0 zlib/1.2.5 libidn/1.24 libssh2/1.4.1
> Host: ovirt.spb.stone.local
> Accept: */*
> Content-type: application/xml
> Content-Length: 170
>
* upload completely sent off: 170 out of 170 bytes
< HTTP/1.1 400 Bad Request
< Date: Wed, 18 Sep 2013 12:05:51 GMT
< Content-Type: text/html;charset=utf-8
< Vary: Accept-Encoding
< Connection: close
< Transfer-Encoding: chunked
<
<html><head><title>JBoss Web/7.0.13.Final - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 400 - javax.xml.bind.UnmarshalException: unexpected element (uri:&quot;&quot;, local:&quot;storage_connection&quot;). Expected elements are &lt;{}action&gt;,&lt;{}agent&gt;,&lt;{}agents&gt;,&lt;{}api&gt;,&lt;{}application&gt;,&lt;{}applications&gt;,&lt;{}authentication_methods&gt;,&lt;{}body&gt;,&lt;{}bonding&gt;,&lt;{}boot_devices&gt;,&lt;{}boot_protocols&gt;,&lt;{}brick&gt;,&lt;{}brick_details&gt;,&lt;{}brick_memoryinfo&gt;,&lt;{}brick_states&gt;,&lt;{}bricks&gt;,&lt;{}capabilities&gt;,&lt;{}cdrom&gt;,&lt;{}cdroms&gt;,&lt;{}certificate&gt;,&lt;{}cluster&gt;,&lt;{}clusters&gt;,&lt;{}console&gt;,&lt;{}content_types&gt;,&lt;{}cpu&gt;,&lt;{}cpu_modes&gt;,&lt;{}cpu_tune&gt;,&lt;{}cpus&gt;,&lt;{}creation&gt;,&lt;{}creation_states&gt;,&lt;{}custom_properties&gt;,&lt;{}data_center&gt;,&lt;{}data_center_states&gt;,&lt;{}data_centers&gt;,&lt;{}detailedLink&gt;,&lt;{}detailedLinks&gt;,&lt;{}disk&gt;,&lt;{}disk_formats&gt;,&lt;{}disk_interfaces&gt;,&lt;{}disk_states&gt;,&lt;{}disks&gt;,&lt;{}display&gt;,&lt;{}display_types&gt;,&lt;{}domain&gt;,&lt;{}domains&gt;,&lt;{}error_handling&gt;,&lt;{}event&gt;,&lt;{}events&gt;,&l
t;{}fault&gt;,&lt;{}feature&gt;,&lt;{}features&gt;,&lt;{}fence_types&gt;,&lt;{}file&gt;,&lt;{}files&gt;,&lt;{}floppies&gt;,&lt;{}floppy&gt;,&lt;{}general_metadata&gt;,&lt;{}gluster_client&gt;,&lt;{}gluster_clients&gt;,&lt;{}gluster_hook&gt;,&lt;{}gluster_volume&gt;,&lt;{}gluster_volume_states&gt;,&lt;{}gluster_volume_types&gt;,&lt;{}gluster_volumes&gt;,&lt;{}glusterhooks&gt;,&lt;{}group&gt;,&lt;{}groups&gt;,&lt;{}hardware_information&gt;,&lt;{}header&gt;,&lt;{}headers&gt;,&lt;{}hook&gt;,&lt;{}hook_states&gt;,&lt;{}hooks&gt;,&lt;{}host&gt;,&lt;{}host_nic&gt;,&lt;{}host_nic_states&gt;,&lt;{}host_nics&gt;,&lt;{}host_non_operational_details&gt;,&lt;{}host_states&gt;,&lt;{}host_storage&gt;,&lt;{}hosts&gt;,&lt;{}ip&gt;,&lt;{}ip_versions&gt;,&lt;{}ips&gt;,&lt;{}job&gt;,&lt;{}jobs&gt;,&lt;{}keyValuePair&gt;,&lt;{}ksm&gt;,&lt;{}link&gt;,&lt;{}linkCapabilities&gt;,&lt;{}logical_unit&gt;,&lt;{}mac&gt;,&lt;{}memory_pool&gt;,&lt;{}memory_pools&gt;,&lt;{}network&gt;,&lt;{}network_states&g
t;,&lt;{}networks&gt;,&lt;{}nfs_versions&gt;,&lt;{}nic&gt;,&lt;{}nic_interfaces&gt;,&lt;{}nics&gt;,&lt;{}options&gt;,&lt;{}os_types&gt;,&lt;{}parameter&gt;,&lt;{}parameters_set&gt;,&lt;{}payload&gt;,&lt;{}payload_file&gt;,&lt;{}payloads&gt;,&lt;{}permission&gt;,&lt;{}permissions&gt;,&lt;{}permit&gt;,&lt;{}permits&gt;,&lt;{}pm_proxies&gt;,&lt;{}pm_proxy&gt;,&lt;{}pm_proxy_types&gt;,&lt;{}port_mirroring&gt;,&lt;{}power_management&gt;,&lt;{}power_management_states&gt;,&lt;{}power_managers&gt;,&lt;{}preview_vms&gt;,&lt;{}product_info&gt;,&lt;{}quota&gt;,&lt;{}quotas&gt;,&lt;{}reported_device&gt;,&lt;{}reported_device_types&gt;,&lt;{}reported_devices&gt;,&lt;{}request&gt;,&lt;{}response&gt;,&lt;{}role&gt;,&lt;{}roles&gt;,&lt;{}rsdl&gt;,&lt;{}scheduling_policies&gt;,&lt;{}schema&gt;,&lt;{}server_hook&gt;,&lt;{}server_hooks&gt;,&lt;{}sgio_options&gt;,&lt;{}slaves&gt;,&lt;{}snapshot&gt;,&lt;{}snapshots&gt;,&lt;{}special_objects&gt;,&lt;{}ssh&gt;,&lt;{}stages&gt;,&lt;{}statistic&gt;,
&lt;{}statistics&gt;,&lt;{}status&gt;,&lt;{}step&gt;,&lt;{}step_types&gt;,&lt;{}steps&gt;,&lt;{}storage&gt;,&lt;{}storage_connections&gt;,&lt;{}storage_domain&gt;,&lt;{}storage_domain_states&gt;,&lt;{}storage_domain_types&gt;,&lt;{}storage_domains&gt;,&lt;{}storage_formats&gt;,&lt;{}storage_manager&gt;,&lt;{}storage_types&gt;,&lt;{}summary&gt;,&lt;{}system_version&gt;,&lt;{}tag&gt;,&lt;{}tags&gt;,&lt;{}template&gt;,&lt;{}template_states&gt;,&lt;{}templates&gt;,&lt;{}transparent_hugepages&gt;,&lt;{}transport_types&gt;,&lt;{}url&gt;,&lt;{}usages&gt;,&lt;{}usb&gt;,&lt;{}user&gt;,&lt;{}users&gt;,&lt;{}value&gt;,&lt;{}values&gt;,&lt;{}vcpu_pin&gt;,&lt;{}version&gt;,&lt;{}vlan&gt;,&lt;{}vm&gt;,&lt;{}vm_affinities&gt;,&lt;{}vm_device_types&gt;,&lt;{}vm_pause_details&gt;,&lt;{}vm_states&gt;,&lt;{}vm_types&gt;,&lt;{}vmpool&gt;,&lt;{}vmpools&gt;,&lt;{}vms&gt;,&lt;{}volume_group&gt;,&lt;{}watchdog&gt;,&lt;{}watchdog_actions&gt;,&lt;{}watchdog_models&gt;,&lt;{}watchdogs&gt;</h1><HR
size="1" noshade="noshade"><p><b>type</b> Status report</p><p><b>message</b> <u>javax.xml.bind.UnmarshalException: unexpected element (uri:&quot;&quot;, local:&quot;storage_connection&quot;). Expected elements are &lt;{}action&gt;,&lt;{}agent&gt;,&lt;{}agents&gt;,&lt;{}api&gt;,&lt;{}application&gt;,&lt;{}applications&gt;,&lt;{}authentication_methods&gt;,&lt;{}body&gt;,&lt;{}bonding&gt;,&lt;{}boot_devices&gt;,&lt;{}boot_protocols&gt;,&lt;{}brick&gt;,&lt;{}brick_details&gt;,&lt;{}brick_memoryinfo&gt;,&lt;{}brick_states&gt;,&lt;{}bricks&gt;,&lt;{}capabilities&gt;,&lt;{}cdrom&gt;,&lt;{}cdroms&gt;,&lt;{}certificate&gt;,&lt;{}cluster&gt;,&lt;{}clusters&gt;,&lt;{}console&gt;,&lt;{}content_types&gt;,&lt;{}cpu&gt;,&lt;{}cpu_modes&gt;,&lt;{}cpu_tune&gt;,&lt;{}cpus&gt;,&lt;{}creation&gt;,&lt;{}creation_states&gt;,&lt;{}custom_properties&gt;,&lt;{}data_center&gt;,&lt;{}data_center_states&gt;,&lt;{}data_centers&gt;,&lt;{}detailedLink&gt;,&lt;{}detailedLinks&gt;,&lt;{}disk&gt;,&lt;{}disk_formats&gt;,&lt;{}disk_interfaces&gt;,&lt;{}disk_states&gt;,&lt;{}disks&gt;,&lt;{}display&gt;,&lt;{}display_types&gt;,&lt;{}domain&gt;,&lt;{}domains&gt;,&lt;{}error_handling&gt;,&lt;{}event&gt;,&lt;{}events&gt;,&l
t;{}fault&gt;,&lt;{}feature&gt;,&lt;{}features&gt;,&lt;{}fence_types&gt;,&lt;{}file&gt;,&lt;{}files&gt;,&lt;{}floppies&gt;,&lt;{}floppy&gt;,&lt;{}general_metadata&gt;,&lt;{}gluster_client&gt;,&lt;{}gluster_clients&gt;,&lt;{}gluster_hook&gt;,&lt;{}gluster_volume&gt;,&lt;{}gluster_volume_states&gt;,&lt;{}gluster_volume_types&gt;,&lt;{}gluster_volumes&gt;,&lt;{}glusterhooks&gt;,&lt;{}group&gt;,&lt;{}groups&gt;,&lt;{}hardware_information&gt;,&lt;{}header&gt;,&lt;{}headers&gt;,&lt;{}hook&gt;,&lt;{}hook_states&gt;,&lt;{}hooks&gt;,&lt;{}host&gt;,&lt;{}host_nic&gt;,&lt;{}host_nic_states&gt;,&lt;{}host_nics&gt;,&lt;{}host_non_operational_details&gt;,&lt;{}host_states&gt;,&lt;{}host_storage&gt;,&lt;{}hosts&gt;,&lt;{}ip&gt;,&lt;{}ip_versions&gt;,&lt;{}ips&gt;,&lt;{}job&gt;,&lt;{}jobs&gt;,&lt;{}keyValuePair&gt;,&lt;{}ksm&gt;,&lt;{}link&gt;,&lt;{}linkCapabilities&gt;,&lt;{}logical_unit&gt;,&lt;{}mac&gt;,&lt;{}memory_pool&gt;,&lt;{}memory_pools&gt;,&lt;{}network&gt;,&lt;{}network_states&g
t;,&lt;{}networks&gt;,&lt;{}nfs_versions&gt;,&lt;{}nic&gt;,&lt;{}nic_interfaces&gt;,&lt;{}nics&gt;,&lt;{}options&gt;,&lt;{}os_types&gt;,&lt;{}parameter&gt;,&lt;{}parameters_set&gt;,&lt;{}payload&gt;,&lt;{}payload_file&gt;,&lt;{}payloads&gt;,&lt;{}permission&gt;,&lt;{}permissions&gt;,&lt;{}permit&gt;,&lt;{}permits&gt;,&lt;{}pm_proxies&gt;,&lt;{}pm_proxy&gt;,&lt;{}pm_proxy_types&gt;,&lt;{}port_mirroring&gt;,&lt;{}power_management&gt;,&lt;{}power_management_states&gt;,&lt;{}power_managers&gt;,&lt;{}preview_vms&gt;,&lt;{}product_info&gt;,&lt;{}quota&gt;,&lt;{}quotas&gt;,&lt;{}reported_device&gt;,&lt;{}reported_device_types&gt;,&lt;{}reported_devices&gt;,&lt;{}request&gt;,&lt;{}response&gt;,&lt;{}role&gt;,&lt;{}roles&gt;,&lt;{}rsdl&gt;,&lt;{}scheduling_policies&gt;,&lt;{}schema&gt;,&lt;{}server_hook&gt;,&lt;{}server_hooks&gt;,&lt;{}sgio_options&gt;,&lt;{}slaves&gt;,&lt;{}snapshot&gt;,&lt;{}snapshots&gt;,&lt;{}special_objects&gt;,&lt;{}ssh&gt;,&lt;{}stages&gt;,&lt;{}statistic&gt;,
&lt;{}statistics&gt;,&lt;{}status&gt;,&lt;{}step&gt;,&lt;{}step_types&gt;,&lt;{}steps&gt;,&lt;{}storage&gt;,&lt;{}storage_connections&gt;,&lt;{}storage_domain&gt;,&lt;{}storage_domain_states&gt;,&lt;{}storage_domain_types&gt;,&lt;{}storage_domains&gt;,&lt;{}storage_formats&gt;,&lt;{}storage_manager&gt;,&lt;{}storage_types&gt;,&lt;{}summary&gt;,&lt;{}system_version&gt;,&lt;{}tag&gt;,&lt;{}tags&gt;,&lt;{}template&gt;,&lt;{}template_states&gt;,&lt;{}templates&gt;,&lt;{}transparent_hugepages&gt;,&lt;{}transport_types&gt;,&lt;{}url&gt;,&lt;{}usages&gt;,&lt;{}usb&gt;,&lt;{}user&gt;,&lt;{}users&gt;,&lt;{}value&gt;,&lt;{}values&gt;,&lt;{}vcpu_pin&gt;,&lt;{}version&gt;,&lt;{}vlan&gt;,&lt;{}vm&gt;,&lt;{}vm_affinities&gt;,&lt;{}vm_device_types&gt;,&lt;{}vm_pause_details&gt;,&lt;{}vm_states&gt;,&lt;{}vm_types&gt;,&lt;{}vmpool&gt;,&lt;{}vmpools&gt;,&lt;{}vms&gt;,&lt;{}volume_group&gt;,&lt;{}watchdog&gt;,&lt;{}watchdog_actions&gt;,&lt;{}watchdog_models&gt;,&lt;{}watchdogs&gt;</u></p><p><b
>description</b>
<u>The request sent by the client was syntactically incorrect (javax.xml.bind.UnmarshalException: unexpected element (uri:&quot;&quot;, local:&quot;storage_connection&quot;). Expected elements are &lt;{}action&gt;,&lt;{}agent&gt;,&lt;{}agents&gt;,&lt;{}api&gt;,&lt;{}application&gt;,&lt;{}applications&gt;,&lt;{}authentication_methods&gt;,&lt;{}body&gt;,&lt;{}bonding&gt;,&lt;{}boot_devices&gt;,&lt;{}boot_protocols&gt;,&lt;{}brick&gt;,&lt;{}brick_details&gt;,&lt;{}brick_memoryinfo&gt;,&lt;{}brick_states&gt;,&lt;{}bricks&gt;,&lt;{}capabilities&gt;,&lt;{}cdrom&gt;,&lt;{}cdroms&gt;,&lt;{}certificate&gt;,&lt;{}cluster&gt;,&lt;{}clusters&gt;,&lt;{}console&gt;,&lt;{}content_types&gt;,&lt;{}cpu&gt;,&lt;{}cpu_modes&gt;,&lt;{}cpu_tune&gt;,&lt;{}cpus&gt;,&lt;{}creation&gt;,&lt;{}creation_states&gt;,&lt;{}custom_properties&gt;,&lt;{}data_center&gt;,&lt;{}data_center_states&gt;,&lt;{}data_centers&gt;,&lt;{}detailedLink&gt;,&lt;{}detailedLinks&gt;,&lt;{}disk&gt;,&lt;{}disk_formats&gt;,&lt;{}disk_interfaces&gt;,&lt;{}disk_states&gt;,&lt;{}disks&gt;,&lt;{}display&gt;,&lt;{}display_types&gt;,&lt;{}domain&gt;,&lt;{}domains&gt;,&lt;{}error_handling&gt;,&lt;{}event&gt;,&lt;{}events&gt;,&l
t;{}fault&gt;,&lt;{}feature&gt;,&lt;{}features&gt;,&lt;{}fence_types&gt;,&lt;{}file&gt;,&lt;{}files&gt;,&lt;{}floppies&gt;,&lt;{}floppy&gt;,&lt;{}general_metadata&gt;,&lt;{}gluster_client&gt;,&lt;{}gluster_clients&gt;,&lt;{}gluster_hook&gt;,&lt;{}gluster_volume&gt;,&lt;{}gluster_volume_states&gt;,&lt;{}gluster_volume_types&gt;,&lt;{}gluster_volumes&gt;,&lt;{}glusterhooks&gt;,&lt;{}group&gt;,&lt;{}groups&gt;,&lt;{}hardware_information&gt;,&lt;{}header&gt;,&lt;{}headers&gt;,&lt;{}hook&gt;,&lt;{}hook_states&gt;,&lt;{}hooks&gt;,&lt;{}host&gt;,&lt;{}host_nic&gt;,&lt;{}host_nic_states&gt;,&lt;{}host_nics&gt;,&lt;{}host_non_operational_details&gt;,&lt;{}host_states&gt;,&lt;{}host_storage&gt;,&lt;{}hosts&gt;,&lt;{}ip&gt;,&lt;{}ip_versions&gt;,&lt;{}ips&gt;,&lt;{}job&gt;,&lt;{}jobs&gt;,&lt;{}keyValuePair&gt;,&lt;{}ksm&gt;,&lt;{}link&gt;,&lt;{}linkCapabilities&gt;,&lt;{}logical_unit&gt;,&lt;{}mac&gt;,&lt;{}memory_pool&gt;,&lt;{}memory_pools&gt;,&lt;{}network&gt;,&lt;{}network_states&g
t;,&lt;{}networks&gt;,&lt;{}nfs_versions&gt;,&lt;{}nic&gt;,&lt;{}nic_interfaces&gt;,&lt;{}nics&gt;,&lt;{}options&gt;,&lt;{}os_types&gt;,&lt;{}parameter&gt;,&lt;{}parameters_set&gt;,&lt;{}payload&gt;,&lt;{}payload_file&gt;,&lt;{}payloads&gt;,&lt;{}permission&gt;,&lt;{}permissions&gt;,&lt;{}permit&gt;,&lt;{}permits&gt;,&lt;{}pm_proxies&gt;,&lt;{}pm_proxy&gt;,&lt;{}pm_proxy_types&gt;,&lt;{}port_mirroring&gt;,&lt;{}power_management&gt;,&lt;{}power_management_states&gt;,&lt;{}power_managers&gt;,&lt;{}preview_vms&gt;,&lt;{}product_info&gt;,&lt;{}quota&gt;,&lt;{}quotas&gt;,&lt;{}reported_device&gt;,&lt;{}reported_device_types&gt;,&lt;{}reported_devices&gt;,&lt;{}request&gt;,&lt;{}response&gt;,&lt;{}role&gt;,&lt;{}roles&gt;,&lt;{}rsdl&gt;,&lt;{}scheduling_policies&gt;,&lt;{}schema&gt;,&lt;{}server_hook&gt;,&lt;{}server_hooks&gt;,&lt;{}sgio_options&gt;,&lt;{}slaves&gt;,&lt;{}snapshot&gt;,&lt;{}snapshots&gt;,&lt;{}special_objects&gt;,&lt;{}ssh&gt;,&lt;{}stages&gt;,&lt;{}statistic&gt;,
&lt;{}statistics&gt;,&lt;{}status&gt;,&lt;{}step&gt;,&lt;{}step_types&gt;,&lt;{}steps&gt;,&lt;{}storage&gt;,&lt;{}storage_connections&gt;,&lt;{}sto*
Closing connection #0
rage_domain&gt;,&lt;{}storage_domain_states&gt;,&lt;{}storage_domain_types&gt;,&lt;{}storage_domains&gt;,&lt;{}storage_formats&gt;,&lt;{}storage_manager&gt;,&lt;{}storage_types&gt;,&lt;{}summary&gt;,&lt;{}system_version&gt;,&lt;{}tag&gt;,&lt;{}tags&gt;,&lt;{}template&gt;,&lt;{}template_states&gt;,&lt;{}templates&gt;,&lt;{}transparent_hugepages&gt;,&lt;{}transport_types&gt;,&lt;{}url&gt;,&lt;{}usages&gt;,&lt;{}usb&gt;,&lt;{}user&gt;,&lt;{}users&gt;,&lt;{}value&gt;,&lt;{}values&gt;,&lt;{}vcpu_pin&gt;,&lt;{}version&gt;,&lt;{}vlan&gt;,&lt;{}vm&gt;,&lt;{}vm_affinities&gt;,&lt;{}vm_device_types&gt;,&lt;{}vm_pause_details&gt;,&lt;{}vm_states&gt;,&lt;{}vm_types&gt;,&lt;{}vmpool&gt;,&lt;{}vmpools&gt;,&lt;{}vms&gt;,&lt;{}volume_group&gt;,&lt;{}watchdog&gt;,&lt;{}watchdog_actions&gt;,&lt;{}watchdog_models&gt;,&lt;{}watchdogs&gt;).</u></p><HR size="1" noshade="noshade"><h3>JBoss Web/7.0.13.Final</h3></body></html>

--
Yuriy Demchenko


_______________________________________________
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users

Reply via email to