Revisión 249
Añadido por Manu Mora Gordillo hace más de 13 años
controlies/trunk/applications/controlies/avahiClient.py | ||
---|---|---|
#!/usr/bin/python
|
||
##############################################################################
|
||
# -*- coding: utf-8 -*-
|
||
# Project: ControlIES
|
||
# Module: avahiClient.py
|
||
# Purpose: Avahi Client to detect ltsp-servers
|
||
# Language: Python 2.5
|
||
# Date: 26-Oct-2011.
|
||
# Ver: 26-Oct-2011.
|
||
# Author: Manuel Mora Gordillo
|
||
# Copyright: 2011 - Manuel Mora Gordillo <manuito @no-spam@ gmail.com>
|
||
#
|
||
# ControlIES is free software: you can redistribute it and/or modify
|
||
# it under the terms of the GNU General Public License as published by
|
||
# the Free Software Foundation, either version 3 of the License, or
|
||
# (at your option) any later version.
|
||
# ControlIES is distributed in the hope that it will be useful,
|
||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
# GNU General Public License for more details.
|
||
# You should have received a copy of the GNU General Public License
|
||
# along with ControlIES. If not, see <http://www.gnu.org/licenses/>.
|
||
#
|
||
##############################################################################
|
||
|
||
import dbus, gobject, avahi
|
||
from dbus import DBusException
|
||
from dbus.mainloop.glib import DBusGMainLoop
|
controlies/trunk/applications/controlies/controllers/gestion.py | ||
---|---|---|
@auth.requires_login()
|
||
def getLTSPServers():
|
||
l=conecta()
|
||
#h = Hosts (l,"","","","ltsp-server-hosts")
|
||
h = Hosts (l,"","","","workstation-hosts")
|
||
h = Hosts (l,"","","","ltsp-server-hosts")
|
||
#h = Hosts (l,"","","","workstation-hosts")
|
||
response = h.getListTriplets()
|
||
l.close()
|
||
return dict(response=response)
|
Exportar a: Unified diff
Cabecera script avahiClient