consentfactory / ztpgenerator Goto Github PK
View Code? Open in Web Editor NEWPython tool simplifying the ZTP process for network device provisioning
License: GNU General Public License v2.0
Python tool simplifying the ZTP process for network device provisioning
License: GNU General Public License v2.0
When I run ztpgenerator.py device_data.csv
, it is now giving me the following errors:
cp: cannot stat '/etc/dhcp/hosts.conf': No such file or directory
rm: cannot remove '/etc/dhcp/hosts.conf': No such file or directory
Generating device and dhcpd config files...
Job for isc-dhcp-server.service failed.
See "systemctl status isc-dhcp-server.service" and "journalctl -xe" for details.
Job for isc-dhcp-server.service failed.
See "systemctl status isc-dhcp-server.service" and "journalctl -xe" for details.
Done generating config files...
Running HTTP Server...
Press "Ctrl+C" in console to close HTTP server.
^C
I do not understand the cp
and rm
outputs, as the /etc/dhcp/hosts.conf
file does exist...
root@junos-ztp:~/ztpgenerator# ls -l /etc/dhcp/hosts.conf
-rw-r--r-- 1 root root 3129 Jan 16 20:16 /etc/dhcp/hosts.conf
Also, as for the restart of the isc-dhcp-server service, journalctl shows the service restart failing with "Start request repeated too quickly":
root@junos-ztp:~/ztpgenerator# journalctl -xe -u isc-dhcp-server
-- Unit isc-dhcp-server.service has finished shutting down.
Jan 16 20:16:04 junos-ztp systemd[1]: isc-dhcp-server.service: Start request repeated too quickly.
Jan 16 20:16:04 junos-ztp systemd[1]: isc-dhcp-server.service: Failed with result 'start-limit-hit'.
Jan 16 20:16:04 junos-ztp systemd[1]: Failed to start ISC DHCP IPv4 server.
-- Subject: Unit isc-dhcp-server.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit isc-dhcp-server.service has failed.
--
-- The result is RESULT.
However, if I start the service by hand (systemctl start isc-dhcp-service
) it starts correctly and then is running.
Ever see anything like this?
Line 177 in 3ba6b97
Currently throws traceback:
Traceback (most recent call last):
File "./ztpgenerator.py", line 214, in <module>
ztpgenerator(csv_file)
File "./ztpgenerator.py", line 177, in ztpgenerator
with open("{}}dhcpd/dhcpd.j2".format(templates_path)) as t2_fh:
ValueError: Single '}' encountered in format string
I see that the rendered configs get put in the configs
dir; does one put the Junos installer tarballs there as well, or do you intend they get served from another web server somewhere?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.