コード例 #1
0
 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
コード例 #2
0
 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
コード例 #3
0
 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)
コード例 #4
0
ファイル: test_solidfire.py プロジェクト: soniafr/nova
 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)
コード例 #5
0
    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)
コード例 #6
0
ファイル: test_solidfire.py プロジェクト: soniafr/nova
    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)