@exception.wrap_pecan_controller_exception
    @pecan.expose()
    def get_all(self):
        """Return all plans, based on the query provided."""
        handler = plan_handler.PlanHandler(pecan.request.security_context)

        if pecan.request.accept is not None and 'yaml' in pecan.request.accept:
            plan_serialized = yamlutils.dump([yaml_content(obj)
                                              for obj in handler.get_all()
                                              if obj and obj.raw_content])
        else:
            plan_serialized = wsme_json.encode_result(
                [plan.Plan.from_db_model(obj, pecan.request.host_url)
                 for obj in handler.get_all()],
                wsme_types.ArrayType(plan.Plan))
        pecan.response.status = 200
        return plan_serialized
dataset/ETHPy150Open openstack/solum/solum/api/controllers/v1/plan.py/PlansController.get_all/original