added grpc api to core-daemon, added get sessions and get session rpc calls

This commit is contained in:
bharnden 2019-02-18 22:54:14 -08:00
parent e72f133488
commit 7aed803aae
5 changed files with 132 additions and 11 deletions

View file

@ -63,6 +63,19 @@ def get_node_class(node_type):
return _NODE_MAP[node_type]
def get_node_type(node_class):
"""
Retrieve the node type given a node class.
:param class node_class: node class to get type for
:return: node type
:rtype: core.enumerations.NodeTypes
"""
global _NODE_MAP
node_type_map = {v: k for k, v in _NODE_MAP.iteritems()}
return node_type_map.get(node_class)
def is_node(obj, node_types):
"""
Validates if an object is one of the provided node types.