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

[yang] add set_owner to feature yang #9075

Merged
merged 6 commits into from
Dec 10, 2021

Conversation

arlakshm
Copy link
Contributor

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan [email protected]

Why I did it

Add the configuration for the set_owner in the feature yang model

How I did it

Add new leaf set_pwner to the feature yang model

How to verify it

compile sonic_yang_mgmt-1.0-py3-none-any.whl

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]>
@arlakshm arlakshm linked an issue Oct 27, 2021 that may be closed by this pull request
@arlakshm
Copy link
Contributor Author

/Azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@arlakshm arlakshm marked this pull request as ready for review October 27, 2021 00:23
@arlakshm arlakshm requested a review from lguohan as a code owner October 27, 2021 00:23
@arlakshm
Copy link
Contributor Author

@dgsudharsan, @praveen-li. This PR is for the DPB issue #8993.
Please review.

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]>
@tw0byt3
Copy link

tw0byt3 commented Nov 1, 2021

Hi Team,

When will this change be reviewed?

@arlakshm
Copy link
Contributor Author

arlakshm commented Nov 2, 2021

@praveen-li, @dgsudharsan can you approve it there are not other comments.

@arlakshm arlakshm added the YANG YANG model related changes label Nov 5, 2021
@arlakshm
Copy link
Contributor Author

arlakshm commented Nov 5, 2021

@praveen-li, @dgsudharsan can you please approve it there are no other comments.

@tw0byt3
Copy link

tw0byt3 commented Nov 8, 2021

@lguohan Sir, awaiting your review.

@tw0byt3
Copy link

tw0byt3 commented Nov 11, 2021

@praveen-li can you please approve the changes

@tw0byt3
Copy link

tw0byt3 commented Nov 12, 2021

@praveen-li Could you please review and approve the same? I have an ongoing project on hold due to this FEATURE yang module.

@mykolaxgerasymenko
Copy link
Contributor

@praveen-li Could you please review this PR?
@anshuv-mfst Could you please add this PR to review on the next yang subgroup meeting?
This issue blocks further activity with the DPB feature.
Thank you in advance.

Copy link
Member

@praveen-li praveen-li left a comment

Choose a reason for hiding this comment

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

Looks good overall, Plz add a negative test as well. Thanks.

@dgsudharsan
Copy link
Collaborator

Looks like there are some more changes needed in feature YANG.
Note: Below table(s) have no YANG models:
KDUMP, SNMP, SNMP_COMMUNITY, WJH, WJH_CHANNEL, XCVRD_LOG,
libyang[0]: Value "always_disabled" does not satisfy the constraint "enabled|disabled|always_enabled" (range, length, or pattern). (path: /sonic-feature:sonic-feature/FEATURE/FEATURE_LIST[name='mux']/state)
sonic_yang(3):Data Loading Failed:Value "always_disabled" does not satisfy the constraint "enabled|disabled|always_enabled" (range, length, or pattern).
Data Loading Failed
Value "always_disabled" does not satisfy the constraint "enabled|disabled|always_enabled" (range, length, or pattern).
ConfigMgmt Class creation failed
Failed to break out Port. Error: Failed to load the config. Error: ConfigMgmtDPB Class creation failed

The "always_disabled" is missing for the state but its generated from init_cfg.json. Can you please update in this PR?

Copy link
Collaborator

@dgsudharsan dgsudharsan left a comment

Choose a reason for hiding this comment

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

Please add always_disabled in state as requested

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]>
@arlakshm
Copy link
Contributor Author

Please add always_disabled in state as requested

Added 'always_disabled' to feature-state in the latest commit

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]>
@arlakshm
Copy link
Contributor Author

arlakshm commented Dec 2, 2021

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@arlakshm
Copy link
Contributor Author

arlakshm commented Dec 3, 2021

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@arlakshm
Copy link
Contributor Author

arlakshm commented Dec 6, 2021

/AzurePipelines run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

qiluo-msft pushed a commit that referenced this pull request Dec 8, 2021
#### Why I did it
DPB falls due to missing POLL_INTERVAL in sonic-flex_counter yang model.

#### How I did it
Added POLL_INTERVAL leaf to ACL container in sonic-flex_counter yang model.

#### How to verify it
Run the command config interface breakout <interface> <breakout_mode>

**NOTE:**
To verify this fix, a PR ([add set_owner to feature yang](#9075)) that fix another bug in SONiC should be merged to master.
@dgsudharsan
Copy link
Collaborator

@arlakshm Can you please sync to the latest to check if pipeline passes? I see pipeline passing in other few other PRs in sonic-buildimage

@zhangyanzhao
Copy link
Collaborator

build failure need be fixed.

@zhangyanzhao
Copy link
Collaborator

@qiluo-msft will review and merge once build check passed

@dgsudharsan dgsudharsan added the Request for 202111 Branch For PRs being requested for 202111 branch label Dec 10, 2021
@qiluo-msft qiluo-msft merged commit 327ad41 into sonic-net:master Dec 10, 2021
qiluo-msft pushed a commit that referenced this pull request Dec 10, 2021
…#9418)

Fixes #9326

#### Why I did it
When we try execute DPB from CLI we have error:
`libyang[0]: Invalid value "False" in "has_global_scope" element. (path: /sonic-feature:sonic-feature/FEATURE/FEATURE_LIST[name='bgp']/has_global_scope)`
The reason for this issue is that has_global_scope and other have been stored in redis database with value False or True form capital letter:
```
   "FEATURE":{
      "bgp":{
         "auto_restart":"enabled",
         "has_global_scope":"False",
         "has_per_asic_scope":"True",
         "has_timer":"False",
         "high_mem_alert":"disabled",
         "state":"enabled"
      }
```
But yang model support boolean just in lowercase letters (https://datatracker.ietf.org/doc/html/rfc6020#section-9.5.1).
#### How I did it
Added boolean to sonic-types as typedef with different literal cases.

#### How to verify it
Run the command config interface breakout <breakout_mode>

**NOTE:**
To verify this fix, the following PRs that fix other problems in SONiC must be merged into master:
1) /pull/9075
2) /pull/9276
judyjoseph pushed a commit that referenced this pull request Dec 27, 2021
#### Why I did it
DPB falls due to missing POLL_INTERVAL in sonic-flex_counter yang model.

#### How I did it
Added POLL_INTERVAL leaf to ACL container in sonic-flex_counter yang model.

#### How to verify it
Run the command config interface breakout <interface> <breakout_mode>

**NOTE:**
To verify this fix, a PR ([add set_owner to feature yang](#9075)) that fix another bug in SONiC should be merged to master.
judyjoseph pushed a commit that referenced this pull request Dec 27, 2021
#### Why I did it
Add the configuration for the set_owner in the `feature` yang model

#### How I did it
Add new leaf `set_pwner` to the `feature` yang model

#### How to verify it
compile `sonic_yang_mgmt-1.0-py3-none-any.whl`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Included in 202111 Branch Request for 202111 Branch For PRs being requested for 202111 branch YANG YANG model related changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DPB] Unable to breakout a port on Mellanox SN2700