Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def evi_attr(self):
return SubAttributesDict(self.EviAttributes, parent=self)
def statement_attr(self):
return SubAttributesDict(self.StatementAttributes, parent=self)
def vrf_attr(self):
return SubAttributesDict(self.VrfAttributes, parent=self)
def router_instance_attr(self):
return SubAttributesDict(self.RouterInstanceAttributes, parent=self)
def interface_attr(self):
return SubAttributesDict(self.InterfaceAttributes, parent=self)
def __init__(self, *args, **kwargs):
self.address_family_attr = SubAttributesDict(
self.AddressFamilyAttributes, parent=self)
super().__init__(*args, **kwargs)
def eid_record_subscriber_attr(self):
return SubAttributesDict(self.EidRecordSubscriberAttributes, parent=self)
def device_attr(self):
return SubAttributesDict(self.DeviceAttributes, parent=self)
def path_option_attr(self):
return SubAttributesDict(self.PathOptionAttributes, parent=self)
def _to_dict(conf_obj, value=None):
ret = {}
for k, value in conf_obj.__dict__.items():
# Disregard those, as cannot be compared between
# run
base = ConfigurableBase()
k = base._convert(conf_obj, k)
if isinstance(value, SubAttributesDict):
# Its already a dict
ret[k] = {}
for k2, v2 in value.items():
# Loop over the returned conf and substitute the objects with
# their corresponding values
k2 = _convert_obj_to_value(k2)
ret[k][k2] = _to_dict(v2)
else:
# Loop over the returned conf and substitute the objects with their
# corresponding values
value = _convert_obj_to_value(value)
ret[k] = value
return ret