diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-06-13 05:35:00 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-06-13 05:35:00 +0000 |
| commit | 992e75aaa1321fec212ca87f7bf263873d94d80c (patch) | |
| tree | f2f5c40fdc909bc5bf3bad958d44bac30108fe11 /nova/db | |
| parent | 53f62b33caa71de1da3163e0f835e39ea7a64ee8 (diff) | |
| parent | 1bf87dda57b076e042301eeafa966283265d08cf (diff) | |
| download | nova-992e75aaa1321fec212ca87f7bf263873d94d80c.tar.gz nova-992e75aaa1321fec212ca87f7bf263873d94d80c.tar.xz nova-992e75aaa1321fec212ca87f7bf263873d94d80c.zip | |
Merge "Fix and enable H403 tests"
Diffstat (limited to 'nova/db')
| -rw-r--r-- | nova/db/api.py | 30 | ||||
| -rw-r--r-- | nova/db/sqlalchemy/api.py | 3 | ||||
| -rw-r--r-- | nova/db/sqlalchemy/models.py | 3 | ||||
| -rw-r--r-- | nova/db/sqlalchemy/utils.py | 3 |
4 files changed, 27 insertions, 12 deletions
diff --git a/nova/db/api.py b/nova/db/api.py index 35f335e60..c25bc26ca 100644 --- a/nova/db/api.py +++ b/nova/db/api.py @@ -888,8 +888,10 @@ def network_delete_safe(context, network_id): def network_disassociate(context, network_id, disassociate_host=True, disassociate_project=True): - """Disassociate the network from project or host and raise if it does - not exist.""" + """Disassociate the network from project or host + + Raises if it does not exist. + """ return IMPL.network_disassociate(context, network_id, disassociate_host, disassociate_project) @@ -1110,7 +1112,9 @@ def block_device_mapping_update(context, bdm_id, values, legacy=True): def block_device_mapping_update_or_create(context, values, legacy=True): """Update an entry of block device mapping. - If not existed, create a new entry""" + + If not existed, create a new entry + """ return IMPL.block_device_mapping_update_or_create(context, values, legacy) @@ -1412,8 +1416,11 @@ def instance_type_extra_specs_delete(context, flavor_id, key): def instance_type_extra_specs_update_or_create(context, flavor_id, extra_specs): - """Create or update instance type extra specs. This adds or modifies the - key/value pairs specified in the extra specs dict argument""" + """Create or update instance type extra specs. + + This adds or modifies the key/value pairs specified in the + extra specs dict argument + """ IMPL.instance_type_extra_specs_update_or_create(context, flavor_id, extra_specs) @@ -1557,7 +1564,9 @@ def vol_usage_update(context, id, rd_req, rd_bytes, wr_req, wr_bytes, last_refreshed=None, update_totals=False, session=None): """Update cached volume usage for a volume - Creates new record if needed.""" + + Creates new record if needed. + """ return IMPL.vol_usage_update(context, id, rd_req, rd_bytes, wr_req, wr_bytes, instance_id, project_id, user_id, availability_zone, @@ -1607,7 +1616,8 @@ def aggregate_metadata_get_by_host(context, host, key=None): Returns a dictionary where each value is a set, this is to cover the case where there two aggregates have different values for the same key. - Optional key filter""" + Optional key filter + """ return IMPL.aggregate_metadata_get_by_host(context, host, key) @@ -1622,8 +1632,10 @@ def aggregate_host_get_by_metadata_key(context, key): def aggregate_update(context, aggregate_id, values): - """Update the attributes of an aggregates. If values contains a metadata - key, it updates the aggregate metadata too.""" + """Update the attributes of an aggregates. + + If values contains a metadata key, it updates the aggregate metadata too. + """ return IMPL.aggregate_update(context, aggregate_id, values) diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py index fa292acbf..01f7ad3de 100644 --- a/nova/db/sqlalchemy/api.py +++ b/nova/db/sqlalchemy/api.py @@ -496,7 +496,8 @@ def _prep_stats_dict(values): @require_admin_context def compute_node_create(context, values): """Creates a new ComputeNode and populates the capacity fields - with the most recent data.""" + with the most recent data. + """ _prep_stats_dict(values) convert_datetimes(values, 'created_at', 'deleted_at', 'updated_at') diff --git a/nova/db/sqlalchemy/models.py b/nova/db/sqlalchemy/models.py index 99a68d2cf..815041638 100644 --- a/nova/db/sqlalchemy/models.py +++ b/nova/db/sqlalchemy/models.py @@ -104,7 +104,8 @@ class ComputeNode(BASE, NovaBase): class ComputeNodeStat(BASE, NovaBase): """Stats related to the current workload of a compute host that are - intended to aid in making scheduler decisions.""" + intended to aid in making scheduler decisions. + """ __tablename__ = 'compute_node_stats' __table_args__ = ( Index('ix_compute_node_stats_compute_node_id', 'compute_node_id'), diff --git a/nova/db/sqlalchemy/utils.py b/nova/db/sqlalchemy/utils.py index 6a24ecb97..7430fefdd 100644 --- a/nova/db/sqlalchemy/utils.py +++ b/nova/db/sqlalchemy/utils.py @@ -47,7 +47,8 @@ def get_table(engine, name): """Returns an sqlalchemy table dynamically from db. Needed because the models don't work for us in migrations - as models will be far out of sync with the current data.""" + as models will be far out of sync with the current data. + """ metadata = MetaData() metadata.bind = engine return Table(name, metadata, autoload=True) |
