示例#1
0
文件: iscsi.py 项目: hackxay/vdsm
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
文件: iscsi.py 项目: vinzenz/vdsm
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)