def _write_ec_profiles(self):
        if not self._cluster_info.get('ec_profiles', None):
            return True

        profile_list = self._cluster_info['ec_profiles']
        for profile in profile_list:
            db.ec_profile_update_or_create(self._context, profile) 

        return True
Example #2
0
    def _write_ec_profiles(self):
        if not self._cluster_info.get('ec_profiles', None):
            return True

        profile_list = self._cluster_info['ec_profiles']
        for profile in profile_list:
            db.ec_profile_update_or_create(self._context, profile)

        return True
Example #3
0
 def ec_profile_update(self, req, body=None):
     LOG.info('CEPH_LOG ec_profile_update body %s ' % body)
     context = req.environ['vsm.context']
     for profile in body.get('ec_profiles'):
         db.ec_profile_update_or_create(context, profile)
     return {
         'message': {
             'error_code': '',
             'error_msg': '',
             'info': 'Update EC Profile success!'
         }
     }
 def ec_profile_update(self, req, body=None):
     LOG.info('CEPH_LOG ec_profile_update body %s ' % body)
     context = req.environ['vsm.context']
     for profile in body.get('ec_profiles'):
         db.ec_profile_update_or_create(context,profile)
     return {'message':{'error_code':'','error_msg':'','info':'Add rbd group success!'}}