Skip to content

Commit

Permalink
Merge 7190a16 into 4c6f9a5
Browse files Browse the repository at this point in the history
  • Loading branch information
solarkennedy committed Dec 10, 2015
2 parents 4c6f9a5 + 7190a16 commit 93c1be9
Show file tree
Hide file tree
Showing 66 changed files with 573 additions and 573 deletions.
8 changes: 4 additions & 4 deletions build-manpages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ mkdir -p /nail/etc/services
mkdir -p docs/man/
. .tox/manpages/bin/activate

VERSION=`./paasta_tools/paasta_cli/paasta_cli.py --version 2>&1 | cut -f 2 -d ' '`
VERSION=`./paasta_tools/cli/cli.py --version 2>&1 | cut -f 2 -d ' '`

function build_man() {
COMMAND=$1
echo "paasta $COMMAND --help"
help2man --name=$COMMAND --version-string=$VERSION "./paasta_tools/paasta_cli/paasta_cli.py $COMMAND" > docs/man/paasta-$COMMAND.1
help2man --name=$COMMAND --version-string=$VERSION "./paasta_tools/cli/cli.py $COMMAND" > docs/man/paasta-$COMMAND.1
}

for FILE in paasta_tools/paasta_cli/cmds/*.py
for FILE in paasta_tools/cli/cmds/*.py
do
BASE=`basename $FILE`
COMMAND=`echo "${BASE%.*}" | tr '_' '-'`
Expand All @@ -48,4 +48,4 @@ for COMMAND in start stop restart; do
done

# And then finally the "main" paasta command
help2man --name='paasta' --version-string=$VERSION "./paasta_tools/paasta_cli/paasta_cli.py" > docs/man/paasta.1
help2man --name='paasta' --version-string=$VERSION "./paasta_tools/cli/cli.py" > docs/man/paasta.1
8 changes: 4 additions & 4 deletions debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -477,8 +477,8 @@ paasta-tools (0.12.60-yelp1) lucid; urgency=low
* 0.12.60 tagged with 'make release'
Commit: Merge branch PAASTA-843b Conflicts:
general_itests/steps/paasta_execute_docker_command.py
paasta_tools/paasta_cli/cmds/local_run.py
paasta_tools/paasta_cli/utils.py
paasta_tools/cli/cmds/local_run.py
paasta_tools/cli/utils.py

-- Kyle Anderson <kwa@yelp.com> Fri, 28 Aug 2015 10:26:58 -0700

Expand Down Expand Up @@ -2114,7 +2114,7 @@ paasta-tools (0.7.21-yelp1) lucid; urgency=low

paasta-tools (0.7.20-yelp1) lucid; urgency=low

* Update paasta_cli documentation and integration tests
* Update cli documentation and integration tests

-- Karthig Balendran <karthig@yelp.com> Tue, 16 Dec 2014 11:51:30 -0800

Expand All @@ -2126,7 +2126,7 @@ paasta-tools (0.7.19-yelp1) lucid; urgency=low

paasta-tools (0.7.18-yelp1) lucid; urgency=low

* Create servicedocs stubs for paasta_cli
* Create servicedocs stubs for cli

-- Karthig Balendran <karthig@yelp.com> Fri, 12 Dec 2014 17:23:56 -0800

Expand Down
2 changes: 1 addition & 1 deletion debian/paasta-tools.links
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ usr/share/python/paasta-tools/bin/generate_services_file.py usr/bin/generate_ser
usr/share/python/paasta-tools/bin/generate_services_yaml.py usr/bin/generate_services_yaml
usr/share/python/paasta-tools/bin/list_chronos_jobs.py usr/bin/list_chronos_jobs
usr/share/python/paasta-tools/bin/list_marathon_service_instances.py usr/bin/list_marathon_service_instances
usr/share/python/paasta-tools/bin/paasta_cli.py usr/bin/paasta
usr/share/python/paasta-tools/bin/cli.py usr/bin/paasta
usr/share/python/paasta-tools/bin/paasta_execute_docker_command.py usr/bin/paasta_execute_docker_command
usr/share/python/paasta-tools/bin/paasta_metastatus.py usr/bin/paasta_metastatus
usr/share/python/paasta-tools/bin/paasta_serviceinit.py usr/bin/paasta_serviceinit
Expand Down
2 changes: 1 addition & 1 deletion docs/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ it is a little tricky.
* You can load the appropriate rules into your shell. Note that it is sensitive
to the exact path you use to invoke the command getting autocomplete hints:

* ``eval "$(.tox/py/bin/register-python-argcomplete ./paasta_tools/paasta_cli/paasta_cli.py)"``
* ``eval "$(.tox/py/bin/register-python-argcomplete ./paasta_tools/cli/cli.py)"``

* There is a simple integration test. See the itest/ folder.

Expand Down
2 changes: 1 addition & 1 deletion general_itests/steps/fsm_wizard_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def _load_yelpsoa_configs(context, service):
def step_impl_when_fsm_auto(context):
service = "new_paasta_service"
cmd = (
"../paasta_tools/paasta_cli/paasta_cli.py fsm "
"../paasta_tools/cli/cli.py fsm "
"--yelpsoa-config-root %s "
"--auto "
"--service-name %s "
Expand Down
4 changes: 2 additions & 2 deletions general_itests/steps/local_run_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def non_interactive_local_run(context, var, val):
# container dies before it gets a chance to lookup the continerid
# (which causes jenkins flakes) The sleep can be removed once local-run
# understands that containers can die quickly.
localrun_cmd = ("paasta_cli.py local-run "
localrun_cmd = ("cli.py local-run "
"--yelpsoa-config-root ../fake_soa_configs_local_run/ "
"--service fake_simple_service "
"--cluster test-cluster "
Expand Down Expand Up @@ -67,7 +67,7 @@ def local_run_on_chronos_job(context):
# container dies before it gets a chance to lookup the continerid
# (which causes jenkins flakes) The sleep can be removed once local-run
# understands that containers can die quickly.
local_run_cmd = ("paasta_cli.py local-run "
local_run_cmd = ("cli.py local-run "
"--yelpsoa-config-root ../fake_soa_configs_local_run/ "
"--service fake_simple_service "
"--cluster test-cluster "
Expand Down
10 changes: 5 additions & 5 deletions general_itests/steps/tail_paasta_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from behave import when, then
import mock

from paasta_tools.paasta_cli.cmds import logs
from paasta_tools.cli.cmds import logs


@when(u'we tail paasta logs and let threads run')
Expand All @@ -31,10 +31,10 @@ def tail_paasta_logs_let_threads_be_threads(context):
context.components = ['deploy', 'monitoring']
context.clusters = ['fake_cluster1', 'fake_cluster2']
with contextlib.nested(
mock.patch('paasta_tools.paasta_cli.cmds.logs.determine_scribereader_envs', autospec=True),
mock.patch('paasta_tools.paasta_cli.cmds.logs.scribe_tail', autospec=True),
mock.patch('paasta_tools.paasta_cli.cmds.logs.log', autospec=True),
mock.patch('paasta_tools.paasta_cli.cmds.logs.print_log', autospec=True),
mock.patch('paasta_tools.cli.cmds.logs.determine_scribereader_envs', autospec=True),
mock.patch('paasta_tools.cli.cmds.logs.scribe_tail', autospec=True),
mock.patch('paasta_tools.cli.cmds.logs.log', autospec=True),
mock.patch('paasta_tools.cli.cmds.logs.print_log', autospec=True),
) as (
context.determine_scribereader_envs_patch,
scribe_tail_patch,
Expand Down
6 changes: 3 additions & 3 deletions paasta_tools/paasta_cli/README → paasta_tools/cli/README
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ A command line utility for interacting with the Yelp PaaSTA stack

Adding a new PaaSTA command:

1) Create a file in src/paasta_tools/paasta_cli/cmds. Name it
1) Create a file in src/paasta_tools/cli/cmds. Name it
after the command you wish to write. If you wish to create 'paasta foo',
create a file called 'foo.py'. Line 48 in paasta_cli.py will discover
create a file called 'foo.py'. Line 48 in cli.py will discover
command plugins every time "paasta" is called and execute them.

2) Your new paasta command *MUST* implement: add_subparser(subparsers)
Expand Down Expand Up @@ -40,5 +40,5 @@ Adding a new PaaSTA command:

That is all :)

4) Don't forget to add unit tests to src/tests/paasta_cli for any new commands
4) Don't forget to add unit tests to src/tests/cli for any new commands
you write.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

import pkg_resources

from paasta_tools.paasta_cli import cmds
from paasta_tools.paasta_cli.utils \
from paasta_tools.cli import cmds
from paasta_tools.cli.utils \
import modules_in_pkg as paasta_commands_dir, load_method
from paasta_tools.utils import configure_log

Expand All @@ -37,7 +37,7 @@ def add_subparser(command, subparsers):
:param command: a simple string - e.g. 'list'
:param subparsers: an ArgumentParser object"""
module_name = 'paasta_tools.paasta_cli.cmds.%s' % command
module_name = 'paasta_tools.cli.cmds.%s' % command
add_subparser_fn = load_method(module_name, 'add_subparser')
add_subparser_fn(subparsers)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@

from paasta_tools.marathon_tools import get_all_namespaces_for_service
from paasta_tools.monitoring_tools import get_team
from paasta_tools.paasta_cli.utils import guess_service_name
from paasta_tools.paasta_cli.utils import is_file_in_dir
from paasta_tools.paasta_cli.utils import NoSuchService
from paasta_tools.paasta_cli.utils import PaastaCheckMessages
from paasta_tools.paasta_cli.utils import success
from paasta_tools.paasta_cli.utils import validate_service_name
from paasta_tools.paasta_cli.utils import x_mark
from paasta_tools.cli.utils import guess_service_name
from paasta_tools.cli.utils import is_file_in_dir
from paasta_tools.cli.utils import NoSuchService
from paasta_tools.cli.utils import PaastaCheckMessages
from paasta_tools.cli.utils import success
from paasta_tools.cli.utils import validate_service_name
from paasta_tools.cli.utils import x_mark
from paasta_tools.utils import DEPLOY_PIPELINE_NON_DEPLOY_STEPS
from paasta_tools.utils import get_service_instance_list
from paasta_tools.utils import get_git_url
Expand Down Expand Up @@ -283,7 +283,7 @@ def smartstack_check(service, service_path):

def paasta_check(args):
"""Analyze the service in the PWD to determine if it is paasta ready
:param args: argparse.Namespace obj created from sys.args by paasta_cli"""
:param args: argparse.Namespace obj created from sys.args by cli"""
service = guess_service_name()
service_path = os.path.join('/nail/etc/services', service)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import os
import sys

from paasta_tools.paasta_cli.cmds.check import makefile_responds_to
from paasta_tools.paasta_cli.utils import validate_service_name
from paasta_tools.cli.cmds.check import makefile_responds_to
from paasta_tools.cli.utils import validate_service_name
from paasta_tools.utils import _log
from paasta_tools.utils import _run
from paasta_tools.utils import get_username
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from paasta_tools.paasta_cli.utils import execute_paasta_serviceinit_on_remote_master
from paasta_tools.paasta_cli.utils import figure_out_service_name
from paasta_tools.paasta_cli.utils import lazy_choices_completer
from paasta_tools.paasta_cli.utils import list_services
from paasta_tools.paasta_cli.utils import list_instances
from paasta_tools.cli.utils import execute_paasta_serviceinit_on_remote_master
from paasta_tools.cli.utils import figure_out_service_name
from paasta_tools.cli.utils import lazy_choices_completer
from paasta_tools.cli.utils import list_services
from paasta_tools.cli.utils import list_instances
from paasta_tools.utils import compose_job_id
from paasta_tools.utils import list_clusters

Expand Down Expand Up @@ -51,8 +51,8 @@ def paasta_emergency_restart(args):
It should not be needed in normal circumstances.
See the service-docs for paasta emergency-stop and emergency-start for details of what exactly this does:
http://servicedocs.yelpcorp.com/docs/paasta_tools/generated/paasta_tools.paasta_cli.cmds.emergency_stop.html
http://servicedocs.yelpcorp.com/docs/paasta_tools/generated/paasta_tools.paasta_cli.cmds.emergency_start.html
http://servicedocs.yelpcorp.com/docs/paasta_tools/generated/paasta_tools.cli.cmds.emergency_stop.html
http://servicedocs.yelpcorp.com/docs/paasta_tools/generated/paasta_tools.cli.cmds.emergency_start.html
"""
service = figure_out_service_name(args)
print "Performing an emergency restart on %s...\n" % compose_job_id(service, args.instance)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@

from service_configuration_lib import DEFAULT_SOA_DIR

from paasta_tools.paasta_cli.utils import execute_paasta_serviceinit_on_remote_master
from paasta_tools.paasta_cli.utils import figure_out_service_name
from paasta_tools.paasta_cli.utils import lazy_choices_completer
from paasta_tools.paasta_cli.utils import list_services
from paasta_tools.paasta_cli.utils import list_instances
from paasta_tools.cli.utils import execute_paasta_serviceinit_on_remote_master
from paasta_tools.cli.utils import figure_out_service_name
from paasta_tools.cli.utils import lazy_choices_completer
from paasta_tools.cli.utils import list_services
from paasta_tools.cli.utils import list_instances
from paasta_tools.utils import compose_job_id
from paasta_tools.utils import list_clusters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from paasta_tools.paasta_cli.utils import execute_paasta_serviceinit_on_remote_master
from paasta_tools.paasta_cli.utils import figure_out_service_name
from paasta_tools.paasta_cli.utils import lazy_choices_completer
from paasta_tools.paasta_cli.utils import list_services
from paasta_tools.paasta_cli.utils import list_instances
from paasta_tools.cli.utils import execute_paasta_serviceinit_on_remote_master
from paasta_tools.cli.utils import figure_out_service_name
from paasta_tools.cli.utils import lazy_choices_completer
from paasta_tools.cli.utils import list_services
from paasta_tools.cli.utils import list_instances
from paasta_tools.utils import compose_job_id
from paasta_tools.utils import list_clusters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@

from service_configuration_lib import DEFAULT_SOA_DIR

from paasta_tools.paasta_cli.utils import execute_paasta_serviceinit_on_remote_master
from paasta_tools.paasta_cli.utils import figure_out_service_name
from paasta_tools.paasta_cli.utils import lazy_choices_completer
from paasta_tools.paasta_cli.utils import list_services
from paasta_tools.paasta_cli.utils import list_instances
from paasta_tools.cli.utils import execute_paasta_serviceinit_on_remote_master
from paasta_tools.cli.utils import figure_out_service_name
from paasta_tools.cli.utils import lazy_choices_completer
from paasta_tools.cli.utils import list_services
from paasta_tools.cli.utils import list_instances
from paasta_tools.utils import compose_job_id
from paasta_tools.utils import list_clusters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@

from service_configuration_lib import DEFAULT_SOA_DIR

from paasta_tools.paasta_cli.fsm.questions import _yamlize
from paasta_tools.paasta_cli.fsm.questions import get_clusternames_from_deploy_stanza
from paasta_tools.paasta_cli.fsm.questions import get_deploy_stanza
from paasta_tools.paasta_cli.fsm.questions import get_marathon_stanza
from paasta_tools.paasta_cli.fsm.questions import get_monitoring_stanza
from paasta_tools.paasta_cli.fsm.questions import get_service_stanza
from paasta_tools.paasta_cli.fsm.questions import get_smartstack_stanza
from paasta_tools.paasta_cli.fsm.questions import get_srvname
from paasta_tools.paasta_cli.fsm.service import Service
from paasta_tools.paasta_cli.utils import list_teams
from paasta_tools.paasta_cli.utils import lazy_choices_completer
from paasta_tools.cli.fsm.questions import _yamlize
from paasta_tools.cli.fsm.questions import get_clusternames_from_deploy_stanza
from paasta_tools.cli.fsm.questions import get_deploy_stanza
from paasta_tools.cli.fsm.questions import get_marathon_stanza
from paasta_tools.cli.fsm.questions import get_monitoring_stanza
from paasta_tools.cli.fsm.questions import get_service_stanza
from paasta_tools.cli.fsm.questions import get_smartstack_stanza
from paasta_tools.cli.fsm.questions import get_srvname
from paasta_tools.cli.fsm.service import Service
from paasta_tools.cli.utils import list_teams
from paasta_tools.cli.utils import lazy_choices_completer
from paasta_tools.utils import PaastaColors


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@

from paasta_tools.monitoring_tools import get_team
from paasta_tools.monitoring_tools import get_team_email_address
from paasta_tools.paasta_cli.utils import guess_service_name
from paasta_tools.paasta_cli.utils import lazy_choices_completer
from paasta_tools.paasta_cli.utils import list_services
from paasta_tools.paasta_cli.utils import NoSuchService
from paasta_tools.paasta_cli.utils import validate_service_name
from paasta_tools.cli.utils import guess_service_name
from paasta_tools.cli.utils import lazy_choices_completer
from paasta_tools.cli.utils import list_services
from paasta_tools.cli.utils import NoSuchService
from paasta_tools.cli.utils import validate_service_name
from paasta_tools.utils import get_git_url
from paasta_tools.utils import _run

Expand All @@ -46,7 +46,7 @@ def add_subparser(subparsers):

def paasta_generate_pipeline(args):
"""Generate a Jenkins build pipeline.
:param args: argparse.Namespace obj created from sys.args by paasta_cli"""
:param args: argparse.Namespace obj created from sys.args by cli"""
service = args.service or guess_service_name()
try:
validate_service_name(service)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
from paasta_tools.marathon_tools import get_all_namespaces_for_service
from paasta_tools.monitoring_tools import get_runbook
from paasta_tools.monitoring_tools import get_team
from paasta_tools.paasta_cli.cmds.status import get_actual_deployments
from paasta_tools.paasta_cli.utils import figure_out_service_name
from paasta_tools.paasta_cli.utils import get_pipeline_url
from paasta_tools.paasta_cli.utils import lazy_choices_completer
from paasta_tools.paasta_cli.utils import list_services
from paasta_tools.cli.cmds.status import get_actual_deployments
from paasta_tools.cli.utils import figure_out_service_name
from paasta_tools.cli.utils import get_pipeline_url
from paasta_tools.cli.utils import lazy_choices_completer
from paasta_tools.cli.utils import list_services
from paasta_tools.utils import get_git_url
from paasta_tools.utils import NoDeploymentsAvailable
from paasta_tools.utils import PaastaColors
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import os
import sys

from paasta_tools.paasta_cli.utils import get_jenkins_build_output_url
from paasta_tools.paasta_cli.utils import validate_service_name
from paasta_tools.cli.utils import get_jenkins_build_output_url
from paasta_tools.cli.utils import validate_service_name
from paasta_tools.utils import _log
from paasta_tools.utils import _run
from paasta_tools.utils import build_docker_tag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

"""Contains methods used by the paasta client to list Yelp services"""
from paasta_tools.utils import SPACER
from paasta_tools.paasta_cli.utils import list_services
from paasta_tools.paasta_cli.utils import list_paasta_services
from paasta_tools.paasta_cli.utils import list_service_instances
from paasta_tools.cli.utils import list_services
from paasta_tools.cli.utils import list_paasta_services
from paasta_tools.cli.utils import list_service_instances


def add_subparser(subparsers):
Expand All @@ -38,7 +38,7 @@ def add_subparser(subparsers):

def paasta_list(args):
"""Print a list of Yelp services currently running
:param args: argparse.Namespace obj created from sys.args by paasta_cli"""
:param args: argparse.Namespace obj created from sys.args by cli"""
if args.print_instances:
services = list_service_instances()
elif args.all:
Expand Down
File renamed without changes.
Loading

0 comments on commit 93c1be9

Please sign in to comment.