188 Commits

Author SHA1 Message Date
OTSUKA, Yuanying
a7a4544033 Add hooks to obtain conductor api
To obtain conductor api instance easily, this add rpcapi attribute to
pecan.request.
So now, we can access to conductor api from "pecan.request.rpcapi".

Related-Bug: #1406539
Change-Id: I6edbf031d91e65d70637629c3b57d45322eee9fd
2014-12-30 23:07:05 +09:00
OTSUKA, Yuanying
c6c606b277 Split up extracting auth.py file
The auth.py file does a couple of things, It contains keystone authentication
and to set request context. So this split up to two files.
After this commit, request hook should be included in hooks.py.

Related-Bug: #1406539
Change-Id: I1754da40383976e48f6fd4ca23911717f918f9bb
2014-12-30 23:02:29 +09:00
Jenkins
a6f4f0f137 Merge "container_delete should call docker.remove_container" 2014-12-30 11:56:47 +00:00
Jenkins
fd8b678d13 Merge "Get container-list REST API working" 2014-12-30 09:04:06 +00:00
Jenkins
084f0c5c2c Merge "Container Controller gets container uuid not name" 2014-12-30 09:03:45 +00:00
Davanum Srinivas
9081425fda container_delete should call docker.remove_container
Change-Id: Ied3f4817c8698af6931cd03f102804d35dc1f409
2014-12-29 19:12:23 -05:00
Davanum Srinivas
6e7ad023e4 Get container-list REST API working
Change-Id: Ifb3d978a7d71fc43a94be6b3abecba95c673ed02
2014-12-29 15:17:33 -05:00
Davanum Srinivas
882d1280b9 Container Controller gets container uuid not name
Change-Id: I97ce71eea4132c7e10306e167e303b3236ba0155
2014-12-29 13:51:18 -05:00
Hongbin Lu
bebc99cb44 Add more tests for magnum/common
Test cases were ported from Nova and Ironic.

Implements: blueprint increase-test-coverage
Change-Id: Ibd262ac84af3167077c9d2c4fd6c1ea872b9b303
2014-12-29 05:10:31 +00:00
Abhishek Chanda
3e2a1e5f69 Add some tests for app and auth
Change-Id: Ic564f4c0305cff2fcdccce746172c32701aa9aa6
2014-12-27 00:13:18 +05:30
Jenkins
7f74517ed8 Merge "Remove bay_list from bay_ironic.py and bay_k8s_heat.py" 2014-12-26 07:01:25 +00:00
Jenkins
cf1c42a7d8 Merge "Remove objects.registry.py" 2014-12-26 02:09:04 +00:00
Jenkins
fd1f836932 Merge "Fix RequestContext attributes" 2014-12-26 02:08:58 +00:00
OTSUKA, Yuanying
c80a80fe2b Remove objects.registry.py
objects class can be obtained from its module, so now objects doesn't
need registry.

Change-Id: Ia982a345c7b231b753a71f8f6a030490fec0d5a2
2014-12-26 09:20:40 +09:00
Jay Lau (Guangya Liu)
34e16e62b2 Split test_all_objects.py to different files
The file test_all_objects.py would become huge when adding more
unit test, this patch is trying to split this file based on
different controllers.

Change-Id: I4ed05367b1632a7ada0a2b399135660458f41a64
2014-12-25 08:25:12 -05:00
Jay Lau (Guangya Liu)
716d7ce2c7 Implement "docker execute" for magnum
"docker execute" need command as a parameter

Change-Id: I31e83ff56efc3e900a716f9f84b5d593415993e0
2014-12-25 04:12:23 -05:00
Jay Lau (Guangya Liu)
a947c3f0f9 Update container operation parameter to name
All of the operations for docker container are now using name
as parameter, this patch is updating the paramter from uuid
to name to make the code more clear.

Change-Id: Ia425e1dfc239272570f2e583dd5b8c6c2d368335
2014-12-24 23:08:09 -05:00
OTSUKA, Yuanying
2e7b9046a8 Fix RequestContext attributes
'auth_url', 'auth_token_info' and 'trust_id' is required to create heatclient.
So this commit added these.

Change-Id: If17c87770f2e4d93dae5e1262faa5b44cc5cfdef
2014-12-25 11:12:58 +09:00
Jenkins
f2a657eefe Merge "Implement bay_ironic.py" 2014-12-24 15:43:40 +00:00
Jenkins
6d2a54796f Merge "Add a new API of get_by_pod_name for pod object" 2014-12-24 15:34:49 +00:00
Jenkins
901f9644e1 Merge "fix the wrong order of steps and missing password in db connection" 2014-12-24 13:59:12 +00:00
Jenkins
1339ad4760 Merge "Remove redundant version info for magnum objects" 2014-12-24 13:17:10 +00:00
Davanum Srinivas
df4e64186e Flesh out some more docker container methods
First cut of Docker container creation and start should be working now

Tested using the REST API:
curl -i -X POST -H 'X-Auth-Token: 1b238d90cd0645a39a626581cf0c9f19' \
     -H 'Content-Type: application/json' \
	 -H 'Accept: application/json' \
	 -d '{"image_id": "cirros", "name": "mycontainer"}' \
	 http://127.0.0.1:9511/v1/v1/containers

curl -i -X PUT -H 'X-Auth-Token: 1b238d90cd0645a39a626581cf0c9f19' \
     -H 'Content-Type: application/json' \
	 -H 'Accept: application/json' \
	 -H 'User-Agent: python-magnumclient' \
	 http://127.0.0.1:9511/v1/containers/4e19a981-057f-4d55-9aaf-d12c06e6430a/start

And the magnum CLI:
echo '{"name":"mycontainer", "image_id":"cirros"}' | magnum --debug container-create
magnum --debug container-start --id c6d6c759-9875-4dd4-aaa3-619799015c1d

Change-Id: Ib7a46d95d2d89cd8479bb0a318a3c9efaf23f187
2014-12-24 07:59:15 -05:00
Jay Lau
f872b84708 Remove redundant version info for magnum objects
Change-Id: I2956636c87d30374d60800cc56ca26ba2524604a
2014-12-24 04:54:54 -05:00
Kai Qiang Wu(Kennan)
774da7ce0d fix the wrong order of steps and missing password in db connection
Change-Id: I5f7f8c3d97af76123ba6344ec013abedc38a539a
2014-12-23 14:39:02 +08:00
Jenkins
51d3cb88a6 Merge "Implement container_list" 2014-12-22 21:52:28 +00:00
Jenkins
33d5c125a0 Merge "Add a hyper-link for quick start" 2014-12-22 21:51:52 +00:00
Jenkins
3ebcc38e23 Merge "Implement docker backend for magnum service" 2014-12-22 21:49:17 +00:00
Jenkins
0aee0c9166 Merge "Update log message and some functions in kube.py" 2014-12-22 21:48:14 +00:00
digambar
ea25d067a6 Implement docker backend for magnum service
Change-Id: I6bde0149caaf93b6e446f5f01039895fb36751e6
Implements: blueprint magnum-backend-docker
2014-12-22 16:45:02 -05:00
Jay Lau
16ad8207bf Implement container_list
Change-Id: Ic2e72c04f37095a0cf731465bdf6fb8db0058e53
2014-12-22 09:44:13 -05:00
Jay Lau
05ad7ed1f4 Remove bay_list from bay_ironic.py and bay_k8s_heat.py
There is no need to add bay_list to those two files since the
bay list will be get from database.

Change-Id: Ide59d0282611df919021e0589464f6eb6460bb3d
2014-12-22 05:05:45 -05:00
Jay Lau
a8294cd201 Implement bay_ironic.py
Update following methods:
1) bay_list
2) bay_delete
3) bay_show

Change-Id: Ie8c8769c9a27db6d201036a1b84e347a183ec92f
2014-12-22 04:58:44 -05:00
Jay Lau
cbae05b099 Add a hyper-link for quick start
Change-Id: If032a5142b57aa20178a374f764b00bc4abd0f80
2014-12-22 04:36:15 -05:00
Jay Lau
0343637f5f Add a new API of get_by_pod_name for pod object
In k8s, pod name cannot be duplicated and some end users want to
get pod by name.

Change-Id: Ic8b6273de914949e4799446e68e5e2d51bfab8b9
2014-12-22 02:26:44 -05:00
Jay Lau
36244a0443 Update log message for kubecli.py
Change-Id: I01df1e6b18c247982f1effc1ccb8e15e5c13a9ac
2014-12-22 02:06:38 -05:00
Jay Lau
878f330636 Update log message and some functions in kube.py
Change-Id: I6ce21d737fc341b8df820761c14ffc3b5e7151da
2014-12-22 01:39:08 -05:00
Steven Dake
0dc370a462 Fix external_network_id
Make external_network be external_network_id to match the rest of the system.

Change-Id: I9bdeabf5efcead9a5b51779b89cc6dd9552defad
2014-12-18 03:11:37 -07:00
Jenkins
6232213f15 Merge "Remove type and image_id replace with baymodel_id" 2014-12-17 13:07:37 +00:00
Jenkins
3b92cc3010 Merge "Add a baymodel object" 2014-12-17 13:07:30 +00:00
OTSUKA, Yuanying
b4e20a0ef0 Fix authentication
auth_token is not set in auth.py. this fixes it.

Change-Id: I510541fd6a1b9d499aa32ec18495db867ef50223
2014-12-17 18:44:03 +09:00
OTSUKA, Yuanying
d8b0d110b7 Fix auth_url type
In this case, auth_url variable is set as Tuple.
It is bug, so this fixes it.

Change-Id: I524749df95cc0cf67fd30d637632e8430dc04e17
2014-12-17 16:32:29 +09:00
Steven Dake
54e59ea12e Remove type and image_id replace with baymodel_id
The baymodel_id represents the bay model used to generate this
particular Bay.  This is essentially a split of Bay into multiple
objects - one for template storage - one for instantation.

Change-Id: Ie6b7220bfecfd61af0ecf9114a791dfed61b415e
2014-12-16 22:45:37 -07:00
Steven Dake
3f520bbde5 Add a baymodel object
The baymodel object and ReST object is used to control bay properties
for different bay models.  It is then possible to launch bay models
using this functionality.

Change-Id: I317bda292719ca3f4649283f7e27674c813cc3b0
2014-12-16 22:45:32 -07:00
Jenkins
e9ff12b521 Merge "Containers Service Spec" 2014-12-16 23:07:28 +00:00
Jenkins
06c21d1855 Merge "Reference proper file in cmd.conductor" 2014-12-15 15:12:35 +00:00
OTSUKA, Yuanying
4eb7aa6f83 Add bay kubernetes_heat type WIP
This uses "larsks/heat-kubernetes" template to build a kubernetes cluster,
to support k8s_heat type Bay.
k8s_heat type Bay provide kubernetes using heat.

Change-Id: I40980a4d264de7f59c1314b6c5a30b643d03dd92
2014-12-15 17:05:04 +09:00
Abhishek Chanda
92e3ebee20 Migrate to oslo.context
Remove deprecated oslo incubator code

Change-Id: Iee16111fc86aef83603251aedf6d58f6da78fc92
2014-12-14 16:38:34 +05:30
Steven Dake
4aac587695 Reference proper file in cmd.conductor
The cmd.conductor was referencing a file that was renamed by a previous
commit.  This resulted in the conductor not running.

Change-Id: Id3e08334d106cf8a1f6cc94c4905d42095a0546d
2014-12-12 18:03:56 -07:00
Pradeep Kilambi
209a639ba1 Knitting Pod and Service object flow for Kubernetes backend
Get the work flow in place for pods and services to use rpc
backend and integrate kube handlers.

Partially-Implements: blueprint magnum-backend-kubernetes

Change-Id: Iabd7f5f1217402c18820170521354ac04e436551
2014-12-12 15:33:29 -05:00