aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python
diff options
context:
space:
mode:
Diffstat (limited to 'mpm/python')
-rw-r--r--mpm/python/usrp_mpm/periph_manager/base.py18
-rw-r--r--mpm/python/usrp_mpm/rpc_server.py2
2 files changed, 19 insertions, 1 deletions
diff --git a/mpm/python/usrp_mpm/periph_manager/base.py b/mpm/python/usrp_mpm/periph_manager/base.py
index 6608a5d2b..1eb6dd8b0 100644
--- a/mpm/python/usrp_mpm/periph_manager/base.py
+++ b/mpm/python/usrp_mpm/periph_manager/base.py
@@ -546,6 +546,24 @@ class PeriphManagerBase(object):
update_func(filepath, metadata)
return True
+ @no_claim
+ def get_component_info(self, component_name):
+ """
+ Returns the metadata for the requested component
+ :param component_name: string name of the component
+ :return: Dictionary of strings containg metadata
+ """
+ if component_name in self.updateable_components:
+ metadata = self.updateable_components.get(component_name)
+ metadata['id'] = component_name
+ self.log.trace("Component info: {}".format(metadata))
+ # Convert all values to str
+ return dict([a, str(x)] for a, x in metadata.items())
+ else:
+ self.log.trace("Component not found in updateable components: {}"
+ .format(component_name))
+ return {}
+
###########################################################################
# Crossbar control
###########################################################################
diff --git a/mpm/python/usrp_mpm/rpc_server.py b/mpm/python/usrp_mpm/rpc_server.py
index 00175d312..4f8058f2f 100644
--- a/mpm/python/usrp_mpm/rpc_server.py
+++ b/mpm/python/usrp_mpm/rpc_server.py
@@ -31,7 +31,7 @@ from usrp_mpm.sys_utils import net
TIMEOUT_INTERVAL = 3.0 # Seconds before claim expires (default value)
TOKEN_LEN = 16 # Length of the token string
# Compatibility number for MPM
-MPM_COMPAT_NUM = (1, 1)
+MPM_COMPAT_NUM = (1, 2)
def no_claim(func):
" Decorator for functions that require no token check "