Commit Graph

12 Commits

Author SHA1 Message Date
Kevin Scott Adams 94d897f7d1 Added API Host
- This change allows the API traffic to be on a different interface then
the iSCSI Provider interface. This allows the selection of the FreeNAS
WebGUI address for HTTP/HTTPS to be on a specific interface instead of
"ALL" (0.0.0.0) interfaces.  If the API Host is not defined then the API
traffic will default to the iSCSI Provider interface.
2018-08-19 15:28:39 -04:00
Kevin Scott Adams 3f6059e75f Add test for the FreeNAS API
- Add a simple API test using the FreeNAS API call to get its version
number, which could prove useful in future versions. Closes #17
- Whitespace cleanup
2018-07-31 22:40:22 -04:00
Kevin Scott Adams 42edb8614e Few housekeeping changes
- Whitespace cleanup
- Removed the 'hardcoded' username and password. Will not throw an error
if it is not defined or blank in /etc/pve/storage.cfg for each ZFS via
ISCSI definition.
- Used a Ternary (Elvis - ?:) Operator for the scheme variable.
2018-07-31 21:33:21 -04:00
Tristan Lostroh cce719afb7 Add a function to return NAA
Adds a function to return NAA. This is required to match the WWID for multipath
2018-07-16 09:16:10 +10:00
Krzysztof Raczkowski d3c477c40d Support for SSL access to FreeNAS API. 2018-07-11 12:41:19 +02:00
Kevin Scott Adams a29328e7fa Undef $iscsi_lunid in FreeNAS.pm on line 457
- The perl code was creating a new variable in the ‘if’ code block by
using 'my' at the beginning of the assignment at line 452. Once the code
exited this block that variable was released and now defaulted to the
main block variable at line 441 which is still set to 'undef'. Removing
the 'my' from the assignment line allowed the code to use the main block
$iscsi_lunid variable.

Fixes issue #7
2018-07-09 15:38:54 -04:00
Kevin Scott Adams 23990fc008 Add tainted checking to iscsi_lunid
- So we do not have to change the /usr/bin/pvedaemon a small fix to
check the $item->{'iscsi_target'} varaible from the API call is needed.
This closes issue #3.
2018-06-26 15:00:09 -04:00
Kevin Scott Adams af42dfd008 Change iscsi_lunid values of 'undef' to 0 (zero)
- In FreeNAS 11.1 it seems like a Lun of 0 becomes 'Auto'. When the API
returns the targent_to_extent data any Lun of "Auto" become 'undef' and
causes issues and errors in the syslog. This change corrects this
behavior. Have tested with adding, detaching, removing and "Moving Disk"
functions of Proxmox version 5.1-51.
2018-04-18 13:53:29 -04:00
Kevin Scott Adams 6931f4a232 - Code formatting and whitespace cleanup
Just conformed to a certain coding, space and comment that was already
in the code for better readability.
2018-04-18 12:59:44 -04:00
Andrew Beam f3c51d8e8a
fix problem with more than 20 LUNs
Disable FreeNAS API result limits
2017-12-08 14:12:54 +01:00
Beam 3797983e1a fix sort luns numerically 2017-10-12 15:23:59 +02:00
Ondrej Bima d91ec2d0b8 first commit 2017-05-19 12:15:42 +02:00