- Drop bay and baymodel tests
- Drop bay and baymodel from controllers
Depends-On: Ib85e4fda8e4ac467bd49590dc72ba5913bb9a19d
Story: 2009104
Task: 42957
Task: 42959
Signed-off-by: Diogo Guerra <diogo.filipe.tomas.guerra@cern.ch>
Change-Id: Ida2e42c86400438951d9804e3ce122c56a46b94f
The post for both clusters and nodegroups is adapted to wait for a
boolean flag called merge_labels. Based on this flag the API will
either merge the provided with the parent labels or just use the
provided labels.
At the same time, the get methods of both clusters and nodegroups
are adapted to include new fields in the response called
"labels_overridden", "labels_added", "labels_skipped". The fields
contain the differnces with the parent labels.
story: 2007515
task: 39691
Change-Id: I1054c54da96005a49e874de6f4cf60b5db57fc02
This adds the changes needed in the API and conductor level to support
creating updating and deleting nodegroups.
Change-Id: I4ad60994ad6b4cb9cac18129557e1e87e61ae98c
This commit removes the fields node_addresses, master_addresses,
node_count and master_count from the cluster object since this info
will be stored in the nodegroups. At the same time, provides the way
to adapt existing clusters to the new schema.
story: 2005266
Change-Id: Iaf2cef3cc50b956c9b6d7bae13dbb716ae54eaf7
this commit introduces a new '/federations'
endpoint to Magnum API, as well as its controllers,
entities and conductor handlers.
this corresponds to the first phase of the
federation-api spec. please refer to [1] for more
details.
[1] https://review.openstack.org/#/c/489609/
Change-Id: I662ac2d6ddec07b50712109541486fd26c5d21de
Partially-Implements: blueprint federation-api
This is patch 3 of 3 to change the internal usage of the terms
Bay and BayModel. This patch updates Bay to Cluster in DB and
Object as well as all the usages. No functionality should be
changed by this patch, just naming and db updates.
Change-Id: Ife04b0f944ded03ca932d70e09e6766d09cf5d9f
Implements: blueprint rename-bay-to-cluster
This patch is the first of 3 patches to change the internal
usage of the terms Bay and BayModel. This patch updates
BayModel to ClusterTemplate. No functionality should be
changed by this patch, just naming and db updates.
Change-Id: I0803e81be6482962be2878a8ea2c7480f89111ac
Implements: blueprint rename-bay-to-cluster
This patch will update the certificate api to use the term Cluster
instead of Bay. Bay will still be supported, but will be deprecated
and removed in a future release.
Change-Id: Ie169162a743320813e636597240941b5dd59ded3
Implements: blueprint rename-bay-to-cluster
Magnum service binary name can be only conductor. Currently any
string having length less than 256 is allowed.
Change-Id: I03dad7a36a01e22e5fc63917f5e2919636f6ab2f
Closes-bug: #1615221
This is the first of several patches to add new Cluster commands
that will replace the Bay terminalogy in Magnum. This patch adds
the new Cluster and ClusterTemplate commands in addition to the
Bay and Baymodel commands. Additional patches will be created
for client, docs, and additional functional tests.
Change-Id: Ie686281a6f98a1a9931158d2a79eee6ac21ed9a1
Implements: blueprint rename-bay-to-cluster
This patch does following:
* Removes X509keypair controller as there is already Certificate
controller for same purpose.
* Removes X509keypair conductor.
* Removes name, ca_cert and bay_uuid from x509keypair model as
Bay model already holds certificate references.
* Add intermediates and private_key_passphrase to x509keypair
model.
* Remove related tests and changes.
Change-Id: I9271221cd1d07c672c4a380a4ae3593237fca66a
Partially-Implements: blueprint barbican-alternative-storeX
Magnum supports multiple COEs however it contains APIs that only work
with certain COEs. To create a coherent service we will only support
APIs that work across all bay types. We will allow API extensions to bay
drivers to allow Magnum to manage containers, but we are not attempting
to create a unified abstraction for containers across COEs.
A follow up patch will continue this refactor by removing the objects
for the k8s specific objects and the CLI commands from
python-magnumclient.
Implements: blueprint delete-container-endpoint
Change-Id: I1f6f04a35dfbb39f217487fea104ded035b75569
In python3, type is more strict, compare str to int will report error.
The patch fix this.
Partially-Implements: blueprint magnum-python3
Change-Id: I66583113dd93425c2157dfa60a5325b1afd03f29
Updated import order as per the OpenStack import standards [1].
Modules under magnum/common/pythonk8sclient are not covered in
this patch because this code is generated via a third party
tool "swagger-codegen" which does not follows openstack
standards yet.
[1] http://docs.openstack.org/developer/hacking/#import-order-template
Change-Id: Ia87f3e797ee627bf3c04d2bae9639fd305b41b0d
The node object represents either a bare metal or virtual machine
node that is provisioned with an OS to run the containers, or
alternatively, run kubernetes. Magnum use Heat to deploy the nodes,
so it is unnecessary to maintain node object in Magnum. Heat can do
the work for us. The code about node object is useless now, so let's
remove it from Magnum.
Closes-Bug: #1540790
Change-Id: If8761b06a364127683099afb4dc51ea551be6f89
PEP-0274 introduced dict comprehensions to replace dict constructor
with a sequence of length-2 sequences, these are benefits copied
from [1]:
The dictionary constructor approach has two distinct disadvantages
from the proposed syntax though. First, it isn't as legible as a
dict comprehension. Second, it forces the programmer to create an
in-core list object first, which could be expensive.
Magnum does not support python 2.6, we can leverage this.
There is deep dive about PEP-0274[2] and basic tests about
performance[3].
Note: This commit doesn't handle dict constructor with kwagrs.
This commit also adds a hacking rule.
[1]http://legacy.python.org/dev/peps/pep-0274/
[2]http://doughellmann.com/2012/11/12/the-performance-impact-of-using
-dict-instead-of-in-cpython-2-7-2.html
[3]http://paste.openstack.org/show/480757/
Change-Id: I61992fa428d6760449afe3754b02506336e8b421
Currently bay-show command always shows "0" in bay_create_timeout, this
is confusing for users, store bay_create_timeout into db so that bay-show
will return correct bay_create_timeout value.
Change-Id: Icaea11d7d298bd6245a50c464bff6ff20292e092
Closes-Bug: #1521146
These changes implement the API level support for querying magnum
services.
Partially-Implements: blueprint magnum-service-list
Closes-bug: #1498158
Depends-On: Ia0c09222405c87cb61e5de4a43ba345ae3405b50
Change-Id: Ib816f595ba2edef29edaec40fa940570755b10aa
The Certificate controller has 2 operations:
1. POST
Generate X509 certificate using bay's CA cert.
Below is an example of Certificate POST API request using magnum command:
Example Request:
curl -X POST -H 'Content-Type: application/json' \
-d '{"bay_uuid": "<bay_uuid>", "csr": "<csr>"}' \
http://localhost:9511/v1/certificates
This creates a X509 certificate signed by the given bay's CA and returns
it. No database information is stored in Magnum against it. For each POST
request, a new certificate is generated.
Example Response:
{"bay_uuid": "<bay_uuid>", "csr": "<csr>",
"pem": "<pem encoded certifiacte>"}
2. GET
Fetches the CA cert associated with a bay. Below is an example of CA GET
API request using magnum command:
Example Request:
curl -X GET http://localhost:9511/v1/certificates/<bay_uuid>
This fetches stored CA cert for the given Bay, which can be used to validate
any client and node certificates signed by the Bay's CA. The value for each
is fetched from Barbican or Magnum db based on the different configuration
for storage of certificates.
Example Response:
{"bay_uuid": "<bay_uuid>", "pem": "<pem encoded certifiacte>"}
Co-Authored-By: Andrew Melton <andrew.melton@rackspace.com>
Change-Id: I4b72cc1e1bddc7a7c7eeb0ab22d3769a666ccb2b
Partially-Implements: bp secure-kubernetes
This patch adds X509KeyPair controller and conductor to handle all
x509keypair related operation and also add test for it.
Change-Id: I5773fcd5bdf8a30fd195714e3e0fdc9d1b0c962d
Partially-Implements: bp secure-kubernetes
Automated change to replace dict.iteritems() which is no longer present
in python 3 with dict.items(). The later can be very marginally slower
in python 2, however the alternative to this would be to use
six.iteritems(dict) which has a greater cognitive overhead and reduces
readability with little or no performance gain.
Refer to this mailing list thread for more on this issue
http://markmail.org/message/tx7776ewlutxitjx
Code under magnum/common/pythonk8sclient has been ignored as this is
autogenerated code expected to be pull out of Magnum.
Partially-Implements: blueprint magnum-python3
Change-Id: Ib7cd192b2be3776985963bdf7fa14e96a464d0ae
Now that Kubernetes 0.15.0 release is supported and it has
v1beta3, the manifest structure has changed from v1beta1 to
v1beta3. This change implements the v1beta3 manifest parsing
logic for service resource of Kubernetes.
Change-Id: I1200473f91118eaa48b1cec386f30cf8a50708b5
Partially-Implements: blueprint python-k8sclient
Now that Kubernetes 0.15.0 release is supported and it has
v1beta3, the manifest structure has changed from v1beta1 to
v1beta3. This change implements the v1beta3 manifest parsing
logic for rc resource of Kubernetes.
Change-Id: I54aa0502c6d9a58652623800e02766ad5b09b159
Partially-Implements: blueprint python-k8sclient
Now that Kubernetes 0.15.0 release is supported and it has
v1beta3, the manifest structure has changed from v1beta1 to
v1beta3. This change implements the v1beta3 manifest parsing
logic.
Change-Id: Iaebe9fa29ba81d4f49a1b9fb1a547757b96520da
Partially-Implements: blueprint python-k8sclient
Add timeout parameter to bay create
Update test cases for the timeout parameter
Change-Id: If8603fc47ba3659eba145e91bcaa30095cabd094
Closes-bug: #1433109
We need to consolidate the unit tests into a separate
directory so we can run just the unit tests in our py27
tox target. And we can in subsequent reviews add a parallel
directory with functional tests.
Related-Bug: #1439621
Change-Id: I8bf5af953fb31080096c371966f7dfda9edb1bf4