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 default values #94

Closed
wants to merge 1,431 commits into from
Closed

Conversation

praveen-li
Copy link
Collaborator

- What I did
[yang-models]: Default value for leaf-lists and tests.

Changes:
-- Add Default value for leaf-lists in ACL and portchannel.
-- Remove members in VLAN.
-- Test modifications.

- How I did it
Used default statement of YANG RFC 7950.

- How to verify it

Build Time Tests

- Description for the changelog

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

judyjoseph and others added 30 commits September 26, 2020 12:14
…to SNMP agent in host. (sonic-net#5420)

* [Multi-Asic] Forward SNMP requests destined to loopback IP, and coming in through the front panel interface
             present in the network namespace, to SNMP agent running in the linux host.

* Updates based on comments

* Further updates in docker_image_ctl.j2 and caclmgrd

* Change the variable for net config file.

* Updated the comments in the code.

* No need to clean up the exising NAT rules if present, which could be created by some other process.

* Delete our rule first and add it back, to take care of caclmgrd restart.
Another benefit is that we delete only our rules, rather than earlier approach of "iptables -F" which cleans up all rules.

* Keeping the original logic to clean the NAT entries, to revist when NAT feature added in namespace.

* Missing updates to log_info call.
implements a new feature: "BGP Allow list."

This feature allows us to control which IP prefixes are going to be advertised via ebgp from the routes received from EBGP neighbors.
There is a syntax error (self is missing for log_info and log_warning) in signal_handler in daemon_base.py, which causes an exception
Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <[email protected]>
CONiC config gen requires jinja2<3.0.0 for stretch and byangbind
versions 0.60.0/0.80.1 for Python 2/3 respectively. byangbind
is installed in the build docker because when it installed it
pulls enum34 as dependent package which is not required for
Python 3 and it breaks the build.

signed-off-by: Tamer Ahmed <[email protected]>
Natural sorting of SONiC config gen output consumes lot of CPU cycles.
The sole use of natsorted was to make test comparison easier and so,
the natsorting logic is now relocated to the test suite. As a result
sonic-cfggen gained nearly 1 sec per call since we no longer import
natsorted module!

singed-off-by: Tamer Ahmed <[email protected]>
Jinja2 templates rendered using Python 3 interpreter, are required
to conform with Python 3 new semantics.

singed-off-by: Tamer Ahmed <[email protected]>
Rendering templates show different orders when rendered using Python
2 vs Python 3. This PR prepare for Python 3 packaging by creating
new dir 'py2' for Python 2 rendered test cases.

singed-off-by: Tamer Ahmed <[email protected]>
This builds Python 2&3 wheel packages for sonic-cfggen script.

singed-off-by: Tamer Ahmed <[email protected]>
Avoiding recursive update of maps as it consumes stack frames. This
PR introduces iterative version of deep_update method.

signed-off-by: Tamer Ahmed <[email protected]>
…5506)

**- Why I did it**
BGP_MONITORS sessions don't have corresponding DEVICE_NEIGHBOR_METADATA CONFIG_DB entries in the minigraphs. Prevent bgpcfgd to wait on such entries for BGP_MONITORS sessions.

**- How I did it**
Set constructor argument to False that means - don't wait for device neighbors metadata info for BGP_MONITORS

