summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSam Kottler <skottler@fedoraproject.org>2013-06-29 17:50:35 -0400
committerSam Kottler <skottler@fedoraproject.org>2013-06-29 17:50:35 -0400
commitc95abffc7977d598307a6f5781f1bd973c4e5bb9 (patch)
tree01e5ac9315a2386f36cfda270a65cf761f3136bd /lib
parent0b8af38fd1ff6c18bbf34f829d245212915375b1 (diff)
downloadkicker-c95abffc7977d598307a6f5781f1bd973c4e5bb9.tar.gz
kicker-c95abffc7977d598307a6f5781f1bd973c4e5bb9.tar.xz
kicker-c95abffc7977d598307a6f5781f1bd973c4e5bb9.zip
Start on the actual implementation
Diffstat (limited to 'lib')
-rw-r--r--lib/__init__.py0
-rw-r--r--lib/interface.py12
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/__init__.py b/lib/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lib/__init__.py
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]