-
Notifications
You must be signed in to change notification settings - Fork 656
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
openconfig-terminal-device module : bad augment when statement #40
Comments
OPTICAL_CHANNEL is defined in openconfig-transport-types.yang, with oc-platform-types:OPENCONFIG_HARDWARE_COMPONENT as its base, so it should probably be referred to as 'oc-opt-types:OPTICAL_CHANNEL' in the when statement below.
Cheers,
Einar
…On 11 Jan 2017, 13:03 +0000, mberroug ***@***.***>, wrote:
Hello,
I can't validate data with this defintion:
augment "/oc-platform:components/oc-platform:component" {
when "/oc-platform:components/oc-platform:component/" +
"oc-platform:state/oc-platform:type = 'OPTICAL_CHANNEL'" {
description
"Augment is active when component is of type
OPTICAL_CHANNEL";
}
description
"Adding optical channel data to physical inventory";
uses terminal-optical-channel-top { }
}
In fact 'OPTICAL_CHANNEL' is not typed oc-platform-types:OPENCONFIG_HARDWARE_COMPONENT or oc-platform-types:OPENCONFIG_SOFTWARE_COMPONENT
type in openconfig-platorm.yang module is defined like
leaf type {
type union {
type identityref {
base oc-platform-types:OPENCONFIG_HARDWARE_COMPONENT;
}
type identityref {
base oc-platform-types:OPENCONFIG_SOFTWARE_COMPONENT;
}
}
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub (#40), or mute the thread (https://github.com/notifications/unsubscribe-auth/AFKGcOxpC2n0O_TdAuFIInqGHDwzeQoQks5rRNM6gaJpZM4Lgjf-).
|
@mberroug can you please say more about how you're doing your module validation ? I just want to try to reproduce. We recently fixed a couple of XPATH and |
Hello, Thanks for your reply. I am using yang2dsdl tool for data validation. Following is what I have: == Using pre-generated schemas == Validating grammar and datatypes ... == Adding default values... done. == Validating semantic constraints ... @einarnn has right , I think we should have 'oc-opt-types:OPTICAL_CHANNEL' in the when statement instead of only 'OPTICAL_CHANNEL' . Regards, |
Confirmed to work if the when-statement is altered. Is there any change to get an update for these issues? |
Afternoon, i changed the when-statement to make sure it is valid for only those components with config/type = 'OPTICAL_CHANNEL'.
|
Adding Type string as one of the types supported in the union will help us solve the issue. Need not change the augment statement.
|
There is one more issue with respect to discussed augment , the Optical channel container(inside uses terminal-optical-channel-top group) will be listed for all components when any one optical channel component is created .
} |
This issue is stale because it has been open 180 days with no activity. If you wish to keep this issue active, please remove the stale label or add a comment, otherwise will be closed in 14 days. |
Hello,
I can't validate data with this defintion:
augment "/oc-platform:components/oc-platform:component" {
when "/oc-platform:components/oc-platform:component/" +
"oc-platform:state/oc-platform:type = 'OPTICAL_CHANNEL'" {
description
"Augment is active when component is of type
OPTICAL_CHANNEL";
}
description
"Adding optical channel data to physical inventory";
}
In fact 'OPTICAL_CHANNEL' is not typed oc-platform-types:OPENCONFIG_HARDWARE_COMPONENT or oc-platform-types:OPENCONFIG_SOFTWARE_COMPONENT
type in openconfig-platorm.yang module is defined like
leaf type {
type union {
type identityref {
base oc-platform-types:OPENCONFIG_HARDWARE_COMPONENT;
}
type identityref {
base oc-platform-types:OPENCONFIG_SOFTWARE_COMPONENT;
}
}
The text was updated successfully, but these errors were encountered: