Commit Graph

78 Commits

Author SHA1 Message Date
Matt Vinall 0815379c26 Filter openstack floating IPs by tenant ID
Merge j2sol:filter-openstack-floating and fix up for comments in PR #1809.

Signed-off-by: Matt Vinall <matt.vinall@imgtec.com>
2015-12-15 22:30:49 +00:00
Jean-Laurent de Morlhon 1079735af8 Remove withFields
Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
2015-12-07 10:34:43 +01:00
Fabrizio 6e43436a3d Sanitize keynames by replacing dots with underscores
Signed-off-by: Fabrizio Soppelsa <fsoppelsa@mirantis.com>
2015-12-05 16:04:35 -08:00
Vladimir Varankin 0735f3f447 fix drivers GetUrl to build propper IPv6 addr
Signed-off-by: Vladimir Varankin <nek.narqo+git@gmail.com>
2015-11-13 13:19:15 +03:00
Olivier Gambier 89d9854943 Another pass at linting
Signed-off-by: Olivier Gambier <olivier@docker.com>
2015-11-10 16:58:14 +01:00
Amir Mohammad Saied a6c44f5d4e Use rackspace's specialized client
`openstack.NewDerivedDriver` sets client to `openstack.GenericClient`
therefore `rackspace.Client` is getting ignored.

`rackspace.Client.Authenticate` has different semantics than
`openstack.GenericClient.Authenticate`, thus almost all operations with
`rackspace` driver fail at the moment.

Signed-off-by: Amir Mohammad Saied <amirsaied@gmail.com>
2015-11-06 18:30:31 +00:00
Olivier Gambier d2ada6488c Lint
Signed-off-by: Olivier Gambier <olivier@docker.com>
2015-11-05 13:34:07 -08:00
David Gageot 11922080a1 FIX #2171 Fix faulty flag and add tests for SetConfigFromFlags
Signed-off-by: David Gageot <david@gageot.net>
2015-11-05 18:57:03 +01:00
Nathan LeClaire 92d67ff13f Merge pull request #850 from dudymas/feat/openstack-nova-ip-pools
feature to fix #737 - openstack driver can use nova to allocate floating ips
2015-10-29 12:33:43 -07:00
Flavio Castelli 2339e548f6 Fix panic when using openstack driver
The openstack driver was unusable because some cli flags were redifined.

That caused a runtime error like:

  create flag redefined: openstack-ssh-user
  panic: create flag redefined: openstack-ssh-user

Signed-off-by: Flavio Castelli <fcastelli@suse.com>
2015-10-28 08:53:54 +01:00
David Gageot 6c5dc41e6d Revert "Remove useless duplication on GetSSHHostname"
This reverts commit b6462eb6d0.

Signed-off-by: David Gageot <david@gageot.net>
2015-10-26 18:47:14 +01:00
Olivier Gambier b6462eb6d0 Remove useless duplication on GetSSHHostname
Signed-off-by: Olivier Gambier <olivier@docker.com>
2015-10-21 13:48:13 -07:00
Olivier Gambier bf3cd8b8f4 Remove useless duplication on PreCreateCheck
Signed-off-by: Olivier Gambier <olivier@docker.com>
2015-10-21 13:48:13 -07:00
Jeremy White f9e40c2ce2 feat(openstack): add flag for using nova networks
Signed-off-by: Jeremy White <dudymas@gmail.com>
2015-10-21 16:03:26 -04:00
Nathan LeClaire c8edb33ecd Move towards using external binaries / RPC plugins
- First RPC steps

- Work on some flaws in RPC model

- Remove unused TLS settings from Engine and Swarm options

- Add code to correctly encode data over the network

- Add client driver for RPC

- Rename server driver file

- Start to make marshal make sense

- Fix silly RPC method args and add client

- Fix some issues with RPC calls, and marshaling

- Simplify plugin main.go

- Move towards 100% plugin in CLI

- Ensure that plugin servers are cleaned up properly

- Make flag parsing for driver flags work properly

Includes some work carried from @dmp42 updating the build process and
tests to use the new method.

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-10-16 16:34:56 -07:00
Christian Mouttet e256702c8c add default AddressType: Fixed
Signed-off-by: Christian Mouttet <cmouttet@gmail.com>
2015-10-10 17:19:45 +02:00
Guillaume Giamarchi 6829837fd5 Add environment varibles for OpenStack flags
Some flags for the OpenStack driver did not have
a corresponding environment variable.

Among others, this is needed to run bats core tests
with the OpenStack driver.

Signed-off-by: Guillaume Giamarchi <guillaume.giamarchi@gmail.com>
2015-10-09 15:16:00 +02:00
Hironobu Saitoh f659e817b4 Add --openstack-ip-version option
This option allows users to specify IP version.

