summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* build: install into bin instead of sbinHEADmasterPatrick Venture2019-03-281-1/+1
| | | | | | | Installs into bin instead of sbin per guidelines. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I1b683415bf518045de5571b0b9517345ea2df77a
* Add array support for defautsJames Feist2019-02-151-0/+1
| | | | | | | | | | | | | | | | Based on: https://uscilab.github.io/cereal/stl_support.html To support vector we need to #include the cereal vector header. Closes #12 Tested-by: Was able to add an array default using C++ vector syntax Change-Id: I3b00c372b668ddcda69a56ede8edbc51ab2693f5 Signed-off-by: James Feist <james.feist@linux.intel.com>
* build: pkg anti-pattern: use defaultsPatrick Venture2019-02-131-6/+3
| | | | | | | | Use the defaults in the pkg check where the default error message is sufficient to identify which package is missing. Change-Id: Ifa7c986a2102fdee5d83b52dd4bbc030c43d8c7d Signed-off-by: Patrick Venture <venture@google.com>
* Add clang-format to repoPatrick Venture2018-11-012-4/+105
| | | | | | | Add clang-format to repo. Change-Id: I85129fe964c15ac389a1117f7a7716f2f6175dd6 Signed-off-by: Patrick Venture <venture@google.com>
* gitignore: add autotools files to listPatrick Venture2018-10-141-1/+59
| | | | | | | Add autotools files to list for gitignore. Change-Id: I772927c48431182243faacbc0f8332e109b53227 Signed-off-by: Patrick Venture <venture@google.com>
* phosphor-settingsd: use c++17Vernon Mauery2018-10-041-1/+1
| | | | | | | Update configure.ac to choose the c++17 standard Change-Id: I5aa098f4d573ce14f8d5ee5c74f1b85fd10d1bb6 Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
* Add MAINTAINERS fileAndrew Jeffery2018-05-191-0/+47
| | | | | Change-Id: Ib29725cba6e78f31123a1713d791fecb04d2257c Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* settings_manager: Use raw string for regexAndrew Jeffery2018-04-301-1/+1
| | | | | | | | | | | | Avoids a warning about an invalid escape sequence: ./settings_manager.py:221:36: W605 invalid escape sequence '\-' regex = '([a-fA-F0-9]{2}[:|\-]?){6}' Fixes openbmc/openbmc#3140 Change-Id: I3be3d27bf9505b104db53a3a93e26fdc2e79e4db Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* PEP 8 fixesGunnar Mills2018-01-314-5/+13
| | | | | | | | | | | | | | | | | | | | | Added E402 to the ignore errors list. E402 is "module level import not at top of file" and ignoring since settings_manager.py needs to modify the sys.path before importing certain modules. Since the default ignore list is not used anymore, rules E121,E123,E126,E226,E24,E704,W503 are now enforced. Looking at those rules, I believe we should enforce them. Note E121,E123,E126,E226,E24,E704,W503 are all in the default ignore list, so if no ignore list is provided in the setup.cfg these errors are ignored. from pycodestyle --help --ignore=errors skip errors and warnings (e.g. E4,W) (default: E121,E123,E126,E226,E24,E704,W503) Change-Id: I0f64535eb4b4ba471466c8c9c3dbda1f8b33f702 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* Enable Cereal class versioningVishwanatha Subbanna2017-10-042-2/+23
| | | | | | | Fixes openbmc/openbmc#2320 Change-Id: Iac2649cd5f4794e2049cbdd4eb2df874d26beaaa Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* cereal: Fix empty file scenarioTom Joseph2017-09-281-9/+24
| | | | | | | | | Cereal throws execption when deserialising empty file, add code to handle empty exception and default the setting to the default value. Change-Id: I466f44d07c902a27344a483b5b574e0507baa2f4 Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
* Grammar fixes for README-settings-manager.mdGunnar Mills2017-09-201-4/+4
| | | | | Change-Id: I424a03c81fb38b5aeb3f2028be1fbdf61aade406 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
* settings objects: support multiple interfacesDeepak Kodihalli2017-08-302-101/+139
| | | | | | | | | | | | | | | A settings object had the limitation that it could implement a single, corresponding settings interface. This was found to be too restrictive because there are use-cases (such as in the boot settings area) that would simplify describing settings with objects that can implement more than one interface. This commit adds the ability for settings objects to implement multiple interfaces. The settings config yaml now should contain a list of interface(s) under each settings object. Change-Id: I90dec9e766e1afd1b0c8616e491832714bbd069d Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Fix settingsd core dump/persistence failDeepak Kodihalli2017-08-041-0/+17
| | | | | | | | | | | | | | | | | | | | | | | The problem was seen only with network settings objects, because they had paths as following: A setting d-bus object /foo/bar/baz is persisted in the filesystem with the same path. This eases re-construction of settings objects when we restore from the filesystem. This can be a problem though when you have two objects such as - /foo/bar and /foo/bar/baz. This is because 'bar' will be treated a file in the first case, and a subdir in the second. This was causing an exception to be thrown by Cereal, because it found a dir where it was expecting a file. This also caused us to not persist certain network setting objects because we couldn't create subdirs as there were files of the same name. To solve this, suffix files with a trailing __. The __ is a safe character sequence to use, because we won't have d-bus object paths ending with this. With this the objects would be persisted as - /foo/bar__ and /foo/bar/baz__. Change-Id: I76b6a0423db1f2f51bd1b6ab2ea5f9cafd1a36d9 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Validate changes to default settings.Dhruvaraj Subhashchandran2017-07-284-8/+106
| | | | | | | Resolves openbmc/openbmc#1771 Change-Id: I763e811e88710425131ec504ff933e3c41c458e6 Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
* Fix to allow multiple properties per interfaceAndrew Geissler2017-07-061-1/+1
| | | | | | | | | | The path variable needs to be shared among all properties in an interface Resolves openbmc/openbmc#1910 Change-Id: I73f85ef9fd36eb8110f3f352fb968f062585c3d9 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Persist changes to settingsDeepak Kodihalli2017-07-034-23/+146
| | | | | | | | | | | | | | | Persist changes made to settings, if any, such that those changes can be restored upon a reboot. Use Cereal for serialization of the settings' properties. Since the settings code is generated based on a system specific settings policy, generate the serialization code as well such that only relevant settings are serialized. Resolves openbmc/openbmc#1764. Change-Id: Id8bd84a9455cf4348b22f255d038b050d004eb7c Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Change object manager pathDeepak Kodihalli2017-05-312-8/+4
| | | | | | | | | Since there's not a "settings" root as such, and the settings objects are spread across the object namespace, register "/" as the path for the d-bus object manager. Change-Id: Ic012129b333cba8831c331803124b3e89642b536 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Fix bug in mako templateDeepak Kodihalli2017-05-311-2/+2
| | | | | | | | | Fix a bug in the settings manager mako template, which was causing some of the settings manager code (header includes and using namespaces) to not be generated appropriately. Change-Id: Ie55fb2f0d637a842dd59148fefe4e3ed6aa75808 Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Add README for the settings managerDeepak Kodihalli2017-05-261-0/+40
| | | | | Change-Id: Ia151903e6882d68b7c6d67d39e6634951bd63d7d Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Add settings applicationDeepak Kodihalli2017-05-267-0/+262
| | | | | | | | | | | | | | | | | Implement settings d-bus interfaces. Define a settings policy file (this commit checks in an example YAML based policy), based on which code for a settings manager will be generated via a python script. This settings manager composes and places desired settings objects on the bus. The policy file can be supplied by a system specific bitbake recipe. Resolves openbmc/openbmc#1487. Change-Id: Ice0d3b319d9466824cef323a6915eb20ca5cae5c Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
* Restore settings to default on errorPatrick Williams2017-04-061-6/+17
| | | | | | | | | | | | In the event that the value read from a persistence file is invalid, currently a ValueError exception is thrown and the settingsd fails to run. Instead, catch this condition and restore the setting to default. Fixes openbmc/openbmc#1442. Change-Id: I22ce8837d9c48b21bab050f1de9b730ec219bc4b Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Phosphor-Settings: Change the value as per the IPMIRatan Gupta2017-04-031-2/+2
| | | | | | | Resolves openbmc/openbmc#1390 Change-Id: Id25c1d5b0752b510260932e39194538d7126ab86 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* New "No auto reboot" element for settingsdMichael Tritz2017-01-311-0/+6
| | | | | | | | This new element will be used to allow the user to disable any kind of automatic reboot. Change-Id: I30bfec142d6ece35bd3e38a745551a1da71da489 Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
* Validate data input *as is* instead of ignoring caseVishwanatha Subbanna2017-01-231-4/+4
| | | | | | | | | | | | | | User input that is supposed to be in certain allowed values were getting validated ignoring the case and this resulted in incorrect behavior in the daemons that consume those values. Since the input value is really the data, its acceptable to be strict about the case and hence this patch validates the user input against the allowed range being sensitive to the case. Fixes openbmc/openbmc#961 Change-Id: I901600918691324b60512c27ab43925c531db09b Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* Increase retry time and interval when calling get_subtree_paths()Lei YU2017-01-111-3/+4
| | | | | | | | | | | | | | | | | | | | In create_object(), mapper.get_subtree_paths() may raise DBusException which is not handled, it will cause settings_manager failure. This is a follow up commit after review #1751, where retry interval is added as function parameter, so that it will sleep for an interval between retries. When calling get_subtree_paths(), use retry time 10 and sleep interval 0.1, so far the exception is not raised any more. Make HostSettingsObject to inherit DbusObjectManager helps ObjectMapper to get HostSettingsObject's info more efficiently, otherwise it falls back to call Introspect. Partially fix openbmc/openbmc#862 Change-Id: I87c856e372a20a0ad577ce52f099074cdf5a4355 Signed-off-by: Lei YU <mine260309@gmail.com>
* Still create host settings object if no host controlMatt Spinler2016-12-161-0/+5
| | | | | | | | | | P9 doesn't have a host control object, so the host settings object can't depend on it. As a short term fix just create the host settings object even if the host control object not found. Change-Id: I6e14a1350de3575eb7f18d6d3a698367384cd8fc Signed-off-by: Matt Spinler <spinler@us.ibm.com>
* Fix incorrect argument for "PropertiesChanged" signal handlerYi Li2016-11-221-5/+5
| | | | | | | | | | We cannot pass 'fname' as an argument to "PropertiesChanged" signal handler, without changing the signal emitting code. Resolves openbmc/openbmc#824 Change-Id: Ia093914fdba9e3299f9cb409b91e093f74393773 Signed-off-by: Yi Li <adamliyi@msn.com>
* Define bus used by mapper in settings_manager.pySergey Solomin2016-11-151-0/+1
| | | | | | | | | | | Undefined bus in mapper = obmc.mapper.Mapper(bus) in settings_manager.py causes a failure. This patch defines the bus. Resolves openbmc/openbmc#806 Change-Id: I1989c1246c34f8be98591f439bfa1847f3325e00 Signed-off-by: Sergey Solomin <sergey.solomin@us.ibm.com>
* Add double-escape to a regex in settings.yamlSergey Solomin2016-11-101-1/+1
| | | | | | | | | | A backslash in regex in settings.yaml causes a failure. Add double-escape before a backslash so it will be treated as a character. Change-Id: Icb11579986d261b562e965c871bf5da9ca2b8763 Signed-off-by: Sergey Solomin <sergey.solomin@us.ibm.com> Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Create top categories dynamically based on inventory object.Sergey Solomin2016-11-083-83/+125
| | | | | | | | | | | | | Presently, the settingsd code will statically create objects 'host0', 'bmc0' and 'bmc0/clock' from top-level categories Host and Bmc in the YAML file. This code provides a 1-to-1 mapping between YAML categories and inventory objects and changes filename format to correspond to an inventory object. Resolves openbmc/openbmc#638 Change-Id: I462cf4c7b7cf042b37e1006a73b36bf11fa52b43 Signed-off-by: Sergey Solomin <sergey.solomin@us.ibm.com>
* phosphor-settingsd - Support YAML categories and sub-categoriesSergey Solomin2016-10-131-30/+72
| | | | | | | | | | | | Currently phosphor-settingsd only supports a single category of 'host0', but the YAML format supports categories and sub-categories. This enhancement supports categories and sub-categories and automatically creates corresponding dbus objects to represent. Resolves openbmc/openbmc#551 Change-Id: I42bf246881ca08e8429771666415321fa997f0dc Signed-off-by: Sergey Solomin <sergey.solomin@us.ibm.com>
* remove parserBrad Bishop2016-10-111-21/+0
| | | | | | | Replaced by setup.py Change-Id: Ieae39ed068329c0f234871a5bef1800ad4fc45e8 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* pep8 fixesBrad Bishop2016-09-292-12/+17
| | | | | Change-Id: Iad6cfe757e9defffbeaa6ea00816ef5e17264fa5 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add vim modelinesBrad Bishop2016-09-292-0/+4
| | | | | Change-Id: I86e2d378c229023fb5dcda658535e2587adec343 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* fix settings data directory pathBrad Bishop2016-09-291-1/+4
| | | | | | | fixes openbmc/openbmc#609 Change-Id: Ib817849c30848b636642ea7d0977e7ad9069a4cb Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add gitignoreBrad Bishop2016-09-281-0/+2
| | | | | Change-Id: I88bf0b065ac842e29ad1dc95eaf0913ae439660e Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Remove settings fileBrad Bishop2016-09-281-65/+0
| | | | | Change-Id: I27cfcf64db7f472a6a2e8728be782c107d7966c2 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Generate settings file during buildBrad Bishop2016-09-282-1/+22
| | | | | Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Change-Id: If8831a33757a71bf4c544d7b1a57433361bc4fc8
* setup: minor formatting changesBrad Bishop2016-09-281-5/+5
| | | | | | | Rename package to match naming conventions. Change-Id: I899f15dcb98524cc96d22afae7c9c07bdc0751b5 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Validate user inputs in settings daemonVishwanatha Subbanna2016-09-273-36/+185
| | | | | | | | | | | | | | | | Currently, the properties defined under /org/openbmc/settings/host0 can take any value and it is upto the consumer daemons to act only if the valid data was given. This patch will provide a validation logic for all the properties and will raise an exception in the case of invalid inputs. Only on a valid input, will the data gets written and saved. Validation methods and types per property are provided in the configuration file and used by the manager whenever a particular property is changed. Change-Id: I0731ce6e00ab3cb4e11deb98c03fda8d5adad913 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* parser: Remove execute permissionsBrad Bishop2016-09-211-0/+0
| | | | | Change-Id: Ibc9824ab085ffdf056ef39cfb793a9e8d7f6aeda Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Add properties needed by Time Manager daemonVishwanatha Subbanna2016-09-122-1/+18
| | | | | | | | | | | time manager daemon needs 3 new properties namely: - time_mode : For setting the mode to NTP or MANUAL - time_owner : For setting the owner to BMC/HOST/SPLIT/BOTH - use_dhcp_ntp : Updating UseNtp= field in network files Change-Id: I50ef4ef32f5555044c7722519f6c0dd26bd3c83a Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
* Add python setup scriptAdriana Kobylak2016-09-113-0/+13
| | | | | | | | | Save script in /usr/sbin/ and data file in /usr/share/obmc-phosphor-settings/. Closes openbmc/phosphor-settingsd#9 Change-Id: I1ac67e88dab5904c3d2a96707db0b510a608a8c2 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* Implement IPMI Network Settings OverrideRatan Gupta2016-09-022-1/+8
| | | | | | | | | Adding the network config data Fixes openbmc/openbmc#267 Change-Id: If6973c04714d6357e5da9887e3ec5f0c1aa04900 Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
* manager: ObjectManager/Properties intf fixesBrad Bishop2016-08-311-1/+2
| | | | | | | | Defer name grab until object is created. Unmask ObjectManager/Properties signals. Change-Id: Ife4d15575b87f1e00e5c30b072be3c7b3d117da7 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* manager: pep8 fixesBrad Bishop2016-08-311-11/+15
| | | | | Change-Id: I3457da41acb1ed9e21c2c83f4a6e4509a79f71f7 Signed-of-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* manager: Remove exe permsBrad Bishop2016-08-311-0/+0
| | | | | Change-Id: I84477ba9dd70d5656bc6f66397cd924bd27a427f Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
* Merge pull request #10 from bradbishop/switch-to-pyphosphorPatrick Williams2016-06-061-4/+4
|\ | | | | Use pyphosphor rather than skeleton Openbmc.py
| * Use pyphosphor rather than skeleton Openbmc.pyBrad Bishop2016-05-171-4/+4
| | | | | | | | | | | | | | The Openbmc module in skeleton is going away so move to using the bindings add ons in the pyphosphor package. Signed-of-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
OpenPOWER on IntegriCloud