Page Menu
Home
ClusterLabs Projects
Search
Configure Global Search
Log In
Files
F2825023
autodetect_test.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1021 B
Referenced Files
None
Subscribers
None
autodetect_test.py
View Options
#!/usr/bin/python
import
unittest
import
autodetect
as
detect
class
TestDetectDevice
(
unittest
.
TestCase
):
options
=
{}
def
setUp
(
self
):
self
.
options
=
{}
self
.
options
[
"--ssh-path"
]
=
"/usr/bin/ssh"
self
.
options
[
"--telnet-path"
]
=
"/usr/bin/telnet"
self
.
options
[
"--login-timeout"
]
=
"10"
self
.
options
[
"--shell-timeout"
]
=
"5"
self
.
options
[
"--power-timeout"
]
=
"10"
self
.
options
[
"eol"
]
=
"
\r\n
"
def
test_bladecenter
(
self
):
self
.
options
[
"--username"
]
=
"rhts"
self
.
options
[
"--password"
]
=
"100yard-"
self
.
options
[
"--ip"
]
=
"blade-mm.englab.brq.redhat.com"
(
found_cmd_prompt
,
conn
)
=
detect
.
detect_login_telnet
(
self
.
options
)
res
=
detect
.
detect_device
(
conn
,
self
.
options
,
found_cmd_prompt
)
self
.
assertEqual
(
'fence_bladecenter'
,
res
)
def
test_apc5
(
self
):
self
.
assertEqual
(
'foo'
,
'foo'
)
self
.
options
[
"c"
]
=
"c"
print
self
.
options
if
__name__
==
"__main__"
:
unittest
.
main
()
File Metadata
Details
Attached
Mime Type
text/x-script.python
Expires
Sat, Jan 25, 11:12 AM (1 d, 7 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1315878
Default Alt Text
autodetect_test.py (1021 B)
Attached To
Mode
rF Fence Agents
Attached
Detach File
Event Timeline
Log In to Comment