From c3dc3d57e4580031a05c2b5b83fc28f8e618e0f6 Mon Sep 17 00:00:00 2001 From: Ann Kamyshnikova Date: Fri, 21 Mar 2014 17:08:23 +0400 Subject: [PATCH] LBaaS: Set correct nullable parameter for agent_id Corrected the following model according to database content: - NOT NULL for PoolLoadbalancerAgentBinding agent_id; Partial-bug: #1296282 Change-Id: I1f11ec2e8f4c16f58dd8d4e6429e46eaedaec945 --- neutron/services/loadbalancer/agent_scheduler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neutron/services/loadbalancer/agent_scheduler.py b/neutron/services/loadbalancer/agent_scheduler.py index 2ace1db6e2..a17e528d17 100644 --- a/neutron/services/loadbalancer/agent_scheduler.py +++ b/neutron/services/loadbalancer/agent_scheduler.py @@ -39,7 +39,8 @@ class PoolLoadbalancerAgentBinding(model_base.BASEV2): primary_key=True) agent = orm.relation(agents_db.Agent) agent_id = sa.Column(sa.String(36), sa.ForeignKey("agents.id", - ondelete='CASCADE')) + ondelete='CASCADE'), + nullable=False) class LbaasAgentSchedulerDbMixin(agentschedulers_db.AgentSchedulerDbMixin,