summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* device: emit IP_CONFIG_CHANGED signal when default route changesbg/defrouteBeniamino Galvani2017-03-311-2/+10
| | | | | | | | | | | | | We now update the default route metric based on the result of the connectivity check. When we update the metric and there is no other changes to the IP configuration, NMPolicy is not notified about it and can't update the best device until an actual change in IP config happens. This results in a wrong best device set in NMPolicy. NMDevice has NM_DEVICE_IP[4,6]_CONFIG_CHANGED signals that are used exclusively by NMPolicy to detect when there is a change in configuration that requires an update of global DNS and routing information. Emit those signals also when the default route changes.
* default-route-manager: return whether the default route changedBeniamino Galvani2017-03-312-26/+29
|
* cli: fix setting of 802-1x.eap propertyBeniamino Galvani2017-03-301-2/+16
| | | | Fixes: 6bf1d6fc163de9f69338af99641bd49f246f32b7
* gitignore: fix ignoring "clients/common/settings-docs.c" (2)Thomas Haller2017-03-301-0/+1
| | | | Fixes: d720f0955ffda93e0fc1f7b69eb6a01395246229
* build: fix out-of-tree build after moving generated settings-docs.cThomas Haller2017-03-301-1/+1
| | | | Fixes: d720f0955ffda93e0fc1f7b69eb6a01395246229
* gitignore: fix ignoring "clients/common/settings-docs.c"Thomas Haller2017-03-301-1/+1
| | | | Fixes: d720f0955ffda93e0fc1f7b69eb6a01395246229
* cli: embed gtk-doc directly in property-info structureThomas Haller2017-03-307-408/+391
| | | | Also mark them for translation.
* cli: merge branch 'th/cli-setting-metadata-bgo732292'Thomas Haller2017-03-3033-11071/+9057
|\ | | | | | | | | | | | | | | | | A larger refactoring of nmcli. Splits out (a bit) the tracking of settings meta data. As such, it goes towards what is proposed by bgo#732292. Then, get rid (a bit) of the global data that is passed around.
| * cli: don't track output data in global NmCli structureThomas Haller2017-03-308-254/+283
| | | | | | | | | | | | | | | | | | | | | | | | | | We should not violate the global data to track the output data while it is constructed and printed. Most of the time, we actually clear the output data anyway -- either before constructing it, or after printing it. In some cases we didn't, but I think that is a bug. It's really hard to keep track of this. The output data should belong to a certain scope and get destroyed afterwards. Passing it around is very confusing. Don't do that.
| * cli: split print_data() in a part with and without side-effectsThomas Haller2017-03-307-41/+64
| | | | | | | | | | | | To better understand which part of the code have side effects, split print_data() in a part that mutilates the input array and a part that only prints.
| * cli: split output data from NmCli to a separate fieldThomas Haller2017-03-309-174/+168
| |
| * cli: cleanup get_value_to_print() utilThomas Haller2017-03-301-15/+17
| | | | | | | | | | | | | | Don't cast const strings to non-const. And don't track whether to free a variable in a boolean. Instead, assign ownership to variables that get destroyed when the function returns.
| * cli: separate input and in-out arguments in print_data()Thomas Haller2017-03-307-51/+51
| | | | | | | | | | Don't pass down the entire NmCli instance. The output_data array is modified by print_data(), the rest is read-only input.
| * cli: pass configuration options separately from NmCli structureThomas Haller2017-03-309-63/+66
| | | | | | | | | | | | | | | | | | | | The NmCli structure is passed around everywhere and contains all the state of the program. It is very hard to follow which parts are used where. Split out more configuration options to a NmcConfig field. This field is mostly immutable, and modified at particular places that now can be easily found.
| * cli: pass use_colors as separate option instead of global nmcThomas Haller2017-03-307-48/+54
| | | | | | | | | | | | nmc contains all options and collects output data. It is very hard to understand what it does. Start splitting it up, and pass arguments along -- as needed.
| * cli: use designated initializers for setting NmcOutputField fieldsThomas Haller2017-03-307-264/+271
| | | | | | | | | | | | | | Otherwise, changing the structure is difficult because it all depends on the order (and you don't immdiately see which field is used where). Also, drop the name_l10n field.
| * cli: use enum property type for connection.lldpThomas Haller2017-03-303-54/+30
| | | | | | | | | | | | | | Change in behavior: - the setter would previoulsy allow "enable" case-insensitive. Now, it's case sensitive.
| * utils: add _nm_utils_enum_from_str_full() to support aliasesThomas Haller2017-03-302-4/+52
| |
| * libnm: move enum utils to new shared file shared/nm-utils/nm-enum-utils.hThomas Haller2017-03-306-287/+349
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libnm contains the public function nm_utils_enum_from_str() et al. The function is not flexible enough for nmcli's usecase. So, I would need another public function like nm_utils_enum_from_str_full() that has an extended API. That was already required previously for ifcfg-rh writer, but in that case I could just add it as internal API as libnm-core is linked statically with NetworkManager. I don't want to commit to a public API for an utility function. So move the code instead to the shared directory, so that nmcli may link statically against it and use the internal API.
| * cli: use enum property type for 802-1x.phase1-auth-flagsThomas Haller2017-03-301-54/+6
| |
| * cli: use enum property type for wifi.power-saveThomas Haller2017-03-301-55/+6
| | | | | | | | | | This changes behavior for the pretty-output. Now, we output "%d (%s)" instead of "%s (%d)".
| * cli: add property type for enum and showcase for ipv6.addr-gen-modeThomas Haller2017-03-303-44/+306
| |
| * cli: belatedly add for connection user dataThomas Haller2017-03-301-24/+33
| | | | | | | | | | User data will be printed in a new multiline mode. Need more work first.
| * cli: don't hard-code list of settings for completionThomas Haller2017-03-302-43/+13
| |
| * cli: move utils function from common.h to nm-meta-setting-desc.cThomas Haller2017-03-3017-687/+779
| | | | | | | | | | | | These functions are only used by nm-meta-setting-desc.c. Make them internal. Unfortunately, they are part of "common.h" which cannot be used without the rest of nmcli. Still todo.
| * cli: split nm-meta-setting-desc out of settingsThomas Haller2017-03-3011-6184/+6244
| | | | | | | | | | | | | | | | | | | | | | This part contains static functions and variables to describe settings. It is distinct from the mechanism to use them, or access them. Split it out. It still uses clients/cli/common.h and clients/cli/utils.h which shall be fixed next.
| * cli/trivial: rename metadata related namesThomas Haller2017-03-306-224/+224
| | | | | | | | | | | | They will be moved out of nmcli as they are generally useful. Even if they happen to be used only inside nmcli, there should be a better separation between logic (nmcli) and setting decriptions.
| * nmcli: output property values in "parsable" mode when the "--terse" option ↵Thomas Haller2017-03-301-1/+5
| | | | | | | | | | | | | | | | is specified (again) Commit 623d888801f611be4e4d14570d6c2f84dcd92937 was reverted during refactoring nmcli to simplify merge conflicts. Restore the behavior of the patch.
| * cli: allow dynamic results from values_fcn() and describe_fcn() property ↵Thomas Haller2017-03-303-88/+89
| | | | | | | | | | | | | | | | | | | | functions Mostly these strings are static. In same cases they are generated however. Instead of caching them in a static variable, return them to the caller. And belatedly fix invoking describe_fcn().
| * cli: refactor indirection to legacy signatures (2)Thomas Haller2017-03-302-888/+520
| |
| * cli: fix intermediate regression of hiding blobs dataThomas Haller2017-03-302-59/+40
| | | | | | | | | | Restore previous behavior of hiding blobs for certain certificate properties.
| * cli: use define for argument lists in settings.cThomas Haller2017-03-301-219/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | settings.c basically consists of property-type structures and *a lot* of accessors. All these accessors share the same argument list. It is very repetitive to specify it over and over again. Also, there are so many arguments that one is compelled to wrap the lines. All in all it results in a lot of noise that takes the eye from the important code. Also, the argument list is expected to change, so we possibly only have to change one place.
| * cli: refactor indirection to legacy signaturesThomas Haller2017-03-301-35/+29
| |
| * cli: add property-info for the restThomas Haller2017-03-306-2334/+830
| |
| * cli: add property-info for NMSettingWirelessThomas Haller2017-03-304-264/+112
| |
| * cli: add property-info for NMSettingWiredThomas Haller2017-03-304-291/+187
| |
| * cli: add property-info for NMSettingWimaxThomas Haller2017-03-304-64/+42
| |
| * cli: let string property-type handle checking valuesThomas Haller2017-03-301-185/+47
| |
| * cli: add property-info for NMSettingAdslThomas Haller2017-03-304-124/+51
| |
| * cli: add property-info for NMSettingPppThomas Haller2017-03-304-240/+97
| |
| * cli: add property-info for NMSetting8021xThomas Haller2017-03-304-598/+325
| |
| * cli: add property-info for NMSettingWirelessSecurityThomas Haller2017-03-304-245/+152
| |
| * cli: add property-info for NMSettingPppoeThomas Haller2017-03-304-95/+96
| |
| * cli: add property-info for NMSettingDcbThomas Haller2017-03-304-191/+134
| |
| * cli: add property-info for NMSettingProxyThomas Haller2017-03-304-96/+65
| |
| * cli: add NmcPropertyType structureThomas Haller2017-03-302-258/+381
| | | | | | | | | | | | | | | | | | | | | | | | | | We shall not only have a PropertyInfo. Most properties share common behavior, that is, they have a type. Move the function pointers to a NmcPropertyType structure, so that it can be reused for multiple properties. This promotes the idea that properties have a (limited) set of types with some type specific behaviors. Contrary, to having each property re-implement fully it's type. E.g. instead of having various property re-define their full behavior as an "bool", have one property type "bool" which can be attached to a property.
| * cli: add property-info for NMSettingIP4Config and NMSettingIP6ConfigThomas Haller2017-03-304-662/+511
| |
| * cli: remove GLUE macros that hide namesThomas Haller2017-03-301-286/+282
| | | | | | | | | | It's useful to see the entire name not having a macro construct it. Otherwise, the usage is not grepable.
| * cli: generate all-properties list from NmcSettingInfoThomas Haller2017-03-302-24/+19
| | | | | | | | | | It's redundant information that requires us to declare it in the static meta data. Generate it instead as needed.
| * cli: add values_func() to NmcPropertyInfo and use for "connection" settingThomas Haller2017-03-307-49/+38
| |