self.assertTrue(m_exec.called)
def test_get_target_chap_auth(self):
- tmp_file = StringIO.StringIO()
+ tmp_file = six.StringIO()
tmp_file.write(
'target:\n'
- ' TargetName=iqn.2010-10.org.openstack:volume-83c2e877-feed-46be-8435-77884fe55b45\n' # noqa
- ' TargetDevice=/dev/stack-volumes-lvmdriver-1/volume-83c2e877-feed-46be-8435-77884fe55b45\n' # noqa
+ ' TargetName=iqn.2010-10.org.openstack:volume-%(id)s\n'
+ ' TargetDevice=/dev/%(vg)s/volume-%(id)s\n'
' PortalGroup=1@10.9.8.7:3260\n'
' AuthMethod=CHAP\n'
' Auth_CHAP_Policy=Oneway\n'