[Users] Adding iscsi/fcp storage with rest api

Mohua Li moli at redhat.com
Thu Dec 20 08:42:23 EST 2012


On Thu, Dec 20, 2012 at 12:42:55PM +0200, Michael Pasternak wrote:
> 
> 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

cool, thanks for the help again, Michael
> 
> > 
> > 
> > thanks for your help again.
> > 
> > 
> > 
> > 
> > 
> > Regards,
> > 
> 
> 
> -- 
> 
> Michael Pasternak
> RedHat, ENG-Virtualization R&D

-- 
我只担心一件事,我怕我配不上我所遭受的苦难
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <http://lists.ovirt.org/pipermail/users/attachments/20121220/feadf417/attachment-0002.sig>


More information about the Users mailing list