Welcome to mirror list, hosted at ThFree Co, Russian Federation.

clients.py « node « fuse « bareos - github.com/bareos/python-bareos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e8618e014b80561cd185e17b21551d5940351bad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""
Bareos specific Fuse node.
"""

from   bareos.fuse.node.client import Client
from   bareos.fuse.node.directory import Directory

class Clients(Directory):
    def __init__(self, root, name):
        super(Clients, self).__init__(root, name)

    @classmethod
    def get_id(cls, name):
        return "unique"

    def do_update(self):
        data = self.bsock.call(".clients")
        clients = data['clients']
        for i in clients:
            name = i['name']
            self.add_subnode(Client, name)