← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1194437] Re: Verify that lbaas entity gets a proper status

 

[Expired for neutron because there has been no activity for 60 days.]

** Changed in: neutron
       Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1194437

Title:
  Verify that lbaas entity gets a proper status

Status in neutron:
  Expired

Bug description:
  We want to verify that the lbaas entity status field comes from a
  closed set of strings.

  This bug is related to
  https://bugs.launchpad.net/quantum/+bug/1155012. Since it looks like
  we are not going to use enum, we need another way of protection.

  Suggested solution:

  LBAAS_STATUS_SET =
  (ACTIVE,PENDING_CREATE,PENDING_UPDATE,PENDING_DELETE,INACTIVE,ERROR)

  class Vip(model_base.BASEV2, models_v2.HasId, models_v2.HasTenant):
      """Represents a v2 quantum loadbalancer vip."""
      ....
      status = sa.Column(sa.String(16), nullable=False)
      ....
      @validates('status')
      def validate_status(self, key, value):
          if value not in LBAAS_STATUS_SET:
              raise ValueError(...)
          return value

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1194437/+subscriptions