def fetch_desired_state(oc_map): desired_state = [] flat_rolebindings_desired_state = \ openshift_rolebindings.fetch_desired_state(ri=None, oc_map=oc_map) desired_state.extend(flat_rolebindings_desired_state) groups_desired_state = openshift_groups.fetch_desired_state(oc_map) flat_groups_desired_state = \ [{'cluster': s['cluster'], 'user': s['user']} for s in groups_desired_state] desired_state.extend(flat_groups_desired_state) return desired_state
def fetch_desired_state(oc_map): desired_state = [] flat_rolebindings_desired_state = openshift_rolebindings.fetch_desired_state( ri=None, oc_map=oc_map ) desired_state.extend(flat_rolebindings_desired_state) groups_desired_state = openshift_groups.fetch_desired_state(oc_map) flat_groups_desired_state = [ {"cluster": s["cluster"], "user": s["user"]} for s in groups_desired_state ] desired_state.extend(flat_groups_desired_state) return desired_state