summaryrefslogtreecommitdiffstats
path: root/lib/bb/command.py
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2017-03-20 17:05:53 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-21 21:01:56 +0000
commit282dc0719d22a39df746eea762ebe05c66aa8f8a (patch)
tree7e410fa0b1873107e44128c2a6a325c68efa3edf /lib/bb/command.py
parent4f9d6f060ed247fb6fa2f45668a892a1788d3f91 (diff)
downloadbitbake-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/command.py')
-rw-r--r--lib/bb/command.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/bb/command.py b/lib/bb/command.py
index 222a76e58..78a86ac4d 100644
--- a/lib/bb/command.py
+++ b/lib/bb/command.py
@@ -505,6 +505,31 @@ class CommandsSync:
raise CommandError('dataStoreConnectorRelease: invalid index %d' % dsindex)
command.remotedatastores.release(dsindex)
+ def dataStoreConnectorSetVarFlag(self, command, params):
+ dsindex = params[0]
+ name = params[1]
+ flag = params[2]
+ value = params[3]
+ datastore = command.remotedatastores[dsindex]
+ datastore.setVarFlag(name, flag, value)
+
+ def dataStoreConnectorDelVar(self, command, params):
+ dsindex = params[0]
+ name = params[1]
+ datastore = command.remotedatastores[dsindex]
+ if len(params) > 2:
+ flag = params[2]
+ datastore.delVarFlag(name, flag)
+ else:
+ datastore.delVar(name)
+
+ def dataStoreConnectorRenameVar(self, command, params):
+ dsindex = params[0]
+ name = params[1]
+ newname = params[2]
+ datastore = command.remotedatastores[dsindex]
+ datastore.renameVar(name, newname)
+
def parseRecipeFile(self, command, params):
"""
Parse the specified recipe file (with or without bbappends)