コード例 #1
0
 def test_set_by_qos_by_type_only(self):
     sfv = SolidFireDriver(configuration=self.configuration)
     type_ref = volume_types.create(self.ctxt,
                                    "type1", {"qos:minIOPS": "100",
                                              "qos:burstIOPS": "300",
                                              "qos:maxIOPS": "200"})
     qos = sfv._set_qos_by_volume_type(self.ctxt, type_ref['id'])
     self.assertEqual(qos, {'minIOPS': 100,
                            'maxIOPS': 200,
                            'burstIOPS': 300})
コード例 #2
0
 def test_set_by_qos_spec(self):
     sfv = SolidFireDriver(configuration=self.configuration)
     qos_ref = qos_specs.create(self.ctxt,
                                'qos-specs-1', {'minIOPS': '1000',
                                                'maxIOPS': '10000',
                                                'burstIOPS': '20000'})
     type_ref = volume_types.create(self.ctxt,
                                    "type1", {"qos:minIOPS": "100",
                                              "qos:burstIOPS": "300",
                                              "qos:maxIOPS": "200"})
     qos_specs.associate_qos_with_type(self.ctxt,
                                       qos_ref['id'],
                                       type_ref['id'])
     qos = sfv._set_qos_by_volume_type(self.ctxt, type_ref['id'])
     self.assertEqual(qos, self.expected_qos_results)