6e212a71ae
A bay has an attribute 'node_addresses' that lists the IP addresses of each minion node. As the support of HA mode was added, we need a similar attribute, known as 'master_addresses', that lists the IP address of each master node. The fix adds 'master_addresses' attribute to the Bay object and Bay db model. Changes to add 'master_addresses' column to Bay are also included in this patch. Change-Id: I31965a0397bc5c18ea798eb73791d9ef8c209960 Partial-Bug: #1483047
37 lines
1.0 KiB
Python
37 lines
1.0 KiB
Python
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
"""Add master_addresses to bay
|
|
|
|
Revision ID: 6f21dc998bb
|
|
Revises: 421102d1f2d2
|
|
Create Date: 2015-08-20 13:57:14.863292
|
|
|
|
"""
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '6f21dc998bb'
|
|
down_revision = '421102d1f2d2'
|
|
|
|
from alembic import op
|
|
from magnum.db.sqlalchemy import models
|
|
import sqlalchemy as sa
|
|
|
|
|
|
def upgrade():
|
|
op.add_column(
|
|
'bay',
|
|
sa.Column('master_addresses',
|
|
models.JSONEncodedList(),
|
|
nullable=True)
|
|
)
|