Class Address


  • public class Address
    extends Object
    Configures the connection to a volume in the target storage device.
    Author:
    Ignasi Barrera
    • Constructor Detail

      • Address

        public Address()
    • Method Detail

      • getConnection

        public String getConnection()
      • setConnection

        public void setConnection​(String connection)
      • iscsi

        public static Address iscsi​(String portal,
                                    int port,
                                    String iqn,
                                    int lun)
        Builds an iSCSI address.

        The generated addresses have the following format:

         ip-<portal>:<port>-iscsi-<iqn>-lun-<lun>
         For example:
         ip-10.60.20.24:3260-iscsi-iqn.1993-08.org.debian:01:c2446d27e53c-lun-0
         
        Parameters:
        portal - The iSCSI portal.
        port - The iSCSI listening port in the target server.
        iqn - The IQN of the resource.
        lun - The LUN of the resource.
        Returns:
        The iSCSI address for the given input.
      • nfs

        public static Address nfs​(String serverIp,
                                  String share,
                                  String file)
        Build an NFS address.

        The generated addresses have the following format:

         <server>:<share>#<volume>
         For example:
         10.60.20.24:/volume1/share#ABQ_163e0ea0-de4e-11e2-9ac2-3b11ddc511bc
         
        Parameters:
        serverIp - The ip of the NFS server.
        share - The path of the NFS share.
        file - The name of the file.
        Returns:
        The NFS address for the given input.