~ubuntu-branches/ubuntu/raring/quantum/raring-proposed

« back to all changes in this revision

Viewing changes to quantum/db/models_v2.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Chuck Short, Yolanda Robla, James Page, Maru Newby
  • Date: 2013-01-11 09:14:35 UTC
  • mfrom: (2.1.17)
  • Revision ID: package-import@ubuntu.com-20130111091435-vaup7dwmtmajy5oe
Tags: 2013.1~g2-0ubuntu1
[ Chuck Short ]
* New upstream version. 
* debian/patches/fix-quantum-configuration.patch: Refreshed.

[ Yolanda Robla ]
* debian/quantum-l3-agent.quantum-metadata-agent.upstart: Add
  upstart configuration for Metadata Agent.
* debian/quantum-l3-agent.install: Added quantum-ns-metadata-proxy,
  quantum-metadata-agent and metadata_agent.ini.
* debian/patches/fix-quantum-configuration.patch: Update rootwrap
  configuration in metadata_agent.ini file.
* debian/changelog: Updated package version
* d/p/fix-quantum-configuration.patch: refresh patches

[ James Page ]
* d/*.install: Install entry points from bin directory instead
  of easy-install ones generated during the package build process
  (LP: #1085038).
* d/control: Drop BD on python-dev-all; its not required.
* d/rules: Install multiple upstart configurations for quantum-l3-agent.
* d/control: Tidy package descriptions.
* d/*.postrm: Drop as debhelper will generate update-rc.d calls in
  maintainer scripts if required.
* d/quantum-common.postinst: Tweak permissions setting so that /etc/quantum
  is not owned/writable by the quantum user, ensure that /etc/quantum/rootwrap*
  is owned by root:root.
* d/*agent*.postinst: Dropped as permissions now correctly set in
  quantum-common.
* d/patches/fix-quantum-configuration.patch: Re-add dropped fixes rootwrap and
  sqlite defaults for all plugins.
* d/control: Added new BD on alembic (>= 0.4.1~), version python-mock >= 1.0b1.

[ Maru Newby ]
* debian/control: Remove unnecessary openvswitch-vswitch dependency
  from quantum-plugin-openvswitch (LP: #1076747).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (c) 2012 OpenStack, LLC.
2
 
#
3
 
# Licensed under the Apache License, Version 2.0 (the "License");
4
 
# you may not use this file except in compliance with the License.
5
 
# You may obtain a copy of the License at
6
 
#
7
 
#    http://www.apache.org/licenses/LICENSE-2.0
8
 
#
9
 
# Unless required by applicable law or agreed to in writing, software
10
 
# distributed under the License is distributed on an "AS IS" BASIS,
11
 
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12
 
# implied.
13
 
# See the License for the specific language governing permissions and
14
 
# limitations under the License.
 
1
# vim: tabstop=4 shiftwidth=4 softtabstop=4
 
2
 
 
3
# Copyright (c) 2012 OpenStack LLC.
 
4
# All Rights Reserved.
 
5
#
 
6
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
 
7
#    not use this file except in compliance with the License. You may obtain
 
8
#    a copy of the License at
 
9
#
 
10
#         http://www.apache.org/licenses/LICENSE-2.0
 
11
#
 
12
#    Unless required by applicable law or agreed to in writing, software
 
13
#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 
14
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 
15
#    License for the specific language governing permissions and limitations
 
16
#    under the License.
15
17
 
16
18
import sqlalchemy as sa
17
19
from sqlalchemy import orm
18
20
 
19
 
from quantum.common import utils
20
21
from quantum.db import model_base
 
22
from quantum.openstack.common import uuidutils
21
23
 
22
24
 
23
25
class HasTenant(object):
28
30
 
29
31
class HasId(object):
30
32
    """id mixin, add to subclasses that have an id."""
31
 
    id = sa.Column(sa.String(36), primary_key=True, default=utils.str_uuid)
 
33
    id = sa.Column(sa.String(36),
 
34
                   primary_key=True,
 
35
                   default=uuidutils.generate_uuid)
32
36
 
33
37
 
34
38
class IPAvailabilityRange(model_base.BASEV2):
65
69
    last_ip = sa.Column(sa.String(64), nullable=False)
66
70
    available_ranges = orm.relationship(IPAvailabilityRange,
67
71
                                        backref='ipallocationpool',
68
 
                                        lazy="dynamic")
 
72
                                        lazy="dynamic",
 
73
                                        cascade='delete')
69
74
 
70
75
    def __repr__(self):
71
76
        return "%s - %s" % (self.first_ip, self.last_ip)
132
137
    gateway_ip = sa.Column(sa.String(64))
133
138
    allocation_pools = orm.relationship(IPAllocationPool,
134
139
                                        backref='subnet',
135
 
                                        lazy="dynamic")
 
140
                                        lazy="dynamic",
 
141
                                        cascade='delete')
136
142
    enable_dhcp = sa.Column(sa.Boolean())
137
143
    dns_nameservers = orm.relationship(DNSNameServer,
138
144
                                       backref='subnet',