Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yangdump errors for [email protected] and [email protected] #152

Open
srilchan81 opened this issue Dec 10, 2024 · 4 comments
Open

yangdump errors for [email protected] and [email protected] #152

srilchan81 opened this issue Dec 10, 2024 · 4 comments

Comments

@srilchan81
Copy link

srilchan81 commented Dec 10, 2024

Hi ,

issue 1

we are trying to validate the yang [email protected] using yangdump .

we are getting below error :
Error: 'notification' token not allowed here
Error: Got 'notification', Expected: anyxml, anydata, container, leaf, leaf-list, list, choice, uses,or augment keyword
[email protected]:1249.9: error(246): wrong token value

From code , netconf/src/ncx/yang_obj.c
consume_datadef is throwing error :
if (res != NO_ERR && !errdone) {
log_error("\nError: '%s' token not allowed here", val);
ncx_mod_exp_err(tkc, mod, res, expstr);
yang_skip_statement(tkc, mod);
}
On analysis , below notification is defined inside alarm list . If we move this object at end of yang file , yangdump issue is resolved.
Customer is not OK to change the standard Yang , so is there any fix done to handle notification syntax inside list or container?
notification operator-action {
if-feature "operator-actions";
description
"This notification is used to report that an operator
acted upon an alarm.";
uses operator-parameters;
}

issue -2

we are validating [email protected] using yangdump
yangdump [email protected]

*** Generated by yangdump 2.12-1
*** Copyright (c) 2008-2012, Andy Bierman, All Rights Reserved.

Warning: revisions with same date (2018-06-28) in iana-if-type line 123
iana-if-type.yang:128.3: warning(451): duplicated dates in revision history

E0:
../../../netconf/src/ncx/ncx_num.c:879
Error 4: invalid internal value

on checking code further , we analyzed that yuma123 does not support decimal64
Can you pls confirm if any fix can be done ?

@srilchan81
Copy link
Author

@vlvassilev pls help here.

@srilchan81 srilchan81 changed the title yangdump error for [email protected] yangdump errors for [email protected] and [email protected] Dec 10, 2024
@vlvassilev
Copy link
Owner

vlvassilev commented Dec 14, 2024

Added a testcase 743123a and a fix 4ede28d for the ietf-alarms issue with the notification inside the list. The testcase validates that the module does not cause error when parsed/compiled.

@srilchan81
Copy link
Author

srilchan81 commented Dec 16, 2024

thanks , that helps for ietf-alarms.
For microwave , we had 2 issues , decimal64 is not getting supported in yangdump . We mapped to float64 as workaround and resolved the issue . Now open issue is "action" statements from Yang is not supported in yuma123 . Its mapped to RPC type but returned error . Can you pls suggest / provide a fix to support actions statements in Yang?
Code snippet:-

if (srcobj->objtype == OBJ_TYP_NONE ||
    srcobj->objtype > OBJ_TYP_AUGMENT) {
    printf("\r\n srcobj->objtype = %d bj_clone: '%s' in mod '%s' on line %u",srcobj->objtype,obj_get_name(srcobj),
               obj_get_mod_name(srcobj),
               srcobj->tkerr.linenum);
    SET_ERROR(ERR_INTERNAL_VAL);      <<-----throwing error
    return NULL;
}

ietf-interface-protection.yang :
action manual-switch-working {
description
"A switch action initiated by an operator command.
It switches a normal traffic signal to the working
transport entity.";
reference
"ITU-T G.808.1";
}
action manual-switch-protection {
description
"A switch action initiated by an operator command.
It switches a normal traffic signal to the protection
transport entity.";
reference
"ITU-T G.808.1";
}

@srilchan81
Copy link
Author

we tried to use the commit id that supported actions :
0e6794c

After this , we are able to validate ietf-microwave-radio-link.yang. But we still observe below error . pls help
root@labuser-virtual-machine:/usr/share/yuma/modules/ietf# ./yangdump [email protected]

*** Generated by yangdump 2.11-0
*** Copyright (c) 2008-2012, Andy Bierman, All Rights Reserved.

E0:
../../../netconf/src/ncx/xpath1.c:9396
Error 4: invalid internal value

*** /usr/share/yuma/modules/ietf/[email protected]
*** 0 Errors, 1 Warnings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants