~ubuntu-branches/ubuntu/saucy/nova/saucy-proposed

« back to all changes in this revision

Viewing changes to nova/db/sqlalchemy/migrate_repo/versions/078_add_rpc_info_to_zones.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Dave Walker (Daviey), Chuck Short
  • Date: 2012-02-17 10:59:59 UTC
  • mfrom: (1.1.45)
  • Revision ID: package-import@ubuntu.com-20120217105959-ut218n638vv7cre0
Tags: 2012.1~e4~20120217.12709-0ubuntu1
[ Dave Walker (Daviey) ]
* New upstream snapshot
* debian/patches/temp_fix_linux_net.patch:
  - Dropped, applied upstream. LP: #929127
* debian/patches/libvirt-use-console-pipe.patch:
  - Rebased against latest trunk

[ Chuck Short ]
* debian/nova.conf: Re-enable default iscsi_helper.
* debian/nova.conf: More fixups.
* debian/control: Dont depend and conflicts on nova-compute-
  hypervisor. (LP: #923681)
* debian/patches/libvirt-us-console-pipe.patch: Refreshed.
* Temporarily disable console patch. (LP: #932787)
* New usptream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright 2012 OpenStack LLC.
 
2
#
 
3
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
 
4
#    not use this file except in compliance with the License. You may obtain
 
5
#    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, WITHOUT
 
11
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 
12
#    License for the specific language governing permissions and limitations
 
13
#    under the License.
 
14
 
 
15
from sqlalchemy import *
 
16
 
 
17
meta = MetaData()
 
18
 
 
19
zones = Table('zones', meta,
 
20
        Column('id', Integer(), primary_key=True, nullable=False),
 
21
        )
 
22
 
 
23
is_parent = Column('is_parent', Boolean(), default=False)
 
24
rpc_host = Column('rpc_host', String(255))
 
25
rpc_port = Column('rpc_port', Integer())
 
26
rpc_virtual_host = Column('rpc_virtual_host', String(255))
 
27
 
 
28
 
 
29
def upgrade(migrate_engine):
 
30
    meta.bind = migrate_engine
 
31
 
 
32
    zones.create_column(is_parent)
 
33
    zones.create_column(rpc_host)
 
34
    zones.create_column(rpc_port)
 
35
    zones.create_column(rpc_virtual_host)
 
36
 
 
37
 
 
38
def downgrade(migrate_engine):
 
39
    meta.bind = migrate_engine
 
40
 
 
41
    zones.drop_column(rpc_virtual_host)
 
42
    zones.drop_column(rpc_port)
 
43
    zones.drop_column(rpc_host)
 
44
    zones.drop_column(is_parent)