Hello,
Here my first issue on Netopeer2, hope all the inputs will be here to help to fix it...
I am using last Netopeer2 version 1.1.34.
I get the following ERROR when engaged RPC via CLI :
user-rpc --content /opt/dev/xml/v1/software-install.xml
ERROR
type: application
tag: operation-failed
severity: error
path: /o-ran-software-management:software-install/slot-name
message: Leafref "/o-ran-software-management:software-inventory/o-ran-software-management:software-slot/o-ran-software-management:name" of value "SW-COMPONENT-2" points to a non-existing leaf.
The content of the running database is the following :
get-config --source=running --filter-xpath /o-ran-software-management:software-inventory/o-ran-software-management:software-slot[name='SW-COMPONENT-2']
DATA
DBG error in netopeer2 are the following
[INF]: LY: Resolving unresolved data nodes and their constraints...
[INF]: LY: Must condition "/o-ran-software-management:software-inventory/o-ran-software-management:software-slot[o-ran-software-management:name = current()][o-ran-software-management:active = 'false' and o-ran-software-management:running = 'false']" not satisfied, but it is not required.
[INF]: LY: All data nodes and constraints resolved.
[INF]: LY: Resolving unresolved data nodes and their constraints...
[ERR]: LY: Leafref "/o-ran-software-management:software-inventory/o-ran-software-management:software-slot/o-ran-software-management:name" of value "SW-COMPONENT-2" points to a non-existing leaf. (/o-ran-software-management:software-install/slot-name)
[ERR]: SR: Leafref "/o-ran-software-management:software-inventory/o-ran-software-management:software-slot/o-ran-software-management:name" of value "SW-COMPONENT-2" points to a non-existing leaf.
[ERR]: SR: RPC input validation failed.
[ERR]: NP: Failed to send an RPC (Validation failed).
[INF]: NP: Session 1: thread 0 event new RPC.
[INF]: NP: Session 1: thread 0 event reply error.
Yang definition of the RPC is the following
```yang
// typedef statements
container software-inventory {
config true;
description
"Contains information about each software slot and its content.";
list software-slot {
key name;
description
"Information about available software-slots and their software.";
leaf name {
type string;
description
"Name of the software package. This shall be unique to identify the software-slot.";
}
leaf status {
type enumeration {
enum VALID {
description
"Slot Contains software build considered as proven valid";
}
enum INVALID {
description
"software build is not currently used by O-RU. The software is considered by O-RU as damaged (e.g. wrong CRC)";
}
enum EMPTY {
description
"W slot does not contain software package.";
}
}
config true;
mandatory true;
description "Indicates the status of the software slot";
}
leaf active {
type boolean;
must "../status = 'VALID'";
config true;
description
"informs if software stored in particular slot is activated at the moment";
}
leaf running {
type boolean;
must "../status = 'VALID'";
config true;
description
"informs if software stored in particular slot is used at the moment";
}
leaf access {
type enumeration {
enum READ_ONLY {
description
"slot intended only for factory software,
activation of such software slot means getting back to factory defaults";
}
enum READ_WRITE {
description
"slot used for updating software";
}
}
default READ_WRITE;
config true;
description
"Indicates the writability of the slot.
A Read-Only software slot is one which has a factory installed software-slot";
}
leaf product-code {
type leafref {
path "/hw:hardware/hw:component/o-ran-hw:product-code";
}
config true;
description "product code provided by the vendor, specific to the product. This is derived from manifest file.";
}
leaf vendor-code {
type string {
length 1..2;
}
config true;
description
"Unique code of the vendor. This is derived from manifest file.";
}
leaf build-id {
type string;
config true;
description
"Identity associated with the software build. This is derived from manifest file.";
}
leaf build-name {
type string;
config true;
description
"Name of the build. This is derived from manifest file.";
}
leaf build-version {
type string;
description "The vendor-specific version string of the software build.";
}
list files {
key "name";
config true;
description "List of all the files present in the software package.";
leaf name {
type string;
description
"Name of the file installed in the slot.";
}
leaf version {
type string;
description
"Version of the file installed in the slot";
}
leaf local-path {
type string;
mandatory true;
description
"Complete path of the file stored locally";
}
leaf integrity {
type enumeration {
enum OK {
description "OK - indicates that file integrity is correct";
}
enum NOK {
description "NOK - indicates corrupted file";
}
}
config true;
description
"Result of the file integrity check (checksum calculation) during installation.";
}
}
}
}
// rpc statements
rpc software-install {
description
"Install a previously downloaded software package.";
input {
leaf slot-name {
type leafref {
path "/o-ran-swm:software-inventory/o-ran-swm:software-slot/o-ran-swm:name";
}
must "/o-ran-swm:software-inventory/o-ran-swm:software-slot[o-ran-swm:name = current()][o-ran-swm:active = 'false' and o-ran-swm:running = 'false']" {
error-message "software-install may be requested only against active::false and running::false slot!";
}
mandatory true;
description
"software-slot to which the software shall be installed to.";
}
leaf-list file-names {
type string;
description
"Names of the files within software package to be installed";
}
}
output {
leaf status {
type enumeration {
enum STARTED {
description
"Operation has been started without error.";
}
enum FAILED {
description
"Operation cannot be started because of error, more detailed information can be found in error-message.";
}
}
mandatory true;
description
"Status of the software package install.";
}
leaf error-message {
when "../status = 'FAILED'";
type string;
description
"Detailed error Message when the status is failed.";
}
}
}
Hi,
the problem here is that the RPC is validated against operational datastore, not running, hence the error. You should be able to find all the required information in the docs.
Hello, Here my first issue on Netopeer2, hope all the inputs will be here to help to fix it... I am using last Netopeer2 version 1.1.34. I get the following ERROR when engaged RPC via CLI :
Do not understand this error message as slot SW-COMPONENT-2 is properly configured as displayed below ?
The content of the xml file of command RPC is the following : root@7967306e7ff9:/opt/dev/xml/v1# cat software-install.xml
The content of the running database is the following :