Commit 0fd5547a authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix _ComputeNewInstanceViolations logic



This function did the opposite: was computing which old instance
violated the specs but no longer do it now. new - old is the expected
behaviour.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 0c2e59ac
......@@ -1276,11 +1276,12 @@ def _ComputeNewInstanceViolations(old_ipolicy, new_ipolicy, instances):
@param old_ipolicy: The current (still in-place) ipolicy
@param new_ipolicy: The new (to become) ipolicy
@param instances: List of instances to verify
@return: A list of instances which violates the new ipolicy but did not before
@return: A list of instances which violates the new ipolicy but
did not before
 
"""
return (_ComputeViolatingInstances(old_ipolicy, instances) -
_ComputeViolatingInstances(new_ipolicy, instances))
return (_ComputeViolatingInstances(new_ipolicy, instances) -
_ComputeViolatingInstances(old_ipolicy, instances))
 
 
def _ExpandItemName(fn, name, kind):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment