def add_host(host):
p = new_prefix()<EOL>p.prefix = str(host['<STR_LIT>'])<EOL>p.type = "<STR_LIT:host>"<EOL>p.description = host['<STR_LIT:description>']<EOL>p.node = host['<STR_LIT>']<EOL>p.avps = {}<EOL>if '<STR_LIT>' in host:<EOL><INDENT>p.comment = host['<STR_LIT>']<EOL><DEDENT>if len(host['<STR_LIT:location>']) > <NUM_LIT:0>:<EOL><INDENT>p.avps['<STR_LIT:location>'] = host['<STR_LIT:location>']<EOL><DEDENT>if len(host['<STR_LIT>']) > <NUM_LIT:0>:<EOL><INDENT>p.avps['<STR_LIT>'] = host['<STR_LIT>']<EOL><DEDENT>if len(host['<STR_LIT>']) > <NUM_LIT:0>:<EOL><INDENT>p.avps['<STR_LIT>'] = host['<STR_LIT>']<EOL><DEDENT>if len(host['<STR_LIT:user>']) > <NUM_LIT:0>:<EOL><INDENT>p.avps['<STR_LIT:user>'] = host['<STR_LIT:user>']<EOL><DEDENT>return p<EOL>
Put your host information in the prefix object.