Skip to content

Commit

Permalink
[change] Implement SNMPDUMP
Browse files Browse the repository at this point in the history
  • Loading branch information
purhan committed Jul 22, 2021
1 parent 034475c commit 995b703
Show file tree
Hide file tree
Showing 10 changed files with 378 additions and 316 deletions.
8 changes: 4 additions & 4 deletions netengine/backends/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ def __repr__(self):
"""returns unicode string represantation"""
return self.__str__()

def validate(self):
def validate(self, *args, **kwargs):
raise NotImplementedError('Not implemented')

def to_dict(self):
def to_dict(self, autowalk=True):
raise NotImplementedError('Not implemented')

def to_json(self, **kwargs):
dictionary = self.to_dict()
def to_json(self, autowalk=True, **kwargs):
dictionary = self.to_dict(autowalk=autowalk)
return json.dumps(dictionary, **kwargs)

@property
Expand Down
2 changes: 1 addition & 1 deletion netengine/backends/dummy.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def get_interfaces(self):
},
]

def to_dict(self):
def to_dict(self, *args, **kwargs):
return self._dict(
{
'name': 'dummy',
Expand Down
Loading

0 comments on commit 995b703

Please sign in to comment.