Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core,restapi: report iscsi server address and port for direct LUNs #559

Merged
merged 2 commits into from
Aug 2, 2022

Conversation

bennyz
Copy link
Member

@bennyz bennyz commented Jul 26, 2022

<lun_storage id="36001405b55de9787c7a41e88d3a5ba0c">
	  <logical_units>
		    <logical_unit id="36001405b55de9787c7a41e88d3a5ba0c">
                  <address>10.35.0.156</address>
			      <discard_max_size>4194304</discard_max_size>
			      <discard_zeroes_data>false</discard_zeroes_data>
			      <disk_id>cd89659f-9983-4e0a-b0b4-a487f8cc995f</disk_id>
			      <lun_mapping>1</lun_mapping>
			      <paths>0</paths>
			      <port>3260</port>
			      <product_id>iscsi-target-01</product_id>
			      <serial>SLIO-ORG_iscsi-target-01_b55de978-7c7a-41e8-8d3a-5ba0c528d6fe</serial>
			      <size>32212254720</size>
                  <target>iqn.2003-01.org.dhcp-0-156.iscsi-target</target>
			      <vendor_id>LIO-ORG</vendor_id>
			      <volume_group_id>oc4SkF-prGc-55uP-RtWI-pGz9-IyLI-D9AFu3</volume_group_id>
		    </logical_unit>
	  </logical_units>
</lun_storage>

@bennyz bennyz force-pushed the add-connections-lun branch 2 times, most recently from b498a0d to c764f21 Compare July 26, 2022 17:52
@bennyz bennyz requested review from liranr23 and mkemel July 26, 2022 18:00
@bennyz
Copy link
Member Author

bennyz commented Jul 26, 2022

/ost

@mkemel
Copy link
Member

mkemel commented Jul 26, 2022

This handles only api/disks/{disk_id} and not api/disks

@bennyz
Copy link
Member Author

bennyz commented Jul 26, 2022

This handles only api/disks/{disk_id} and not api/disks

yes, I'm aware, need to see if it's enough for our purposes first

@@ -48,6 +48,11 @@ public static LogicalUnit map(LUNs entity, LogicalUnit template) {
model.setSize(SizeConverter.convert((long)entity.getDeviceSize(),
SizeConverter.SizeUnit.GiB, SizeConverter.SizeUnit.BYTES).longValue());

if (entity.getLunConnections() != null && !entity.getLunConnections().isEmpty()) {
model.setAddress(entity.getLunConnections().get(0).getConnection());
model.setPort(Integer.valueOf(entity.getLunConnections().get(0).getPort()));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not having the whole details of StorageServerConnections? we will need the iqn(target) for example

@bennyz bennyz force-pushed the add-connections-lun branch 2 times, most recently from 06823c4 to efeae5b Compare August 1, 2022 11:21
@bennyz bennyz marked this pull request as ready for review August 1, 2022 11:21
@bennyz
Copy link
Member Author

bennyz commented Aug 1, 2022

/ost

Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
@ahadas
Copy link
Member

ahadas commented Aug 2, 2022

/ost

@ahadas ahadas added the storage label Aug 2, 2022
@ahadas ahadas merged commit d845edd into oVirt:master Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants