274 Commits

Author SHA1 Message Date
Andrew Melton
46ebff53e6 Docker: Pull Image Before Container Create
The image needs to be pulled so that it's available for
subsequent inspect and create calls.

Change-Id: I7f2731911a3fc71fbbf3b408b39e57b7521db81f
Closes-bug: #1408101
2015-01-06 13:28:39 -08:00
Jenkins
c22e2fa328 Merge "Implements k8s resource creation/updating with data" 2015-01-06 15:56:40 +00:00
Jenkins
72fc7081ed Merge "Add master endpoint support to kube_utils.py" 2015-01-06 15:50:44 +00:00
OTSUKA, Yuanying
9ff6b93e08 Implements k8s resource creation/updating with data
Now kube_utils.py supports creation/updating from k8s resource data.
User will be able to updload pod/service/replication_controller data to
create or update resource.

Change-Id: I98f7ab2eab7ac9e68c4e4a313a61f7d39b7596b2
2015-01-06 17:17:34 +09:00
OTSUKA, Yuanying
be136bbd8e Add master endpoint support to kube_utils.py
kubeutils.py support k8s master endpoint url to connect remote k8s cluster.
In this change, some method signatures are refactored for future works.

Change-Id: Ie065abeef3c65ea429b799a932fe39d868fabcbf
2015-01-06 14:43:28 +09:00
Jay Lau (Guangya Liu)
5c6f3000e3 Add more unit test for replication controller
Change-Id: Icf7251c9abc3b9b92c9e2c38506c49ea9de03bf7
2015-01-05 21:18:34 -05:00
Jay Lau (Guangya Liu)
068874d0db Add unit tests for the conductor AMQP API
This tests create and delete at the AMQP level and makes certain the AMQP
code is being called.  This does not actually test the connection to the
handlers, which would be more like a functional test.

This test case purpose is meant to introduce pain when changing the
interface.  The interface should not be changed, a new version should
be implemented.

Change-Id: Icfca04df842497515c20138ba58694805b266b55
2015-01-05 21:07:48 -05:00
Jenkins
8b60442bd2 Merge "Remove usage of BayLocked" 2015-01-06 01:44:31 +00:00
Jenkins
4cc3f9ed81 Merge "Add test and refactoring on bay_create" 2015-01-06 01:10:10 +00:00
Steven Dake
566658a6d4 Remove usage of BayLocked
The API had an exception that is not being used (BayLocked)
being executed.  The API calling the exception is not used
by the codebase.

Change-Id: Ib4c6ea7f3a7bf82a136e4234c7d618444413b46d
2015-01-05 20:09:02 -05:00
Jenkins
05c6a317f2 Merge "Add missing Exceptions" 2015-01-06 00:34:09 +00:00
Davanum Srinivas
1b963d5960 Add missing Exceptions
There are exceptions being thrown but are missing!

Change-Id: Ibff98c66374c0827043f8da65a4ac25e4fd55cdb
2015-01-05 09:59:46 -05:00
Jay Lau (Guangya Liu)
01ce1daac8 Add bay_uuid for replication controller
bay_uuid is needed when creating replication controller

Change-Id: If88235bda4b2f9833058533d1308fd89e6b6da4d
2015-01-05 07:59:19 -05:00
Jenkins
fffbfd8a4e Merge "Remove ctxt from RPC API" 2015-01-05 12:33:44 +00:00
Jenkins
30b5ec7944 Merge "Remove ctxt from rpcapi for pod create" 2015-01-05 12:32:53 +00:00
Kennan
7daa7b434d Fix the opts in genconfig issue
there is a lot of options not include in opts, which cause genconfig
not include such config, this patch fix that

Change-Id: I3774930563644b402b74b66b776f13d810fe6f32
2015-01-05 18:17:24 +08:00
OTSUKA, Yuanying
ded30d1237 Add test and refactoring on bay_create
This contains temporary implementation of updating master_address, refactoring
rpc handler and some tests.

Change-Id: Idc88795908441d987d9bb63292daccae523f7cbf
2015-01-05 19:15:24 +09:00
Jay Lau (Guangya Liu)
a4f184c844 Remove ctxt from RPC API
The ctxt was provided by default RPC so there is no need to add
it for RPC API

Change-Id: I199ebc6e981ad0ae73cceb3166079d690fd64554
2015-01-05 00:10:44 -05:00
Steven Dake
5d20742212 Remove ctxt from rpcapi for pod create
the rpcapi does not need ctxt for pod create.  This results in an error
creating the POD complaining about incorrect number of parameters.

Change-Id: I98adb0c68fbcc527cd012ff353e4fd831297658b
2015-01-04 20:49:59 -07:00
Steven Dake
7cb3897ac5 bay-create does not need ctxt on the rpcapi side
The rpcapi client does not need ctxt.  the rpcapi delivery will generate
a context automatically via the RPC subsystem.

Change-Id: Iac1e8937a24db193db94cf20307fdabba408037f
2015-01-04 20:39:19 -07:00
Jenkins
a264393cd0 Merge "Add oslo concurrency namespace" 2015-01-05 02:50:45 +00:00
Kennan
1375f1e48a Add oslo concurrency namespace
As magnum used concurrency, this patch adds those two options to
generated magnum.conf

see: https://github.com/openstack/oslo.concurrency/blob/master/oslo_concurrency/lockutils.py#L40

Change-Id: I50ece3aed506b27c0c87069cab7aa99c376fc663
2015-01-04 14:02:11 +08:00
Hongbin Lu
e54428845b Add tests for Pod and Service on dbapi
Did the following fix/modification to make the tests pass:
* Raise an exception on deleting non-existent pod or service.
* Rename the following methods:
  get_service_by_bay_uuid -> get_services_by_bay_uuid (db)
  get_by_bay_uuid -> list_by_bay_uuid (objects)

Change-Id: I7cbeb119550acecdbf0697df19172a8285eabca8
2015-01-03 21:09:45 +00:00
Jenkins
6f3ed11181 Merge "Add DB unit test for JSONEncodedDict and JSONEncodedList" 2015-01-03 17:28:34 +00:00
Jenkins
1767fb41a9 Merge "Added multi-region/multi-cloud use case to specs" 2015-01-03 12:42:51 +00:00
Jenkins
47bb7a9623 Merge "Added container network use case to specs" 2015-01-03 12:38:27 +00:00
Jay Lau (Guangya Liu)
e4d101ea4e Add DB unit test for JSONEncodedDict and JSONEncodedList
Change-Id: Ice952f6c06dd01f96eab72b260f0b6c12696aa71
2015-01-02 23:24:58 -05:00
Jenkins
05e4ce7ccc Merge "Make bay, service and pod show call db directly" 2015-01-03 04:08:16 +00:00
Jenkins
db3b424e87 Merge "Make baymodel operations working" 2015-01-03 04:08:10 +00:00
Jenkins
cbb6c1bd16 Merge "Add ctxt for all conductor APIs" 2015-01-03 04:08:02 +00:00
Jay Lau (Guangya Liu)
493eeb8af2 Make bay, service and pod show call db directly
Change-Id: I49d87ab0cb32cd76e79a986f9f4cd340decc91f7
2015-01-02 23:36:06 +00:00
Jay Lau (Guangya Liu)
5a72df3662 Make baymodel operations working
Change-Id: I3d971e52b4032538cbfa089dd5b5a9ad88d4088c
2015-01-02 23:35:55 +00:00
Jay Lau (Guangya Liu)
6acf2e7a0f Add ctxt for all conductor APIs
Change-Id: I7bc27b5716aec85e50a3c7824667c3f762557fa0
2015-01-02 23:35:34 +00:00
Jay Lau (Guangya Liu)
6357bd27b7 Prune DB API
Remove following related APIs:
1) reserve_xxx
2) release_xxx
3) get_xxx_by_instance

Change-Id: Idda40f06698792b99915745faef58abd60194a64
2015-01-02 23:35:23 +00:00
Jay Lau (Guangya Liu)
b37036c34d Add k8s replication support for magnum
Implements bp add-k8s-replication-controller

Change-Id: I5aee1af171b0a3a1476fd9fee1fdf26755ab0805
2015-01-02 18:29:18 -05:00
Jenkins
d46ac431e5 Merge "Move out docker client logic from docker conductor" 2015-01-02 21:54:44 +00:00
Hongbin Lu
9744c393af Added multi-region/multi-cloud use case to specs
Change-Id: I3b5bcbb8f41c987b421303a72aa010e520b9439f
2015-01-02 20:04:20 +00:00
Hongbin Lu
d74df5cb62 Added container network use case to specs
Change-Id: I1f8cdf41c962866b7250126212694904beb3c0ed
2015-01-02 19:58:37 +00:00
Davanum Srinivas
2184b3bead execute and logs API response should be JSON
Change-Id: I70adca286e3e3dbbf01196d19dc988490201a208
2015-01-02 10:17:51 -05:00
Jenkins
5987013822 Merge "Add tests for Bay dbapi and make them pass" 2015-01-02 05:55:04 +00:00
Hongbin Lu
659e3d09ef Add tests for Bay dbapi and make them pass
Did the following fixes/modifications to pass the tests:
* Raise an exception when deleting an non-empty Bay (A bay with
  pod(s)/service(s).
* Fixed methods _add_bays_filters, _add_pods_filters and
  _add_services_filters.

Change-Id: Iaaeb3f4b49337a822cc79e06fe620b8b11b0acbd
2015-01-02 03:21:43 +00:00
Davanum Srinivas
10d0a5095c Move out docker client logic from docker conductor
Change-Id: Iac5ebb2f74c1dfe0c927e0e86501c50a93a83958
2015-01-01 22:14:15 -05:00
Davanum Srinivas
90ab6cba1d get container-execute to work
For execute we need at least 1.15 version of Docker Remote API

Change-Id: I6268150e03e06c2c68263e41a6252e0e0f3ef209
2015-01-01 20:10:25 -05:00
Davanum Srinivas
77f8314da6 Get pause and unpause working
All other methods take in a parameter that can be either a dict with
container information or a string id. pause/unpause should be the
same. Also we have pause/unpause here explicitly is because they
are missing from some versions of the docker-py client.

Change-Id: I882326b718f1252c757fe13f0de3844e02cc9d08
2015-01-01 20:10:14 -05:00
Jenkins
2d1fe31f56 Merge "Remove type from bay object" 2015-01-01 23:53:59 +00:00
Jenkins
9a1766d7de Merge "Add tests for baymodel dbapi and make them pass" 2015-01-01 23:52:45 +00:00
Jenkins
fc44bc4aa8 Merge "Fix and cleanup baymodel dbapi" 2015-01-01 23:52:32 +00:00
Jenkins
a44474a2d7 Merge "Enable pod update using pod_defintion_url" 2015-01-01 23:49:38 +00:00
Jenkins
d3f67a44c7 Merge "Add service_update for k8s" 2015-01-01 23:48:04 +00:00
Jay Lau (Guangya Liu)
1d79c72b5f Remove type from bay object
type is not needed by bay object and bay is now using baymodel_id
but not image_id

Change-Id: I40cd8743d69b4116332a1690dc21aaf09aea9adf
2015-01-01 00:57:19 -05:00