Skip to content

Commit

Permalink
Merge branch 'master' into mclag_enhacements
Browse files Browse the repository at this point in the history
  • Loading branch information
gitsabari authored Mar 2, 2021
2 parents 325b50b + 8b3bc18 commit 004017c
Show file tree
Hide file tree
Showing 306 changed files with 189,719 additions and 2,349 deletions.
2 changes: 2 additions & 0 deletions .artifactignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/*
!dist/*.whl
29 changes: 29 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[run]
branch = True
source =
acl_loader
clear
config
connect
consutil
counterpoll
crm
debug
fdbutil
fwutil
pcieutil
pddf_fanutil
pddf_ledutil
pddf_psuutil
pddf_thermalutil
pfc
pfcwd
psuutil
scripts
sfputil
show
sonic_installer
ssdutil
undebug
utilities_common
watchdogutil
60 changes: 0 additions & 60 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

32 changes: 0 additions & 32 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

60 changes: 60 additions & 0 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<!--
If you are reporting a new issue, make sure that we do not have any duplicates
already open. You can ensure this by searching the issue list for this
repository. If there is a duplicate, please close your issue and add a comment
to the existing issue instead.
If you suspect your issue is a bug, please edit your issue description to
include the BUG REPORT INFORMATION shown below. If you fail to provide this
information within 7 days, we cannot debug your issue and will close it. We
will, however, reopen it if you later provide the information.
For more information about reporting issues, see
https://github.com/Azure/SONiC/wiki#report-issues
---------------------------------------------------
GENERAL SUPPORT INFORMATION
---------------------------------------------------
The GitHub issue tracker is for bug reports and feature requests.
General support can be found at the following locations:
- SONiC Support Forums - https://groups.google.com/forum/#!forum/sonicproject
---------------------------------------------------
BUG REPORT INFORMATION
---------------------------------------------------
Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST
-->

#### Description

<!--
Briefly describe the problem you are having in a few paragraphs.
-->

## Steps to reproduce the issue
1.
2.
3.

#### Describe the results you received


#### Describe the results you expected


#### Additional information you deem important (e.g. issue happens only occasionally)


#### Output of `show version`

```
(paste your output here)
```

<!--
Also attach debug file produced by `sudo generate_dump`
-->

32 changes: 32 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!--
Please make sure you've read and understood our contributing guidelines:
https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md
** Make sure all your commits include a signature generated with `git commit -s` **
If this is a bug fix, make sure your description includes "closes #xxxx",
"fixes #xxxx" or "resolves #xxxx" so that GitHub automatically closes the related
issue when the PR is merged.
If you are adding/modifying/removing any command or utility script, please also
make sure to add/modify/remove any unit tests from the tests
directory as appropriate.
If you are modifying or removing an existing 'show', 'config' or 'sonic-clear'
subcommand, or you are adding a new subcommand, please make sure you also
update the Command Line Reference Guide (doc/Command-Reference.md) to reflect
your changes.
Please provide the following information:
-->

#### What I did

#### How I did it

#### How to verify it

#### Previous command output (if the output of a command-line utility has changed)

#### New command output (if the output of a command-line utility has changed)

14 changes: 9 additions & 5 deletions acl_loader/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
import tabulate
import pyangbind.lib.pybindJSON as pybindJSON
from natsort import natsorted
from sonic_py_common import device_info
from swsssdk import ConfigDBConnector, SonicDBConfig
from swsscommon.swsscommon import SonicV2Connector
from sonic_py_common import device_info, multi_asic
from swsscommon.swsscommon import SonicV2Connector, ConfigDBConnector, SonicDBConfig


def info(msg):
Expand Down Expand Up @@ -115,8 +114,13 @@ def __init__(self):
self.tables_db_info = {}
self.rules_db_info = {}
self.rules_info = {}
# Load global db config. This call is no-op in single npu platforms
SonicDBConfig.load_sonic_global_db_config()

if multi_asic.is_multi_asic():
# Load global db config
SonicDBConfig.load_sonic_global_db_config()
else:
SonicDBConfig.initialize()

self.sessions_db_info = {}
self.configdb = ConfigDBConnector()
self.configdb.connect()
Expand Down
78 changes: 78 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml

trigger:
- master

pool:
vmImage: ubuntu-20.04

container:
image: sonicdev-microsoft.azurecr.io:443/sonic-slave-buster:latest

steps:
- task: DownloadPipelineArtifact@2
inputs:
source: specific
project: build
pipeline: 1
artifact: sonic-buildimage.vs
runVersion: 'latestFromBranch'
runBranch: 'refs/heads/master'
displayName: "Download artifacts from latest sonic-buildimage build"

- script: |
set -xe
sudo dpkg -i libnl-3-200_*.deb
sudo dpkg -i libnl-genl-3-200_*.deb
sudo dpkg -i libnl-route-3-200_*.deb
sudo dpkg -i libnl-nf-3-200_*.deb
sudo dpkg -i libhiredis0.14_*.deb
sudo dpkg -i libswsscommon_1.0.0_amd64.deb
sudo dpkg -i python3-swsscommon_1.0.0_amd64.deb
sudo dpkg -i libyang_1.0.73_amd64.deb
sudo dpkg -i libyang-cpp_1.0.73_amd64.deb
sudo dpkg -i python3-yang_1.0.73_amd64.deb
workingDirectory: $(Pipeline.Workspace)/target/debs/buster/
displayName: 'Install Debian dependencies'

- script: |
set -xe
sudo pip3 install swsssdk-2.0.1-py3-none-any.whl
sudo pip3 install sonic_py_common-1.0-py3-none-any.whl
sudo pip3 install sonic_config_engine-1.0-py3-none-any.whl
sudo pip3 install sonic_platform_common-1.0-py3-none-any.whl
sudo pip3 install sonic_yang_mgmt-1.0-py3-none-any.whl
sudo pip3 install sonic_yang_models-1.0-py3-none-any.whl
workingDirectory: $(Pipeline.Workspace)/target/python-wheels/
displayName: 'Install Python dependencies'

- script: |
python3 setup.py test
displayName: 'Test Python 3'

- task: PublishTestResults@2
inputs:
testResultsFiles: '$(System.DefaultWorkingDirectory)/test-results.xml'
testRunTitle: Python 3
failTaskOnFailedTests: true
condition: succeededOrFailed()
displayName: 'Publish Python 3 test results'

- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/htmlcov/'
displayName: 'Publish Python 3 test coverage'

- script: |
set -e
python3 setup.py bdist_wheel
displayName: 'Build Python 3 wheel'

- publish: '$(System.DefaultWorkingDirectory)/dist/'
artifact: wheels
displayName: "Publish Python wheels"
3 changes: 1 addition & 2 deletions clear/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ def get_routing_stack():
proc = subprocess.Popen(command,
stdout=subprocess.PIPE,
shell=True,
text=True,
stderr=subprocess.STDOUT)
text=True)
stdout = proc.communicate()[0]
proc.wait()
result = stdout.rstrip('\n')
Expand Down
2 changes: 1 addition & 1 deletion config/aaa.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import click
from swsssdk import ConfigDBConnector
from swsscommon.swsscommon import ConfigDBConnector
import utilities_common.cli as clicommon

def add_table_kv(table, entry, key, val):
Expand Down
Loading

0 comments on commit 004017c

Please sign in to comment.