Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@xxxxxxx> --- nfs4.1/server41tests/environment.py | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/nfs4.1/server41tests/environment.py b/nfs4.1/server41tests/environment.py index 6e68e83..45ceef1 100644 --- a/nfs4.1/server41tests/environment.py +++ b/nfs4.1/server41tests/environment.py @@ -453,6 +453,21 @@ def open_create_file(sess, owner, path=None, attrs={FATTR4_MODE: 0644}, deleg_type=None, open_create=OPEN4_NOCREATE, seqid=0, clientid=0): + open_op = open_create_file_op (sess, owner, path, attrs, access, deny, mode, + verifier, claim_type, want_deleg, deleg_type, + open_create, seqid, clientid) + + return sess.compound(open_op) + +def open_create_file_op(sess, owner, path=None, attrs={FATTR4_MODE: 0644}, + access=OPEN4_SHARE_ACCESS_BOTH, + deny=OPEN4_SHARE_DENY_NONE, + mode=GUARDED4, verifier=None, + claim_type=CLAIM_NULL, + want_deleg=False, + deleg_type=None, + open_create=OPEN4_NOCREATE, + seqid=0, clientid=0): # Set defaults if path is None: dir = sess.c.homedir @@ -485,7 +500,7 @@ def open_create_file(sess, owner, path=None, attrs={FATTR4_MODE: 0644}, open_op = op.open(seqid, access, deny, open_owner4(clientid, owner), openflag, openclaim) - return sess.compound(fh_op + [open_op, op.getfh()]) + return fh_op + [open_op, op.getfh()] def create_file(sess, owner, path=None, attrs={FATTR4_MODE: 0644}, access=OPEN4_SHARE_ACCESS_BOTH, -- 1.7.7 -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html