Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
how do i get information of serial-hex of a lun using API. Essentaily i need to get output of "lun show -path" using API
Solved! See The Solution
1 ACCEPTED SOLUTION
kbhonagiri has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The serial_number property returned by the GET /storage/luns/{uuid} can be converted to hex. That ASCII and the hex are the same thing.
For example:
[root@jfs0 current]# echo -n '80A2z+UglTqg' | od -A n -t x1
38 30 41 32 7a 2b 55 67 6c 54 71 67
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The LUN endpoints do not support returning the serial number in hexadecimal form. However, you can retrieve the serial number through the REST API with "/api/storage/luns?fields=serial_number". You can then convert this returned string to to a hexadecimal string. (this is can be done by getting the hexadecimal value of each character in the string and putting them together to get the hexadecimal string)
While imperfect, this should get you what you're looking for!
Please let me know if you have further questions!
Daniel
kbhonagiri has accepted the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The serial_number property returned by the GET /storage/luns/{uuid} can be converted to hex. That ASCII and the hex are the same thing.
For example:
[root@jfs0 current]# echo -n '80A2z+UglTqg' | od -A n -t x1
38 30 41 32 7a 2b 55 67 6c 54 71 67
