diff options
author | Scott Moser <smoser@ubuntu.com> | 2018-12-03 22:07:59 +0000 |
---|---|---|
committer | Server Team CI Bot <josh.powers+server-team-bot@canonical.com> | 2018-12-03 22:07:59 +0000 |
commit | 230e67ebd489c0d895243a2fc66ca95af2cea13b (patch) | |
tree | 652f4cec81d827012c964a38ffd12507c672e180 /upstart | |
parent | adbd950af07a4b613a14bd83049915abdd6ca348 (diff) | |
download | vyos-cloud-init-230e67ebd489c0d895243a2fc66ca95af2cea13b.tar.gz vyos-cloud-init-230e67ebd489c0d895243a2fc66ca95af2cea13b.zip |
dhclient-hook: cleanups, tests and fix a bug on 'down' event.
I noticed a bug in dhclient_hook on the 'down' event, using 'is'
operator rather than '==' (if self.net_action is 'down').
This refactors/simplifies the code a bit for easier testing and adds
tests. The reason for the rename of 'action' to 'event' is to just
be internally consistent. The word and Namespace 'action' is used
by cloud-init main, so it was not really usable here.
Also adds a main which can easily be debugged with:
CI_DHCP_HOOK_DATA_D=./my.d python -m cloudinit.dhclient_hook up eth0
Diffstat (limited to 'upstart')
0 files changed, 0 insertions, 0 deletions