Skip to content

Issue with nc_clb_default_get_schema Format Option in libnetconf2 #514

Closed
@nbiskup-eridan

Description

@nbiskup-eridan

Hi,

I'm encountering an issue with nc_clb_default_get_schema when I set the format option to yang. It expects a prefix before the format name.

I'm curious why the prefix is required, especially since the same prefix was removed in this commit ( cd4a72de957d9fb093e732c64a05eae497ef353f ) within Netopeer for the get-schema RPC. Could you provide more information on this behavior?

/* check format */
if (!format || !strcmp(format, "ietf-netconf-monitoring:yang")) {
    outformat = LYS_OUT_YANG;
} else if (!strcmp(format, "ietf-netconf-monitoring:yin")) {
    outformat = LYS_OUT_YIN;
} else {
    err = nc_err(session->ctx, NC_ERR_INVALID_VALUE, NC_ERR_TYPE_APP);
    nc_err_set_msg(err, "The requested format is not supported.", "en");
    return nc_server_reply_err(err);
}

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    is:questionIssue is actually a question.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions