Пример #1
0
def removeIscsiNode(iface, target):
    targetName = target.iqn
    portalStr = "%s:%d" % (target.portal.hostname, target.portal.port)
    with _iscsiadmTransactionLock:
        try:
            iscsiadm.node_disconnect(iface.name, portalStr, targetName)
        except iscsiadm.IscsiSessionNotFound:
            pass

        iscsiadm.node_delete(iface.name, portalStr, targetName)
Пример #2
0
def removeIscsiNode(iface, target):
    targetName = target.iqn
    portalStr = "%s:%d" % (target.portal.hostname, target.portal.port)
    with _iscsiadmTransactionLock:
        try:
            iscsiadm.node_disconnect(iface.name, portalStr, targetName)
        except iscsiadm.IscsiSessionNotFound:
            pass

        iscsiadm.node_delete(iface.name, portalStr, targetName)
Пример #3
0
def removeIscsiNode(iface, target):
    # Basically this command deleting a node record (see addIscsiNode).
    # Once we create a record in the new style format by specifying a tpgt,
    # we delete it in the same way.
    with _iscsiadmTransactionLock:
        try:
            iscsiadm.node_disconnect(iface.name, target.address, target.iqn)
        except iscsiadm.IscsiSessionNotFound:
            pass

        iscsiadm.node_delete(iface.name, target.address, target.iqn)
        setRpFilterIfNeeded(iface.netIfaceName, target.portal.hostname, False)
Пример #4
0
def removeIscsiNode(iface, target):
    # Basically this command deleting a node record (see addIscsiNode).
    # Once we create a record in the new style format by specifying a tpgt,
    # we delete it in the same way.
    portalStr = "%s:%d,%d" % (target.portal.hostname, target.portal.port,
                              target.tpgt)
    with _iscsiadmTransactionLock:
        try:
            iscsiadm.node_disconnect(iface.name, portalStr, target.iqn)
        except iscsiadm.IscsiSessionNotFound:
            pass

        iscsiadm.node_delete(iface.name, portalStr, target.iqn)
Пример #5
0
def removeIscsiNode(iface, target):
    # Basically this command deleting a node record (see addIscsiNode).
    # Once we create a record in the new style format by specifying a tpgt,
    # we delete it in the same way.
    portalStr = "%s:%d,%d" % (target.portal.hostname, target.portal.port,
                              target.tpgt)
    with _iscsiadmTransactionLock:
        try:
            iscsiadm.node_disconnect(iface.name, portalStr, target.iqn)
        except iscsiadm.IscsiSessionNotFound:
            pass

        iscsiadm.node_delete(iface.name, portalStr, target.iqn)