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

Fixed issue#15359 by adding support of IpaddrToIfIndex MIB #284

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Merge branch 'master' into issue_15359

a072c34
Select commit
Loading
Failed to load commit list.
Open

Fixed issue#15359 by adding support of IpaddrToIfIndex MIB #284

Merge branch 'master' into issue_15359
a072c34
Select commit
Loading
Failed to load commit list.
Azure Pipelines / Azure.sonic-snmpagent failed Oct 4, 2023 in 3m 21s

Build #20231004.1 had test failures

Details

Tests

  • Failed: 25 (6.89%)
  • Passed: 331 (91.18%)
  • Other: 7 (1.93%)
  • Total: 363

Annotations

Check failure on line 1416 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Azure.sonic-snmpagent

Build log #L1416

Bash exited with code '1'.

Check failure on line 17 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Azure.sonic-snmpagent

Build log #L17

There are one or more test failures detected in result files. Detailed summary of published test results can be viewed in the Tests tab.

Check failure on line 1 in test_getnextpdu

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Azure.sonic-snmpagent

test_getnextpdu

test setup failure
Raw output
cls = <class 's.tests.test_arp.TestSonicMIB'>

    @classmethod
    def setUpClass(cls):
        cls.lut = MIBTable(SonicMIB)
        for updater in cls.lut.updater_instances:
>           updater.update_data()

tests/test_arp.py:27: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sonic_ax_impl.mibs.ietf.rfc1213.IfIndexUpdater object at 0x7f12f4dd8f28>

    def update_data(self):
        self.if_index_map = {}
        self.if_index_list = []
    
        interfaces = Namespace.dbs_keys(self.db_conn, mibs.APPL_DB, "INTF_TABLE:*")
        for interface in interfaces:
            ethTablePrefix = re.search(r"INTF_TABLE\:[A-Za-z]+[0-9]+\:[0-9.\:A-Fa-f]+", interface)
            if ethTablePrefix is None:
                continue
            else:
                dev = ethTablePrefix.group().split(':')[1]
                ip = ':'.join(ethTablePrefix.group().split(':')[2:])
            self._update_if_index_info(dev, ip)
    
        mgmt_ipv4 = os.popen('ip addr show eth0').read().split("inet ")[1].split("/")[0]
        if (len(mgmt_ipv4) != 0):
            self._update_if_index_info("eth0", mgmt_ipv4)
>       mgmt_ipv6 = os.popen('ip addr show eth0').read().split("inet6 ")[1].split("/")[0]
E       IndexError: list index out of range

src/sonic_ax_impl/mibs/ietf/rfc1213.py:224: IndexError

Check failure on line 1 in test_getnextpdu_empty

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Azure.sonic-snmpagent

test_getnextpdu_empty

test setup failure
Raw output
cls = <class 's.tests.test_arp.TestSonicMIB'>

    @classmethod
    def setUpClass(cls):
        cls.lut = MIBTable(SonicMIB)
        for updater in cls.lut.updater_instances:
>           updater.update_data()

tests/test_arp.py:27: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sonic_ax_impl.mibs.ietf.rfc1213.IfIndexUpdater object at 0x7f12f4dd8f28>

    def update_data(self):
        self.if_index_map = {}
        self.if_index_list = []
    
        interfaces = Namespace.dbs_keys(self.db_conn, mibs.APPL_DB, "INTF_TABLE:*")
        for interface in interfaces:
            ethTablePrefix = re.search(r"INTF_TABLE\:[A-Za-z]+[0-9]+\:[0-9.\:A-Fa-f]+", interface)
            if ethTablePrefix is None:
                continue
            else:
                dev = ethTablePrefix.group().split(':')[1]
                ip = ':'.join(ethTablePrefix.group().split(':')[2:])
            self._update_if_index_info(dev, ip)
    
        mgmt_ipv4 = os.popen('ip addr show eth0').read().split("inet ")[1].split("/")[0]
        if (len(mgmt_ipv4) != 0):
            self._update_if_index_info("eth0", mgmt_ipv4)
>       mgmt_ipv6 = os.popen('ip addr show eth0').read().split("inet6 ")[1].split("/")[0]
E       IndexError: list index out of range

src/sonic_ax_impl/mibs/ietf/rfc1213.py:224: IndexError

Check failure on line 1 in test_getnextpdu_exactmatch

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Azure.sonic-snmpagent

test_getnextpdu_exactmatch

test setup failure
Raw output
cls = <class 's.tests.test_arp.TestSonicMIB'>

    @classmethod
    def setUpClass(cls):
        cls.lut = MIBTable(SonicMIB)
        for updater in cls.lut.updater_instances:
>           updater.update_data()

tests/test_arp.py:27: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sonic_ax_impl.mibs.ietf.rfc1213.IfIndexUpdater object at 0x7f12f4dd8f28>

    def update_data(self):
        self.if_index_map = {}
        self.if_index_list = []
    
        interfaces = Namespace.dbs_keys(self.db_conn, mibs.APPL_DB, "INTF_TABLE:*")
        for interface in interfaces:
            ethTablePrefix = re.search(r"INTF_TABLE\:[A-Za-z]+[0-9]+\:[0-9.\:A-Fa-f]+", interface)
            if ethTablePrefix is None:
                continue
            else:
                dev = ethTablePrefix.group().split(':')[1]
                ip = ':'.join(ethTablePrefix.group().split(':')[2:])
            self._update_if_index_info(dev, ip)
    
        mgmt_ipv4 = os.popen('ip addr show eth0').read().split("inet ")[1].split("/")[0]
        if (len(mgmt_ipv4) != 0):
            self._update_if_index_info("eth0", mgmt_ipv4)
>       mgmt_ipv6 = os.popen('ip addr show eth0').read().split("inet6 ")[1].split("/")[0]
E       IndexError: list index out of range

src/sonic_ax_impl/mibs/ietf/rfc1213.py:224: IndexError

Check failure on line 1 in test_getpdu

See this annotation in the file changed.

@azure-pipelines azure-pipelines / Azure.sonic-snmpagent

test_getpdu

test setup failure
Raw output
cls = <class 's.tests.test_arp.TestSonicMIB'>

    @classmethod
    def setUpClass(cls):
        cls.lut = MIBTable(SonicMIB)
        for updater in cls.lut.updater_instances:
>           updater.update_data()

tests/test_arp.py:27: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sonic_ax_impl.mibs.ietf.rfc1213.IfIndexUpdater object at 0x7f12f4dd8f28>

    def update_data(self):
        self.if_index_map = {}
        self.if_index_list = []
    
        interfaces = Namespace.dbs_keys(self.db_conn, mibs.APPL_DB, "INTF_TABLE:*")
        for interface in interfaces:
            ethTablePrefix = re.search(r"INTF_TABLE\:[A-Za-z]+[0-9]+\:[0-9.\:A-Fa-f]+", interface)
            if ethTablePrefix is None:
                continue
            else:
                dev = ethTablePrefix.group().split(':')[1]
                ip = ':'.join(ethTablePrefix.group().split(':')[2:])
            self._update_if_index_info(dev, ip)
    
        mgmt_ipv4 = os.popen('ip addr show eth0').read().split("inet ")[1].split("/")[0]
        if (len(mgmt_ipv4) != 0):
            self._update_if_index_info("eth0", mgmt_ipv4)
>       mgmt_ipv6 = os.popen('ip addr show eth0').read().split("inet6 ")[1].split("/")[0]
E       IndexError: list index out of range

src/sonic_ax_impl/mibs/ietf/rfc1213.py:224: IndexError