summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/tinfoil.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-22 11:35:22 +0000
commit5b1807021e932b1150095f3d1744d8411a28a1f0 (patch)
treeb949a92af026dfb0334be4fa627c48920538fa42 /bitbake/lib/bb/tinfoil.py
parent99414bdb1c64f7f03e12c347cc16c43c2fa336b2 (diff)
downloadpoky-5b1807021e932b1150095f3d1744d8411a28a1f0.tar.gz
bitbake: 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.) (Bitbake rev: 282dc0719d22a39df746eea762ebe05c66aa8f8a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/tinfoil.py')
-rw-r--r--bitbake/lib/bb/tinfoil.py30
1 files changed, 29 insertions, 1 deletions
diff --git a/bitbake/lib/bb/tinfoil.py b/bitbake/lib/bb/tinfoil.py
index 00cec59b83..19b41be46c 100644
--- a/bitbake/lib/bb/tinfoil.py
+++ b/bitbake/lib/bb/tinfoil.py
@@ -1,6 +1,6 @@
1# tinfoil: a simple wrapper around cooker for bitbake-based command-line utilities 1# tinfoil: a simple wrapper around cooker for bitbake-based command-line utilities
2# 2#
3# Copyright (C) 2012-2016 Intel Corporation 3# Copyright (C) 2012-2017 Intel Corporation
4# Copyright (C) 2011 Mentor Graphics Corporation 4# Copyright (C) 2011 Mentor Graphics Corporation
5# 5#
6# This program is free software; you can redistribute it and/or modify 6# This program is free software; you can redistribute it and/or modify
@@ -84,6 +84,34 @@ class TinfoilDataStoreConnector:
84 # Not currently implemented - indicate that setting should 84 # Not currently implemented - indicate that setting should
85 # be redirected to local side 85 # be redirected to local side
86 return True 86 return True
87 def setVarFlag(self, varname, flagname, value):
88 if self.dsindex is None:
89 self.tinfoil.run_command('dataStoreConnectorSetVarFlag', self.dsindex, varname, flagname, value)
90 else:
91 # Not currently implemented - indicate that setting should
92 # be redirected to local side
93 return True
94 def delVar(self, varname):
95 if self.dsindex is None:
96 self.tinfoil.run_command('dataStoreConnectorDelVar', self.dsindex, varname)
97 else:
98 # Not currently implemented - indicate that setting should
99 # be redirected to local side
100 return True
101 def delVarFlag(self, varname, flagname):
102 if self.dsindex is None:
103 self.tinfoil.run_command('dataStoreConnectorDelVar', self.dsindex, varname, flagname)
104 else:
105 # Not currently implemented - indicate that setting should
106 # be redirected to local side
107 return True
108 def renameVar(self, name, newname):
109 if self.dsindex is None:
110 self.tinfoil.run_command('dataStoreConnectorRenameVar', self.dsindex, name, newname)
111 else:
112 # Not currently implemented - indicate that setting should
113 # be redirected to local side
114 return True
87 115
88class TinfoilCookerAdapter: 116class TinfoilCookerAdapter:
89 """ 117 """