コード例 #1
0
class ServerAdmin():
    def __init__(self, parent=None):
        self.admin = AdminInterface(SERVICE, '/org/ganesha/nfsd/admin',
                                    'org.ganesha.nfsd.admin')

    def shutdown(self):
        print("Shutting down server.")
        status, msg = self.admin.shutdown()
        self.status_message(status, msg)

    def grace(self, ipaddr):
        print("Start grace period.")
        status, msg = self.admin.grace(ipaddr)
        self.status_message(status, msg)

    def purge_netgroups(self):
        print("Purging netgroups cache")
        status, msg = self.admin.purge_netgroups()
        self.status_message(status, msg)

    def purge_idmap(self):
        print("Purging idmapper cache")
        status, msg = self.admin.purge_idmap()
        self.status_message(status, msg)

    def purge_gids(self):
        print("Purging gids cache")
        status, msg = self.admin.purge_gids()
        self.status_message(status, msg)

    def status_message(self, status, errormsg):
        print("Returns: status = %s, %s" % (str(status), errormsg))
コード例 #2
0
ファイル: ganesha_mgr.py プロジェクト: dotbugfix/nfs-ganesha
class ServerAdmin():

    def __init__(self, parent=None):
        self.admin = AdminInterface(SERVICE,
                                    '/org/ganesha/nfsd/admin',
                                    'org.ganesha.nfsd.admin')
    def shutdown(self):
        print("Shutting down server.")
        status, msg = self.admin.shutdown()
        self.status_message(status, msg)

    def grace(self, ipaddr):
        print("Start grace period.")
        status, msg = self.admin.grace(ipaddr)
        self.status_message(status, msg)

    def purge_netgroups(self):
        print("Purging netgroups cache")
        status, msg = self.admin.purge_netgroups()
        self.status_message(status, msg)

    def purge_idmap(self):
        print("Purging idmapper cache")
        status, msg = self.admin.purge_idmap()
        self.status_message(status, msg)

    def purge_gids(self):
        print("Purging gids cache")
        status, msg = self.admin.purge_gids()
        self.status_message(status, msg)

    def status_message(self, status, errormsg):
        print("Returns: status = %s, %s" % (str(status), errormsg))
コード例 #3
0
ファイル: ganesha_mgr.py プロジェクト: JevonQ/nfs-ganesha
class ServerAdmin:
    def __init__(self, parent=None):
        self.admin = AdminInterface(SERVICE, "/org/ganesha/nfsd/admin", "org.ganesha.nfsd.admin")

    def shutdown(self):
        print "Shutting down server."
        status, msg = self.admin.shutdown()
        self.status_message(status, msg)

    def grace(self, ipaddr):
        print "Start grace period."
        status, msg = self.admin.grace(ipaddr)
        self.status_message(status, msg)

    def status_message(self, status, errormsg):
        print "Returns: status = %s, %s" % (str(status), errormsg)
コード例 #4
0
ファイル: ganesha_mgr.py プロジェクト: yang123vc/nfs-ganesha
class ServerAdmin():
    def __init__(self, parent=None):
        self.admin = AdminInterface(SERVICE, '/org/ganesha/nfsd/admin',
                                    'org.ganesha.nfsd.admin')

    def shutdown(self):
        print "Shutting down server."
        status, msg = self.admin.shutdown()
        self.status_message(status, msg)

    def grace(self, ipaddr):
        print "Start grace period."
        status, msg = self.admin.grace(ipaddr)
        self.status_message(status, msg)

    def status_message(self, status, errormsg):
        print "Returns: status = %s, %s" % (str(status), errormsg)
コード例 #5
0
class ServerAdmin():
    def __init__(self, parent=None):
        self.admin = AdminInterface(SERVICE, '/org/ganesha/nfsd/admin',
                                    'org.ganesha.nfsd.admin')

    def shutdown(self):
        print("Shutting down server.")
        status, msg = self.admin.shutdown()
        self.status_message(status, msg)

    def grace(self, ipaddr):
        print("Start grace period.")
        status, msg = self.admin.grace(ipaddr)
        self.status_message(status, msg)

    def purge_netgroups(self):
        print("Purging netgroups cache")
        status, msg = self.admin.purge_netgroups()
        self.status_message(status, msg)

    def purge_idmap(self):
        print("Purging idmapper cache")
        status, msg = self.admin.purge_idmap()
        self.status_message(status, msg)

    def purge_gids(self):
        print("Purging gids cache")
        status, msg = self.admin.purge_gids()
        self.status_message(status, msg)

    def show_version(self):
        status, msg, versions = self.admin.GetAll()
        if status:
            print("NFS-Ganesha Release = V{}".format(
                versions['VERSION_RELEASE']))
            try:
                print("ganesha compiled on {} at {}".format(
                    versions['VERSION_COMPILE_DATE'],
                    versions['VERSION_COMPILE_TIME']))
                print("Release comment = {}".format(
                    versions['VERSION_COMMENT']))
                print("Git HEAD = {}".format(versions['VERSION_GIT_HEAD']))
                print("Git Describe = {}".format(
                    versions['VERSION_GIT_DESCRIBE']))
            except KeyError:
                pass
        else:
            self.status_message(status, msg)

    def status_message(self, status, errormsg):
        print("Returns: status = %s, %s" % (str(status), errormsg))
コード例 #6
0
ファイル: ganesha_mgr.py プロジェクト: yang123vc/nfs-ganesha
 def __init__(self, parent=None):
     self.admin = AdminInterface(SERVICE, '/org/ganesha/nfsd/admin',
                                 'org.ganesha.nfsd.admin')
コード例 #7
0
ファイル: ganesha_mgr.py プロジェクト: hongjil5/nfs-ganesha
 def __init__(self, parent=None):
     self.admin = AdminInterface(SERVICE,
                                 '/org/ganesha/nfsd/admin',
                                 'org.ganesha.nfsd.admin')