From demchenko.ya at gmail.com Wed Sep 18 08:21:05 2013 Content-Type: multipart/mixed; boundary="===============4285962393540368090==" MIME-Version: 1.0 From: Yuriy Demchenko To: users at ovirt.org Subject: [Users] cant add storage connection via api Date: Wed, 18 Sep 2013 16:21:01 +0400 Message-ID: <52399AAD.2050709@gmail.com> --===============4285962393540368090== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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(a)internal:pass" -H "Content-type: application/xml" = > -d ' > iscsi >
192.168.221.5
> 3260 > iqn.2013-09.local.stone.spb:target3.disk >
' = > '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=3Dovirt.spb.stone.local,O=3Dspb.stone.local,C=3DUS > * 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=3DCA-ovirt.spb.stone.local.95565,O=3Dspb.stone.local,C= =3DUS > * Server auth using Basic with user 'admin(a)internal' > > POST /api/storageconnections HTTP/1.1 > > Authorization: Basic YWRtaW5AaW50ZXJuYWw6bXAyMjFjMg=3D=3D > > 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=3Dutf-8 > < Vary: Accept-Encoding > < Connection: close > < Transfer-Encoding: chunked > < > JBoss Web/7.0.13.Final - Error = > report

HTTP Status 400 - = > javax.xml.bind.UnmarshalException: unexpected element = > (uri:"", local:"storage_connection"). Expected = > elements are = > <{}action>,<{}agent>,<{}agents>,<{}api>,<{}app= lication>,<{}applications>,<{}authentication_methods>,<{}= body>,<{}bonding>,<{}boot_devices>,<{}boot_protocols>,= <{}brick>,<{}brick_details>,<{}brick_memoryinfo>,<{}br= ick_states>,<{}bricks>,<{}capabilities>,<{}cdrom>,<= {}cdroms>,<{}certificate>,<{}cluster>,<{}clusters>,<= ;{}console>,<{}content_types>,<{}cpu>,<{}cpu_modes>,&l= t;{}cpu_tune>,<{}cpus>,<{}creation>,<{}creation_states>= ;,<{}custom_properties>,<{}data_center>,<{}data_center_state= s>,<{}data_centers>,<{}detailedLink>,<{}detailedLinks>= ,<{}disk>,<{}disk_formats>,<{}disk_interfaces>,<{}disk= _states>,<{}disks>,<{}display>,<{}display_types>,<{= }domain>,<{}domains>,<{}error_handling>,<{}event>,<= {}events>,<{}fault>,<{}feature>,<{}features>,<{}fen= ce_types>,<{}file>,<{}files>,<{}floppies>,<{}floppy= >,<{}general_metadata>,<{}gluster_client>,<{}gluster_clie= nts>,<{}gluster_hook>,<{}gluster_volume>,<{}gluster_volum= e_states>,<{}gluster_volume_types>,<{}gluster_volumes>,<{= }glusterhooks>,<{}group>,<{}groups>,<{}hardware_informati= on>,<{}header>,<{}headers>,<{}hook>,<{}hook_states&= gt;,<{}hooks>,<{}host>,<{}host_nic>,<{}host_nic_states= >,<{}host_nics>,<{}host_non_operational_details>,<{}host_= states>,<{}host_storage>,<{}hosts>,<{}ip>,<{}ip_ver= sions>,<{}ips>,<{}job>,<{}jobs>,<{}keyValuePair>= ,<{}ksm>,<{}link>,<{}linkCapabilities>,<{}logical_unit= >,<{}mac>,<{}memory_pool>,<{}memory_pools>,<{}netwo= rk>,<{}network_states>,<{}networks>,<{}nfs_versions>,&= lt;{}nic>,<{}nic_interfaces>,<{}nics>,<{}options>,<= {}os_types>,<{}parameter>,<{}parameters_set>,<{}payload&g= t;,<{}payload_file>,<{}payloads>,<{}permission>,<{}per= missions>,<{}permit>,<{}permits>,<{}pm_proxies>,<{}= pm_proxy>,<{}pm_proxy_types>,<{}port_mirroring>,<{}power_= management>,<{}power_management_states>,<{}power_managers>,&= lt;{}preview_vms>,<{}product_info>,<{}quota>,<{}quotas>= ;,<{}reported_device>,<{}reported_device_types>,<{}reported_= devices>,<{}request>,<{}response>,<{}role>,<{}roles= >,<{}rsdl>,<{}scheduling_policies>,<{}schema>,<{}se= rver_hook>,<{}server_hooks>,<{}sgio_options>,<{}slaves>= ;,<{}snapshot>,<{}snapshots>,<{}special_objects>,<{}ss= h>,<{}stages>,<{}statistic>,<{}statistics>,<{}statu= s>,<{}step>,<{}step_types>,<{}steps>,<{}storage>= ,<{}storage_connections>,<{}storage_domain>,<{}storage_domai= n_states>,<{}storage_domain_types>,<{}storage_domains>,<{= }storage_formats>,<{}storage_manager>,<{}storage_types>,<= {}summary>,<{}system_version>,<{}tag>,<{}tags>,<{}t= emplate>,<{}template_states>,<{}templates>,<{}transparent= _hugepages>,<{}transport_types>,<{}url>,<{}usages>,<= ;{}usb>,<{}user>,<{}users>,<{}value>,<{}values>,= <{}vcpu_pin>,<{}version>,<{}vlan>,<{}vm>,<{}vm_a= ffinities>,<{}vm_device_types>,<{}vm_pause_details>,<{}vm= _states>,<{}vm_types>,<{}vmpool>,<{}vmpools>,<{}vms= >,<{}volume_group>,<{}watchdog>,<{}watchdog_actions>,&= lt;{}watchdog_models>,<{}watchdogs>