**- How to verify it**
Build an image, write on your device, use a minigraph with BGP_MONITORS sessions. Check that sessions are populated in the config.
…uter) (sonic-net#5510)

* Fix generate_l2_config: don't override hostname because sonic-cfggen may not read from Redis. Fix test_l2switch_template test case to test preset l2 feature.
* Improve test script: compare json files with sort_keys
* Revert changes on sample_output
* Remove members field in VLAN section. Fix test assertTrue statement.
…net#5527)

* Add pcie.yaml configuration for Gardena
* Add pcie.yaml configuration for Upperlake
* Add pcie.yaml configuration for Clearlake
* Add pcie.yaml configuration for Lodoga
be51ebc Add IPv6 key item support to request parser (sonic-net#1449)
76e2251 When teamd feature state is disabled the Netdevice created by teamd were (sonic-net#1450)
6aa97ce Use .clear() after std::move() (sonic-net#1444)
d5757db Add libzmq to README dependencies (sonic-net#1447)
c7b262e Add libzmq to Makefiles (sonic-net#1443)
0b2e59a [drop counters] Clarify log messages for initial counter setup (sonic-net#1445)
003cf24 [dvs] Refactor and add buffer pool wm test (sonic-net#1446)
2f5d2d9 [acl] Remove Ethertype from L3V6 qualifiers (sonic-net#1433)
f7b974f Fix issue: bufferorch only pass the first attribute to sai when setting attribute (sonic-net#1442)

Signed-off-by: Abhishek Dosi <[email protected]>
This patch set updates the documentation for
QFX5200 & QFX5210 Juniper switching platforms.

Signed-off-by: Ciju Rajan K <[email protected]>
…m platform (sonic-net#5483)

Some platforms don't leverage the brcm led coprocessor.
However ledinit will try to load a non existing file and exit with an
error code.
This change is a cosmetic fix mostly.

- How to verify it

Boot a platform without the configuration and verify in the syslog that the exit status of ledinit is 0
Boot a platform with the configuration and verify in the syslog that the exit status of ledinit is 0 and the leds are working.
Verified by adding a dumb led_proc_init.soc on an Arista platform which usually doesn't use it.
… reload (sonic-net#5518)

Cleanup FG_ROUTE state db table during reload
implements a new feature: "BGP Allow list."

This feature allows us to control which IP prefixes are going to be advertised via ebgp from the routes received from EBGP neighbors.
…onic-net#5473)

The manufacture date returned from platform API was truncated, time is not included. Revise the regular expression used for matching.
…ic-net#5388)

Update dynamic minimum fan speed table according to data provided by thermal team.
Added barefoot platform api 2.0 support

Signed-off-by: Volodymyr Boyko <[email protected]>
…ic (sonic-net#5528)

To address issue sonic-net#5525

Explicitly control the grub installation requirement when it is needed.
We have scenario where configuration migration happened but grub
installation is not required.

Signed-off-by: Ying Xie <[email protected]>
yxieca and others added 25 commits November 17, 2020 19:01
…-net#5950)

Need A mmu configuration to get the device going without generating lots of warnings.

Similar to dummy MMU configuration for Arista-7050CX3-32S-C32, this configuration will need to be updated with correct numbers. This MMU configuration is copied from 7060 comparable hwsku.

Signed-off-by: Ying Xie <[email protected]>
Commits include:

* src/sonic-platform-common e4883e5...5db8c84 (1):
  > [sonic-platform-common] Fix name error and import error  (sonic-net#143)
sonic-net#4442)

Changes:
1.) yang models for device_metadata, device_neighbor, flex_counters, crm, versions.
2.) Test cases for above yang models.
Signed-off-by: Praveen Chaudhary [email protected]:
* [enable counters] provide initial rates parameters

Signed-off-by: Mykola Faryma <[email protected]>

* add descriptive comment

Signed-off-by: Mykola Faryma <[email protected]>

Co-authored-by: Volodymyr Samotiy <[email protected]>
This release includes changes for supporting Debian Buster, fixes for internally found issues and more enhancement related to spec coverage and feature parity for Broadcom ASICs.

Additional fixes included:

CS00011465498 - Warm reboot
CS00011465061 - interfaces not coming up
CS00011396506 - nexthop resource leak
CS00011452080 - BCM SAI crash while getting lane count
Platform: armhf-nokia_ixs7215_52x-r0
HwSKU: Nokia-7215
ASIC: marvell
Port Config: 48x1G + 4x10G

Co-authored-by: dflynn <[email protected]>
Co-authored-by: Carl Keene <[email protected]>
* Add explicit default state into the constants.yml
* Enable/disable only peer-groups, available in the config
* Retrieve updates from frr before using configuration

Co-authored-by: Pavel Shirshov <[email protected]>
Update the sonic-swss-common submodule. The following are the commits in the submodule.
```
95f9e11 2020-11-19 | [pyext] allow to catch exceptions raised in python (sonic-net#415) [Stepan Blyshchak]
5a718f9 2020-11-18 | [swig] translate C++ `del` to python `delete` (sonic-net#416) [Qi Luo]
40b255b 2020-11-12 | Fix: SWIG dict.get() should have optional default value parameter (sonic-net#413) [Qi Luo]
91e484d 2020-11-07 | Reduce notice logging (sonic-net#412) [Qi Luo]
f5945ae 2020-11-05 | Mux Cable schema definitions for interaction between linkmanager and xcvrd (sonic-net#411) [vdahiya12]
602f9c2 2020-11-05 | [lua] load lua script on demand (sonic-net#409) [Dong Zhang]
d88412b 2020-11-04 | Rename hdel to del when using multiple keys as param (sonic-net#410) [Kamil Cudnik]
e0c229a 2020-11-04 | CHASSIS_STATE_DB on control-card for chassis state (sonic-net#395) [mprabhu-nokia]
a4e3ac8 2020-11-04 | Chassisd config table to store admin state (sonic-net#388) [mprabhu-nokia]
```
…-net#5753)

We are facing some compilation issue while compiling mgmt framework for arm.
So, disabling Mgmt framework for marvell-armhf. We will enable it after fixing the compilation issues

Signed-off-by: Sabareesh Kumar Anandan <[email protected]>
* src/sonic-platform-daemons be21d91...b90ddda (1):
  > [thermalctld] [psud] [chassisd] Fix crash with undefined environment variable (sonic-net#120)
Update the sonic-swss submodule. The following are the commits in the submodule.

[dvs] Re-add runcmd_async command
5ba548c

[dvs] Re-add copy_file method to DVS
86e1171

Add a check for warm-restart, and do a clear only when warm-restart is enable.
fcb6c9d

[Routeorch] Fix next hop group reference count in bulk operation
7a92100

[orchagent][port] In case of successful port creation set log level to INFO
fea7ade

Copp Manager Changes
7b76d2e

[orchagent] Arm 32-bit arch compilation warning Fixes
bed7970

Revert: swss: flush g_asicState after each event is done sonic-net#570
b9084a7

[dvs] Clean-up conftest.py
d6e15e9
…sion in Buster container (sonic-net#5546)

**- Why I did it**

We were building a custom version of Supervisor because I had added patches to prevent hangs and crashes if the system clock ever rolled backward. Those changes were merged into the upstream Supervisor repo as of version 3.4.0 (http://supervisord.org/changes.html#id9), therefore, we should be able to simply install the vanilla package via pip. This will also allow us to easily move to Python 3, as Python 3 support was added in version 4.0.0.

**- How I did it**

- Remove Makefiles and patches for building supervisor package from source
- Install Python 3 supervisor package version 4.2.1 in Buster base container
    - Also install Python 3 version of supervisord-dependent-startup in Buster base container
- Debian package installed binary in `/usr/bin/`, but pip package installs in `/usr/local/bin/`, so rather than update all absolute paths, I changed all references to simply call `supervisord` and let the system PATH find the executable to prevent future need for changes just in case we ever need to switch back to build a Debian package, then we won't need to modify these again.
- Install Python 2 supervisor package >= 3.4.0 in Stretch and Jessie base containers
…t#5346)

- Why I did it
There is a issue for counters after warm-reboot:
If I clear counters by command "sonic-clear counters", then execute 'warm-reboot' and whenSONiC is restart, the counters showed with command "show interface counters" is still old counters before "sonic-clear". It is not the right counters because the counters file in '/tmp' is lost in warm-reboot process.

- How I did it
I fixed it by saving '/tmp/portstat-0' folders in '/host/' before executing 'warm-reboot' (in pull request sonic-net/sonic-utilities#1099 ), and restore the counters folders back to '/tmp/' after warm-reboot process is finished.

- How to verify it

Clear counters by command 'sonic-clear'
sonic-clear counters
sonic-clear dropcounters
sonic-clear pfccounters
sonic-clear queuecounters
sonic-clear rifcounters
Execute 'warm-reboot'
Use command ‘show interface counters’ to see if the counters is right.
Fix 259 alerts reported by the LGTM tool:

- 245 for Unused import
- 7 for Testing equality to None
- 5 for Duplicate key in dict literal
- 1 for Module is imported more than once
- 1 for Unused local variable
- Fix test_updater_thermal_check_min_max()
sonic-net/sonic-platform-daemons@f6e5e59

- [sonic-platform-daemons] Add more physical entity information to DB for physical entity mib
sonic-net/sonic-platform-daemons@14e586d

Signed-off-by: Petro Bratash <[email protected]>
…onic-net#5951)

* If a device has subtype = 'DualToR', then enable proxy ARP and gratuitous ARP.
- Why I did it
frr is creating /var/log/frr/frr.log inside the frr docker and letting it grow. It will eventually exhaust hard drive space.

To fixe issue sonic-net#5965

- How I did it
Remove rsyslog file outchannel so that frr won't generate /var/log/frr/frr.log inside the docker.

- How to verify it
Manually removed the outchannel and restart BGP docker, making sure that /var/log/frr/frr.log is no longer created inside the docker.

While restarting bgp docker, observed that base image /var/log/quagga/bgpd.log continued to grow and captured all FRR logs.
- Why I did it
Add reboot history to State db so that can be used telemetry service
- How I did it
Split the process-reboot-cause service to determine-reboot-cause and process-reboot-cause
determine-reboot-cause to determine the reboot cause
process-reboot-cause to parse the reboot cause files and put the reboot history to state db
Moved to sonic-host-service* packages
- How to verify it
Performed unit test and tested on DUT
- Why I did it
The l2switch.j2 template does not include all fields for PORT. This could be incompatible with the 201911 image or later.

- How I did it
Update l2switch.j2 template and add a unit test.
use abspath makes the entrypoint not affected by PATH env.

Signed-off-by: Guohan Lu <[email protected]>
Included submodule commits:
    f143b7f 2020-11-22 | [swig] wrap logger.h (sonic-net#418) [Qi Luo]
*Introduce CoPP Manager infrastructure
Copp service to generate initial copp config template file

Co-authored-by: dgsudharsan <[email protected]>
Changes:
-- Add Default value for leaf-lists in ACL and portchannel.
-- Remove members in VLAN.
-- Test modifications.

Signed-off-by: Praveen Chaudhary<[email protected]>
@praveen-li praveen-li closed this Nov 24, 2020
zhenggen-xu pushed a commit that referenced this pull request Dec 15, 2020
…te submodules (sonic-net#4852)

* src/sonic-platform-common 75698a8...82bbeab (9):
  > [sfputil] Make SfpUtilHelper.get_physical_to_logical noexcept as in SfpUtilBase (sonic-net#96)
  > [sfp_base] Update return value documentation of channel-specific methods (sonic-net#98)
  > [sfp] Tweak key names of some transceiver info fields (sonic-net#97)
  > fix typo:  portconfig.ini to port_config.ini (#94)
  > [chassis_base] Add platform API support for system LED (#91)
  > Add PCIe check commad  (#64)
  > [sfputilbase.py] Don't try to print EEPROM sysfs file name if we failed to read from it (#81)                                                                                    
  > [sfputilbase | sfputilhelper] Add support of platform.json (#72)
  > [eeprom] Add try-except to catch the IOError (#85)

* src/sonic-platform-daemons 0f4fd83...abe115e (2):
  > [xcvrd] Tweak some transceiver info key names (#62)
  > [psud][thermalctld] Always get fan/PSU LED status from platform API to avoid status inconsistencies (#59)                                                                        

* src/sonic-utilities fd7781b...16a33f2 (9):
  > [config] Fix syntax error (sonic-net#966)
  > [config] Fix indentation level in _get_disabled_services_list() (sonic-net#965)
  > a4e64d1 [sonic_installer] Refactor sonic_installer code (sonic-net#953)
  > 90efd62 [Show | Command Reference] Add Port breakout Show Command (sonic-net#859)
  > [sfpshow][mock_state_db] Tweak key names of some transceiver info fields (sonic-net#958)
  > [show] Add missing verbose option to "show line" (sonic-net#961)
  > [filter-fdb] Check VLAN Presence When Filter FDB (sonic-net#957)
  > [master]fix sonic-net#4716 show ipv6 interfaces neighbor_ip is N/A issue (sonic-net#948)
  > Fix for command. show interface transceiver eeprom -d Ethernet (sonic-net#955)

Note: sonic-utilities update fixes sonic-net#4716
zhenggen-xu pushed a commit that referenced this pull request Dec 15, 2020
…c-utilities] Update submodules (sonic-net#5435)

Update Python-based submodules to include updated dependencies in setup.py files.

* src/sonic-platform-common 14c6e53...7255d3a (2):
  > [setup.py] Update dependenices (sonic-net#120)
  > [sfputilbase|sfputilhelper] fix value unpack error due to port_alias_asic_map in portconfig.py file (sonic-net#116)

* src/sonic-platform-daemons e1842b2...1aaffcc (2):
  > Add 'wheel' package to 'setup_requires' list (#95)
  > [thermalctld] Fix issue: thermalctld should be auto restarted when being killed (#94)

* src/sonic-snmpagent 1a2b62a...5957460 (1):
  > [setup.py] Add 'wheel' to 'setup_requires' (sonic-net#160)

* src/sonic-utilities 2244d7b...2f79ac1 (4):
  > [show] Add missing import to fix `show ip interfaces` (sonic-net#1126)
  > Fixed config load_minigrpah not working for Multi-asic platfroms. (sonic-net#1123)
  > Add CLI for configuring synchronous mode (sonic-net#1094)
  > [setup.py] Update dependencies (sonic-net#1125)
zhenggen-xu pushed a commit that referenced this pull request Dec 15, 2020
…heel (sonic-net#5926)

Submodule updates include the following commits:

* src/sonic-utilities 9dc58ea...f9eb739 (18):
  > Remove unnecessary calls to str.encode() now that the package is Python 3; Fix deprecation warning (sonic-net#1260)
  > [generate_dump] Ignoring file/directory not found Errors (sonic-net#1201)
  > Fixed porstat rate and util issues (sonic-net#1140)
  > fix error: interface counters is mismatch after warm-reboot (sonic-net#1099)
  > Remove unnecessary calls to str.decode() now that the package is Python 3 (sonic-net#1255)
  > [acl-loader] Make list sorting compliant with Python 3 (sonic-net#1257)
  > Replace hard-coded fast-reboot with variable. And some typo corrections (sonic-net#1254)
  > [configlet][portconfig] Remove calls to dict.has_key() which is not available in Python 3 (sonic-net#1247)
  > Remove unnecessary conversions to list() and calls to dict.keys() (sonic-net#1243)
  > Clean up LGTM alerts (sonic-net#1239)
  > Add 'requests' as install dependency in setup.py (sonic-net#1240)
  > Convert to Python 3 (sonic-net#1128)
  > Fix mock SonicV2Connector in python3: use decode_responses mode so caller code will be the same as python2 (sonic-net#1238)
  > [tests] Do not trim from PATH if we did not append to it; Clean up/fix shebangs in scripts (sonic-net#1233)
  > Updates to bgp config and show commands with BGP_INTERNAL_NEIGHBOR table (sonic-net#1224)
  > [cli]: NAT show commands newline issue after migrated to Python3 (sonic-net#1204)
  > [doc]: Update Command-Reference.md (sonic-net#1231)
  > Added 'import sys' in feature.py file (sonic-net#1232)

* src/sonic-py-swsssdk 9d9f0c6...1664be9 (2):
  > Fix: no need to decode() after redis client scan, so it will work for both python2 and python3 (sonic-net#96)
  > FieldValueMap `contains`(`in`)  will also work when migrated to libswsscommon(C++ with SWIG wrapper) (#94)

- Also fix Python 3-related issues:
    - Use integer (floor) division in config_samples.py (sonic-config-engine)
    - Replace print statement with print function in eeprom.py plugin for x86_64-kvm_x86_64-r0 platform
    - Update all platform plugins to be compatible with both Python 2 and Python 3
    - Remove shebangs from plugins files which are not intended to be executable
    - Replace tabs with spaces in Python plugin files and fix alignment, because Python 3 is more strict
    - Remove trailing whitespace from plugins files
praveen-li pushed a commit to praveen-li/sonic-buildimage that referenced this pull request Aug 9, 2022
e56e9b4 Fix CVE-2021-3121 warning (sonic-net#96)
bf1be4f [ci]: Support code diff coverage threshold 50% (zhenggen-xu#94)
64e516c Ported Marvell armhf build on x86 for debian buster to use cross-compilation instead of qemu emulation (zhenggen-xu#80)
e426388 [ci]: Support azp code coverage (zhenggen-xu#87)
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.