| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Change-Id: Ib29725cba6e78f31123a1713d791fecb04d2257c
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Fixes openbmc/openbmc#2320
Change-Id: Iac2649cd5f4794e2049cbdd4eb2df874d26beaaa
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: I424a03c81fb38b5aeb3f2028be1fbdf61aade406
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Resolves openbmc/openbmc#1771
Change-Id: I763e811e88710425131ec504ff933e3c41c458e6
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
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 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>
|
|
|
|
|
|
|
|
|
| |
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 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>
|
|
|
|
|
| |
Change-Id: Ia151903e6882d68b7c6d67d39e6634951bd63d7d
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Resolves openbmc/openbmc#1390
Change-Id: Id25c1d5b0752b510260932e39194538d7126ab86
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Replaced by setup.py
Change-Id: Ieae39ed068329c0f234871a5bef1800ad4fc45e8
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
| |
Change-Id: Iad6cfe757e9defffbeaa6ea00816ef5e17264fa5
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
| |
Change-Id: I86e2d378c229023fb5dcda658535e2587adec343
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
| |
fixes openbmc/openbmc#609
Change-Id: Ib817849c30848b636642ea7d0977e7ad9069a4cb
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
| |
Change-Id: I88bf0b065ac842e29ad1dc95eaf0913ae439660e
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
| |
Change-Id: I27cfcf64db7f472a6a2e8728be782c107d7966c2
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
| |
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: If8831a33757a71bf4c544d7b1a57433361bc4fc8
|
|
|
|
|
|
|
| |
Rename package to match naming conventions.
Change-Id: I899f15dcb98524cc96d22afae7c9c07bdc0751b5
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: Ibc9824ab085ffdf056ef39cfb793a9e8d7f6aeda
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
Adding the network config data
Fixes openbmc/openbmc#267
Change-Id: If6973c04714d6357e5da9887e3ec5f0c1aa04900
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
|
|
|
|
|
|
|
|
| |
Defer name grab until object is created.
Unmask ObjectManager/Properties signals.
Change-Id: Ife4d15575b87f1e00e5c30b072be3c7b3d117da7
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
| |
Change-Id: I3457da41acb1ed9e21c2c83f4a6e4509a79f71f7
Signed-of-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|
|
|
|
| |
Change-Id: I84477ba9dd70d5656bc6f66397cd924bd27a427f
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
|
|\
| |
| | |
Use pyphosphor rather than skeleton Openbmc.py
|
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\ \
| |/
|/| |
Adding the boot_policy attribute
|
|/ |
|
|\
| |
| | |
Make settings_file.py more git-diff friendly.
|
| |
| |
| |
| | |
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|/
|
|
|
|
|
|
| |
Use pprint for settings map instead of just casting to string. This
makes the output of the tool better for git-diff because it is sorted
and multiple lines.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
|
|\
| |
| | |
Add Restricted mode as a host setting
|