Exemple #1
0
    def test_do_node_list_detail_sort_dir(self):
        client_mock = mock.MagicMock()
        args = self._get_client_mock_args(sort_dir='asc', detail=True)

        n_shell.do_node_list(client_mock, args)
        client_mock.node.list.assert_called_once_with(sort_dir='asc',
                                                      detail=True)
Exemple #2
0
    def test_do_node_list_detail_maintenance(self):
        client_mock = mock.MagicMock()
        args = self._get_client_mock_args(maintenance=True, detail=True)

        n_shell.do_node_list(client_mock, args)
        client_mock.node.list.assert_called_once_with(maintenance=True,
                                                      detail=True)
Exemple #3
0
    def test_do_node_list_detail_resource_class(self):
        client_mock = mock.MagicMock()
        args = self._get_client_mock_args(resource_class='foo', detail=True)

        n_shell.do_node_list(client_mock, args)
        client_mock.node.list.assert_called_once_with(resource_class='foo',
                                                      detail=True)
Exemple #4
0
    def test_do_node_list_sort_key(self):
        client_mock = mock.MagicMock()
        args = self._get_client_mock_args(sort_key='created_at', detail=False)

        n_shell.do_node_list(client_mock, args)
        client_mock.node.list.assert_called_once_with(sort_key='created_at',
                                                      detail=False)
Exemple #5
0
    def test_do_node_list_detail_driver(self):
        client_mock = mock.MagicMock()
        args = self._get_client_mock_args(driver='fake', detail=True)

        n_shell.do_node_list(client_mock, args)
        client_mock.node.list.assert_called_once_with(driver='fake',
                                                      detail=True)
    def test_do_node_list_detail_associated(self):
        client_mock = mock.MagicMock()
        args = self._get_client_mock_args(associated=True, detail=True)

        n_shell.do_node_list(client_mock, args)
        client_mock.node.list.assert_called_once_with(associated=True,
                                                      detail=True)
Exemple #7
0
    def test_do_node_list_provison_state(self):
        client_mock = mock.MagicMock()
        args = self._get_client_mock_args(provision_state='wait call-back')

        n_shell.do_node_list(client_mock, args)
        client_mock.node.list.assert_called_once_with(
            provision_state='wait call-back', detail=False)
    def test_do_node_list_detail_associated(self):
        client_mock = mock.MagicMock()
        args = self._get_client_mock_args(associated=True,
                                          detail=True)

        n_shell.do_node_list(client_mock, args)
        client_mock.node.list.assert_called_once_with(associated=True,
                                                      detail=True)
    def test_do_node_list_detail_maintenance(self):
        client_mock = mock.MagicMock()
        args = self._get_client_mock_args(maintenance=True,
                                          detail=True)

        n_shell.do_node_list(client_mock, args)
        client_mock.node.list.assert_called_once_with(maintenance=True,
                                                      detail=True)
    def test_do_node_list_detail_sort_dir(self):
        client_mock = mock.MagicMock()
        args = self._get_client_mock_args(sort_dir='asc',
                                          detail=True)

        n_shell.do_node_list(client_mock, args)
        client_mock.node.list.assert_called_once_with(sort_dir='asc',
                                                      detail=True)
    def test_do_node_list_sort_key(self):
        client_mock = mock.MagicMock()
        args = self._get_client_mock_args(sort_key='created_at',
                                          detail=False)

        n_shell.do_node_list(client_mock, args)
        client_mock.node.list.assert_called_once_with(sort_key='created_at',
                                                      detail=False)
    def test_do_node_list_detail_driver(self):
        client_mock = mock.MagicMock()
        args = self._get_client_mock_args(driver='fake',
                                          detail=True)

        n_shell.do_node_list(client_mock, args)
        client_mock.node.list.assert_called_once_with(driver='fake',
                                                      detail=True)
    def test_do_node_list_provison_state(self):
        client_mock = mock.MagicMock()
        args = self._get_client_mock_args(provision_state='wait call-back')

        n_shell.do_node_list(client_mock, args)
        client_mock.node.list.assert_called_once_with(
            provision_state='wait call-back',
            detail=False)
    def test_do_node_list_detail_resource_class(self):
        client_mock = mock.MagicMock()
        args = self._get_client_mock_args(resource_class='foo',
                                          detail=True)

        n_shell.do_node_list(client_mock, args)
        client_mock.node.list.assert_called_once_with(resource_class='foo',
                                                      detail=True)
 def test_do_node_list_fields(self):
     client_mock = mock.MagicMock()
     args = self._get_client_mock_args(fields=[['uuid', 'provision_state']])
     n_shell.do_node_list(client_mock, args)
     client_mock.node.list.assert_called_once_with(
         fields=['uuid', 'provision_state'], detail=False)
Exemple #16
0
 def test_do_node_list_fields(self):
     client_mock = mock.MagicMock()
     args = self._get_client_mock_args(fields=[['uuid', 'provision_state']])
     n_shell.do_node_list(client_mock, args)
     client_mock.node.list.assert_called_once_with(
         fields=['uuid', 'provision_state'], detail=False)
Exemple #17
0
    def test_do_node_list(self):
        client_mock = mock.MagicMock()
        args = self._get_client_mock_args()

        n_shell.do_node_list(client_mock, args)
        client_mock.node.list.assert_called_once_with(detail=False)
    def test_do_node_list(self):
        client_mock = mock.MagicMock()
        args = self._get_client_mock_args()

        n_shell.do_node_list(client_mock, args)
        client_mock.node.list.assert_called_once_with(detail=False)