managed networks
by Peter Klassen
Hi,
we are using cobbler to mange several machines in different networks.
I have implemented a prove of concept for Cobbler suggesting free and
not yet managed IP addresses. You can find the code in my github
ip_range branch [1]. Basically this is just a button in the web frontend
that puts a available IP address into the ip_address input field. Keep
in mind this is just a proof of concept and I am learning Python by this.
What do you think about this functionality in general? Is this something
People could use? If that's the case I could try to hack something more
mature (i.e. use netaddr) and more well-engeneered in a few days.
regards
Peter
[1] https://github.com/klassenpeter/cobbler/tree/ip_range
9 years, 11 months
Code/documentation conventions
by Alan Evangelista
I noticed Cobbler does not apply some conventions used in other Python
projects. I have some suggestions:
* Validate code using Pylint
* Comment: I think this is fundamental to find subtle errors (eg
referencing inexistent variables). I have already fixed all Pylint
errors I could in my Cobbler clone and I just ignored those few I cannot
fix (eg in templating classes). I could submit relevant patches
upstream. I'll soon automate Pylint checks in any patch submitted by my
team, possibly Cobbler upstream could do the same.
* Introduce documentation convention
* Motivation: makes documentation easier to read and write
* Suggestions:
* Sphinx restructuredText extensions
(http://sphinx-doc.org/domains.html#signatures) .
* simple Javadoc-style documentation convention. eg document methods
are documented with method description, @param <type> <var_name>
<var_description> for each parameter and @return <type>
<return_var_description> for return value. My team uses that and it
works well.
* Comment: I consider param/return type specially useful, as Python
does not declare variable types in method definition.
* Validate code using PEP8 (Python style guide)
* Order imports alphabetically. Possibly, split imports in standard
Python imports, third-party imports and Cobbler imports.
* Motivation: readability
* Remove trailing whitespaces
* Motivation: remove commit noise. I see other reasons at
http://programmers.stackexchange.com/questions/121555/why-is-trailing-whi...
, but imho they are minor.
Maybe some of these suggestions have already been considered in the past
and rejected. If you could share with me these reasons, it'd be much
appreciated.
Regards,
Alan Evangelista
9 years, 11 months
Cobbler CLI: cobbler aclsetup
by Alan Evangelista
Could someone make this command purpose clearer?
Is this command still useful at all?
In cobbler/action_acl.py, I read:
"Configures acls for various users/groups so they can access the cobbler
command
line as non-root. Now that CLI is largely remoted (XMLRPC) this is
largely just
useful for not having to log in (access to shared-secret) file but also
grants
access to hand-edit various config files and other useful things."
Reading this, Cobbler CLI purpose becomes unclear to me. If it is
supposed to be a Cobbler admin-only
tool, it makes sense that is only accessibly by root user in the server.
If it is supposed to be used
by regular users, users should be able to run CLI from anywhere (eg
their local workstations) and the
CLI should connect to remote Cobbler server using XML-RPC interface.
Regards,
Alan Evangelista
9 years, 11 months