Skip to content
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

SONiC Yang model support for LLDP #8120

Merged
merged 2 commits into from
Aug 26, 2021
Merged

Conversation

ph408077
Copy link
Contributor

@ph408077 ph408077 commented Jul 7, 2021

What I did
Created SONiC Yang model for LLDP

How I did it
Added LLDP and LLDP_PORT tables for global and port level configurations

How to verify it
Compile sonic_yang_mgmt-1.0-py3-none-any.whl

@anshuv-mfst
Copy link

Hi @venkatmahalingam , @praveen-li - could you please review and approve. This is dup of #7191

@anshuv-mfst anshuv-mfst added the YANG YANG model related changes label Jul 7, 2021
@anshuv-mfst anshuv-mfst added this to To be reviewed in yang via automation Jul 7, 2021
@anshuv-mfst anshuv-mfst moved this from To be reviewed to Review in progress in yang Jul 7, 2021
description
"SONiC LLDP yang model";

revision 2020-04-16 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the date.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

"RX/TX mode for LLDP frames";
}

//uses lldp_mode_config;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use the grouping, Praveen mentioned in the last meeting that only few lines are required in the infra, @praveen-li please provide the infra code for testing.

}

leaf supp_mgmt_address_tlv {
type boolean;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no default value for this field?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added default value

type enumeration {
enum RECEIVE;
enum TRANSMIT;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no default value?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is optional field, so user can set the mode to either tx-only or rx-only and 'both tx and rx' is controlled by enabled field

Copy link
Contributor Author

@ph408077 ph408077 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/azpw run

@ph408077
Copy link
Contributor Author

ph408077 commented Jul 8, 2021

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -924,6 +924,24 @@
"trap_ids": "ip2me",
"trap_group": "queue1_group1"
}
},
"LLDP": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW what is the source of this config?, this config is not listed on https://github.com/Azure/SONiC/wiki/Configuration.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LLDP parameters were directly configured via lldpcli. To support north bound interfaces,these configs were added by Broadcom to configure LLDP global and per port parameters and store the same in Config DB.

"Initial revision.";
}

grouping lldp_mode_config {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason by grouping is used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enabled and mode leaf is used in Global and per Port config. So it was grouped and used in these nodes. However usage of grouping is leading to compilation error, its commented for now. But ideally since its used in two places, grouping is defined.

@ph408077
Copy link
Contributor Author

Hi @venkatmahalingam , @praveen-li - Do you have there any further comments or questions

@lguohan lguohan merged commit 92d4bfe into sonic-net:master Aug 26, 2021
yang automation moved this from Review in progress to Done Aug 26, 2021
@zhangyanzhao
Copy link
Collaborator

@lguohan will merge this one. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
YANG YANG model related changes
Projects
yang
Done
Development

Successfully merging this pull request may close these issues.

None yet

8 participants