File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ def main():
229
229
asic_id = None
230
230
if asic_name is not None :
231
231
asic_id = get_npu_id_from_name (asic_name )
232
- asic_role = parse_asic_sub_role ( args . minigraph if args . minigraph else '/etc/sonic/minigraph.xml' , asic_name )
232
+
233
233
234
234
if hwsku is not None :
235
235
hardware_data = {'DEVICE_METADATA' : {'localhost' : {
@@ -276,8 +276,18 @@ def main():
276
276
deep_update (data , FormatConverter .db_to_output (configdb .get_config ()))
277
277
278
278
279
+ # for multi Asic platforms to generate the platform info for an Asic
280
+ # the minigraph file must be provided
279
281
if args .platform_info :
280
- if asic_name is not None and asic_role .lower () == "backend" :
282
+ asic_role = None
283
+ mac = None
284
+ if asic_name is not None :
285
+ if args .minigraph is None :
286
+ print ('Failed to get minigraph' )
287
+ sys .exit (1 )
288
+ asic_role = parse_asic_sub_role (args .minigraph , asic_name )
289
+
290
+ if asic_role is not None and asic_role .lower () == "backend" :
281
291
mac = get_system_mac (namespace = asic_name )
282
292
else :
283
293
mac = get_system_mac ()
You can’t perform that action at this time.
0 commit comments