Revision 07e68848 test/py/cmdlib/node_unittest.py
b/test/py/cmdlib/node_unittest.py | ||
---|---|---|
35 | 35 |
|
36 | 36 |
import testutils |
37 | 37 |
|
38 |
|
|
38 | 39 |
# pylint: disable=W0613 |
39 | 40 |
def _TcpPingFailSecondary(cfg, mock_fct, target, port, timeout=None, |
40 | 41 |
live_port_needed=None, source=None): |
... | ... | |
42 | 43 |
# and False if not. |
43 | 44 |
return "192.0.2." in target |
44 | 45 |
|
46 |
|
|
45 | 47 |
class TestLUNodeAdd(CmdlibTestCase): |
46 | 48 |
def setUp(self): |
47 | 49 |
super(TestLUNodeAdd, self).setUp() |
... | ... | |
80 | 82 |
self.rpc.call_node_verify.return_value = \ |
81 | 83 |
defaultdict(lambda: node_verify_result, {}) |
82 | 84 |
|
83 |
def testOvsParamsButNotEnabled(self): |
|
84 |
ndparams = { |
|
85 |
constants.ND_OVS: False, |
|
86 |
constants.ND_OVS_NAME: "testswitch", |
|
87 |
} |
|
88 |
|
|
89 |
op = self.CopyOpCode(self.op_add, |
|
90 |
ndparams=ndparams) |
|
91 |
|
|
92 |
self.ExecOpCodeExpectOpPrereqError(op, "OpenvSwitch is not enabled") |
|
93 |
|
|
94 | 85 |
def testOvsNoLink(self): |
95 | 86 |
ndparams = { |
96 | 87 |
constants.ND_OVS: True, |
Also available in: Unified diff