Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separating the contents of interface.py into two files #23

Open
jeffsilverm opened this issue Sep 23, 2018 · 1 comment
Open

Separating the contents of interface.py into two files #23

jeffsilverm opened this issue Sep 23, 2018 · 1 comment

Comments

@jeffsilverm
Copy link
Owner

The output of the ip command confuses me, but that can't be helped. The ip link list command lists things that have datalink values, which are typically ethernet (or MAC, or link) addresses. By way of contrast, the ip addr list command lists things that have IPv4 or IPv6 addresses.

The ip link command is working at layer 2, the datalink layer, in the OSI model. The ip addr command is working at layer 3, the network layer, in the OSI model. One big difference: the datalink layer has many more parameters than the network layer.

The problem is that the ip command conflates these two levels. Yes, it makes it easier for the system administrator who is trying to figure this stuff all out. But for somebody who is interested in elegance, it is not optimal.

@jeffsilverm
Copy link
Owner Author

I took the guts of interface.py and put it in a file called guts_of_interface.py. Then, put the part which I had been calling DataLink and put that in mac.py. That was a mistake. So then what I did was rename mac.py to datalink.py and changed class Mac to class DataLink.

That change caused a change in nbmdt, that pycharm took care of when refactoring. However, there is another name error in nbmdt, that there is something called interface, and it should not be there.

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

No branches or pull requests

1 participant