Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Multiplex flavor plugins by type in a single RPC endpoint. #364

Merged
merged 5 commits into from Jan 15, 2017

Conversation

chungers
Copy link
Contributor

Similar to #360 this PR adds support for sub-types in a flavor plugin.

  • Same naming mechanism: plugin.Name := $lookup[/$type] where $type is defined by the name a flavor SPI implementation is bound in the function to export the object in the RPC server (the PluginServerWithTypes method.
  • Added tests
  • Updated the swarm flavor plugin as two spi flavor.Plugin implementations: one as manager and one as worker -- so the Plugin names should be flavor-swarm/manager and flavor-swarm/worker.
  • Swarm flavor plugin no longer needs to implement a Type switch in its own Spec schema. Instead, the switch is handled at the RPC layer.
  • Added a new e2e test case, scripts/e2e-swarm.sh and updated the scripts/e2e-test-plugins.json template to describe how to start up the vagrant and swarm flavor plugins.

David Chung added 4 commits January 14, 2017 19:04
Signed-off-by: David Chung <david.chung@docker.com>
Signed-off-by: David Chung <david.chung@docker.com>
Signed-off-by: David Chung <david.chung@docker.com>
@GordonTheTurtle
Copy link

Please sign your commits following these rules:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:

$ git clone -b "multiplex-flavor" git@github.com:chungers/infrakit.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842354446536
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

@codecov-io
Copy link

codecov-io commented Jan 15, 2017

Current coverage is 64.82% (diff: 50.76%)

Merging #364 into master will decrease coverage by 0.56%

@@             master       #364   diff @@
==========================================
  Files            45         47     +2   
  Lines          2190       2266    +76   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           1432       1469    +37   
- Misses          611        637    +26   
- Partials        147        160    +13   

Powered by Codecov. Last update 3113b14...87e097c

@chungers chungers merged commit 89b031a into docker-archive:master Jan 15, 2017
@chungers chungers deleted the multiplex-flavor branch January 15, 2017 20:21
chungers pushed a commit to chungers/infrakit that referenced this pull request Sep 30, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants