[Users] Adding iscsi/fcp storage with rest api

--9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, I'm trying to add fcp/iscsi storage with rest api like below,=20 #iscsi(iscsi hba card) 743 # type_: storage type 744 storage_params =3D param.Storage(address=3D"10.66.90.= 100",=B7 745 port=3D"3260",=B7 id=3D"36090a038d0f731= 6a6807a568b2491f1d", target=3D"iqn.2001-05= =2Ecom.equallogic:0-8a0906-6a31f7d03-1d1f49b268a50768" 746 type_=3D"iscsi") 747 # type_: storagedomain type 748 storagedomain_params =3D param.StorageDomain(name=3D"= iscsidomain", 749 data_cente= r=3Ddc, host=3Dhost, 750 type_=3D"d= ata", storage_format=3D"v3", 751 storage=3D= storage_params) 752 try: 753 logging.info("Creating iscsi data storage %s" % na= me) 754 storagedomain =3D self.api.storagedomains.add(stor= agedomain_params) storage params for fcp storage: 744 storage_params =3D param.Storage(id=3D"3600a0b80005ad= b0b00004d834f0b7954", 746 type_=3D"fcp") my question are: * if this is enough to connect iscsi/fcp(lun id, target) storage? * did wrong type the logical_unit element,=20 thanks for your help again. Regards, --9jxsPFA5p3P2qPhR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAEBAgAGBQJQ0r+oAAoJEKa5n96c5rR6YYwH/2m+Ub+3AOvvIFl3HvE9F5uE u3uay1cFHHI5NxYjiA6RZ0+UqmvQnqXNRP5ILoau5670PLOI63rJiInBseR1pZTN VlM3gy2zy0yFa8EkSQIoCtoAuQJqO3Oa5wcqOsl6q92o23OgooScDQ9vaCCv6o1p ZLJl3YQ0eBc/yJJ0Sim+qz2adFwnutW+6DhuOBkZ+FWLlle5kIwvNltWbL3cNCOa II261zTEh5sXSjbLEO+9r6lZbZxN0CVTd63c38rC4nwC5242hn2QkFCzJdRR0zd/ l976DfK445SgcJ4lmE8WQaiI3VjeqbO+X0NlxV5kyAAu5om4XVO3GTh+0E/u36o= =LVDZ -----END PGP SIGNATURE----- --9jxsPFA5p3P2qPhR--

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_C...
thanks for your help again.
Regards,
-- Michael Pasternak RedHat, ENG-Virtualization R&D

--7AUc2qLy4jB3hD7Z Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 20, 2012 at 12:42:55PM +0200, Michael Pasternak wrote:
=20 Hi Mohua, =20 On 12/20/2012 09:35 AM, Mohua Li wrote:
Hi, =20 I'm trying to add fcp/iscsi storage with rest api like below,=20 =20 =20 #iscsi(iscsi hba card) 743 # type_: storage type 744 storage_params =3D param.Storage(address=3D"10.66= =2E90.100",=C2=B7 745 port=3D"3260",=C2= =B7 id=3D"36090a038d0= f7316a6807a568b2491f1d", target=3D"iqn.200= 1-05.com.equallogic:0-8a0906-6a31f7d03-1d1f49b268a50768" 746 type_=3D"iscsi") 747 # type_: storagedomain type 748 storagedomain_params =3D param.StorageDomain(name= =3D"iscsidomain", 749 data_c= enter=3Ddc, host=3Dhost, 750 type_= =3D"data", storage_format=3D"v3", 751 storag= e=3Dstorage_params) 752 try: 753 logging.info("Creating iscsi data storage %s" = % name) 754 storagedomain =3D self.api.storagedomains.add(= storagedomain_params) =20 =20 storage params for fcp storage: =20 744 storage_params =3D param.Storage(id=3D"3600a0b800= 05adb0b00004d834f0b7954", 746 type_=3D"fcp") =20 =20 my question are: =20 * if this is enough to connect iscsi/fcp(lun id, target) storage? * did wrong type the logical_unit element,=20 =20 Please see this link [1], it should have example of creating iSCSI SD. =20 [1] http://www.ovirt.org/Testing/PythonApi#Create_iSCSI_Storage_Domain_on= _Data_Center
cool, thanks for the help again, Michael
=20
=20 =20 thanks for your help again. =20 =20 =20 =20 =20 Regards, =20 =20 =20 --=20 =20 Michael Pasternak RedHat, ENG-Virtualization R&D
--=20 =E6=88=91=E5=8F=AA=E6=8B=85=E5=BF=83=E4=B8=80=E4=BB=B6=E4=BA=8B=EF=BC=8C=E6= =88=91=E6=80=95=E6=88=91=E9=85=8D=E4=B8=8D=E4=B8=8A=E6=88=91=E6=89=80=E9=81= =AD=E5=8F=97=E7=9A=84=E8=8B=A6=E9=9A=BE --7AUc2qLy4jB3hD7Z Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAEBAgAGBQJQ0xW/AAoJEKa5n96c5rR6YfYIAJJdswvWXpCb8NgCOdxZ6Djo 31FOb7OvdawxoxoCwLg3aDqxo8LKaKeA+by0RY49AXqNB0d5G7L02GAo7rKiVG34 f7vdZU3dcJzKnA28nK9LRPqs7pLKBGP+ClQBR/5FgHfmH32iyXVBgd7jPhYxWegD qa+MECt0ZssR6vikhOaZtQrde0fLSQwobR9M5VSRBwXmUmEZTkMCyAfDy1Z0JFAe CdfGpu2u7dzucQ6+GNLYXH+CCWqZFv0MsIUEb8iIHc9pxVUkwsm0ccVXaAor8qir qgSS3e/K7E6OTGwJUD6kJemxi/cGd/BHrF+ayexaIIWLBpDHyfmQAeHsFENQH5Y= =iRP8 -----END PGP SIGNATURE----- --7AUc2qLy4jB3hD7Z--
participants (2)
-
Michael Pasternak
-
Mohua Li