diff options
author | Sam Kottler <skottler@fedoraproject.org> | 2013-06-29 17:50:35 -0400 |
---|---|---|
committer | Sam Kottler <skottler@fedoraproject.org> | 2013-06-29 17:50:35 -0400 |
commit | c95abffc7977d598307a6f5781f1bd973c4e5bb9 (patch) | |
tree | 01e5ac9315a2386f36cfda270a65cf761f3136bd /lib/interface.py | |
parent | 0b8af38fd1ff6c18bbf34f829d245212915375b1 (diff) | |
download | kicker-c95abffc7977d598307a6f5781f1bd973c4e5bb9.tar.gz kicker-c95abffc7977d598307a6f5781f1bd973c4e5bb9.tar.xz kicker-c95abffc7977d598307a6f5781f1bd973c4e5bb9.zip |
Start on the actual implementation
Diffstat (limited to 'lib/interface.py')
-rw-r--r-- | lib/interface.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/interface.py b/lib/interface.py new file mode 100644 index 0000000..8f18559 --- /dev/null +++ b/lib/interface.py @@ -0,0 +1,12 @@ +import string + +class Interface(object): + def __init__(self, interface): + """ Store the NIC in the form "<if name> <MAC address> """ + self.nic_info = string.split(interface, " ") + + def get_interface(self): + return self.nic_info[0] + + def get_mac_addr(self): + return self.nic_info[1] |