Skip to content

Commit

Permalink
integrate NUT client Python support from David Goncalves.
Browse files Browse the repository at this point in the history
Fossil-ID: SVN r1711
  • Loading branch information
aquette committed Jan 2, 2009
1 parent 90ac8c8 commit da14a82
Show file tree
Hide file tree
Showing 20 changed files with 2,471 additions and 342 deletions.
5 changes: 5 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ W: http://cheetah.cwru.edu
D: Added custom formatting to upslog
D: Helped get apcsmart working with old SmartUPS models

N: David Goncalves
E: david@lestat.st
W: http://www.lestat.st
D: Python client suppor (PyNUTClient module and NUT-Monitor application)

N: Bruno Hall
D: Contributed UPS compatibility information

Expand Down
344 changes: 6 additions & 338 deletions COPYING

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
Fri Jan 2 22:05:32 UTC 2008 / Arnaud Quette <aquette.dev@gmail.com>

* Integrate the NUT client Python module and application from David Goncalves:
- scripts/python/client/app/*: integrate the NUT-Monitor Python application,
- scripts/python/client/module/*: integrate the PyNUTClient Python module,
- scripts/python/client/README: add some documentation,
- scripts/python/Makefile.am: add the distribution rule,
- configure.in: also output scripts/python/Makefile,
- COPYING: modified to reflect the GPL 2+ and GPL 3+ (python/client/*) files,
- LICENSE-GPL2, LICENSE-GPL3: distribute the most recent version of the GNU
GENERAL PUBLIC LICENSE,
- UPGRADING: mention the licensing difference,
- NEWS: mention the integrated NUT client Python support,
- AUTHORS: mention David's work.

Fri Jan 2 21:29:20 UTC 2008 / Charles Lepple <clepple@gmail.com>

- man/blazer.8: small wording and punctuation changes,
Expand Down
339 changes: 339 additions & 0 deletions LICENSE-GPL2

Large diffs are not rendered by default.

676 changes: 676 additions & 0 deletions LICENSE-GPL3

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ Release notes for NUT 2.4.0 - what's new since 2.2.2:
PRO and Imperial, PowerKinetics BlackOut Buster, UNITEK Alpha 500, WinPower
CPM-800.

- NUT now embeds Python client support in through the PyNUTClient module and
the NUT-Monitor application. Both are from David Goncalves, and are still
available from http://www.lestat.st.
For more information, refer to scripts/python/client/README.

- the dummy-ups driver now support a "repeater" mode. This allows it to act as
a NUT client, and to forward data. This can be useful for supervision and
load sharing purposes.
Expand Down
3 changes: 3 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ Changes from 2.2.2 to 2.4.0:
their "UPSCONN" client structure to "UPSCONN_t".
- The upsd server will now disconnect clients that remain silent for more than
60 seconds.
- The files under scripts/python/client are distributed under GPL 3+, whereas
the rest of the files are distributed under GPL 2+. Refer to COPYING for more
information.

---------------------------------------------------------------------------
Changes from 2.2.1 to 2.2.2:
Expand Down
1 change: 1 addition & 0 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,7 @@ AC_OUTPUT([
scripts/hal/ups-nut-device.fdi
scripts/hotplug/Makefile
scripts/hotplug/libhidups
scripts/python/Makefile
scripts/udev/Makefile
scripts/udev/nut-usbups.rules
scripts/Makefile
Expand Down
2 changes: 1 addition & 1 deletion scripts/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ subdriver/path-to-subdriver.sh \
Windows/halt.c \
Windows/Makefile

SUBDIRS = hotplug udev hal
SUBDIRS = hal hotplug python udev
13 changes: 10 additions & 3 deletions scripts/README
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
These directories hold example startup and shutdown scripts for various
operating systems and distributions. They have all been contributed by
users of the software.
These directories hold various scripts:
- example startup and shutdown scripts for various operating systems and
distributions,
- hotplug and udev integration for on the fly privileges settings (Linux only),
- Hardware Abstraction Layer script, for declaring and binding NUT addons to
specific USB devices,
- Python Client module and application.

They have either been contributed by users of the software, or by the NUT Team
itself.
4 changes: 4 additions & 0 deletions scripts/python/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

Makefile

Makefile.in
12 changes: 12 additions & 0 deletions scripts/python/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Network UPS Tools: data/html

EXTRA_DIST = client/README \
client/app/copyright \
client/app/gui.glade \
client/app/NUT-Monitor \
client/app/nut-monitor.desktop \
client/app/nut-monitor.png \
client/app/README \
client/module/PyNUTClient.py \
client/module/test_nutclient.py

28 changes: 28 additions & 0 deletions scripts/python/client/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Python NUT Client files
-----------------------

This directory contains various NUT Client related Python scripts, written by
David Goncalves, and released under GPL v3.

* "module": this directory contains PyNUTClient.py, which is a Python
abstraction class to access NUT server(s). You can use it in Python programs
to access NUT's upsd data server in a simple way, without having to know the NUT
protocol.

To import it on Python programs you have to use the following (case sensitive) :
'import PyNUTClient'

To install the PyNUTClient class on Debian/Ubuntu, copy it to:
/usr/share/python-support/python-pynut/

This directory also contains test_nutclient.py, which is a PyNUTClient test
program. For this to be fully functional, you will need to adapt the login,
password and upsname to fit your configuration.


* "app": this directory contains the NUT-Monitor application, that uses the
PyNUTClient class, along with its resources.

To install it, you will either need to keep the files together, or to install
gui.glade to /usr/share/nut-monitor/, and nut-monitor.png to something like
/usr/share/pixmaps/
Loading

0 comments on commit da14a82

Please sign in to comment.