conf: Covert StrOpt -> PortOpt
...resolving the TODO in the process. Change-Id: I076483c4a3aff369c0ba2e87abd91acafcd9f677
This commit is contained in:
parent
8d0c195e00
commit
c5a76f97e6
@ -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.
|
||||
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user