Hi Shani,
the problem is solved. It was a syntax error: in the row <logical_unit id …….> 
I forget a slash at the end.
The correct row is: <logical_unit id="3600000e00d2a0000002a0d15034d0000"/>

Thank you very much helping me.

Best Regards,
Michael

Von: Shani Leviim <[email protected]>
Gesendet: Montag, 28. Februar 2022 15:31
An: Wagenknecht, Michael (ik4-sv) <[email protected]>
Cc: users <[email protected]>
Betreff: Re: [ovirt-users] How to create a new Direct LUN with the API

I was able to use your parameters and create the FC with the mentioned LUN. [1]
- Are you able to add it manually from the UI?
- The only difference I can think of is the headers, maybe adding the URL 
address, "--verbose" and "Content-Type: application/xml" [2] will show the 
missing info?

[1]
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<disk href="/ovirt-engine/api/disks/3e779a94-6590-40f0-b0cf-273fc298aa63" 
id="3e779a94-6590-40f0-b0cf-273fc298aa63">
<actions>
...
</actions>
<name>DX600RZ2_OLVM_Test</name>
<description></description>
<link 
href="/ovirt-engine/api/disks/3e779a94-6590-40f0-b0cf-273fc298aa63/disksnapshots"
 rel="disksnapshots"/>
<link 
href="/ovirt-engine/api/disks/3e779a94-6590-40f0-b0cf-273fc298aa63/permissions" 
rel="permissions"/>
<link 
href="/ovirt-engine/api/disks/3e779a94-6590-40f0-b0cf-273fc298aa63/statistics" 
rel="statistics"/>
<alias>DX600RZ2_OLVM_Test</alias>
<content_type>data</content_type>
<lun_storage id="3600000e00d2a0000002a0d15034d0000">
<logical_units>
<logical_unit id="3600000e00d2a0000002a0d15034d0000">
<discard_zeroes_data>false</discard_zeroes_data>
<disk_id>3e779a94-6590-40f0-b0cf-273fc298aa63</disk_id>
<paths>0</paths>
<size>0</size>
</logical_unit>
</logical_units>
</lun_storage>
<propagate_errors>false</propagate_errors>
<shareable>false</shareable>
<storage_type>lun</storage_type>
<wipe_after_delete>false</wipe_after_delete>
</disk>


[2]
url="https://*****************<https://urldefense.com/v3/__https:/**P__;KioqKioqKioqKioqKioqKio!!CdWb0g08DYTo!ds2DRo7oS72gjnNY8-eFO2fTlX2kLqf2wMke0YWsCWdLvT47byOEthnSs6vSRIrm_LOPQL1YUwsUYg$>***/ovirt-engine/api"
user="admin@internal"
password="******************"
curl \
--verbose \
--cacert /etc/pki/ovirt-engine/ca.pem \
--user "${user}:${password}" \
--request POST \
--header "Content-Type: application/xml" \
--header "Accept: application/xml" \
--data '

Regards,
Shani Leviim

On Fri, Feb 25, 2022 at 11:23 PM 
<[email protected]<mailto:[email protected]>>
 wrote:
Hi,
I tried to create a new Fibre Channel Direct LUN with the API. But it doesn't 
work. My command is:

curl -s \
--cacert '/etc/pki/ovirt-engine/ca.pem' \
--request POST \
--header 'Version: 4' \
--header 'Accept: application/xml' \
--user 'admin@internal:XXXXXXXXXX' \
--data '
<disk>
  <alias>DX600RZ2_OLVM_Test</alias>
  <name>DX600RZ2_OLVM_Test</name>
  <lun_storage>
    <type>fcp</type>
    <logical_units>
      <logical_unit id="3600000e00d2a0000002a0d15034d0000">
      </logical_unit>
    </logical_units>
  </lun_storage>
</disk>
' \
https://olvmmanager/ovirt-engine/api/disks<https://urldefense.com/v3/__https:/olvmmanager/ovirt-engine/api/disks__;!!CdWb0g08DYTo!ds2DRo7oS72gjnNY8-eFO2fTlX2kLqf2wMke0YWsCWdLvT47byOEthnSs6vSRIrm_LOPQL1cH2i8mQ$>

I think there are parameter missing. But I can't find a working example.
Please help.

Best Regards,
Michael
_______________________________________________
Users mailing list -- [email protected]<mailto:[email protected]>
To unsubscribe send an email to 
[email protected]<mailto:[email protected]>
Privacy Statement: 
https://www.ovirt.org/privacy-policy.html<https://urldefense.com/v3/__https:/www.ovirt.org/privacy-policy.html__;!!CdWb0g08DYTo!ds2DRo7oS72gjnNY8-eFO2fTlX2kLqf2wMke0YWsCWdLvT47byOEthnSs6vSRIrm_LOPQL3wB_u0xg$>
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/<https://urldefense.com/v3/__https:/www.ovirt.org/community/about/community-guidelines/__;!!CdWb0g08DYTo!ds2DRo7oS72gjnNY8-eFO2fTlX2kLqf2wMke0YWsCWdLvT47byOEthnSs6vSRIrm_LOPQL0XonT-Ag$>
List Archives: 
https://lists.ovirt.org/archives/list/[email protected]/message/HYJ2JENVIVQY3QQGVII7IFEYLA3MB5DF/<https://urldefense.com/v3/__https:/lists.ovirt.org/archives/list/[email protected]/message/HYJ2JENVIVQY3QQGVII7IFEYLA3MB5DF/__;!!CdWb0g08DYTo!ds2DRo7oS72gjnNY8-eFO2fTlX2kLqf2wMke0YWsCWdLvT47byOEthnSs6vSRIrm_LOPQL2GZV4oLg$>
_______________________________________________
Users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/[email protected]/message/3IC5XFCLUAV5DQOZW4AOBPPNZCJF42DG/

Reply via email to