...resolving the TODO in the process.
Change-Id: I076483c4a3aff369c0ba2e87abd91acafcd9f677
* Any string that represents hostname/ip of Target.
"""),
- # TODO(aunnam): This should be PortOpt
- cfg.StrOpt('target_port',
- default='3260',
+ cfg.PortOpt('target_port',
+ default=3260,
help="""
The iSCSI Target Port.
self.assertIsNone(volume_utils._get_target_host(None))
def test_target_port(self):
- self.assertEqual(volume_utils._get_target_port('host:port'),
- 'port')
-
- self.assertEqual(volume_utils._get_target_port('host'),
- '3260')
+ self.assertEqual(volume_utils._get_target_port('host:port'), 'port')
+ self.assertEqual(volume_utils._get_target_port('host'), 3260)
class IntroduceTestCase(stubs.XenAPITestBaseNoDB):