aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Lindstad <jonaslindstad@gmail.com>2015-02-19 04:52:14 +0100
committerJonas Lindstad <jonaslindstad@gmail.com>2015-02-19 04:52:14 +0100
commit370defe26443e9cadacbcf1c8d0102a84cc2c06e (patch)
tree5aefe415108cb3b620ed3a1d67a9ed665d536b5d
parent196163203e4cb657394fa8ad0b5456d0045f317e (diff)
updates 'last_config_fetch' when DHCP client fetches config
-rw-r--r--junos-bootstrap/httpd/server_http.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/junos-bootstrap/httpd/server_http.py b/junos-bootstrap/httpd/server_http.py
index 982283f..000bd41 100644
--- a/junos-bootstrap/httpd/server_http.py
+++ b/junos-bootstrap/httpd/server_http.py
@@ -35,11 +35,11 @@ def main():
connect_params = ("dbname='%s' user='%s' host='%s' password='%s'" % (settings['db']['dbname'], settings['db']['user'], settings['db']['host'], settings['db']['password']))
conn = psycopg2.connect(connect_params)
cur = conn.cursor(cursor_factory=psycopg2.extras.DictCursor)
- cur.execute("""SELECT * from switches""")
- rows = cur.fetchall()
- print ("\nSwitches in DB during server_http.py startup:")
- for row in rows:
- print (" --> %s, connected to %s port %s" % (row['hostname'], row['distro_name'], row['distro_phy_port']))
+ # cur.execute("""SELECT * from switches""")
+ # rows = cur.fetchall()
+ # print ("\nSwitches in DB during server_http.py startup:")
+ # for row in rows:
+ # print (" --> %s, connected to %s port %s" % (row['hostname'], row['distro_name'], row['distro_phy_port']))
except (psycopg2.DatabaseError, psycopg2.OperationalError) as e:
print ('Error: %s' % e)