diff options
author | Dan Timoney <dtimoney@att.com> | 2024-03-26 15:55:50 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2024-03-26 15:55:50 +0000 |
commit | 6faa14b235b3888096b1c629ec917f66f38b6b53 (patch) | |
tree | 45539cda38e1e1245b52f13d113e3cc4bfbc0f2f /sdnr/wt/odlux/apps/configurationApp/src/yang/yangParser.ts | |
parent | 33bfa0221b0449018bfbf3c2f5d794990bc652ce (diff) | |
parent | cb30c64aada718c479791468f8babbcd3576cbf5 (diff) |
Merge "ODLUX Update" into montreal
Diffstat (limited to 'sdnr/wt/odlux/apps/configurationApp/src/yang/yangParser.ts')
-rw-r--r-- | sdnr/wt/odlux/apps/configurationApp/src/yang/yangParser.ts | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/sdnr/wt/odlux/apps/configurationApp/src/yang/yangParser.ts b/sdnr/wt/odlux/apps/configurationApp/src/yang/yangParser.ts index 85eeb41a4..14e3468ac 100644 --- a/sdnr/wt/odlux/apps/configurationApp/src/yang/yangParser.ts +++ b/sdnr/wt/odlux/apps/configurationApp/src/yang/yangParser.ts @@ -491,7 +491,12 @@ export class YangParser { } public postProcess() { - + // process all type refs + this._typeRefToResolve.forEach(cb => { + try { cb(); } catch (error) { + console.warn(error.message); + } + }); /** * This is to fix the issue for sequential execution of modules based on their child and parent relationship * We are sorting the module object based on their augment status @@ -580,7 +585,7 @@ export class YangParser { const identity = module.identities[idKey]; if (identity.base != null) { const base = this.resolveIdentity(identity.base, module); - base.children?.push(identity); + base?.children?.push(identity); } else { baseIdentities.push(identity); } @@ -596,12 +601,6 @@ export class YangParser { } }); - this._typeRefToResolve.forEach(cb => { - try { cb(); } catch (error) { - console.warn(error.message); - } - }); - this._modulesToResolve.forEach(cb => { try { cb(); } catch (error) { console.warn(error.message); @@ -622,8 +621,11 @@ export class YangParser { } }); + const knownViews: ViewSpecification[] = []; // resolve readOnly const resolveReadOnly = (view: ViewSpecification, parentConfig: boolean) => { + if (knownViews.includes(view)) return; + knownViews.push(view); // update view config view.config = view.config && parentConfig; @@ -1622,4 +1624,4 @@ export class YangParser { : module.identities[identityName]; } -}
\ No newline at end of file +} |