def probe(self): # Verify NFS target and port util._testHost(self.dconf['server'], NFSPORT, 'NFSTarget') self.validate_remotepath(True) self.check_server() temppath = os.path.join(SR.MOUNT_BASE, PROBE_MOUNTPOINT) self.mount(temppath, self.dconf['serverpath']) try: return nfs.scan_srlist(temppath) finally: try: nfs.unmount(temppath, True) except: pass
def probe(self): # Verify NFS target and port util._testHost(self.dconf['server'], NFSPORT, 'NFSTarget') self.validate_remotepath(True) self.check_server() temppath = os.path.join(SR.MOUNT_BASE, PROBE_MOUNTPOINT) self.mount(temppath, self.remotepath) try: return nfs.scan_srlist(temppath, self.dconf) finally: try: nfs.unmount(temppath, True) except: pass