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

« back to all changes in this revision

Viewing changes to quantum/plugins/cisco/db/network_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
1
# vim: tabstop=4 shiftwidth=4 softtabstop=4
2
 
#
 
2
 
3
3
# Copyright 2012, Cisco Systems, Inc.
4
4
#
5
5
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
16
16
#
17
17
# @author: Rohit Agarwalla, Cisco Systems, Inc.
18
18
 
19
 
import uuid
20
 
 
21
19
from sqlalchemy import Column, Integer, String, ForeignKey, Boolean
22
20
from sqlalchemy.orm import relation, object_mapper
23
21
 
24
22
from quantum.db import model_base
25
23
from quantum.db import models_v2 as models
 
24
from quantum.openstack.common import uuidutils
26
25
 
27
26
 
28
27
class L2NetworkBase(object):
111
110
    qos = Column(String(255))
112
111
 
113
112
    def __init__(self, name, vlan_id, qos=None):
114
 
            self.uuid = uuid.uuid4()
115
 
            self.name = name
116
 
            self.vlan_id = vlan_id
117
 
            self.qos = qos
 
113
        self.uuid = uuidutils.generate_uuid()
 
114
        self.name = name
 
115
        self.vlan_id = vlan_id
 
116
        self.qos = qos
118
117
 
119
118
    def __repr__(self):
120
119
        return "<PortProfile(%s,%s,%d,%s)>" % (self.uuid,
160
159
    qos_desc = Column(String(255))
161
160
 
162
161
    def __init__(self, tenant_id, qos_name, qos_desc):
163
 
        self.qos_id = str(uuid.uuid4())
 
162
        self.qos_id = uuidutils.generate_uuid()
164
163
        self.tenant_id = tenant_id
165
164
        self.qos_name = qos_name
166
165
        self.qos_desc = qos_desc
181
180
    password = Column(String(255))
182
181
 
183
182
    def __init__(self, tenant_id, credential_name, user_name, password):
184
 
        self.credential_id = str(uuid.uuid4())
 
183
        self.credential_id = uuidutils.generate_uuid()
185
184
        self.tenant_id = tenant_id
186
185
        self.credential_name = credential_name
187
186
        self.user_name = user_name