From c95abffc7977d598307a6f5781f1bd973c4e5bb9 Mon Sep 17 00:00:00 2001 From: Sam Kottler Date: Sat, 29 Jun 2013 17:50:35 -0400 Subject: Start on the actual implementation --- lib/__init__.py | 0 lib/interface.py | 12 ++++++++++++ 2 files changed, 12 insertions(+) create mode 100644 lib/__init__.py create mode 100644 lib/interface.py (limited to 'lib') diff --git a/lib/__init__.py b/lib/__init__.py new file mode 100644 index 0000000..e69de29 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 " """ + 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] -- cgit