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

[Multi-asic]: Namespace support for LLDP and Sensor tables #131

Merged
merged 5 commits into from
May 29, 2020

Conversation

SuvarnaMeenakshi
Copy link
Contributor

@SuvarnaMeenakshi SuvarnaMeenakshi commented May 27, 2020

Signed-off-by: SuvarnaMeenakshi sumeenak@microsoft.com

- What I did
This PR targets changes in lldp/sensor related MIB implementation for multi-asic platform.
LLDP Mgmt interface related information will be obtained from global db.
Update implementation of the following MIBS to get data from all
databases:
LLDPRemManAddrTable
PhysicalTableMIB
PhysicalSensorTableMIB
QBridgeMIBObjects
- How I did it
Modified implementation of above MIB classes to obtain data from all namespace database DBs.

- How to verify it
Verified in multi-asic platform.
Note: Requires code/test mock tables from #126

- Description for the changelog

…form:

LLDPRemManAddrTable
PhysicalTableMIB
PhysicalSensorTableMIB
QBridgeMIBObjects

Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
@lgtm-com
Copy link

lgtm-com bot commented May 27, 2020

This pull request introduces 5 alerts when merging 961fc20 into c8e5757 - view on LGTM.com

new alerts:

  • 5 for Unused import

Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
@lgtm-com
Copy link

lgtm-com bot commented May 27, 2020

This pull request introduces 1 alert when merging 3ffba0e into c8e5757 - view on LGTM.com

new alerts:

  • 1 for Unused import

Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
@lgtm-com
Copy link

lgtm-com bot commented May 29, 2020

This pull request introduces 1 alert when merging 01e70be into a677876 - view on LGTM.com

new alerts:

  • 1 for Syntax error


self.if_range = []
self.lldp_counters = {}
for if_oid, if_name in self.oid_name_map.items():
lldp_kvs = self.db_conn.get_all(mibs.APPL_DB, mibs.lldp_entry_table(if_name))
lldp_kvs = Namespace.get_all_dbs(self.db_conn, mibs.APPL_DB, mibs.lldp_entry_table(if_name))
Copy link
Contributor

@qiluo-msft qiluo-msft May 29, 2020

Choose a reason for hiding this comment

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

get_all_dbs [](start = 33, length = 11)

dbs_get_all #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@@ -419,7 +419,11 @@ def update_data(self):
self.oid_list = []
self.oid_map = {}

<<<<<<< HEAD
Copy link
Contributor

@qiluo-msft qiluo-msft May 29, 2020

Choose a reason for hiding this comment

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

Please resolve conflicts #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@@ -571,3 +595,22 @@ def init_namespace_sync_d_queue_tables(dbs):
port_queue_list_map.update(port_queue_list_map_ns)

return port_queues_map, queue_stat_map, port_queue_list_map

@staticmethod
def get_bridge_port_map_from_namespace_dbs(dbs, db_name):
Copy link
Contributor

@qiluo-msft qiluo-msft May 29, 2020

Choose a reason for hiding this comment

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

get_bridge_port_map_from_namespace_dbs [](start = 8, length = 38)

dbs_get_bridge_port_map #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

return if_br_oid_map

@staticmethod
def get_vlan_id_from_bvid_from_namespace_dbs(dbs, bvid):
Copy link
Contributor

@qiluo-msft qiluo-msft May 29, 2020

Choose a reason for hiding this comment

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

get_vlan_id_from_bvid_from_namespace_dbs [](start = 8, length = 40)

dbs_get_vlan_id_from_bvid #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Signed-off-by: SuvarnaMeenakshi <sumeenak@microsoft.com>
@qiluo-msft qiluo-msft merged commit 89b7b2c into sonic-net:master May 29, 2020
abdosi pushed a commit that referenced this pull request Jul 8, 2020
* Changes in below MIB tables implementation to support multi-asic platform:
LLDPRemManAddrTable
PhysicalTableMIB
PhysicalSensorTableMIB
QBridgeMIBObjects
* Fix LGTM errors.
* Fix merge conflicts and fix function names as per review comment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants