Browse Source

Merge "Remove pod/svc/container object reference from doc"

changes/80/389080/1
Jenkins 5 years ago
committed by Gerrit Code Review
parent
commit
68af88a737
2 changed files with 13 additions and 27 deletions
  1. +0
    -13
      doc/source/index.rst
  2. +13
    -14
      doc/source/objects.rst

+ 0
- 13
doc/source/index.rst View File

@ -35,11 +35,6 @@ There are several different types of objects in the magnum system:
* **Cluster:** A collection of node objects where work is scheduled
* **ClusterTemplate:** An object stores template information about the cluster
which is used to create new clusters consistently
* **Pod:** A collection of containers running on one physical or virtual
machine
* **Service:** An abstraction which defines a logical set of pods and a policy
by which to access them
* **Container:** A Docker container
Two binaries work together to compose the magnum system. The first binary
(accessed by the python-magnumclient code) is the magnum-api REST server. The
@ -49,14 +44,6 @@ magnum-conductor process. The REST server is horizontally scalable. At this
time, the conductor is limited to one process, but we intend to add horizontal
scalability to the conductor as well.
The magnum-conductor process runs on a controller machine and connects to a
Kubernetes or Docker REST API endpoint. The Kubernetes and Docker REST API
endpoints are managed by the cluster object.
When service or pod objects are created, Kubernetes may be directly contacted
via the Kubernetes REST API. When container objects are acted upon, the
Docker REST API may be directly contacted.
Features
========


+ 13
- 14
doc/source/objects.rst View File

@ -47,24 +47,24 @@ Object Change Example
'''''''''''''''''''''
The following example shows the unit test workflow when changing an object
(Container was updated to hold a new 'foo' field)::
(Cluster was updated to hold a new 'foo' field)::
tox -e py27 magnum.tests.unit.objects.test_objects
This results in a unit test failure with the following output::
testtools.matchers._impl.MismatchError: !=:
reference = {'Container': '1.0-e12affbba5f8a748882a3ae98aced282'}
actual = {'Container': '1.0-22b40e8eed0414561ca921906b189820'}
reference = {'Cluster': '1.0-35edde13ad178e9419e7ea8b6d580bcd'}
actual = {'Cluster': '1.0-22b40e8eed0414561ca921906b189820'}
: Fields or remotable methods in some objects have changed. Make sure the versions of the objects has been bumped, and update the hashes in the static fingerprints tree (object_data). For more information, read http://docs.openstack.org/developer/magnum/objects.html.
This is an indication that me adding the 'foo' field to Container means I need
to bump the version of Container, so I increase the version and add a comment
This is an indication that me adding the 'foo' field to Cluster means I need
to bump the version of Cluster, so I increase the version and add a comment
saying what I changed in the new version::
@base.MagnumObjectRegistry.register
class Container(base.MagnumPersistentObject, base.MagnumObject,
base.MagnumObjectDictCompat):
class Cluster(base.MagnumPersistentObject, base.MagnumObject,
base.MagnumObjectDictCompat):
# Version 1.0: Initial version
# Version 1.1: Added 'foo' field
VERSION = '1.1'
@ -73,8 +73,8 @@ Now that I have updated the version, I will run the tests again and let the
test tell me the fingerprint that I now need to put in the static tree::
testtools.matchers._impl.MismatchError: !=:
reference = {'Container': '1.0-e12affbba5f8a748882a3ae98aced282'}
actual = {'Container': '1.1-22b40e8eed0414561ca921906b189820'}
reference = {'Cluster': '1.0-35edde13ad178e9419e7ea8b6d580bcd'}
actual = {'Cluster': '1.1-22b40e8eed0414561ca921906b189820'}
: Fields or remotable methods in some objects have changed. Make sure the versions of the objects has been bumped, and update the hashes in the static fingerprints tree (object_data). For more information, read http://docs.openstack.org/developer/magnum/objects.html.
I can now copy the new fingerprint needed
@ -82,13 +82,12 @@ I can now copy the new fingerprint needed
magnum/tests/unit/objects/test_objects.py::
object_data = {
'Bay': '1.0-35edde13ad178e9419e7ea8b6d580bcd',
'BayModel': '1.0-06863f04ab4b98307e3d1b736d3137bf',
'Container': '1.1-22b40e8eed0414561ca921906b189820',
'Cluster': '1.1-22b40e8eed0414561ca921906b189820',
'ClusterTemplate': '1.0-06863f04ab4b98307e3d1b736d3137bf',
'Certificate': '1.0-69b579203c6d726be7878c606626e438',
'MyObj': '1.0-b43567e512438205e32f4e95ca616697',
'Pod': '1.0-69b579203c6d726be7878c606626e438',
'Service': '1.0-d4b8c0f3a234aec35d273196e18f7ed1',
'X509KeyPair': '1.0-fd008eba0fbc390e0e5da247bba4eedd',
'MagnumService': '1.0-d4b8c0f3a234aec35d273196e18f7ed1',
}
Running the unit tests now shows no failure.


Loading…
Cancel
Save