def check_server(self): try: if self.dconf.has_key(PROBEVERSION): nfs.check_server_tcp(self.remoteserver) else: nfs.check_server_tcp(self.remoteserver, self.nfsversion) except nfs.NfsException, exc: raise xs_errors.XenError('NFSVersion', opterr=exc.errstr)
def check_server(self): try: if self.dconf.has_key(PROBEVERSION): sv = nfs.get_supported_nfs_versions(self.remoteserver) if len(sv): self.nfsversion = sv[0] else: nfs.check_server_tcp(self.remoteserver, self.nfsversion) except nfs.NfsException, exc: raise xs_errors.XenError('NFSVersion', opterr=exc.errstr)
def check_server(self): try: nfs.check_server_tcp(self.remoteserver) except nfs.NfsException, exc: raise xs_errors.XenError('NFSVersion', opterr=exc.errstr)
def test_check_server_tcp_nfsversion(self, pread): nfs.check_server_tcp('aServer', 'aNfsversion') pread.assert_called_once_with(['/usr/sbin/rpcinfo', '-p', 'aServer'], quiet=False)
def test_check_server_tcp(self, pread): nfs.check_server_tcp('aServer') pread.assert_called_once_with(['/usr/sbin/rpcinfo', '-t', 'aServer', 'nfs', '3'])
def test_check_server_tcp(self, pread): nfs.check_server_tcp('aServer') pread.assert_called_once_with(['/usr/sbin/rpcinfo', '-p', 'aServer'], quiet=False)