Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ libopx_nas_qos_la_LIBADD=-lopx_logging -lopx_nas_ndi -lopx_cps_api_common -lopx_

systemdconfdir=/lib/systemd/system
systemdconf_DATA = scripts/init/*.service

sosdir=/usr/share/sosreport/sos/plugins
sos_DATA=sos/*
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])
AC_INIT([opx-nas-qos], [2.4.0+opx7], [ops-dev@lists.openswitch.net])
AC_INIT([opx-nas-qos], [2.4.0+opx9], [ops-dev@lists.openswitch.net])
AM_INIT_AUTOMAKE([foreign subdir-objects])
AC_CONFIG_SRCDIR([.])
AC_CONFIG_HEADERS([config.h])
Expand Down
12 changes: 12 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
opx-nas-qos (2.4.0+opx9) unstable; urgency=medium

* feat: Add plugin for sosreport

-- Dell EMC <ops-dev@lists.openswitch.net> Wed, 9 Jan 2019 15:45:00 -0800

opx-nas-qos (2.4.0+opx8) unstable; urgency=medium

* feat: Add flag file to prevent QoS initialization

-- Dell EMC <ops-dev@lists.openswitch.net> Wed, 9 Jan 2019 15:27:00 -0800

opx-nas-qos (2.4.0+opx7) unstable; urgency=medium

* Update: Remove duplicated header files from ./inc
Expand Down
1 change: 1 addition & 0 deletions debian/libopx-nas-qos1.install
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
usr/lib/*/lib*.so*
usr/share/sosreport/sos/plugins
1 change: 1 addition & 0 deletions scripts/init/opx-qos-init.service
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
Description=QoS default initialization
After=opx-cps.service opx-nas.service opx-create-interface.service
Requires=opx-cps.service opx-nas.service opx-create-interface.service
ConditionPathExists=!/etc/opx/base_qos_no_init

[Service]
Type=oneshot
Expand Down
35 changes: 35 additions & 0 deletions sos/opx_nas_qos.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-

# Copyright (c) 2019 Dell Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR
# CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT
# LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS
# FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.
#
# See the Apache Version 2.0 License for specific language governing
# permissions and limitations under the License.
from sos.plugins import Plugin, DebianPlugin
import os

class DN_nas_qos(Plugin, DebianPlugin):
""" Collects nas-qos debugging information
"""

plugin_name = os.path.splitext(os.path.basename(__file__))[0]
profiles = ('networking', 'opx')

def setup(self):
self.add_cmd_output("/usr/bin/cps_get_oid.py base-qos/meter")
self.add_cmd_output("/usr/bin/cps_get_oid.py base-qos/wred-profile")
self.add_cmd_output("/usr/bin/cps_get_oid.py base-qos/scheduler-profile")
self.add_cmd_output("/usr/bin/cps_get_oid.py base-qos/dot1p-to-tc-color-map")
self.add_cmd_output("/usr/bin/cps_get_oid.py base-qos/dscp-to-tc-color-map")
self.add_cmd_output("/usr/bin/cps_get_oid.py base-qos/tc-to-queue-map")
self.add_cmd_output("/usr/bin/cps_get_oid.py base-qos/tc-color-to-dot1p-map")
self.add_cmd_output("/usr/bin/cps_get_oid.py base-qos/tc-color-to-dscp-map")