Remove node join/leave from senlinclient

Remove node join/leave from senlinclient

Change-Id: Iad829753df418e5fe236d8d3f2a7c5151ce3cc02
This commit is contained in:
Ethan Lynn 2016-01-15 11:23:11 +08:00
parent 5c654bdf9a
commit 8ff51b8398
3 changed files with 0 additions and 53 deletions

View File

@ -1194,33 +1194,6 @@ class ShellTest(testtools.TestCase):
service.update_node.assert_called_once_with('node_id', **attrs)
mock_show.assert_called_once_with(service, 'node_id')
@mock.patch.object(sh, '_show_node')
def test_do_node_join(self, mock_show):
service = mock.Mock()
args = {
'id': 'node1',
'cluster': 'cluster1'
}
args = self._make_args(args)
resp = {'action': 'action_id'}
service.node_join.return_value = resp
sh.do_node_join(service, args)
service.node_join.assert_called_once_with('node1', 'cluster1')
mock_show.assert_called_once_with(service, 'node1')
@mock.patch.object(sh, '_show_node')
def test_do_node_leave(self, mock_show):
service = mock.Mock()
args = {
'id': 'node1',
}
args = self._make_args(args)
resp = {'action': 'action_id'}
service.node_leave.return_value = resp
sh.do_node_leave(service, args)
service.node_leave.assert_called_once_with('node1')
mock_show.assert_called_once_with(service, 'node1')
@mock.patch.object(utils, 'print_list')
def test_do_event_list(self, mock_print):
service = mock.Mock()

View File

@ -131,12 +131,6 @@ class Client(object):
def delete_node(self, node, ignore_missing=True):
return self.service.delete_node(node, ignore_missing)
def node_join(self, node, cluster):
return self.service.node_join(node, cluster)
def node_leave(self, node):
return self.service.node_leave(node)
def receivers(self, **queries):
return self.service.receivers(**queries)

View File

@ -975,26 +975,6 @@ def do_node_update(service, args):
_show_node(service, node.id)
@utils.arg('-c', '--cluster', required=True,
help=_('ID or name of cluster for node to join.'))
@utils.arg('id', metavar='<NODE>',
help=_('Name or ID of node to operate on.'))
def do_node_join(service, args):
"""Make node join the specified cluster."""
resp = service.node_join(args.id, args.cluster)
print('Request accepted by action: %s' % resp['action'])
_show_node(service, args.id)
@utils.arg('id', metavar='<NODE>',
help=_('Name or ID of node to operate on.'))
def do_node_leave(service, args):
"""Make node leave its current cluster."""
resp = service.node_leave(args.id)
print('Request accepted by action: %s' % resp['action'])
_show_node(service, args.id)
# RECEIVERS