diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2014-11-21 22:15:06 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2014-12-11 11:15:53 +0100 |
commit | 9a3cc60d9b7bf3dac8137d0b379246f5287c891e (patch) | |
tree | 121cd344194a963481b29c49a07a9e92c3a7e97e | |
parent | dfdcbfe115a700adc83c44ba50438d091fb6e54f (diff) | |
download | NetworkManager-9a3cc60d9b7bf3dac8137d0b379246f5287c891e.tar.gz |
cli: expose the vpn.persistent propertylr/vpn-fixes
-rw-r--r-- | clients/cli/settings.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/clients/cli/settings.c b/clients/cli/settings.c index 4153e40428..7d2a46c8c9 100644 --- a/clients/cli/settings.c +++ b/clients/cli/settings.c @@ -497,13 +497,15 @@ NmcOutputField nmc_fields_setting_vpn[] = { SETTING_FIELD (NM_SETTING_VPN_USER_NAME, 12), /* 2 */ SETTING_FIELD (NM_SETTING_VPN_DATA, 30), /* 3 */ SETTING_FIELD (NM_SETTING_VPN_SECRETS, 15), /* 4 */ + SETTING_FIELD (NM_SETTING_VPN_PERSISTENT, 15), /* 5 */ {NULL, NULL, 0, NULL, FALSE, FALSE, 0} }; #define NMC_FIELDS_SETTING_VPN_ALL "name"","\ NM_SETTING_VPN_SERVICE_TYPE","\ NM_SETTING_VPN_USER_NAME","\ NM_SETTING_VPN_DATA","\ - NM_SETTING_VPN_SECRETS + NM_SETTING_VPN_SECRETS","\ + NM_SETTING_VPN_PERSISTENT #define NMC_FIELDS_SETTING_VPN_COMMON NMC_FIELDS_SETTING_VPN_ALL /* Available fields for NM_SETTING_WIMAX_SETTING_NAME */ @@ -1450,6 +1452,8 @@ nmc_property_vpn_get_secrets (NMSetting *setting) return g_string_free (secret_str, FALSE); } +DEFINE_GETTER (nmc_property_vpn_get_persistent, NM_SETTING_VPN_PERSISTENT) + /* --- NM_SETTING_WIMAX_SETTING_NAME property get functions --- */ DEFINE_GETTER (nmc_property_wimax_get_network_name, NM_SETTING_WIMAX_NETWORK_NAME) DEFINE_GETTER (nmc_property_wimax_get_mac_address, NM_SETTING_WIMAX_MAC_ADDRESS) @@ -5930,6 +5934,13 @@ nmc_properties_init (void) NULL, NULL, NULL); + nmc_add_prop_funcs (GLUE (VPN, PERSISTENT), + nmc_property_vpn_get_persistent, + nmc_property_set_bool, + NULL, + NULL, + NULL, + NULL); /* Add editable properties for NM_SETTING_WIMAX_SETTING_NAME */ nmc_add_prop_funcs (GLUE (WIMAX, NETWORK_NAME), @@ -7076,6 +7087,7 @@ setting_vpn_details (NMSetting *setting, NmCli *nmc, const char *one_prop, gboo set_val_str (arr, 2, nmc_property_vpn_get_user_name (setting)); set_val_str (arr, 3, nmc_property_vpn_get_data (setting)); set_val_str (arr, 4, GET_SECRET (secrets, setting, nmc_property_vpn_get_secrets)); + set_val_str (arr, 5, nmc_property_vpn_get_persistent (setting)); g_ptr_array_add (nmc->output_data, arr); print_data (nmc); /* Print all data */ |