CESNET / libyang

YANG data modeling language library
BSD 3-Clause "New" or "Revised" License
368 stars 292 forks source link

getting : libyang-3.1.0 :LY: Ext plugin "ly2 schema mount v1": Callback for getting ext data failed when using schema-mounts mount-point #2277

Closed msuryarao2011 closed 3 months ago

msuryarao2011 commented 3 months ago

[ERR]: SR: No "ietf-yang-schema-mount" operational data set needed for parsing mounted data. [ERR]: LY: Ext plugin "ly2 schema mount v1": Callback for getting ext data failed. [INF]: NP: Session 8: thread 1 event bad RPC. [INF]: NP: Session 8: thread 1 event reply error. [ERR]: SR: No "ietf-yang-schema-mount" operational data set needed for parsing mounted data. [ERR]: LY: Ext plugin "ly2 schema mount v1": Callback for getting ext data failed. [INF]: NP: Session 8: thread 1 event bad RPC. [INF]: NP: Session 8: thread 1 event reply error.

module _3gpp-common-subnetwork { yang-version 1.1; namespace "urn:3gpp:sa5:_3gpp-common-subnetwork"; prefix "subnet3gpp";

import _3gpp-common-yang-types { prefix types3gpp; } import _3gpp-common-top { prefix top3gpp; } import _3gpp-common-measurements { prefix meas3gpp; } import _3gpp-common-subscription-control { prefix subscr3gpp; } import _3gpp-common-fm { prefix fm3gpp; } import _3gpp-common-trace { prefix trace3gpp; } import ietf-yang-schema-mount { prefix yangmnt; } import _3gpp-common-files { prefix files3gpp; } import _3gpp-5gc-nrm-configurable5qiset { prefix fiveqi3gpp; } import _3gpp-5gc-nrm-ecmconnectioninfo { prefix econn3gpp ; }

organization "3GPP SA5"; contact "https://www.3gpp.org/DynaReport/TSG-WG--S5--officials.htm?Itemid=464";

description "Defines basic SubNetwork which will be augmented by other IOCs Copyright 2024, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved."; reference "3GPP TS 28.623 Generic Network Resource Model (NRM) Integration Reference Point (IRP); Solution Set (SS) definitions

  3GPP TS 28.622
  Generic Network Resource Model (NRM)
  Integration Reference Point (IRP);
  Information Service (IS)

