[Users] Adding iscsi/fcp storage with rest api
Michael Pasternak
mpastern at redhat.com
Thu Dec 20 10:42:55 UTC 2012
Hi Mohua,
On 12/20/2012 09:35 AM, Mohua Li wrote:
> Hi,
>
> I'm trying to add fcp/iscsi storage with rest api like below,
>
>
> #iscsi(iscsi hba card)
> 743 # type_: storage type
> 744 storage_params = param.Storage(address="10.66.90.100",·
> 745 port="3260",·
> id="36090a038d0f7316a6807a568b2491f1d",
> target="iqn.2001-05.com.equallogic:0-8a0906-6a31f7d03-1d1f49b268a50768"
> 746 type_="iscsi")
> 747 # type_: storagedomain type
> 748 storagedomain_params = param.StorageDomain(name="iscsidomain",
> 749 data_center=dc, host=host,
> 750 type_="data", storage_format="v3",
> 751 storage=storage_params)
> 752 try:
> 753 logging.info("Creating iscsi data storage %s" % name)
> 754 storagedomain = self.api.storagedomains.add(storagedomain_params)
>
>
> storage params for fcp storage:
>
> 744 storage_params = param.Storage(id="3600a0b80005adb0b00004d834f0b7954",
> 746 type_="fcp")
>
>
> my question are:
>
> * if this is enough to connect iscsi/fcp(lun id, target) storage?
> * did wrong type the logical_unit element,
Please see this link [1], it should have example of creating iSCSI SD.
[1] http://www.ovirt.org/Testing/PythonApi#Create_iSCSI_Storage_Domain_on_Data_Center
>
>
> thanks for your help again.
>
>
>
>
>
> Regards,
>
--
Michael Pasternak
RedHat, ENG-Virtualization R&D
More information about the Users
mailing list