Skip to content

Commit d05cdf1

Browse files
committed
fixes for 1gen shell autoload - remove model name attribute from AutoloadDetails
1 parent f3b6fa8 commit d05cdf1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cloudshell/networking/cisco/autoload/cisco_generic_snmp_autoload.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from cloudshell.devices.standards.networking.autoload_structure import *
1212

1313

14-
1514
class CiscoGenericSNMPAutoload(object):
1615
IF_ENTITY = "ifDescr"
1716
ENTITY_PHYSICAL = "entPhysicalDescr"
@@ -74,6 +73,11 @@ def discover(self, supported_os):
7473
self.logger.error("Entity table error, no chassis found")
7574

7675
autoload_details = AutoloadDetailsBuilder(self.resource).autoload_details()
76+
if not self.shell_name:
77+
root_model_name = [x for x in autoload_details.attributes if
78+
x.relative_address == "" and x.attribute_name == "Model Name"][0]
79+
if root_model_name:
80+
autoload_details.attributes.remove(root_model_name)
7781
self._log_autoload_details(autoload_details)
7882
return autoload_details
7983

0 commit comments

Comments
 (0)