All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Haynes <loghyr@primarydata.com>
To: "J. Bruce Fields" <bfields@redhat.com>
Cc: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: [PATCH pynfs 04/12] Get rid of the client records as well as the session records
Date: Sat, 26 Nov 2016 22:26:33 -0800	[thread overview]
Message-ID: <1480228001-64821-5-git-send-email-loghyr@primarydata.com> (raw)
In-Reply-To: <1480228001-64821-1-git-send-email-loghyr@primarydata.com>

Signed-off-by: Tom Haynes <loghyr@primarydata.com>
---
 nfs4.1/nfs4client.py                | 5 ++++-
 nfs4.1/server41tests/environment.py | 5 +++++
 nfs4.1/testmod.py                   | 1 +
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/nfs4.1/nfs4client.py b/nfs4.1/nfs4client.py
index 0a25bcf..2e22695 100644
--- a/nfs4.1/nfs4client.py
+++ b/nfs4.1/nfs4client.py
@@ -40,6 +40,7 @@ class NFS4Client(rpc.Client, rpc.Server):
         self.server_address =3D (host, port)
         self.c1 =3D self.connect(self.server_address)
         self.sessions =3D {} # XXX Really, this should be per server
+        self.clients =3D {} # XXX Really, this should be per server
         self.ctrl_proc =3D ctrl_proc
         self.summary =3D summary
=20
@@ -313,7 +314,9 @@ class NFS4Client(rpc.Client, rpc.Server):
                             cred)
         nfs4lib.check(res, expect)
         if expect =3D=3D NFS4_OK:
-            return ClientRecord(res.resarray[0], self, cred, protect)
+            client_rec =3D ClientRecord(res.resarray[0], self, cred, prote=
ct)
+            self.clients[client_rec.clientid] =3D client_rec
+            return client_rec
         else:
             return None
=20
diff --git a/nfs4.1/server41tests/environment.py b/nfs4.1/server41tests/env=
ironment.py
index 7384b3c..a910a69 100644
--- a/nfs4.1/server41tests/environment.py
+++ b/nfs4.1/server41tests/environment.py
@@ -257,6 +257,11 @@ class Environment(testmod.Environment):
         for sessionid in self.c1.sessions.keys():
             self.c1.compound([op.destroy_session(sessionid)])
=20
+    def clean_clients(self):
+        """Destroy client name env.c1"""
+        for clientid in self.c1.clients.keys():
+            self.c1.compound([op.destroy_clientid(clientid)])
+
 #########################################
 debug_fail =3D False
=20
diff --git a/nfs4.1/testmod.py b/nfs4.1/testmod.py
index ce25974..c5ca0fe 100644
--- a/nfs4.1/testmod.py
+++ b/nfs4.1/testmod.py
@@ -222,6 +222,7 @@ class Test(object):
             self.runtest(self, environment)
             self.result =3D self._pass_result
 =09    environment.clean_sessions()
+=09    environment.clean_clients()
         except KeyboardInterrupt:
             raise
         except TestException, e:
--=20
2.3.6


  parent reply	other threads:[~2016-11-27  6:27 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-27  6:26 [PATCH pynfs 00/12] Flex File support Tom Haynes
2016-11-27  6:26 ` [PATCH pynfs 01/12] According to RFC7863, this is not an array Tom Haynes
2016-11-27  6:26 ` [PATCH pynfs 02/12] Close the files opened in the OPEN tests Tom Haynes
2016-11-27  6:26 ` [PATCH pynfs 03/12] Some more file closes to cleanup state on the server Tom Haynes
2016-11-27  6:26 ` Tom Haynes [this message]
2016-11-27  6:26 ` [PATCH pynfs 05/12] Really, really close those open temp files to remove " Tom Haynes
2016-11-27  6:26 ` [PATCH pynfs 06/12] Add xdr for Flex Files Layout Type Tom Haynes
2016-11-27  6:26 ` [PATCH pynfs 07/12] Simple tests of the flex file layout type Tom Haynes
2016-11-27  6:26 ` [PATCH pynfs 08/12] Add a check to see if NFS4ERR_OLD_STATEID is issued on concurrent layoutgets Tom Haynes
2016-11-27  6:26 ` [PATCH pynfs 09/12] Check that the flex file access uid/gid are correct for the different iomodes Tom Haynes
2016-11-27  6:26 ` [PATCH pynfs 10/12] FFLS1: Simulate LAYOUTSTATS for 20 small file creations Tom Haynes
2016-11-27  6:26 ` [PATCH pynfs 11/12] Factor out checking seqid for flex file layouts Tom Haynes
2016-11-27  6:26 ` [PATCH pynfs 12/12] Add layoutstats tests for flex files Tom Haynes
2016-11-28 17:22   ` J. Bruce Fields
2016-11-28 17:52     ` Tom Haynes
2016-11-28 16:33 ` [PATCH pynfs 00/12] Flex File support J. Bruce Fields
2016-11-28 16:53   ` Tom Haynes
2016-11-28 21:47   ` J. Bruce Fields
2016-11-28 23:38     ` Tom Haynes
2016-11-29  1:55       ` J. Bruce Fields
2016-11-29 23:44   ` Frank Filz
2016-11-30 14:24     ` J. Bruce Fields
2016-11-30 16:56       ` Frank Filz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1480228001-64821-5-git-send-email-loghyr@primarydata.com \
    --to=loghyr@primarydata.com \
    --cc=bfields@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.