'Strings prefixed with $ are capability lookups in the
form \'$variable\' where \'variable\' is an attribute in the
HostState class.  If $variable is a dictionary, you may
use: $variable.dictkey'

def _parse_string(self, string, host_state):

    if (not string):
        return None
    if (not string.startswith('$')):
        return string
    path = string[1:].split('.')
    obj = getattr(host_state, path[0], None)
    if (obj is None):
        return None
    for item in path[1:]:
        obj = obj.get(item, None)
        if (obj is None):
            return None
    return obj
