File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ def _get_combined_df(self, **kwargs):
3939
4040 ifschema = SchemaForTable ('ospfIf' , schema = self .all_schemas )
4141 nbrschema = SchemaForTable ('ospfNbr' , schema = self .all_schemas )
42+ ospfschema = SchemaForTable ('ospf' , schema = self .all_schemas )
4243
4344 if columns not in [['default' ], ['*' ]]:
4445 ifkeys = ifschema .key_fields ()
@@ -102,6 +103,11 @@ def _get_combined_df(self, **kwargs):
102103 nbr_df = self ._get_table_sqobj ('ospfNbr' ) \
103104 .get (columns = nbrcols , ** kwargs )
104105 if nbr_df .empty :
106+ missing_cols = set (ospfschema .get_display_fields (['default' ])) - set (df .columns )
107+ for col in missing_cols :
108+ df [col ] = np .nan
109+ df = df .fillna ({'peerIP' : '-' , 'peerHostname' : '' ,
110+ 'lastChangeTime' : 0 , 'numChanges' : 0 , 'ifState' : '' , 'adjState' : '' })
105111 return df
106112
107113 merge_cols = [x for x in ['namespace' , 'hostname' , 'ifname' ]
You can’t perform that action at this time.
0 commit comments