Update kolla command to kolla-cli action command

to keep the kolla-ansile action by alphabet

Change-Id: Iee3394453be0e16daf7ea3486e951ce758da3b66
This commit is contained in:
gujin 2019-08-06 21:00:54 +08:00
parent 55963d94f6
commit ce489ad252
3 changed files with 13 additions and 13 deletions

View File

@ -150,13 +150,14 @@ class TestFunctional(KollaCliTest):
'error performing whole host deploy %s' % msg)
# test deploy with timeout
msg = self.run_cli_cmd('deploy --timeout .001', expect_error=True)
msg = self.run_cli_cmd('action deploy --timeout .001',
expect_error=True)
self.assertIn('timed out', msg)
def test_upgrade(self):
# test will upgrade an environment with no hosts, mostly a NOP,
# but it will go through the client code paths.
self.run_cli_cmd('upgrade -v')
self.run_cli_cmd('action upgrade -v')
msg = ''
# run rabbitmq service deploy
@ -178,7 +179,7 @@ class TestFunctional(KollaCliTest):
def test_pull(self):
# test will upgrade an environment with no hosts, mostly a NOP,
# but it will go through the client code paths.
self.run_cli_cmd('pull -v')
self.run_cli_cmd('action pull -v')
CLIENT.host_add(['test_pull_host'])
CLIENT.set_deploy_mode(remote_mode=True)

View File

@ -24,7 +24,7 @@ class TestUnit(KollaCliUnitTest):
def test_deploy(self, _, mock_get_status, mock_deploy):
mock_get_status.return_value = 0
mock_deploy.return_value = self.get_fake_job()
ret = self.run_cli_command('deploy')
ret = self.run_cli_command('action deploy')
self.assertEqual(ret, 0)
mock_deploy.assert_called_once_with(None, False, 1, None)
@ -37,6 +37,6 @@ class TestUnit(KollaCliUnitTest):
mock_deploy.return_value = self.get_fake_job()
services = ['foo', 'bar']
ret = self.run_cli_command(
'deploy --services {}'.format(','.join(services)))
'action deploy --services {}'.format(','.join(services)))
self.assertEqual(ret, 0)
mock_deploy.assert_called_once_with(None, False, 1, services)

View File

@ -29,12 +29,17 @@ console_scripts =
kolla-cli = kolla_cli.shell:main
kolla.cli =
action_check = kolla_cli.commands.kolla_action:Check
action_deploy = kolla_cli.commands.kolla_action:Deploy
action_genconfig = kolla_cli.commands.kolla_action:Genconfig
action_postdeploy = kolla_cli.commands.kolla_action:PostDeploy
action_pull = kolla_cli.commands.kolla_action:Pull
action_reconfigure = kolla_cli.commands.kolla_action:Reconfigure
action_upgrade = kolla_cli.commands.kolla_action:Upgrade
certificate_init = kolla_cli.commands.kolla_action:CertificateInit
config_reset = kolla_cli.commands.config:ConfigReset
config_import = kolla_cli.commands.config:ConfigImport
deploy = kolla_cli.commands.kolla_action:Deploy
dump = kolla_cli.commands.support:Dump
genconfig = kolla_cli.commands.kolla_action:Genconfig
getdeploy = kolla_cli.commands.mode:Getdeploy
group_add = kolla_cli.commands.group:GroupAdd
group_addhost = kolla_cli.commands.group:GroupAddhost
@ -54,20 +59,14 @@ kolla.cli =
password_list = kolla_cli.commands.password:PasswordList
password_set = kolla_cli.commands.password:PasswordSet
password_setkey = kolla_cli.commands.password:PasswordSetKey
postdeploy = kolla_cli.commands.kolla_action:PostDeploy
property_clear = kolla_cli.commands.property:PropertyClear
property_list = kolla_cli.commands.property:PropertyList
property_set = kolla_cli.commands.property:PropertySet
pull = kolla_cli.commands.kolla_action:Pull
reconfigure = kolla_cli.commands.kolla_action:Reconfigure
service_addgroup = kolla_cli.commands.service:ServiceAddGroup
service_list = kolla_cli.commands.service:ServiceList
service_listgroups = kolla_cli.commands.service:ServiceListGroups
service_removegroup = kolla_cli.commands.service:ServiceRemoveGroup
setdeploy = kolla_cli.commands.mode:Setdeploy
check = kolla_cli.commands.kolla_action:Check
upgrade = kolla_cli.commands.kolla_action:Upgrade
[extract_messages]
keywords = _ gettext ngettext l_ lazy_gettext