There is no need to do "None" value check

Bug #1675652 reported by Jeffrey Guan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Invalid
Undecided
Jeffrey Guan

Bug Description

There is no need to do "None" value check
for self.VOLUME_TYPE and self.SERVER_TYPE
in handle_create() and validate() in
heat/engine/resources/openstack/magnum/cluster_template.py

From the defination of self.VOLUME_TYPE and self.SERVER_TYPE,
there are already constraints for their allowed values. So,
the extra "None" value check is not needed.

Changed in heat:
assignee: nobody → Jeffrey Guan (double12gzh)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/449448

Revision history for this message
Rabi Mishra (rabi) wrote :

I think VOLUME_TYPE is optional porperty. If the property is not specified in the template it would be None. SERVER_TYPE is checked along with other optional properties for None[1]. So not sure why this is a bug???

[1] https://github.com/openstack/heat/blob/master/heat/engine/resources/openstack/magnum/cluster_template.py#L247

Changed in heat:
status: In Progress → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on heat (master)

Change abandoned by JeffreyGuan (double12gzh@163.com) on branch: master
Review: https://review.openstack.org/449448
Reason: This is not a bug. self.VOLUME_TYPE and self.SERVER_TYPE is not always "required" for this resource. So the check for None is necessary

Revision history for this message
Jeffrey Guan (double12gzh) wrote :

Thank you for your reply. It's my fault.

I only noticed there is a constrain for their value but take for granted these properties is "required".

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.