Create zone.

    Argument:

        args: arguments object

def create_zone(args):
    """Create zone.

    Argument:

        args: arguments object
    """
    action = True

    password = get_password(args)
    token = connect.get_token(args.username, password, args.server)

    domain = args.domain
    template = args.domain.replace('.', '_')

    master = None
    dnsaddr = args.dnsaddr
    if args.__dict__.get('S'):
        dtype = 'SLAVE'
        master = dnsaddr
    elif args.__dict__.get('N'):
        dtype = 'NATIVE'
    else:
        dtype = 'MASTER'

    # generate template data
    o = JSONConverter(domain)
    o.generate_template(domain, dnsaddr, desc='')

    # create template
    processing.create_template(args.server, token, template, o.record)

    # create zone
    processing.create_zone(args.server, token, domain, template, dtype, master)

    # delete template
    processing.delete_template(args.server, token, template)