Signed-off-by: Hironobu Saitoh <hiro@hironobu.org>
2015-10-09 07:29:48 +09:00
Nathan LeClaire b5927f10c4 Make libmachine usable by outside world
- Clear out some cruft tightly coupling libmachine to filestore

- Comment out drivers other than virtualbox for now

- Change way too many things

- Mostly, break out the code to be more modular.

- Destroy all traces of "provider" in its current form.  It will be
brought back as something more sensible, instead of something which
overlaps in function with both Host and Store.

- Fix mis-managed config passthru

- Remove a few instances of state stored in env vars

- This should be explicitly communicated in Go-land, not through the
shell.

- Rename "store" module to "persist"

- This is done mostly to avoid confusion about the fact that a concrete
instance of a "Store" interface is oftentimes referred to as "store" in
the code.

- Rip out repetitive antipattern for getting store

- This replaces the previous repetive idiom for getting the cert info, and
consequently the store, with a much less repetitive idiom.

- Also, some redundant methods in commands.go for accessing hosts have
either been simplified or removed entirely.

- First steps towards fixing up tests

- Test progress continues

- Replace unit tests with integration tests

- MAKE ALL UNIT TESTS PASS YAY

- Add helper test files

- Don't write to disk in libmachine/host

- Heh.. coverage check strikes again

- Fix remove code

- Move cert code around

- Continued progress: simplify Driver

- Fixups and make creation work with new model

- Move drivers module inside of libmachine

- Move ssh module inside of libmachine

- Move state module to libmachine

- Move utils module to libmachine

- Move version module to libmachine

- Move log module to libmachine

- Modify some constructor methods around

- Change Travis build dep structure

- Boring gofmt fix

- Add version module

- Move NewHost to store

- Update some boring cert path infos to make API easier to use

- Fix up some issues around the new model

- Clean up some cert path stuff

- Don't use shady functions to get store path :D

- Continue artifact work

- Fix silly machines dir bug

- Continue fixing silly path issues

- Change up output of vbm a bit

- Continue work to make example go

- Change output a little more

- Last changes needed to make create finish properly

- Fix config.go to use libmachine

- Cut down code duplication and make both methods work with libmachine

- Add pluggable logging implementation

- Return error when machine already in desired state

- Update example to show log method

- Fix file:// bug

- Fix Swarm defaults

- Remove unused TLS settings from Engine and Swarm options

- Remove spurious error

- Correct bug detecting if migration was performed

- Fix compilation errors from tests

- Fix most of remaining test issues

- Fix final silly bug in tests

- Remove extraneous debug code

- Add -race to test command

- Appease the gofmt

- Appease the generate coverage

- Making executive decision to remove Travis coverage check

In the early days I thought this would be a good idea because it would
encourage people to write tests in case they added a new module.  Well,
in fact it has just turned into a giant nuisance and made refactoring
work like this even more difficult.

- Move Get to Load
- Move HostListItem code to CLI

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-09-23 12:30:15 -07:00
David Zerulla 66b4e3b826 openstack: New machine active timeout parameter
* Adds `--openstack-active-timeout` parameter to set the timeout
  until a machine is active. Closes #1632

Signed-off-by: David Zerulla <ddaze@outlook.de>
2015-08-11 17:45:08 +02:00
Nathan LeClaire fb2e843e99 - Re-introduce config migration; fix panics occurring from older configs
- Introduce boilerplate for config.json migrations

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-07-28 15:38:16 -07:00
Dave Henderson 3d002187fe Refactoring drivers to embed drivers.DefaultDriver
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
2015-07-07 11:24:00 -04:00
LingFaKe c1b9ef6743 Add option parameter availability_zone
Signed-off-by: Ling FaKe <lingfake@huawei.com>
2015-06-05 17:37:43 -07:00
Guillaume Giamarchi de817cfe46 Stop polling the instance when status is ERROR
Fix #1269

Signed-off-by: Guillaume Giamarchi <guillaume.giamarchi@gmail.com>
2015-06-01 00:49:23 +02:00
Evan Hazlett f82032b28d remove provider
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-05-21 10:41:03 -04:00
Dave Henderson 3739e4d067 Harmonizing drivers so IPAddress property is kept up-to-date
Signed-off-by: Dave Henderson <Dave.Henderson@ca.ibm.com>
2015-04-30 19:59:23 -04:00
Nathan LeClaire 142ffadc2c Refactor logging to focus on simple STDOUT/STDERR
This also lays the foundation for the possibility of log drivers in the
future, if it is decided that is a direction to pursue.

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-04-30 12:04:52 -07:00
Vincent Bernat 6f1155c2e7 drivers/openstack: don't let the driver wait for state
OpenStack driver waits for the machine to reach the expected state. This
is already done in libmachine for most instances of this pattern.

