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-head.yang]: Libyang sweep host bits from inet:ip-prefix, fixin… #56

Merged

Conversation

praveen-li
Copy link
Collaborator

@praveen-li praveen-li commented Feb 28, 2020

…g that problem.

Changed inet:ip-prefix to custom ip-prefix.
Changed test case accordingly.

- What I did
Libyang sweep host bits from inet:ip-prefix, fixing that problem.

- How I did it
Changed inet:ip-prefix to custom ip-prefix.
Changed test case accordingly.
- How to verify it

Build the package and also wrote custom test case to print config diff.

pchaudha@e8879b00ab3e:/sonic/src/sonic-yang-mgmt/tests/yang-model-tests/custom_code$ python pc_yang.py
Loaded below Yang Models
['sonic-vlan', 'sonic-head', 'sonic-portchannel', 'sonic-acl', 'sonic-loopback-interface', 'sonic-port', 'sonic-interface']
{u'INTERFACE': {insert: {'Ethernet112|2a04:5555:40:a709::/126': {u'scope': 'global', u'family': 'IPv6'}, 'Ethernet14|10.184.229.210/31': {u'scope': 'global', u'family': 'IPv4'}, 'Ethernet16|10.184.230.210/31': {u'scope': 'global', u'family': 'IPv4'}, 'Ethernet14|2a04:5555:40:a749::/126': {u'scope': 'global', u'family': 'IPv6'}, 'Ethernet18|10.184.231.210/31': {u'scope': 'global', u'family': 'IPv4'}, 'Ethernet16|2a04:5555:40:a789::/126': {u'scope': 'global', u'family': 'IPv6'}, 'Ethernet112|10.184.228.210/31': {u'scope': 'global', u'family': 'IPv4'}, 'Ethernet18|2a04:5555:40:a7c9::/126': {u'scope': 'global', u'family': 'IPv6'}}, delete: {u'Ethernet16|10.184.230.211/31': {u'scope': u'global', u'family': u'IPv4'}, u'Ethernet112|10.184.228.211/31': {u'scope': u'global', u'family': u'IPv4'}, u'Ethernet112|2a04:5555:40:a709::2/126': {u'scope': u'global', u'family': u'IPv6'}, u'Ethernet18|2a04:5555:40:a7c9::2/126': {u'scope': u'global', u'family': u'IPv6'}, u'Ethernet14|2a04:5555:40:a749::2/126': {u'scope': u'global', u'family': u'IPv6'}, u'Ethernet16|2a04:5555:40:a789::2/126': {u'scope': u'global', u'family': u'IPv6'}, u'Ethernet14|10.184.229.211/31': {u'scope': u'global', u'family': u'IPv4'}, u'Ethernet18|10.184.231.211/31': {u'scope': u'global', u'family': u'IPv4'}}}, u'VLAN_INTERFACE': {insert: {'Vlan100|2a04:5555:45:6709::/64': {u'scope': 'global', u'family': 'IPv6'}, 'Vlan777|fe80::/10': {u'scope': 'local', u'family': 'IPv6'}, 'Vlan777|2a04:5555:41:4e9::/64': {u'scope': 'global', u'family': 'IPv6'}, 'Vlan777|10.111.58.64/26': {u'scope': 'global', u'family': 'IPv4'}, 'Vlan100|fe80::/10': {u'scope': 'local', u'family': 'IPv6'}, 'Vlan100|10.222.10.64/26': {u'scope': 'global', u'family': 'IPv4'}}, delete: {u'Vlan777|fe80::1/10': {u'scope': u'local', u'family': u'IPv6'}, u'Vlan100|2a04:5555:45:6709::1/64': {u'scope': u'global', u'family': u'IPv6'}, u'Vlan777|10.111.58.65/26': {u'scope': u'global', u'family': u'IPv4'}, u'Vlan777|2a04:5555:41:4e9::1/64': {u'scope': u'global', u'family': u'IPv6'}, u'Vlan100|10.222.10.65/26': {u'scope': u'global', u'family': u'IPv4'}, u'Vlan100|fe80::1/10': {u'scope': u'local', u'family': u'IPv6'}}}}
Xlate and Rev Xlate Passed



pchaudha@e8879b00ab3e:/sonic/src/sonic-yang-mgmt/tests/yang-model-tests/custom_code$ python pc_yang.py
Loaded below Yang Models
['sonic-vlan', 'sonic-head', 'sonic-portchannel', 'sonic-acl', 'sonic-loopback-interface', 'sonic-port', 'sonic-interface']
Xlate and Rev Xlate Passed
pchaudha@e8879b00ab3e:/sonic$ make -f slave.mk target/python-wheels/sonic_yang_mgmt-1.0-py2-none-any.whl
SONiC Build System

Build Configuration
"CONFIGURED_PLATFORM"             : "broadcom"
"CONFIGURED_ARCH"                 : "amd64"
"SONIC_CONFIG_PRINT_DEPENDENCIES" : ""
"SONIC_BUILD_JOBS"                : "1"
"SONIC_CONFIG_MAKE_JOBS"          : "24"
"SONIC_USE_DOCKER_BUILDKIT"       : ""
"USERNAME"                        : "admin"
"PASSWORD"                        : "YourPaSsWoRd"
"ENABLE_DHCP_GRAPH_SERVICE"       : ""
"SHUTDOWN_BGP_ON_START"           : ""
"ENABLE_PFCWD_ON_START"           : ""
"INSTALL_DEBUG_TOOLS"             : ""
"ROUTING_STACK"                   : "frr"
"FRR_USER_UID"                    : "300"
"FRR_USER_GID"                    : "300"
"ENABLE_SYNCD_RPC"                : ""
"ENABLE_ORGANIZATION_EXTENSIONS"  : "y"
"HTTP_PROXY"                      : ""
"HTTPS_PROXY"                     : ""
"ENABLE_SYSTEM_TELEMETRY"         : "y"
"ENABLE_RESTAPI"                  : "n"
"ENABLE_ZTP"                      : ""
"SONIC_DEBUGGING_ON"              : ""
"SONIC_PROFILING_ON"              : ""
"KERNEL_PROCURE_METHOD"           : "build"
"BUILD_TIMESTAMP"                 : ""
"BLDENV"                          : ""
"VS_PREPARE_MEM"                  : "yes"
"ENABLE_SFLOW"                    : "y"

pchaudha@e8879b00ab3e:/sonic$

Testing for Commit 2:

Build Configuration
"CONFIGURED_PLATFORM"             : "broadcom"
"CONFIGURED_ARCH"                 : "amd64"
"SONIC_CONFIG_PRINT_DEPENDENCIES" : ""
"SONIC_BUILD_JOBS"                : "1"
"SONIC_CONFIG_MAKE_JOBS"          : "24"
"SONIC_USE_DOCKER_BUILDKIT"       : ""
"USERNAME"                        : "admin"
"PASSWORD"                        : "YourPaSsWoRd"
"ENABLE_DHCP_GRAPH_SERVICE"       : ""
"SHUTDOWN_BGP_ON_START"           : ""
"ENABLE_PFCWD_ON_START"           : ""
"INSTALL_DEBUG_TOOLS"             : ""
"ROUTING_STACK"                   : "frr"
"FRR_USER_UID"                    : "300"
"FRR_USER_GID"                    : "300"
"ENABLE_SYNCD_RPC"                : ""
"ENABLE_ORGANIZATION_EXTENSIONS"  : "y"
"HTTP_PROXY"                      : ""
"HTTPS_PROXY"                     : ""
"ENABLE_SYSTEM_TELEMETRY"         : "y"
"ENABLE_RESTAPI"                  : "n"
"ENABLE_ZTP"                      : ""
"SONIC_DEBUGGING_ON"              : ""
"SONIC_PROFILING_ON"              : ""
"KERNEL_PROCURE_METHOD"           : "build"
"BUILD_TIMESTAMP"                 : ""
"BLDENV"                          : ""
"VS_PREPARE_MEM"                  : "yes"
"ENABLE_SFLOW"                    : "y"

pchaudha@e8879b00ab3e:/sonic$

pchaudha@e8879b00ab3e:/sonic$ date
Wed Mar  4 07:53:38 UTC 2020


pchaudha@e8879b00ab3e:/sonic$ pip install target/python-wheels/sonic_yang_mgmt-1.0-py2-none-any.whl
Processing ./target/python-wheels/sonic_yang_mgmt-1.0-py2-none-any.whl
Installing collected packages: sonic-yang-mgmt
Successfully installed sonic-yang-mgmt-1.0
pchaudha@e8879b00ab3e:/sonic$ ls -l /var/pchaudha/.local/yang-models/
total 36
-rw-r--r-- 1 pchaudha gpchaudha 4959 Mar  4 07:52 sonic-acl.yang
-rw-r--r-- 1 pchaudha gpchaudha 2214 Mar  4 07:52 sonic-head.yang
-rw-r--r-- 1 pchaudha gpchaudha 2207 Mar  4 07:52 sonic-interface.yang
-rw-r--r-- 1 pchaudha gpchaudha 1379 Mar  4 07:52 sonic-port.yang
-rw-r--r-- 1 pchaudha gpchaudha 1440 Mar  4 07:52 sonic-portchannel.yang
-rw-r--r-- 1 pchaudha gpchaudha 3682 Mar  4 07:52 sonic-vlan.yang
-rw-r--r-- 1 pchaudha gpchaudha 5391 Mar  4 07:52 sonic_yang_tree

