def _prefix_from_opts(opts):
    p = Prefix()
    p.prefix = opts.get('prefix')
    p.type = opts.get('type')
    p.description = opts.get('description')
    p.node = opts.get('node')
    p.country = opts.get('country')
    p.order_id = opts.get('order_id')
    p.customer_id = opts.get('customer_id')
    p.alarm_priority = opts.get('alarm_priority')
    p.comment = opts.get('comment')
    p.monitor = _str_to_bool(opts.get('monitor'))
    p.vlan = opts.get('vlan')
    p.status = opts.get('status') or 'assigned' # default to assigned
    p.tags = list(csv.reader([opts.get('tags', '')], escapechar='\\'))[0]
    p.expires = opts.get('expires')
    return p
Return a prefix based on options passed from command line
dataset/ETHPy150Open SpriteLink/NIPAP/nipap-cli/nipap_cli/nipap_cli.py/_prefix_from_opts