-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[minigraph.py]: Prefer parsing device type from <ElementType> #6184
[minigraph.py]: Prefer parsing device type from <ElementType> #6184
Conversation
@theasianpianist , can you please update the PR heading, it doesn't match the changes? |
* Fall back to <Device> type attribute if no <ElementType> is found Signed-off-by: Lawrence Lee <[email protected]>
088f7f5
to
9ff2370
Compare
retest baseimage please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, please wait for @lguohan's approval
retest vsimage please |
I remember the name space is different |
I'm not sure I understand, do you mean the namespace used in |
retest vsimage please |
|
here is what i see in the example, it seems different from you test example. |
it looks like you are using a different approach to address the proble, which is fine. wonder if you can update the sample graph to inlcude the proper namespace so that we can make sure it address the issue. |
I will update it for consistency. However I don't believe the specific namespace included in the |
Signed-off-by: Lawrence Lee <[email protected]>
* Parse device type from <ElementType> first in <PngDec> * Fall back to <Device> type attribute if no <ElementType> is found Signed-off-by: Lawrence Lee <[email protected]>
Signed-off-by: Lawrence Lee [email protected]
- Why I did it
In some minigraph deployments, the
type
attribute in the<Device>
tag (<PngDec> -> <Devices>
) sometimes includes the XML namespace (e.g. instead of "BackEndLeafRouter" the value is "a:BackEndLeafRouter").- How I did it
When parsing devices, prefer the
<ElementType>
tag usually found inside of<Device>
, and use thetype
attribute as a fallback in case it is not found.- How to verify it
Run the sonic-config-engine tests
- Which release branch to backport (provide reason below if selected)
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)