Commit Graph

159 Commits

Author SHA1 Message Date
Jean-Laurent de Morlhon a729e3e2f6 Merge pull request #2464 from askb/2310_filter_engine_label
Fixes issue #2310 - docker-machine ls --filter with engine label
2015-12-08 10:36:21 +01:00
David Gageot aca111a373 Merge pull request #2489 from jeanlaurent/logrus
Replace custom logging system by logrus
2015-12-08 10:27:38 +01:00
Anil Belur 0b0373d436 Fixes issue #2310 - machine ls --filter with engine label
* Added a new members `Labels` to `FilterOptions struct`, and `EngineOptions` to
`HostListItem struct`. `HostListItems` is already being read from the file
store `config.json` which TestFilterHostsReturnSetLabel engine labels.

* Modified `parseFilters()` and added new `func matchesLabel(`) which compares
the one or more label values provided as input.

* Also the changes include added tests for UT and integration.
Note: Have kept `--filter label=<key>=<value>` syntax which is similar to
`docker images --filter` to keep the usability consistent.

review comments from @dgageot

Signed-off-by: Anil Belur <askb23@gmail.com>
2015-12-08 10:15:31 +05:30
Nathan LeClaire ed8ed5f14e Revise SSH help flow and add 'docker-machine ssh' test
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-12-07 13:07:57 -08:00
Jean-Laurent de Morlhon 4792177b11 Logrus Machine Logger
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
2015-12-07 18:36:48 +01:00
Jean-Laurent de Morlhon 2e79f67e93 Cleanup stdout/stderr log initialization
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
2015-12-07 10:33:32 +01:00
Jean-Laurent de Morlhon 109bea4151 Extract interface and Remove log.print
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
2015-12-07 10:33:32 +01:00
David Gageot 3612c55677 Add version to machine ls
Signed-off-by: David Gageot <david@gageot.net>
2015-12-03 16:27:42 +01:00
Anil Belur 2d71dc77dc This is a follow up for PR #2473
Now the returned `err` is being checked to ensure its `Nil`

Signed-off-by: Anil Belur <askb23@gmail.com>
2015-12-03 09:13:44 +05:30
Nathan LeClaire 98a1c8c159 Merge pull request #2473 from askb/2451_key_filter_case
Fixes #2451 - ensures ls filters `<key>` and `<value>` works case-insensitive
2015-12-02 15:42:12 -08:00
Jean-Laurent de Morlhon f9f886f529 Display driver in error without crashing
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
2015-12-02 18:27:21 +01:00
Anil Belur 22cacbf152 Fixes #2451 ensure filters `<key>` and `<value>` work when case-insensitive
Added unit tests to verify filters

Signed-off-by: Anil Belur <askb23@gmail.com>
2015-12-02 22:15:03 +05:30
Anil Belur 77fba72d13 Fixes #2349 - rm get user confirmation before proceeding further
* adds new flag `-y` prompting for user confirmation before removal
* Modified existing integration tests to work with the fix #2349.
* Added tests for checking user confirmation, updated the test cases use sub-shell with `|`
* Updated the reference docs for rm sub-command

incorporated changes by @dgageot, @jeanlaurent and @nathanleclaire

Signed-off-by: Anil Belur <askb23@gmail.com>
2015-12-02 09:17:33 +05:30
Jean-Laurent de Morlhon 75fd2cdac0 Fix for #2415
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
2015-12-01 17:09:40 +01:00
Nathan LeClaire f7ea3d9f19 Merge pull request #2434 from dgageot/check-after-create
Check machine after create
2015-11-30 16:24:43 -08:00
David Gageot 643b7349f7 Remove duplicated FakeApi
Signed-off-by: David Gageot <david@gageot.net>
2015-11-30 18:30:00 +01:00
David Gageot faaac3df8c FIX 2444 Command scp being called twice
Signed-off-by: David Gageot <david@gageot.net>
2015-11-28 11:59:43 +01:00
David Gageot 0c12b7dbc1 Check machine after create
Signed-off-by: David Gageot <david@gageot.net>
2015-11-27 09:43:34 +01:00
David Gageot cfe3972d18 Minor
Signed-off-by: David Gageot <david@gageot.net>
2015-11-26 14:13:52 +01:00
David Gageot 518e3b8bde Rename to rawDriver
Signed-off-by: David Gageot <david@gageot.net>
2015-11-26 14:08:09 +01:00
David Gageot 00f62150b4 FIX nil pointer dereference in machine ls
Signed-off-by: David Gageot <david@gageot.net>
2015-11-26 08:53:09 +01:00
David Gageot 6a1993664d FIX #1619 Timeout test for machine ls
Signed-off-by: David Gageot <david@gageot.net>
2015-11-26 08:49:56 +01:00
David Gageot 89fcca2879 Increase coverage of machine ls tests
Signed-off-by: David Gageot <david@gageot.net>
2015-11-26 08:48:07 +01:00
David Gageot 742cdb958b Add more command tests
Signed-off-by: David Gageot <david@gageot.net>
2015-11-25 14:23:29 +01:00
Nathan LeClaire 47da7f8314 Add interfaces for CLI unit testing and env test
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-11-24 18:09:27 -08:00
David Gageot 9039cbba3d FIX #2086 Add an error column to ls
Signed-off-by: David Gageot <david@gageot.net>
2015-11-24 09:50:43 +01:00
Nathan LeClaire 19ce7b79bd Revise CommandLine interface to contain libmachine client and store
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-11-23 19:29:20 -08:00
David Gageot c2be96eac8 Make user supplied input more obvious
Signed-off-by: David Gageot <david@gageot.net>
2015-11-23 15:52:39 +01:00
Jean-Laurent de Morlhon a55bba3ed2 Move tls-san flag to a local flag for create
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
2015-11-23 12:40:07 +01:00
Jean-Laurent de Morlhon b6519d43e9 More readable code
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
2015-11-23 12:22:57 +01:00
Sam Alba 5b453e6305 Implemented '--tls-san' global arg for adding extra SANs (subject alt names) to server-side certificates
Signed-off-by: Sam Alba <sam.alba@gmail.com>
2015-11-23 12:17:29 +01:00
Nathan LeClaire 42b6249a8c Vendor codegangsta/cli properly
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-11-20 18:20:11 -08:00
David Gageot e537a51926 Merge pull request #2352 from jeanlaurent/better-cli
Fix create usage & description in cli
2015-11-19 13:39:02 +01:00
Jean-Laurent de Morlhon 1521fed1ed Add a version command
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
2015-11-19 12:42:32 +01:00
Jean-Laurent de Morlhon 91b64ff913 Fix create usage & description in cli
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
2015-11-19 12:19:56 +01:00
Roman Coedo f81870e4f1 Global set for fish env
Using "set -x" only exports the variable in the local scope.
This is a limitation when an user needs to invoke "docker-machine" in a fish script.

Using "set -gx" instead exports the variable globally.

Signed-off-by: Roman Coedo <romancoedo@gmail.com>
2015-11-18 21:35:32 +01:00
David Gageot fa24554871 Merge pull request #2290 from dgageot/quality-03-simpler-test
Quality 03 simpler test
2015-11-18 09:40:25 +01:00
David Gageot 0c296783be Merge pull request #2289 from dgageot/quality-02-move-code
Quality 02 move code
2015-11-18 09:40:01 +01:00
Nick Gauthier a34a394810 skip printing swarm info when host options swarm info is nil
Fixes #2252 #2280

Signed-off-by: Nick Gauthier <ngauthier@gmail.com>
2015-11-16 15:54:16 +01:00
David Gageot a8e3ee868f Simpler test code
Signed-off-by: David Gageot <david@gageot.net>
2015-11-13 16:27:50 +01:00
David Gageot eb39f098d5 Move code where it's used
Signed-off-by: David Gageot <david@gageot.net>
2015-11-13 16:27:50 +01:00
David Gageot 8bbfc6ef2a Remove unused code
Signed-off-by: David Gageot <david@gageot.net>
2015-11-13 16:27:50 +01:00
Jean-Laurent de Morlhon fe37f1fb0d Fix #2204 broken env unset
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
2015-11-12 17:32:27 +01:00
Olivier Gambier 89d9854943 Another pass at linting
Signed-off-by: Olivier Gambier <olivier@docker.com>
2015-11-10 16:58:14 +01:00
David Gageot 68092b3524 FIX #2154 query virtualbox serially
Signed-off-by: David Gageot <david@gageot.net>
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-11-07 16:14:25 +01:00
Olivier Gambier d2ada6488c Lint
Signed-off-by: Olivier Gambier <olivier@docker.com>
2015-11-05 13:34:07 -08:00
David Gageot 99d6fe134d Introduce CommandLine interface
Signed-off-by: David Gageot <david@gageot.net>
2015-11-05 06:07:57 +01:00
Olivier Gambier 19fc49b58a Lint, step 1
The easy stuff

Signed-off-by: Olivier Gambier <olivier@docker.com>
2015-11-04 14:17:58 -08:00
David Gageot 8a452a9629 FIX #2064 Support local windows path
+ Use assert in tests
+ Improve parsing
+ Simplify code and tests

Signed-off-by: David Gageot <david@gageot.net>
2015-11-04 09:48:21 +01:00
Nathan LeClaire 9a4bc9a20d Ensure that ls will still work when plugin cannot be found
Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-11-03 11:35:30 -08:00