Merge pull request #514 from oasis-open/network-traffic-2.1cs03

Update Network Traffic for CS03
pull/1/head
Rich Piazza 2021-07-06 16:02:28 -04:00 committed by GitHub
commit be320fff15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -561,7 +561,7 @@ class NetworkTraffic(_Observable):
('defanged', BooleanProperty(default=lambda: False)),
('extensions', ExtensionsProperty(spec_version='2.1', enclosing_type=_type)),
])
_id_contributing_properties = ["start", "src_ref", "dst_ref", "src_port", "dst_port", "protocols"]
_id_contributing_properties = ["start", "end", "src_ref", "dst_ref", "src_port", "dst_port", "protocols", "extensions"]
def _check_object_constraints(self):
super(NetworkTraffic, self)._check_object_constraints()
@ -579,8 +579,8 @@ class NetworkTraffic(_Observable):
msg = "{0.id} if 'is_active' is True, 'end' must not be included"
raise ValueError(msg.format(self))
if start and end and end <= start:
msg = "{0.id} 'end' must be greater than 'start'"
if start and end and end < start:
msg = "{0.id} 'end' must be greater than or equal to 'start'"
raise ValueError(msg.format(self))