def grow_pool(arg, opts, shell_opts):
if not pool:<EOL><INDENT>print("<STR_LIT>" % arg, file=sys.stderr)<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>if not '<STR_LIT>' in opts:<EOL><INDENT>print("<STR_LIT>" % pool.name, file=sys.stderr)<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>if pool.vrf is not None:<EOL><INDENT>v = pool.vrf<EOL><DEDENT>else:<EOL><INDENT>v = get_vrf(opts.get('<STR_LIT>'), abort=True)<EOL><DEDENT>q = { '<STR_LIT>': opts['<STR_LIT>'] }<EOL>if v.rt != '<STR_LIT:all>':<EOL><INDENT>q['<STR_LIT>'] = v.rt<EOL><DEDENT>res = Prefix.list(q)<EOL>if len(res) == <NUM_LIT:0>:<EOL><INDENT>print("<STR_LIT>" % (opts['<STR_LIT>'], vrf_format(v)), file=sys.stderr)<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>elif res[<NUM_LIT:0>].pool:<EOL><INDENT>if res[<NUM_LIT:0>].pool == pool:<EOL><INDENT>print("<STR_LIT>" % (opts['<STR_LIT>'], vrf_format(v)), file=sys.stderr)<EOL><DEDENT>else:<EOL><INDENT>print("<STR_LIT>" % (opts['<STR_LIT>'], vrf_format(v), res[<NUM_LIT:0>].pool.name), file=sys.stderr)<EOL><DEDENT>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>res[<NUM_LIT:0>].pool = pool<EOL>res[<NUM_LIT:0>].save()<EOL>print("<STR_LIT>" % (res[<NUM_LIT:0>].prefix, vrf_format(v), pool.name))<EOL>
Expand a pool with the ranges set in opts