Merge "conf: Covert StrOpt -> PortOpt"

This commit is contained in:
Jenkins 2016-11-30 16:37:32 +00:00 committed by Gerrit Code Review
commit 6a6f40e991
2 changed files with 4 additions and 8 deletions

View File

@ -425,9 +425,8 @@ Possible values:
* 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.

View File

@ -81,11 +81,8 @@ class ISCSIParametersTestCase(stubs.XenAPITestBaseNoDB):
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):