cnetworkmanager
cnetworkmanager copied to clipboard
Getting connection info by id fails
Example:
$ cnetworkmanager --actcon State | Name | AP | Devices | Default route ----------+-------------+----+---------+-------------- ACTIVATED | System eth0 | | eth0 | * $ cnetworkmanager --con-info="System eth0" Connection 'System eth0' not found Traceback (most recent call last): File "/usr/bin/cnetworkmanager", line 250, incs = c.GetSettings() AttributeError: 'NoneType' object has no attribute 'GetSettings'
This is with cnetworkmanager 0.21.1.
Ok, if I specify KIND manually, I still get an exception:
$ cnetworkmanager "--con-info=system,System eth0" Section | Property | Value ---------------+-------------+------------------------------------- 802-3-ethernet | | | mac-address | �C�� connection | | | type | 802-3-ethernet | uuid | 5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03 | id | System eth0 ipv4 | | | routes | | addresses | | dns | | method | auto Traceback (most recent call last): File "/usr/bin/cnetworkmanager", line 253, insecu = cs[type]["security"] KeyError: 'security'
I am using NetworkManager 0.7.1-8.git20090708 on Fedora 11.
Yes, KIND defaults to "user" so you have to say "system" explicitly. That should probably try both in order. I need to fix that "KeyError: 'security'"
Ah, ok. I didn't expect that behaviour from --help.
Also, looks like mac-address isn't getting printed correctly?
For the --terse behaviour, it would be a lot easier for scripts to parse if instead of the current format, it was something like this:
802-3-ethernet|mac-address|00:11:22:33:44:55 connection|type|802-3-ethernet connection|uuid|foo connection|id|System eth0 ipv4|routes| ipv4|addresses| ...