Example #1
0
 def get_ec_profile_list(self, req):
     """ec_profile_list."""
     context = req.environ['vsm.context']
     ec_profile_list = db.ec_profile_get_all(context)
     ec_profiles = {
         "ec_profiles": [{
             "id": x.id,
             "name": x.name
         } for x in ec_profile_list]
     }
     return ec_profiles
 def detail(self, req):
     """Returns the list of ecprofiles."""
     LOG.info("Get a list of ecprofiles")
     context = req.environ['vsm.context']
     ec_profiles = db.ec_profile_get_all(context)
     return self._view_builder.detail(req, ec_profiles)
 def get_ec_profile_list(self, req):
     """ec_profile_list."""
     context = req.environ['vsm.context']
     ec_profile_list = db.ec_profile_get_all(context)
     ec_profiles = {"ec_profiles": [{"id": x.id, "name": x.name} for x in ec_profile_list]}
     return ec_profiles