def delete(cls, resources, background=False, force=False):
        """Delete an ip by deleting the iface"""
        if not isinstance(resources, (list, tuple)):
            resources = [resources]

        ifaces = []
        for item in resources:
            try:
                ip_ = cls.info(item)
            except UsageError:
                cls.error("Can't find this ip %s" % item)

            iface = Iface.info(ip_['iface_id'])
            ifaces.append(iface['id'])

        return Iface.delete(ifaces, background)
def delete ( cls , resources , background = False , force = False ) : if not isinstance ( resources , ( list , tuple ) ) : resources = [ resources ] ifaces = [ ] for item in resources : try : ip_ = cls . info ( item ) except UsageError : cls . error ( "Can't find this ip %s" % item ) iface = Iface . info ( ip_ [ 'iface_id' ] ) ifaces . append ( iface [ 'id' ] ) return Iface . delete ( ifaces , background )
Delete an ip by deleting the iface