Update commons.py to new OrderedDict format, just in case.
parent
5172f86a7b
commit
228f488f5b
stix2
|
@ -1,18 +1,22 @@
|
|||
"""STIX 2 Common Data Types and Properties"""
|
||||
|
||||
from collections import OrderedDict
|
||||
|
||||
from .other import ExternalReference, GranularMarking
|
||||
from .properties import (BooleanProperty, ListProperty, ReferenceProperty,
|
||||
StringProperty, TimestampProperty)
|
||||
from .utils import NOW
|
||||
|
||||
COMMON_PROPERTIES = {
|
||||
COMMON_PROPERTIES = OrderedDict()
|
||||
|
||||
COMMON_PROPERTIES.update([
|
||||
# 'type' and 'id' should be defined on each individual type
|
||||
'created': TimestampProperty(default=lambda: NOW, precision='millisecond'),
|
||||
'modified': TimestampProperty(default=lambda: NOW, precision='millisecond'),
|
||||
'external_references': ListProperty(ExternalReference),
|
||||
'revoked': BooleanProperty(),
|
||||
'labels': ListProperty(StringProperty),
|
||||
'created_by_ref': ReferenceProperty(type="identity"),
|
||||
'object_marking_refs': ListProperty(ReferenceProperty(type="marking-definition")),
|
||||
'granular_markings': ListProperty(GranularMarking),
|
||||
}
|
||||
('created_by_ref', ReferenceProperty(type="identity")),
|
||||
('created', TimestampProperty(default=lambda: NOW, precision='millisecond')),
|
||||
('modified', TimestampProperty(default=lambda: NOW, precision='millisecond')),
|
||||
('revoked', BooleanProperty()),
|
||||
('labels', ListProperty(StringProperty)),
|
||||
('external_references', ListProperty(ExternalReference)),
|
||||
('object_marking_refs', ListProperty(ReferenceProperty(type="marking-definition"))),
|
||||
('granular_markings', ListProperty(GranularMarking)),
|
||||
])
|
||||
|
|
Loading…
Reference in New Issue