Example #1
0
 def setUp(self):
     super(TestBaseISCSITargetDriver, self).setUp()
     self.target = fake.FakeTarget(root_helper=utils.get_root_helper(),
                                   configuration=self.configuration)
     self.target.db = mock.MagicMock(
         volume_get=mock.MagicMock(return_value={'provider_auth':
                                                 'CHAP otzL 234Z'}))
Example #2
0
    def setUp(self):
        super(TestBaseISCSITargetDriver, self).setUp()
        self.configuration = conf.Configuration(None)
        self.fake_project_id = 'ed2c1fd4-5fc0-11e4-aa15-123b93f75cba'
        self.fake_volume_id = 'ed2c2222-5fc0-11e4-aa15-123b93f75cba'
        self.target = fake.FakeTarget(root_helper=utils.get_root_helper(),
                                      configuration=self.configuration)
        self.testvol =\
            {'project_id': self.fake_project_id,
             'name': 'testvol',
             'size': 1,
             'id': self.fake_volume_id,
             'volume_type_id': None,
             'provider_location': '10.10.7.1:3260 '
                                  'iqn.2010-10.org.openstack:'
                                  'volume-%s 0' % self.fake_volume_id,
             'provider_auth': 'CHAP stack-1-a60e2611875f40199931f2'
                              'c76370d66b 2FE0CQ8J196R',
             'provider_geometry': '512 512',
             'created_at': timeutils.utcnow(),
             'host': 'fake_host@lvm#lvm'}

        self.expected_iscsi_properties = \
            {'auth_method': 'CHAP',
             'auth_password': '******',
             'auth_username': '******',
             'encrypted': False,
             'logical_block_size': '512',
             'physical_block_size': '512',
             'target_discovered': False,
             'target_iqn': 'iqn.2010-10.org.openstack:volume-%s' %
                           self.fake_volume_id,
             'target_lun': 0,
             'target_portal': '10.10.7.1:3260',
             'volume_id': self.fake_volume_id}
Example #3
0
 def setUp(self):
     super(TestBaseISCSITargetDriver, self).setUp()
     self.target = fake.FakeTarget(root_helper=utils.get_root_helper(),
                                   configuration=self.configuration)