示例#1
0
    def DiscoverWithTask(self, portal: Structure, credentials: Structure, interfaces_mode: Str) -> ObjPath:
        """Discover an iSCSI device.

        :param portal: the portal information
        :param credentials: the iSCSI credentials
        :param interfaces_mode: required mode specified by IscsiInterfacesMode string value
        :return: a DBus path to a task
        """
        portal = Portal.from_structure(portal)
        credentials = Credentials.from_structure(credentials)
        interfaces_mode = IscsiInterfacesMode(interfaces_mode)
        return self.implementation.discover_with_task(portal, credentials, interfaces_mode)
示例#2
0
    def LoginWithTask(self, portal: Structure, credentials: Structure, node: Structure) -> ObjPath:
        """Login into an iSCSI node discovered on a portal.

        :param portal: the portal information
        :param credentials: the iSCSI credentials
        :param node: the node information
        :return: a DBus path to a task
        """
        portal = Portal.from_structure(portal)
        credentials = Credentials.from_structure(credentials)
        node = Node.from_structure(node)
        return self.implementation.login_with_task(portal, credentials, node)