Signed-off-by: Vincent Bernat <Vincent.Bernat@exoscale.ch>
2015-04-21 07:11:41 +02:00
Vincent Bernat 44be16c49f drivers: don't let the driver wait for SSH/Docker
Waiting for SSH to start or Docker to be available is a step done
directly in the framework (in libmachine). There is no need for the
driver to do that.

Signed-off-by: Vincent Bernat <Vincent.Bernat@exoscale.ch>
2015-04-21 07:11:41 +02:00
Evan Hazlett 2a93207bd9 Merge pull request #955 from ggiamarchi/keystone_v3_domains
Keystone v3 domains
2015-04-10 16:57:06 -04:00
Vincent Bernat 91d12d06ec drivers: remove unneeded `GetDockerConfigDir()` and `dockerConfigDir` const
This method is not part of the driver interface anymore.

Signed-off-by: Vincent Bernat <Vincent.Bernat@exoscale.ch>
2015-04-10 17:03:11 +02:00
Guillaume Giamarchi edbdbd7bbf Support Keystone v3 domains
Fix #679

Signed-off-by: Guillaume Giamarchi <guillaume.giamarchi@gmail.com>
2015-04-09 17:40:21 +02:00
Guillaume Giamarchi fb1362ea05 Remove dead code
Signed-off-by: Guillaume Giamarchi <guillaume.giamarchi@gmail.com>
2015-03-27 19:25:11 +01:00
Evan Hazlett d68cbe4164 Merge pull request #780 from smashwilson/set-useragent
Set the User-Agent for OpenStack and Rackspace drivers
2015-03-24 05:17:45 -07:00
Paul Czarkowski 5b366b5573 quick fix of typo in openstack driver
Signed-off-by: Paul Czarkowski <username.taken@gmail.com>
2015-03-23 18:31:34 -05:00
Ash Wilson cab014cd28 Prepend a string to the User-Agent.
For both OpenStack and Rackspace drivers.

Signed-off-by: Ash Wilson <ash.wilson@rackspace.com>
2015-03-23 11:42:24 -04:00
Evan Hazlett bc6b66c122
drivers: specify defaults if values are missing; i.e. config updates
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-03-11 22:59:28 -04:00
Evan Hazlett 6f098c817b
openstack: driver cleanup for new interface
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-03-09 23:29:52 -04:00
Evan Hazlett 6c931dadde
openstack: update for new driver interface
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-03-09 23:27:17 -04:00
Evan Hazlett 3351f8c58d Merge pull request #726 from hairyhenderson/openstack-net-id-usage-fix
Fixing inaccurate Usage message for the `--openstack-net-id` option
2015-03-09 22:42:24 -04:00
Dave Henderson 093914cbd5 Fixing inaccurate Usage message for the `--openstack-net-id` option
Signed-off-by: Dave Henderson <Dave.Henderson@ca.ibm.com>
2015-03-06 07:04:06 -05:00
Guillaume Giamarchi 5fa93a0888 Remove dead code
This method is no longer called since
the docker installation has moved out
of the driver (54f3607).

Signed-off-by: Guillaume Giamarchi <guillaume.giamarchi@gmail.com>
2015-02-27 23:13:12 +01:00
Guillaume Giamarchi 96224409b8 HTTP configuration it done too late
The HTTP transport configuration should be
done before the authentication request.

Signed-off-by: Guillaume Giamarchi <guillaume.giamarchi@gmail.com>
2015-02-26 09:12:13 -06:00
Ash Wilson 5f20240340 Use --openstack-insecure to disable TLS checking.
At your own risk!

Signed-off-by: Ash Wilson <ash.wilson@rackspace.com>
2015-02-26 09:12:13 -06:00
Evan Hazlett 4f5de31d3f Merge pull request #590 from ehazlett/no-debug-for-docker-install
do not show debug for docker install by default
2015-02-24 15:01:20 -05:00
Evan Hazlett bebb2dc718
show detailed messages only in debug for rackspace remove
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-02-24 11:02:49 -05:00
Evan Hazlett c406e1575b
common logging for rackspace
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-02-24 10:52:40 -05:00
Evan Hazlett 54f36078f4 do not show debug for docker install by default; refactor install out of drivers
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-02-23 17:14:32 -05:00
Evan Hazlett 3a3ef6f45e add discovery to machine config; show swarm membership
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-02-20 13:07:21 -08:00
Evan Hazlett a949e12b6e store swarm config in driver; vendor Godeps; generate swarm token
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-02-20 13:07:21 -08:00