def edit(self, id):
c.pool = Pool.get(int(id))<EOL>c.prefix_list = Prefix.list({ '<STR_LIT>': c.pool.id })<EOL>c.prefix = '<STR_LIT>'<EOL>if request.method == '<STR_LIT:POST>':<EOL><INDENT>c.pool.name = request.params['<STR_LIT:name>']<EOL>c.pool.description = request.params['<STR_LIT:description>']<EOL>c.pool.default_type = request.params['<STR_LIT>']<EOL>if request.params['<STR_LIT>'].strip() == '<STR_LIT>':<EOL><INDENT>c.pool.ipv4_default_prefix_length = None<EOL><DEDENT>else:<EOL><INDENT>c.pool.ipv4_default_prefix_length = request.params['<STR_LIT>']<EOL><DEDENT>if request.params['<STR_LIT>'].strip() == '<STR_LIT>':<EOL><INDENT>c.pool.ipv6_default_prefix_length = None<EOL><DEDENT>else:<EOL><INDENT>c.pool.ipv6_default_prefix_length = request.params['<STR_LIT>']<EOL><DEDENT>c.pool.save()<EOL>redirect(url(controller = '<STR_LIT>', action = '<STR_LIT:list>'))<EOL><DEDENT>c.search_opt_parent = '<STR_LIT:all>'<EOL>c.search_opt_child = '<STR_LIT:none>'<EOL>return render("<STR_LIT>")<EOL>
Edit a pool.