nmcli connection import fails
# nmcli conn import type openconnect file ~/XXX.keyfile
Error: Failed to add 'XXX' connection: ipv4.method: property is missing``
The source of this error is as follows:
properties/nm-openconnect-editor-plugin.c function import() creates a default ipv4 configuration using:
s_ip4 = NM_SETTING_IP4_CONFIG (nm_setting_ip4_config_new ());
nm_connection_add_setting (connection, NM_SETTING (s_ip4));
However, the default configuration is empty. Loading the settings file via the GUI succeeds because it initializes default parameters. I think the fix is to add a call to nm_connection_normalize(connection,NULL,NULL,NULL) before returning.