  3GPP TS 28.620 
  Umbrella Information Model (UIM)";

revision 2024-01-30 { reference CR-0328 ; } revision 2023-11-14 { reference CR-0305 ; } revision 2023-09-18 { reference CR-0271 ; } revision 2023-08-10 { reference CR-0257; } revision 2023-04-26 { reference CR-0250; } revision 2023-02-14 { reference CR-0234; } revision 2022-09-30 { reference CR-0191 ; } revision 2021-01-16 { reference "CR-0120"; }
revision 2020-08-06 { reference "CR-0102"; }
revision 2020-06-08 { reference "CR-0092"; }
revision 2020-05-08 { reference "S5-203316"; }

revision 2020-03-11 { description "Added KPIs and corrections"; reference "S5-201365, S5-201581, SP-200229"; }

revision 2020-02-24 { reference "S5-201365"; }

revision 2019-06-17 { reference "Initial revision"; }

feature EcmConnectionInfoUnderSubNetwork { description "The EcmConnectionInfo shall be contained under Subnetwork"; }

feature Configurable5QISetUnderSubNetwork { description "The Configurable5QISet shall be contained under Subnetwork"; }

feature FilesUnderSubNetwork { description "Files shall be contained under Subnetwork"; }

feature ExternalsUnderSubNetwork { description "Classes representing external entities like EUtranFrequency, ExternalGNBCUCPFunction, ExternalENBFunction are contained under a Subnetwork list/class."; }

feature MeasurementsUnderSubNetwork { description "The MeasurementSubtree shall be contained under SubNetwork"; }

feature SubscriptionControlUnderSubNetwork { description "The SubscriptionControlSubtree shall be contained under SubNetwork"; }

feature SupportedNotificationsUnderSubNetwork { description "The SupportedNotificationsSubtree shall be contained under SubNetwork"; }

feature FmUnderSubNetwork { description "The FmSubtree shall be contained under SubNetwork"; }

feature TraceUnderSubNetwork { description "The TraceSubtree shall be contained under SubNetwork"; }

feature DESManagementFunction { description "Class representing Distributed SON or Domain-Centralized SON Energy Saving feature. The DESManagementFunction shall be contained under SubNetwork."; }

feature DMROFunction { description "Class representing D-SON function of MRO feature. The DMROFunction shall be contained under SubNetwork."; }

feature DRACHOptimizationFunction { description "Class representing D-SON function of RACH optimization feature. The DRACHOptimizationFunction shall be contained under SubNetwork."; }

feature DPCIConfigurationFunction { description "Class representing Distributed SON or Domain-Centralized SON function of PCI configuration feature. The DPCIConfigurationFunction shall be contained under SubNetwork."; }

feature CPCIConfigurationFunction { description "Class representing Cross Domain-Centralized SON function of PCI configuration feature. The CPCIConfigurationFunction shall be contained under SubNetwork."; }

feature CESManagementFunction { description "Class representing Cross Domain-Centralized SON Energy Saving feature. The CESManagementFunction shall be contained under SubNetwork."; }

grouping Domain_Grp { description "A domain is a partition of instances of managed entities such that :

module ietf-yang-schema-mount { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-yang-schema-mount"; prefix yangmnt;

import ietf-inet-types { prefix inet; reference "RFC 6991: Common YANG Data Types"; }

import ietf-yang-types { prefix yang; reference "RFC 6991: Common YANG Data Types"; }

organization "IETF NETMOD (NETCONF Data Modeling Language) Working Group";

contact "WG Web: https://datatracker.ietf.org/wg/netmod/ WG List: mailto:netmod@ietf.org

 Editor:   Martin Bjorklund
           <mailto:mbj@tail-f.com>

 Editor:   Ladislav Lhotka
           <mailto:lhotka@nic.cz>";

description "This module defines a YANG extension statement that can be used to incorporate data models defined in other YANG modules in a module. It also defines operational state data that specify the overall structure of the data model.

 The key words 'MUST', 'MUST NOT', 'REQUIRED', 'SHALL', 'SHALL
 NOT', 'SHOULD', 'SHOULD NOT', 'RECOMMENDED', 'NOT RECOMMENDED',
 'MAY', and 'OPTIONAL' in this document are to be interpreted as
 described in BCP 14 (RFC 2119) (RFC 8174) when, and only when,
 they appear in all capitals, as shown here.

 Copyright (c) 2019 IETF Trust and the persons identified as
 authors of the code.  All rights reserved.

 Redistribution and use in source and binary forms, with or
 without modification, is permitted pursuant to, and subject to
 the license terms contained in, the Simplified BSD License set
 forth in Section 4.c of the IETF Trust's Legal Provisions
 Relating to IETF Documents
 (https://trustee.ietf.org/license-info).

 This version of this YANG module is part of RFC 8528;
 see the RFC itself for full legal notices.";

revision 2019-01-14 { description "Initial revision."; reference "RFC 8528: YANG Schema Mount"; }

/*

msuryarao2011 commented 3 months ago

**

subnet3gpp urn:3gpp:sa5:_3gpp-common-subnetwork
<mount-point>
  <module>_3gpp-common-subnetwork</module>
  <label>children-of-SubNetwork</label>
  <config>true</config>
  <inline></inline>
  <shared-schema>
    <parent-reference>/data/SubNetwork/ExternalGNBCUCPFunction/id</parent-reference>
  </shared-schema>
</mount-point>

** Also tried loading only schema > edit-config --target candidate --config=/root/package//mount-schema.xml ERROR type: application tag: operation-failed severity: error message: List "parent-reference" with duplicate instances allowed found without required metadata.

    type:     application
    tag:      operation-failed
    severity: error
    message:  User callback failed. <schema-mounts xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-schema-mount">
<namespace>
  <prefix>subnet3gpp</prefix>
  <uri>urn:3gpp:sa5:_3gpp-common-subnetwork</uri>
</namespace>
<mount-point>
  <module>_3gpp-common-subnetwork</module>
  <label>children-of-SubNetwork</label>
  <config>true</config>
  <inline></inline>
  <shared-schema>
    <parent-reference>/subnet3gpp:SubNetwork/ExternalGNBCUCPFunction</parent-reference>
  </shared-schema>
</mount-point>

jktjkt commented 3 months ago

This bugreport is impossible to read, sorry:

msuryarao2011 commented 3 months ago

Hi ,

I am using libyang-3.1.10 and netopeer2-2.2.28 , sysrepo 2.10.1

  1. I have loaded required yang files for 3GPP model and urn:3gpp:sa5:_3gpp-common-subnetwork.yang which uses ietf-yang-schema-mount as mount-point .

  2. Prepared XML data having the mount-point with shared-schema in the single XML .

  3. Tried performing edit-config operation using netopeer2-cli

  4. edit-config --target candidate --config=/root/package/vinay/config-mount.xml nc ERROR: Unable to parse mounted data, no operational schema-mounts data received from the server. ERROR type: application tag: operation-failed severity: error message: Ext plugin "ly2 schema mount v1": Callback for getting ext data failed.

  5. Prepared only mount point xml and tried edit-config using netopeer2-cli

    edit-config --target candidate--config=/root/package/netopeer2-2.2.28/build/sample/xml/schema-mount.xml ERROR type: application tag: operation-failed severity: error message: List "parent-reference" with duplicate instances allowed found without required metadata.

    type:     application
    tag:      operation-failed
    severity: error
    message:  User callback failed.
  6. Tried adding the deviation to the mount-point using deviation "/yangmnt:schema-mounts" { deviate not-supported;

  7. ly ERROR: Not found node "schema-mounts" in path. (/ietf-yang-library:yang-library)

As per this https://github.com/sysrepo/sysrepo/issues/2842 there was fix added to support the same . Can i perform edit-config operation for the same if not can i use the deviation to the schema mount to pass the XML in the edit config without using schema mount

jktjkt commented 3 months ago

You cannot use the NETCONF protocol to edit the YANG schema mounts. That's an operation which would affect the validation rules of the "layout" of the data, and in the RFC which defined schema mounts these data are clearly marked as read-only. This is not a limitation of the software, it's a design feature.

The data which are required for working with schema mounts are set via a command-line argument to netopeer2-server. See the output of netopeer2-server --help for details. Similarly, if you wanted to play along with YANG datastores directly from a CLI, yanglint has a similar option. There's no support for ietf-schema-mount in yang-cli/sysrepo-cli/netconf-cli.

msuryarao2011 commented 3 months ago

Thanks for your support will try to explore the suggestions mentioned.