summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authord11wtq <chris@w3style.co.uk>2014-06-11 10:41:24 +0000
committerd11wtq <chris@w3style.co.uk>2014-06-11 10:50:45 +0000
commit6e485df0845618af78ee19869c5df924e1a3ce93 (patch)
tree0b88b9945fac7354cf169d2ff6c20a8a65bb8c36
parente71e82f8ac167ae840af1395bb474239c5d431a8 (diff)
Rename --no-links to --only
Signed-off-by: d11wtq <chris@w3style.co.uk>
-rw-r--r--docs/cli.md4
-rw-r--r--fig/cli/main.py24
-rw-r--r--tests/integration/cli_test.py4
3 files changed, 16 insertions, 16 deletions
diff --git a/docs/cli.md b/docs/cli.md
index 5e99e834..ac22feee 100644
--- a/docs/cli.md
+++ b/docs/cli.md
@@ -53,9 +53,9 @@ Links are also created between one-off commands and the other containers for tha
$ fig run db /bin/sh -c "psql -h \$DB_1_PORT_5432_TCP_ADDR -U docker"
-If you do not want linked containers to be started when running the one-off command, specify the `--no-links` flag:
+If you do not want linked containers to be started when running the one-off command, specify the `--only` flag:
- $ fig run --no-links web python manage.py shell
+ $ fig run --only web python manage.py shell
## scale
diff --git a/fig/cli/main.py b/fig/cli/main.py
index cfb6a778..3847e982 100644
--- a/fig/cli/main.py
+++ b/fig/cli/main.py
@@ -204,22 +204,22 @@ class TopLevelCommand(Command):
By default, linked services will be started, unless they are already
running. If you do not want to start linked services, use
- `fig run --no-links SERVICE COMMAND [ARGS...]`.
+ `fig run --only SERVICE COMMAND [ARGS...]`.
Usage: run [options] SERVICE COMMAND [ARGS...]
Options:
- -d Detached mode: Run container in the background, print
- new container name.
- -T Disable pseudo-tty allocation. By default `fig run`
- allocates a TTY.
- --rm Remove container after run. Ignored in detached mode.
- --no-links Don't start linked services.
+ -d Detached mode: Run container in the background, print new
+ container name.
+ -T Disable pseudo-tty allocation. By default `fig run`
+ allocates a TTY.
+ --rm Remove container after run. Ignored in detached mode.
+ --only Don't start linked services.
"""
service = self.project.get_service(options['SERVICE'])
- if not options['--no-links']:
+ if not options['--only']:
self.project.up(
service_names=service.get_linked_names(),
start_links=True,
@@ -309,14 +309,14 @@ class TopLevelCommand(Command):
Usage: up [options] [SERVICE...]
Options:
- -d Detached mode: Run containers in the background,
- print new container names.
- --no-links Don't start linked services.
+ -d Detached mode: Run containers in the background,
+ print new container names.
+ --only Don't start linked services.
--no-recreate If containers already exist, don't recreate them.
"""
detached = options['-d']
- start_links = not options['--no-links']
+ start_links = not options['--only']
recreate = not options['--no-recreate']
service_names = options['SERVICE']
diff --git a/tests/integration/cli_test.py b/tests/integration/cli_test.py
index ba309ef1..00e1b79c 100644
--- a/tests/integration/cli_test.py
+++ b/tests/integration/cli_test.py
@@ -65,7 +65,7 @@ class CLITestCase(DockerClientTestCase):
def test_up_with_no_links(self):
self.command.base_dir = 'tests/fixtures/links-figfile'
- self.command.dispatch(['up', '-d', '--no-links', 'web'], None)
+ self.command.dispatch(['up', '-d', '--only', 'web'], None)
web = self.command.project.get_service('web')
db = self.command.project.get_service('db')
console = self.command.project.get_service('console')
@@ -118,7 +118,7 @@ class CLITestCase(DockerClientTestCase):
mock_stdout.fileno = lambda: 1
self.command.base_dir = 'tests/fixtures/links-figfile'
- self.command.dispatch(['run', '--no-links', 'web', '/bin/true'], None)
+ self.command.dispatch(['run', '--only', 'web', '/bin/true'], None)
db = self.command.project.get_service('db')
self.assertEqual(len(db.containers()), 0)