- Description for the changelog

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

…g that problem.

Changed inet:ip-prefix to custom ip-prefix.
Changed test case accordingly.
@zhenggen-xu
Copy link
Owner

Should we do the same for loopback interface too?

@@ -52,22 +52,37 @@ module: sonic-acl
module: sonic-interface
Copy link
Owner

Choose a reason for hiding this comment

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

Is file autogenerated? If so, should we not keep this as part of the code?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This file is generated by Pyang tool. Yes, Cool, we can also generate it as part of build process. Sonic-stretch docker will\should have pyang installed and then while building sonic-yang-models pkg I can run "pyang" tool.

@praveen-li
Copy link
Collaborator Author

Should we do the same for loopback interface too?

Yes, I missed loopback interface, I need to fix it for loopback as well.

Changes done:
1.) Build yang tree while package build.
2.) Add sonic_yang_tree as part of package.
3.) Fix sonic-loopback-interface.yang for ip-prefix problem.
@zhenggen-xu zhenggen-xu merged commit 6eb21f6 into zhenggen-xu:sonic-cfg-mgmt Mar 4, 2020
praveen-li pushed a commit to praveen-li/sonic-buildimage that referenced this pull request Apr 23, 2020
zhenggen-xu pushed a commit that referenced this pull request Aug 31, 2020
[syseepromd] Prevent the syseepromd from termination (#56)
 [thermalctld] Fix invalid warning status (#58)
praveen-li pushed a commit to praveen-li/sonic-buildimage that referenced this pull request Aug 9, 2022
…w components mgmt. (sonic-net#10377)

* Support new platform SN2201 and RJ45 port

Signed-off-by: Kebo Liu <kebol@nvidia.com>

* remove unused import and redundant function

Signed-off-by: Kebo Liu <kebol@nvidia.com>

* fix error introduced by rebase

Signed-off-by: Kebo Liu <kebol@nvidia.com>

* Revert the special handling of RJ45 ports (zhenggen-xu#56)

* Revert the special handling of RJ45 ports

sfp.py
sfp_event.py
chassis.py

Signed-off-by: Stephen Sun <stephens@nvidia.com>

* Remove deadcode

Signed-off-by: Stephen Sun <stephens@nvidia.com>

* Support CPLD update for SN2201

A new class is introduced, deriving from ComponentCPLD and overloading _install_firmware
Change _install_firmware from private (starting with __) to protected, making it overloadable

Signed-off-by: Stephen Sun <stephens@nvidia.com>

* Initialize component BIOS/CPLD

Signed-off-by: Stephen Sun <stephens@nvidia.com>

* Remove swb_amb which doesn't on DVT board any more

Signed-off-by: Stephen Sun <stephens@nvidia.com>

* Remove the unexisted sensor - switch board ambient - from platform.json

Signed-off-by: Stephen Sun <stephens@nvidia.com>

* Do not report error on receiving unknown status on RJ45 ports

Translate it to disconnect for RJ45 ports
Report error for xSFP ports

Signed-off-by: Stephen Sun <stephens@nvidia.com>

* Add reinit for RJ45 to avoid exception

Signed-off-by: Stephen Sun <stephens@nvidia.com>

Co-authored-by: Stephen Sun <5379172+stephenxs@users.noreply.github.com>
Co-authored-by: Stephen Sun <stephens@nvidia.com>
praveen-li pushed a commit to praveen-li/sonic-buildimage that referenced this pull request Aug 9, 2022
3f43852b8 [sonic_operators.cpp]: Increasing select timeout (zhenggen-xu#55)
a1142e251  [sonic_operators.cpp] Update sonic_db_manager::get_counter (zhenggen-xu#56)
1069d2dd4 [sonic_operators.cpp]: Fixbug wait with false positive to return success (zhenggen-xu#54)

Signed-off-by: Ze Gan <ganze718@gmail.com>
praveen-li pushed a commit to praveen-li/sonic-buildimage that referenced this pull request Dec 23, 2022
[sonic-linkmgrd][202012] submodule update

3523738 Jing Zhang      Sun Apr 3 20:54:40 2022 -0700   Reset link prober state when default route is back zhenggen-xu#56
8282e78 Jing Zhang      Fri Apr 15 15:59:34 2022 -0700  Keep incrementing sequence number when link prober is suspended and shutdown zhenggen-xu#55 (zhenggen-xu#65)
8246eb8 Jing Zhang      Thu Apr 14 18:49:36 2022 -0700  Shutdown ICMP heartbeats when default route state is missing and ToR is in auto mode zhenggen-xu#44 (zhenggen-xu#59)

sign-off: Jing Zhang zhangjing@microsoft.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants