------=_Part_10902368_1205201040.1398672824017
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Hi Gary,
Your are correct in your hunch - there's no need to specify size for a direct lun.
However, you have a mistake in your XML - the lun storage clause should be defined in a
<lun_storage> element, not <lunStorage>.
----- Original Message -----
Hello
I was just wondering if anyone would be able to help me figure out if
there
is a way to login to an ISCSI target (EqualLogic) and add its associated
volume as a Direct LUN via the REST api.
I have figured out how to add an existing Direct LUN to a vm.
I have created a volume on the SAN and then I am attempting to upload
some
xml to the API:
curl -v -u 'admin@internal:mypass' -H "Content-type:
application/xml" -d
@disk.xml
https://ovirt-test/disks/ --insecure
cat disk.xml
> <disk>
> <alias>direct_lun</alias>
> <interface>virtio</interface>
> <format>raw</format>
> <lunStorage>
> <type>iscsi</type>
> <logical_unit>
> <address>10.0.0.1</address>
> <port>3260</port>
>
<target>iqn.2001-05.com.equallogic:0-1cb196-cff1c713e-e2a004dfcc65357b-dev-directlun</target>
> </logical_unit>
> </lunStorage>
> </disk>
At the moment the API is returning with a HTTP 400:
<fault>
<reason>Incomplete parameters</reason>
<detail>Disk [provisionedSize|size] required for add</detail>
</fault>
Is it possible to achieve my goal via the API ?
Thanks
Gary Lloyd
----------------------------------
IT Services
Keele University
-----------------------------------
_______________________________________________
Users mailing list
Users(a)ovirt.org
http://lists.ovirt.org/mailman/listinfo/users
------=_Part_10902368_1205201040.1398672824017
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit
<html><body><div style="font-family: times new roman,new
york,times,serif; font-size: 12pt; color: #000000"><div>Hi
Gary,</div><div><br></div><div>Your are correct in your
hunch - there's no need to specify size for a direct
lun.</div><div>However, you have a mistake in your XML - the lun storage
clause should be defined in a <lun_storage> element, not
<lunStorage>.</div><div><br></div><hr
id="zwchr"><blockquote style="border-left:2px solid
#1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div
dir="ltr"><div>Hello</div><div><br></div><div>I
was just wondering if anyone would be able to help me figure out if there is a way to
login to an ISCSI target (EqualLogic) and add its associated volume as a Direct LUN via
the REST api.</div>
<div><br></div><div>I have figured out how to add an existing
Direct LUN to a vm.</div><div><br></div><div>I have created
a volume on the SAN and then I am attempting to upload some xml to the
API:</div><div><br></div><div>
curl -v -u 'admin@internal:mypass' -H "Content-type: application/xml" -d
@disk.xml <a href="https://ovirt-test/disks/"
target="_blank">https://ovirt-test/disks/</a>
--insecure<br></div><div><br></div><div>cat
disk.xml</div>
<div><br></div><blockquote style="margin:0px 0px 0px
40px;border:none;padding:0px"><div><div><disk></div></div><div><div>
<alias>direct_lun</alias></div></div><div><div>
<interface>virtio</interface></div>
</div><div><div>
<format>raw</format></div></div><div><div>
<lunStorage></div></div><div><div>
<type>iscsi</type></div></div><div><div>
<logical_unit></div></div><div>
<div>
<address>10.0.0.1</address></div></div><div><div>
<port>3260</port></div></div><div><div>
<target>iqn.2001-05.com.equallogic:0-1cb196-cff1c713e-e2a004dfcc65357b-dev-directlun</target></div>
</div><div><div>
</logical_unit></div></div><div><div>
</lunStorage></div></div><div><div></disk></div></div></blockquote><div><br></div><div>At
the moment the API is returning with a HTTP 400: </div>
<div><br></div><div><fault></div><div>
<reason>Incomplete
parameters</reason></div><div>
<detail>Disk [provisionedSize|size] required for
add</detail></div><div></fault></div><div>
<br></div><div>Is it possible to achieve my goal via the API
?</div><div><br></div><div>Thanks</div><div><br></div><div><br></div><div><i>Gary
Lloyd</i><div>----------------------------------<br><div>IT
Services</div><div>
Keele
University</div></div><div>-----------------------------------</div></div>
</div>
<br>_______________________________________________<br>Users mailing
list<br>Users@ovirt.org<br>http://lists.ovirt.org/mailman/listinfo/users<br></blockquote><div><br></div></div></body></html>
------=_Part_10902368_1205201040.1398672824017--