Simple Devlink class.
Bases: object
Represents a device link.
These are a bit anomalous, since they are recognized by their structure as paths.
The category of this device link.
Returns: | the category of the device link or None, if no category |
---|---|
Return type: | str or NoneType |
Whether this devlink has a category, like by-id, or by-path.
Returns: | True if the devlink has a category, otherwise False. |
---|---|
Return type: | boolean |
This is decided by taking apart the path and looking for the lack of expected distinguishing features.
The full path of the device link.
Returns: | the full path |
---|---|
Return type: | str |
The value of the devlink, which is the basename of the path.
Returns: | the basename, or None if this devlink has no category. |
---|---|
Return type: | str or NoneType |