def test_create_volume_fails(self): self.stubs.Set(SolidFire, '_issue_api_request', self.fake_issue_api_request_fails) testvol = {'project_id': 'testprjid', 'name': 'testvol', 'size': 1, 'id': 'a720b3c0-d1f0-11e1-9b23-0800200c9a66'} sfv = SolidFire() try: sfv.create_volume(testvol) self.fail("Should have thrown Error") except Exception: pass
def test_create_volume_fails(self): self.stubs.Set(SolidFire, '_issue_api_request', self.fake_issue_api_request_fails) testvol = { 'project_id': 'testprjid', 'name': 'testvol', 'size': 1, 'id': 'a720b3c0-d1f0-11e1-9b23-0800200c9a66' } sfv = SolidFire() try: sfv.create_volume(testvol) self.fail("Should have thrown Error") except Exception: pass
def test_create_volume(self): self.stubs.Set(SolidFire, '_issue_api_request', self.fake_issue_api_request) testvol = {'project_id': 'testprjid', 'name': 'testvol', 'size': 1, 'id': 'a720b3c0-d1f0-11e1-9b23-0800200c9a66'} sfv = SolidFire() model_update = sfv.create_volume(testvol)
def test_create_volume_with_qos(self): preset_qos = {} preset_qos['qos'] = 'fast' self.stubs.Set(SolidFire, '_issue_api_request', self.fake_issue_api_request) testvol = {'project_id': 'testprjid', 'name': 'testvol', 'size': 1, 'id': 'a720b3c0-d1f0-11e1-9b23-0800200c9a66', 'metadata': [preset_qos]} sfv = SolidFire() model_update = sfv.create_volume(testvol)