'return whether role_binding exists'

def exists_role_binding(self):

    bindings = None
    if (self.config.config_options['resource_kind']['value'] == 'cluster-role'):
        bindings = self.clusterrolebindings
    else:
        bindings = self.rolebindings
    if (bindings is None):
        return False
    for binding in bindings:
        if ((binding['roleRef']['name'] == self.config.config_options['name']['value']) and (binding['userNames'] is not None) and (self.config.config_options['user']['value'] in binding['userNames'])):
            self.role_binding = binding
            return True
    return False