size=3D"1" noshade=3D"noshade">

type Status = > report

message javax.xml.bind.UnmarshalException: = > unexpected element (uri:"", = > local:"storage_connection"). Expected elements are = > <{}action>,<{}agent>,<{}agents>,<{}api>,<{}app= lication>,<{}applications>,<{}authentication_methods>,<{}= body>,<{}bonding>,<{}boot_devices>,<{}boot_protocols>,= <{}brick>,<{}brick_details>,<{}brick_memoryinfo>,<{}br= ick_states>,<{}bricks>,<{}capabilities>,<{}cdrom>,<= {}cdroms>,<{}certificate>,<{}cluster>,<{}clusters>,<= ;{}console>,<{}content_types>,<{}cpu>,<{}cpu_modes>,&l= t;{}cpu_tune>,<{}cpus>,<{}creation>,<{}creation_states>= ;,<{}custom_properties>,<{}data_center>,<{}data_center_state= s>,<{}data_centers>,<{}detailedLink>,<{}detailedLinks>= ,<{}disk>,<{}disk_formats>,<{}disk_interfaces>,<{}disk= _states>,<{}disks>,<{}display>,<{}display_types>,<{= }domain>,<{}domains>,<{}error_handling>,<{}event>,<= {}events>,<{}fault>,<{}feature>,<{}features>,<{}fen= ce_types>,<{}file>,<{}files>,<{}floppies>,<{}floppy= >,<{}general_metadata>,<{}gluster_client>,<{}gluster_clie= nts>,<{}gluster_hook>,<{}gluster_volume>,<{}gluster_volum= e_states>,<{}gluster_volume_types>,<{}gluster_volumes>,<{= }glusterhooks>,<{}group>,<{}groups>,<{}hardware_informati= on>,<{}header>,<{}headers>,<{}hook>,<{}hook_states&= gt;,<{}hooks>,<{}host>,<{}host_nic>,<{}host_nic_states= >,<{}host_nics>,<{}host_non_operational_details>,<{}host_= states>,<{}host_storage>,<{}hosts>,<{}ip>,<{}ip_ver= sions>,<{}ips>,<{}job>,<{}jobs>,<{}keyValuePair>= ,<{}ksm>,<{}link>,<{}linkCapabilities>,<{}logical_unit= >,<{}mac>,<{}memory_pool>,<{}memory_pools>,<{}netwo= rk>,<{}network_states>,<{}networks>,<{}nfs_versions>,&= lt;{}nic>,<{}nic_interfaces>,<{}nics>,<{}options>,<= {}os_types>,<{}parameter>,<{}parameters_set>,<{}payload&g= t;,<{}payload_file>,<{}payloads>,<{}permission>,<{}per= missions>,<{}permit>,<{}permits>,<{}pm_proxies>,<{}= pm_proxy>,<{}pm_proxy_types>,<{}port_mirroring>,<{}power_= management>,<{}power_management_states>,<{}power_managers>,&= lt;{}preview_vms>,<{}product_info>,<{}quota>,<{}quotas>= ;,<{}reported_device>,<{}reported_device_types>,<{}reported_= devices>,<{}request>,<{}response>,<{}role>,<{}roles= >,<{}rsdl>,<{}scheduling_policies>,<{}schema>,<{}se= rver_hook>,<{}server_hooks>,<{}sgio_options>,<{}slaves>= ;,<{}snapshot>,<{}snapshots>,<{}special_objects>,<{}ss= h>,<{}stages>,<{}statistic>,<{}statistics>,<{}statu= s>,<{}step>,<{}step_types>,<{}steps>,<{}storage>= ,<{}storage_connections>,<{}storage_domain>,<{}storage_domai= n_states>,<{}storage_domain_types>,<{}storage_domains>,<{= }storage_formats>,<{}storage_manager>,<{}storage_types>,<= {}summary>,<{}system_version>,<{}tag>,<{}tags>,<{}t= emplate>,<{}template_states>,<{}templates>,<{}transparent= _hugepages>,<{}transport_types>,<{}url>,<{}usages>,<= ;{}usb>,<{}user>,<{}users>,<{}value>,<{}values>,= <{}vcpu_pin>,<{}version>,<{}vlan>,<{}vm>,<{}vm_a= ffinities>,<{}vm_device_types>,<{}vm_pause_details>,<{}vm= _states>,<{}vm_types>,<{}vmpool>,<{}vmpools>,<{}vms= >,<{}volume_group>,<{}watchdog>,<{}watchdog_actions>,&= lt;{}watchdog_models>,<{}watchdogs>

