Example #1
0
 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)
Example #2
0
 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)
Example #3
0
 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)
Example #4
0
 def check_server(self):
     try:
         nfs.check_server_tcp(self.remoteserver)
     except nfs.NfsException, exc:
         raise xs_errors.XenError('NFSVersion',
                                  opterr=exc.errstr)
Example #5
0
    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)
Example #6
0
 def check_server(self):
     try:
         nfs.check_server_tcp(self.remoteserver)
     except nfs.NfsException, exc:
         raise xs_errors.XenError('NFSVersion', opterr=exc.errstr)
Example #7
0
    def test_check_server_tcp(self, pread):
        nfs.check_server_tcp('aServer')

        pread.assert_called_once_with(['/usr/sbin/rpcinfo', '-t', 'aServer',
                                      'nfs', '3'])
Example #8
0
    def test_check_server_tcp(self, pread):
        nfs.check_server_tcp('aServer')

        pread.assert_called_once_with(['/usr/sbin/rpcinfo', '-p', 'aServer'], quiet=False)