prologin.mdb.views module¶
-
class
prologin.mdb.views.
MDBServer
(app_name, secret=None, **kwargs)¶ Bases:
prologin.rpc.server.BaseRPCApp
-
REMOTE_METHODS
= {'ansible': <function MDBServer.ansible>, 'query': <function MDBServer.query>, 'register': <function MDBServer.register>, 'switches': <function MDBServer.switches>}¶
-
async
ansible
()¶ Generate an Ansible dynamic inventory from the machine database (mdb) in JSON format.
References
-
async
query
(**kwargs)¶ Query the MDB using the Django query syntax. The possible fields are:
hostname: the machine name and any of its aliases
ip: the machine IP address
aliases: the machine aliases
mac: the machine MAC address
rfs: nearest root file server
hfs: nearest home file server
mtype: machine type, either user/orga/cluster/service
room: physical room location, either pasteur/alt/cluster/other
-
async
register
(hostname, mac, rfs, hfs, room, mtype)¶
-
async
switches
(**kwargs)¶ Query the MDB for switches using the Django query syntax. The possible fields are:
name: the name of the switch
chassis: the chassis ID
rfs: associated root file server
hfs: associated home file server
room: physical room location, either pasteur/alt/cluster/other
-