description = > The request sent by the client was syntactically incorrect = > (javax.xml.bind.UnmarshalException: unexpected element = > (uri:"", local:"storage_connection"). Expected = > elements are = > <{}action>,<{}agent>,<{}agents>,<{}api>,<{}app= lication>,<{}applications>,<{}authentication_methods>,<{}= body>,<{}bonding>,<{}boot_devices>,<{}boot_protocols>,= <{}brick>,<{}brick_details>,<{}brick_memoryinfo>,<{}br= ick_states>,<{}bricks>,<{}capabilities>,<{}cdrom>,<= {}cdroms>,<{}certificate>,<{}cluster>,<{}clusters>,<= ;{}console>,<{}content_types>,<{}cpu>,<{}cpu_modes>,&l= t;{}cpu_tune>,<{}cpus>,<{}creation>,<{}creation_states>= ;,<{}custom_properties>,<{}data_center>,<{}data_center_state= s>,<{}data_centers>,<{}detailedLink>,<{}detailedLinks>= ,<{}disk>,<{}disk_formats>,<{}disk_interfaces>,<{}disk= _states>,<{}disks>,<{}display>,<{}display_types>,<{= }domain>,<{}domains>,<{}error_handling>,<{}event>,<= {}events>,<{}fault>,<{}feature>,<{}features>,<{}fen= ce_types>,<{}file>,<{}files>,<{}floppies>,<{}floppy= >,<{}general_metadata>,<{}gluster_client>,<{}gluster_clie= nts>,<{}gluster_hook>,<{}gluster_volume>,<{}gluster_volum= e_states>,<{}gluster_volume_types>,<{}gluster_volumes>,<{= }glusterhooks>,<{}group>,<{}groups>,<{}hardware_informati= on>,<{}header>,<{}headers>,<{}hook>,<{}hook_states&= gt;,<{}hooks>,<{}host>,<{}host_nic>,<{}host_nic_states= >,<{}host_nics>,<{}host_non_operational_details>,<{}host_= states>,<{}host_storage>,<{}hosts>,<{}ip>,<{}ip_ver= sions>,<{}ips>,<{}job>,<{}jobs>,<{}keyValuePair>= ,<{}ksm>,<{}link>,<{}linkCapabilities>,<{}logical_unit= >,<{}mac>,<{}memory_pool>,<{}memory_pools>,<{}netwo= rk>,<{}network_states>,<{}networks>,<{}nfs_versions>,&= lt;{}nic>,<{}nic_interfaces>,<{}nics>,<{}options>,<= {}os_types>,<{}parameter>,<{}parameters_set>,<{}payload&g= t;,<{}payload_file>,<{}payloads>,<{}permission>,<{}per= missions>,<{}permit>,<{}permits>,<{}pm_proxies>,<{}= pm_proxy>,<{}pm_proxy_types>,<{}port_mirroring>,<{}power_= management>,<{}power_management_states>,<{}power_managers>,&= lt;{}preview_vms>,<{}product_info>,<{}quota>,<{}quotas>= ;,<{}reported_device>,<{}reported_device_types>,<{}reported_= devices>,<{}request>,<{}response>,<{}role>,<{}roles= >,<{}rsdl>,<{}scheduling_policies>,<{}schema>,<{}se= rver_hook>,<{}server_hooks>,<{}sgio_options>,<{}slaves>= ;,<{}snapshot>,<{}snapshots>,<{}special_objects>,<{}ss= h>,<{}stages>,<{}statistic>,<{}statistics>,<{}statu= s>,<{}step>,<{}step_types>,<{}steps>,<{}storage>= ,<{}storage_connections>,<{}sto* = > Closing connection #0 > rage_domain>,<{}storage_domain_states>,<{}storage_domain_type= s>,<{}storage_domains>,<{}storage_formats>,<{}storage_man= ager>,<{}storage_types>,<{}summary>,<{}system_version>= ,<{}tag>,<{}tags>,<{}template>,<{}template_states>,= <{}templates>,<{}transparent_hugepages>,<{}transport_types&g= t;,<{}url>,<{}usages>,<{}usb>,<{}user>,<{}users&= gt;,<{}value>,<{}values>,<{}vcpu_pin>,<{}version>,&= lt;{}vlan>,<{}vm>,<{}vm_affinities>,<{}vm_device_types>= ;,<{}vm_pause_details>,<{}vm_states>,<{}vm_types>,<{}v= mpool>,<{}vmpools>,<{}vms>,<{}volume_group>,<{}watc= hdog>,<{}watchdog_actions>,<{}watchdog_models>,<{}watchdo= gs>).


size=3D"1" noshade=3D"noshade">

JBoss Web/7.0.13.Final

-- = Yuriy Demchenko --===============4285962393540368090==--