Despite of its name, _check_update_has_security_groups can
handle create requests as well. There are plugins actually
using it for create. eg. ml2, vmware
Change-Id: I3c26ad0ac00b12ce24096bfc27606797af2d9098
return False
def _check_update_has_security_groups(self, port):
- """Return True if port has as a security group and False if the
- security_group field is is_attr_set or [].
+ """Return True if port has security_groups attribute set and
+ its not empty, or False otherwise.
+ This method is called both for port create and port update.
"""
if (ext_sg.SECURITYGROUPS in port['port'] and
(attributes.is_attr_set(port['port'][ext_sg.SECURITYGROUPS]) and