Skip to content

Widmann/feat dynamic update#35

Open
swdn133 wants to merge 13 commits intomasterfrom
widmann/feat_dynamic_update
Open

Widmann/feat dynamic update#35
swdn133 wants to merge 13 commits intomasterfrom
widmann/feat_dynamic_update

Conversation

@swdn133
Copy link

@swdn133 swdn133 commented Apr 8, 2019

DMPR is now able to handle dynamic link updates. The dynamic updates are received by rest-api.
The information can be provided for example by any Radio-to-Router communication protocols (e.g. DLEP).

The new feature is tested in mininet simulation environment as well as on real hardware

dmpr/dmpr.py Outdated
logger = logging.getLogger(__name__)

mylog = logging.getLogger("mylog")
fh = logging.FileHandler('/var/logs/tmp/myLog.txt')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the path is completly b0rken:

  • please let the user the ability where to log, not silently log somewhere. You should log to stderr if not known
  • the directory is probably not available
  • /var/logS is not a valid path /var/log (but see other comment)
  • please always name the logfile of path to your application, nobody known that myLog is dmpr
  • no camel case for linux filenames, that is not linux (see FHS pdf, the linux standard)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the logger is unnecessary anyways (just for debug purposes) - deleted for the merge

dmpr/dmpr.py Outdated
logmsg = dict()
logmsg['event'] = 'update-interval'
logmsg['msg'] = self.id
mylog.error(logmsg)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's missing the IPv6 part completly.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added IPv6 handling

dmpr/dmpr.py Outdated
database and trigger all recalculations
"""

print("rx {}".format(msg['id']))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deleted

self.msg_db[interface_name][msg['id']] = message
self.state.update_required = True
# check if already attributes known
if message.addr_v4 in interface['neighbor-attributes']['unknown']:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only v4, v6 needed as well

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added v6 handling

@hgn
Copy link
Member

hgn commented Apr 9, 2019

The rest if fine!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants