diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2017-03-20 17:05:53 +1300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-21 21:01:56 +0000 |
commit | 282dc0719d22a39df746eea762ebe05c66aa8f8a (patch) | |
tree | 7e410fa0b1873107e44128c2a6a325c68efa3edf /lib/bb/tinfoil.py | |
parent | 4f9d6f060ed247fb6fa2f45668a892a1788d3f91 (diff) | |
download | bitbake-contrib-282dc0719d22a39df746eea762ebe05c66aa8f8a.tar.gz |
data_smart: implement missing remote datastore operations
Enable the following operations from a remote datastore to affect the
other end:
* setVarFlag()
* delVar()
* delVarFlag()
* renameVar()
In practice I don't expect these to be used much, but they should be
present so that the implementation is at least reasonably filled out
and that the tests pass.
Also add tests for the interface, mostly by subclassing the existing
local test classes so that they are using a remote datastore. (These
don't actually test remote usage via tinfoil, just that the
datastore's interface can be used.)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/tinfoil.py')
-rw-r--r-- | lib/bb/tinfoil.py | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/lib/bb/tinfoil.py b/lib/bb/tinfoil.py index 00cec59b8..19b41be46 100644 --- a/lib/bb/tinfoil.py +++ b/lib/bb/tinfoil.py @@ -1,6 +1,6 @@ # tinfoil: a simple wrapper around cooker for bitbake-based command-line utilities # -# Copyright (C) 2012-2016 Intel Corporation +# Copyright (C) 2012-2017 Intel Corporation # Copyright (C) 2011 Mentor Graphics Corporation # # This program is free software; you can redistribute it and/or modify @@ -84,6 +84,34 @@ class TinfoilDataStoreConnector: # Not currently implemented - indicate that setting should # be redirected to local side return True + def setVarFlag(self, varname, flagname, value): + if self.dsindex is None: + self.tinfoil.run_command('dataStoreConnectorSetVarFlag', self.dsindex, varname, flagname, value) + else: + # Not currently implemented - indicate that setting should + # be redirected to local side + return True + def delVar(self, varname): + if self.dsindex is None: + self.tinfoil.run_command('dataStoreConnectorDelVar', self.dsindex, varname) + else: + # Not currently implemented - indicate that setting should + # be redirected to local side + return True + def delVarFlag(self, varname, flagname): + if self.dsindex is None: + self.tinfoil.run_command('dataStoreConnectorDelVar', self.dsindex, varname, flagname) + else: + # Not currently implemented - indicate that setting should + # be redirected to local side + return True + def renameVar(self, name, newname): + if self.dsindex is None: + self.tinfoil.run_command('dataStoreConnectorRenameVar', self.dsindex, name, newname) + else: + # Not currently implemented - indicate that setting should + # be redirected to local side + return True class TinfoilCookerAdapter: """ |