summaryrefslogtreecommitdiffstats
path: root/qa/tasks/mgr/test_ssh_orchestrator.py
blob: f7c1c0edfe66d819ed0749deb3aeb7c0426dec8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import logging
from tasks.mgr.mgr_test_case import MgrTestCase

log = logging.getLogger(__name__)

class TestOrchestratorCli(MgrTestCase):
    MGRS_REQUIRED = 1

    def _orch_cmd(self, *args):
        return self.mgr_cluster.mon_manager.raw_cluster_cmd("orchestrator", *args)

    def setUp(self):
        super(TestOrchestratorCli, self).setUp()
        self._load_module("orchestrator_cli")
        self._load_module("ssh")
        self._orch_cmd("set", "backend", "ssh")

    def test_host_ls(self):
        self._orch_cmd("host", "add", "osd0")
        self._orch_cmd("host", "add", "mon0")
        ret = self._orch_cmd("host", "ls")
        self.assertIn("osd0", ret)
        self.assertIn("mon0", ret)