[Git][NTPsec/ntpsec][master] 3 commits: Fixed slight innacuracy.

Ian Bruene gitlab at mg.gitlab.com
Mon Feb 26 19:51:59 UTC 2018


Ian Bruene pushed to branch master at NTPsec / ntpsec


Commits:
62de4810 by Ian Bruene at 2018-02-25T18:01:26-06:00
Fixed slight innacuracy.

- - - - -
c2002dae by Ian Bruene at 2018-02-26T13:14:56-06:00
Manpage now included in build.

- - - - -
afc71933 by Ian Bruene at 2018-02-26T13:50:45-06:00
ntpsnmpd dynamic settings load/save functions created.

Methods are not yet tested or enabled

- - - - -


4 changed files:

- README
- ntpclients/ntpsnmpd-man.txt
- ntpclients/ntpsnmpd.py
- wscript


Changes:

=====================================
README
=====================================
--- a/README
+++ b/README
@@ -73,7 +73,7 @@ ntptime/:: 	Directory containing a utility for reading and modifying
 
 packaging/::	Parts and guidance for distribution packagers.
 
-pylib/::	Installable Python helper classes for scripts.
+pylib/::	Installable Python helper modules for scripts.
 
 tests/::	Self-test code.
 


=====================================
ntpclients/ntpsnmpd-man.txt
=====================================
--- a/ntpclients/ntpsnmpd-man.txt
+++ b/ntpclients/ntpsnmpd-man.txt
@@ -1,4 +1,4 @@
-= ntpsnmpd(1) =
+= ntpsnmpd(8) =
 :doctype: manpage
 :man source: NTPsec
 :man version: @NTPSEC_VERSION@
@@ -11,11 +11,6 @@ include::../docs/includes/ntpsnmpd-body.txt[]
 
 == EXIT STATUS ==
 
-One of the following exit values will be returned:
-
-0 (EXIT_SUCCESS)::
-  Successful program execution.
-1 (EXIT_FAILURE)::
-  The operation failed or the command syntax was not valid.
+Always returns 0.
 
 // end


=====================================
ntpclients/ntpsnmpd.py
=====================================
--- a/ntpclients/ntpsnmpd.py
+++ b/ntpclients/ntpsnmpd.py
@@ -882,6 +882,46 @@ class DataSource(ntp.agentx.MIBControl):
     # Misc data helpers (not part of the MIB proper)
     # =====================================
 
+    def misc_loadDynamicSettings(self):
+        if self.settingsFilename is None:
+            return
+        def booify(d, k):
+            return True if d[k] == "True" else False
+        settings = loadSettings(self.settingsFilename)
+        if settings is None:
+            return
+        for key in settings.keys():
+            if key == "notify-mode-change":
+                self.notifyModeChange = boolify(settings, key)
+            elif key == "notify-stratum-change":
+                self.notifyStratumChange = boolify(settings, key)
+            elif key == "notify-syspeer-change":
+                self.notifySyspeerChange = boolify(settings, key)
+            elif key == "notify-add-association":
+                self.notifyAddAssociation = boolify(settings, key)
+            elif key == "notify-rm-association":
+                self.notifyRMAssociation = boolify(settings, key)
+            elif key == "notify-leap-announced":
+                self.notifyLeapSecondAnnounced = boolify(settings, key)
+            elif key == "notify-heartbeat":
+                self.notifyHeartbeat = boolify(settings, key)
+            elif key == "heartbeat-interval":
+                self.heartbeatInterval = int(settings[key])
+
+    def misc_storeDynamicSettings(self):
+        if self.settingsFilename is None:
+            return
+        settings = {}
+        settings["notify-mode-change"] = str(self.notifyModeChange)
+        settings["notify-stratum-change"] = str(self.notifyStratumChange)
+        settings["notify-syspeer-change"] = str(self.notifySyspeerChange)
+        settings["notify-add-association"] = str(self.notifyAddAssociation)
+        settings["notify-rm-association"] = str(self.notifyRMAssociation)
+        settings["notify-leap-announced"] = str(self.notifyLeapSecondAnnounced)
+        settings["notify-heartbeat"] = str(self.notifyHeartbeat)
+        settings["heartbeat-interval"] = str(self.heartbeatInterval)
+        storeSettings(self.settingsFilename, settings)
+
     def misc_getAssocListChanges(self):
         # We need to keep the names, because those won't be available
         # after they have been removed.


=====================================
wscript
=====================================
--- a/wscript
+++ b/wscript
@@ -1116,6 +1116,7 @@ def build(ctx):
     ctx.manpage(8, "ntpclients/ntpkeygen-man.txt")
     ctx.manpage(8, "ntpclients/ntpleapfetch-man.txt")
     ctx.manpage(8, "ntpclients/ntpwait-man.txt")
+    ctx.manpage(8, "ntpclients/ntpsnmpd-man.txt")
 
     # Skip running unit tests on a cross compile build
     if not ctx.env.ENABLE_CROSS:



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/c34dc16f36557cc9e19ff8537ebffa5805606512...afc719335ef47fa9951b6dae27ca6727a8bc7e48

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/c34dc16f36557cc9e19ff8537ebffa5805606512...afc719335ef47fa9951b6dae27ca6727a8bc7e48
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20180226/2fdcd148/attachment.html>


More information about the vc mailing list