summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--ceilometer/storage/impl_mongodb.py42
-rw-r--r--ceilometer/storage/impl_sqlalchemy.py78
-rw-r--r--ceilometer/storage/impl_test.py42
-rw-r--r--doc/source/api/index.rst8
-rw-r--r--doc/source/contributing/index.rst1
-rw-r--r--doc/source/index.rst1
7 files changed, 93 insertions, 83 deletions
diff --git a/.gitignore b/.gitignore
index 8336faa9..95310274 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,5 +12,7 @@ ChangeLog
dist
*.egg
ceilometer/versioninfo
-doc/source/api/*.rst
+doc/source/api/ceilometer.*.rst
+doc/source/api/tests.*.rst
+doc/source/api/autoindex.rst
*.mo
diff --git a/ceilometer/storage/impl_mongodb.py b/ceilometer/storage/impl_mongodb.py
index 24aacff0..84bc027d 100644
--- a/ceilometer/storage/impl_mongodb.py
+++ b/ceilometer/storage/impl_mongodb.py
@@ -36,27 +36,27 @@ LOG = log.getLogger(__name__)
class MongoDBStorage(base.StorageEngine):
"""Put the data into a MongoDB database
- Collections:
-
- - user
- - { _id: user id
- source: [ array of source ids reporting for the user ]
- }
- - project
- - { _id: project id
- source: [ array of source ids reporting for the project ]
- }
- - meter
- - the raw incoming data
- - resource
- - the metadata for resources
- - { _id: uuid of resource,
- metadata: metadata dictionaries
- timestamp: datetime of last update
- user_id: uuid
- project_id: uuid
- meter: [ array of {counter_name: string, counter_type: string} ]
- }
+ Collections::
+
+ - user
+ - { _id: user id
+ source: [ array of source ids reporting for the user ]
+ }
+ - project
+ - { _id: project id
+ source: [ array of source ids reporting for the project ]
+ }
+ - meter
+ - the raw incoming data
+ - resource
+ - the metadata for resources
+ - { _id: uuid of resource,
+ metadata: metadata dictionaries
+ timestamp: datetime of last update
+ user_id: uuid
+ project_id: uuid
+ meter: [ array of {counter_name: string, counter_type: string} ]
+ }
"""
OPTIONS = []
diff --git a/ceilometer/storage/impl_sqlalchemy.py b/ceilometer/storage/impl_sqlalchemy.py
index 7ac83fbf..de3acb43 100644
--- a/ceilometer/storage/impl_sqlalchemy.py
+++ b/ceilometer/storage/impl_sqlalchemy.py
@@ -33,45 +33,45 @@ LOG = log.getLogger(__name__)
class SQLAlchemyStorage(base.StorageEngine):
"""Put the data into a SQLAlchemy database
- Tables:
-
- - user
- - { id: user uuid }
- - source
- - { id: source id }
- - project
- - { id: project uuid }
- - meter
- - the raw incoming data
- - { id: meter id
- counter_name: counter name
- user_id: user uuid (->user.id)
- project_id: project uuid (->project.id)
- resource_id: resource uuid (->resource.id)
- resource_metadata: metadata dictionaries
- counter_type: counter type
- counter_volume: counter volume
- timestamp: datetime
- message_signature: message signature
- message_id: message uuid
- }
- - resource
- - the metadata for resources
- - { id: resource uuid
- resource_metadata: metadata dictionaries
- received_timestamp: received datetime
- timestamp: datetime
- project_id: project uuid (->project.id)
- user_id: user uuid (->user.id)
- }
- - sourceassoc
- - the relationships
- - { meter_id: meter id (->meter.id)
- project_id: project uuid (->project.id)
- resource_id: resource uuid (->resource.id)
- user_id: user uuid (->user.id)
- source_id: source id (->source.id)
- }
+ Tables::
+
+ - user
+ - { id: user uuid }
+ - source
+ - { id: source id }
+ - project
+ - { id: project uuid }
+ - meter
+ - the raw incoming data
+ - { id: meter id
+ counter_name: counter name
+ user_id: user uuid (->user.id)
+ project_id: project uuid (->project.id)
+ resource_id: resource uuid (->resource.id)
+ resource_metadata: metadata dictionaries
+ counter_type: counter type
+ counter_volume: counter volume
+ timestamp: datetime
+ message_signature: message signature
+ message_id: message uuid
+ }
+ - resource
+ - the metadata for resources
+ - { id: resource uuid
+ resource_metadata: metadata dictionaries
+ received_timestamp: received datetime
+ timestamp: datetime
+ project_id: project uuid (->project.id)
+ user_id: user uuid (->user.id)
+ }
+ - sourceassoc
+ - the relationships
+ - { meter_id: meter id (->meter.id)
+ project_id: project uuid (->project.id)
+ resource_id: resource uuid (->resource.id)
+ user_id: user uuid (->user.id)
+ source_id: source id (->source.id)
+ }
"""
OPTIONS = []
diff --git a/ceilometer/storage/impl_test.py b/ceilometer/storage/impl_test.py
index a01bc899..5115268c 100644
--- a/ceilometer/storage/impl_test.py
+++ b/ceilometer/storage/impl_test.py
@@ -36,27 +36,27 @@ class TestDBStorage(base.StorageEngine):
This driver is based on MIM, an in-memory version of MongoDB.
- Collections:
-
- - user
- - { _id: user id
- source: [ array of source ids reporting for the user ]
- }
- - project
- - { _id: project id
- source: [ array of source ids reporting for the project ]
- }
- - meter
- - the raw incoming data
- - resource
- - the metadata for resources
- - { _id: uuid of resource,
- metadata: metadata dictionaries
- timestamp: datetime of last update
- user_id: uuid
- project_id: uuid
- meter: [ array of {counter_name: string, counter_type: string} ]
- }
+ Collections::
+
+ - user
+ - { _id: user id
+ source: [ array of source ids reporting for the user ]
+ }
+ - project
+ - { _id: project id
+ source: [ array of source ids reporting for the project ]
+ }
+ - meter
+ - the raw incoming data
+ - resource
+ - the metadata for resources
+ - { _id: uuid of resource,
+ metadata: metadata dictionaries
+ timestamp: datetime of last update
+ user_id: uuid
+ project_id: uuid
+ meter: [ array of {counter_name: string, counter_type: string} ]
+ }
"""
OPTIONS = []
diff --git a/doc/source/api/index.rst b/doc/source/api/index.rst
new file mode 100644
index 00000000..57dfc7cc
--- /dev/null
+++ b/doc/source/api/index.rst
@@ -0,0 +1,8 @@
+======================
+Internal API Reference
+======================
+
+.. toctree::
+ :maxdepth: 1
+
+ autoindex
diff --git a/doc/source/contributing/index.rst b/doc/source/contributing/index.rst
index d570eaaf..44df84ea 100644
--- a/doc/source/contributing/index.rst
+++ b/doc/source/contributing/index.rst
@@ -24,3 +24,4 @@
areas
source
plugins
+ ../api/index
diff --git a/doc/source/index.rst b/doc/source/index.rst
index 93d19e7a..6d87a69b 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -53,7 +53,6 @@ Table of contents
webapi/index
contributing/index
releasenotes/index
- api/index
glossary
.. - installation