Browse Source

Поправил wotcher так, чтобы не цеплял лизинг с нулевым третьим октетом

master
Mikhail Grebenkin 7 years ago
parent
commit
f469017d4a
2 changed files with 119 additions and 53 deletions
  1. +116
    -52
      .idea/workspace.xml
  2. +3
    -1
      kea_host_wacher.py

+ 116
- 52
.idea/workspace.xml View File

@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="860870ba-65f3-49c8-9afa-136b118d341a" name="Default" comment="">
<change beforePath="" afterPath="$PROJECT_DIR$/kea_host_wacher.py" />
<list default="true" id="860870ba-65f3-49c8-9afa-136b118d341a" name="Default" comment="Переработаны скрипты с поддержкой конфига, кроме веб-морды">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change beforePath="$PROJECT_DIR$/kea_hosts_generane.py" afterPath="$PROJECT_DIR$/kea_hosts_generane.py" />
<change beforePath="$PROJECT_DIR$/kea_host_wacher.py" afterPath="$PROJECT_DIR$/kea_host_wacher.py" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
@ -15,11 +14,11 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="kea_hosts_generane.py" pinned="false" current-in-tab="true">
<file leaf-file-name="kea_hosts_generane.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/kea_hosts_generane.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="57" column="30" lean-forward="true" selection-start-line="57" selection-start-column="30" selection-end-line="57" selection-end-column="30" />
<state relative-caret-position="612">
<caret line="57" column="30" lean-forward="false" selection-start-line="57" selection-start-column="30" selection-end-line="57" selection-end-column="30" />
<folding>
<element signature="e#37#48#0" expanded="true" />
<element signature="e#100#246#0" expanded="false" />
@ -31,11 +30,11 @@
</provider>
</entry>
</file>
<file leaf-file-name="kea_host_wacher.py" pinned="false" current-in-tab="false">
<file leaf-file-name="kea_host_wacher.py" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/kea_host_wacher.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="414">
<caret line="91" column="72" lean-forward="true" selection-start-line="91" selection-start-column="72" selection-end-line="91" selection-end-column="72" />
<state relative-caret-position="246">
<caret line="33" column="26" lean-forward="true" selection-start-line="33" selection-start-column="26" selection-end-line="33" selection-end-column="26" />
<folding>
<element signature="e#36#47#0" expanded="true" />
</folding>
@ -47,7 +46,7 @@
<entry file="file://$PROJECT_DIR$/config.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="198">
<caret line="11" column="0" lean-forward="true" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
<caret line="11" column="0" lean-forward="false" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
<folding />
</state>
</provider>
@ -56,7 +55,7 @@
<file leaf-file-name="web-leases.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/web-leases.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1746">
<state relative-caret-position="1728">
<caret line="97" column="39" lean-forward="false" selection-start-line="97" selection-start-column="39" selection-end-line="97" selection-end-column="39" />
<folding>
<element signature="e#35#87#0" expanded="true" />
@ -69,7 +68,7 @@
<entry file="file://$PROJECT_DIR$/hosts.tpl">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="324">
<caret line="18" column="12" lean-forward="true" selection-start-line="18" selection-start-column="12" selection-end-line="18" selection-end-column="12" />
<caret line="18" column="12" lean-forward="false" selection-start-line="18" selection-start-column="12" selection-end-line="18" selection-end-column="12" />
<folding />
</state>
</provider>
@ -78,8 +77,8 @@
<file leaf-file-name="main.tpl" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/main.tpl">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="144">
<caret line="8" column="16" lean-forward="false" selection-start-line="8" selection-start-column="16" selection-end-line="8" selection-end-column="16" />
<state relative-caret-position="288">
<caret line="16" column="13" lean-forward="false" selection-start-line="16" selection-start-column="13" selection-end-line="16" selection-end-column="13" />
<folding />
</state>
</provider>
@ -111,8 +110,8 @@
<option value="$PROJECT_DIR$/hosts.tpl" />
<option value="$PROJECT_DIR$/config-sample.json" />
<option value="$PROJECT_DIR$/config.json" />
<option value="$PROJECT_DIR$/kea_host_wacher.py" />
<option value="$PROJECT_DIR$/kea_hosts_generane.py" />
<option value="$PROJECT_DIR$/kea_host_wacher.py" />
</list>
</option>
</component>
@ -139,8 +138,6 @@
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scratches" />
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<expand>
@ -152,6 +149,8 @@
<select />
</subPane>
</pane>
<pane id="Scratches" />
<pane id="Scope" />
</panes>
</component>
<component name="PropertiesComponent">
@ -175,7 +174,7 @@
</list>
</option>
</component>
<component name="RunManager" selected="Python.kea_hosts_generane">
<component name="RunManager" selected="Python.kea_host_wacher">
<configuration name="kea_host_wacher" type="PythonConfigurationType" factoryName="Python" temporary="true">
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
@ -237,8 +236,8 @@
</list>
<recent_temporary>
<list size="3">
<item index="0" class="java.lang.String" itemvalue="Python.kea_hosts_generane" />
<item index="1" class="java.lang.String" itemvalue="Python.kea_host_wacher" />
<item index="0" class="java.lang.String" itemvalue="Python.kea_host_wacher" />
<item index="1" class="java.lang.String" itemvalue="Python.kea_hosts_generane" />
<item index="2" class="java.lang.String" itemvalue="Python.web-leases" />
</list>
</recent_temporary>
@ -292,19 +291,26 @@
<option name="project" value="LOCAL" />
<updated>1513799532745</updated>
</task>
<option name="localTasksCounter" value="6" />
<task id="LOCAL-00006" summary="Переработаны скрипты с поддержкой конфига, кроме веб-морды">
<created>1513972942286</created>
<option name="number" value="00006" />
<option name="presentableId" value="LOCAL-00006" />
<option name="project" value="LOCAL" />
<updated>1513972942286</updated>
</task>
<option name="localTasksCounter" value="7" />
<servers />
</component>
<component name="ToolWindowManager">
<frame x="0" y="610" width="1366" height="772" extended-state="6" />
<frame x="0" y="610" width="1368" height="780" extended-state="6" />
<editor active="true" />
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.1420205" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32882884" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.3093093" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.3093093" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
@ -314,6 +320,7 @@
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Data View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
</layout>
@ -327,7 +334,8 @@
<MESSAGE value="мелкие косметические изменения" />
<MESSAGE value="Довел до ума отчет." />
<MESSAGE value="Добавлена поддержа конфига для создания хостов" />
<option name="LAST_COMMIT_MESSAGE" value="Добавлена поддержа конфига для создания хостов" />
<MESSAGE value="Переработаны скрипты с поддержкой конфига, кроме веб-морды" />
<option name="LAST_COMMIT_MESSAGE" value="Переработаны скрипты с поддержкой конфига, кроме веб-морды" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
@ -336,6 +344,64 @@
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/kea_hosts_generane.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="612">
<caret line="57" column="30" lean-forward="false" selection-start-line="57" selection-start-column="30" selection-end-line="57" selection-end-column="30" />
<folding>
<element signature="e#37#48#0" expanded="true" />
<element signature="e#100#246#0" expanded="false" />
<element signature="e#498#592#0" expanded="false" />
<element signature="e#610#1411#0" expanded="false" />
<element signature="e#4821#5607#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/web-leases.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1728">
<caret line="97" column="39" lean-forward="false" selection-start-line="97" selection-start-column="39" selection-end-line="97" selection-end-column="39" />
<folding>
<element signature="e#35#87#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/config.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="198">
<caret line="11" column="0" lean-forward="true" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/hosts.tpl">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="324">
<caret line="18" column="12" lean-forward="true" selection-start-line="18" selection-start-column="12" selection-end-line="18" selection-end-column="12" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/main.tpl">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="288">
<caret line="16" column="13" lean-forward="true" selection-start-line="16" selection-start-column="13" selection-end-line="16" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/kea_host_wacher.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="522">
<caret line="33" column="50" lean-forward="true" selection-start-line="33" selection-start-column="50" selection-end-line="33" selection-end-column="50" />
<folding>
<element signature="e#36#47#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/kea_hosts_generane.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
@ -639,7 +705,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="18">
<caret line="1" column="12" lean-forward="true" selection-start-line="1" selection-start-column="12" selection-end-line="1" selection-end-column="12" />
<folding />
</state>
</provider>
</entry>
@ -647,13 +712,12 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/web-leases.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1746">
<state relative-caret-position="1728">
<caret line="97" column="39" lean-forward="false" selection-start-line="97" selection-start-column="39" selection-end-line="97" selection-end-column="39" />
<folding>
<element signature="e#35#87#0" expanded="true" />
@ -661,50 +725,50 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/hosts.tpl">
<entry file="file://$PROJECT_DIR$/config.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="324">
<caret line="18" column="12" lean-forward="true" selection-start-line="18" selection-start-column="12" selection-end-line="18" selection-end-column="12" />
<state relative-caret-position="198">
<caret line="11" column="0" lean-forward="false" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/main.tpl">
<entry file="file://$PROJECT_DIR$/kea_hosts_generane.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="144">
<caret line="8" column="16" lean-forward="false" selection-start-line="8" selection-start-column="16" selection-end-line="8" selection-end-column="16" />
<folding />
<state relative-caret-position="612">
<caret line="57" column="30" lean-forward="false" selection-start-line="57" selection-start-column="30" selection-end-line="57" selection-end-column="30" />
<folding>
<element signature="e#37#48#0" expanded="true" />
<element signature="e#100#246#0" expanded="false" />
<element signature="e#498#592#0" expanded="false" />
<element signature="e#610#1411#0" expanded="false" />
<element signature="e#4821#5607#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/kea_host_wacher.py">
<entry file="file://$PROJECT_DIR$/hosts.tpl">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="414">
<caret line="91" column="72" lean-forward="true" selection-start-line="91" selection-start-column="72" selection-end-line="91" selection-end-column="72" />
<folding>
<element signature="e#36#47#0" expanded="true" />
</folding>
<state relative-caret-position="324">
<caret line="18" column="12" lean-forward="false" selection-start-line="18" selection-start-column="12" selection-end-line="18" selection-end-column="12" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/config.json">
<entry file="file://$PROJECT_DIR$/main.tpl">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="198">
<caret line="11" column="0" lean-forward="true" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
<state relative-caret-position="288">
<caret line="16" column="13" lean-forward="false" selection-start-line="16" selection-start-column="13" selection-end-line="16" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/kea_hosts_generane.py">
<entry file="file://$PROJECT_DIR$/kea_host_wacher.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="57" column="30" lean-forward="true" selection-start-line="57" selection-start-column="30" selection-end-line="57" selection-end-column="30" />
<state relative-caret-position="246">
<caret line="33" column="26" lean-forward="true" selection-start-line="33" selection-start-column="26" selection-end-line="33" selection-end-column="26" />
<folding>
<element signature="e#37#48#0" expanded="true" />
<element signature="e#100#246#0" expanded="false" />
<element signature="e#498#592#0" expanded="false" />
<element signature="e#610#1411#0" expanded="false" />
<element signature="e#4821#5607#0" expanded="false" />
<element signature="e#36#47#0" expanded="true" />
</folding>
</state>
</provider>


+ 3
- 1
kea_host_wacher.py View File

@ -29,7 +29,9 @@ qonline = "select " \
" 1c_import.id as 1c_id " \
"from 1c_import" \
" right join lease4 " \
" on (unhex(replace(1c_import.hw_addr, ':', '')) = lease4.hwaddr);"
" on (unhex(replace(1c_import.hw_addr, ':', '')) = lease4.hwaddr)" \
"WHERE " \
"INET_NTOA(address) not like '10.%.0.%';"
qselect_last_seen = "select * from was_last_seen;"


Loading…
Cancel
Save

Powered by TurnKey Linux.