@@ -26,13 +26,13 @@ log_cb.setLevel(logging.DEBUG)
SHOW_TRAFFIC = True # Debugging aid, prints out client traffic
class NFS4Client(rpc.Client, rpc.Server):
- def __init__(self, host='localhost', port=2049, ctrl_proc=16):
+ def __init__(self, host='localhost', port=2049, minorversion=1, ctrl_proc=16):
rpc.Client.__init__(self, 100003, 4)
self.prog = 0x40000000
self.versions = [1] # List of supported versions of prog
- self.minorversion = 1
- self.minor_versions = [1]
+ self.minorversion = minorversion
+ self.minor_versions = [minorversion]
self.tag = "default tag"
self.impl_id = nfs_impl_id4("citi.umich.edu", "pynfs X.X",
nfs4lib.get_nfstime())
@@ -113,7 +113,7 @@ class Environment(testmod.Environment):
def __init__(self, opts):
self._lock = Lock()
self.opts = opts
- self.c1 = nfs4client.NFS4Client(opts.server, opts.port)
+ self.c1 = nfs4client.NFS4Client(opts.server, opts.port, opts.minorversion)
s1 = rpc.security.instance(opts.flavor)
if opts.flavor == rpc.AUTH_NONE:
self.cred1 = s1.init_cred()
@@ -70,6 +70,8 @@ def scan_options(p):
help="Store test results in xml format [%default]")
p.add_option("--debug_fail", action="store_true", default=False,
help="Force some checks to fail")
+ p.add_option("--minorversion", type="int", default=1,
+ metavar="MINORVERSION", help="Choose NFSv4 minor version")
g = OptionGroup(p, "Security flavor options",
"These options choose or affect the security flavor used.")