diff --git a/stix2/core.py b/stix2/core.py index 81dd492..be2a53d 100644 --- a/stix2/core.py +++ b/stix2/core.py @@ -1,5 +1,6 @@ """STIX 2.0 Objects that are neither SDOs nor SROs""" +from collections import OrderedDict from . import exceptions from .base import _STIXBase @@ -31,12 +32,13 @@ class STIXObjectProperty(Property): class Bundle(_STIXBase): _type = 'bundle' - _properties = { - 'type': TypeProperty(_type), - 'id': IDProperty(_type), - 'spec_version': Property(fixed="2.0"), - 'objects': ListProperty(STIXObjectProperty), - } + _properties = OrderedDict() + _properties.update([ + ('type', TypeProperty(_type)), + ('id', IDProperty(_type)), + ('spec_version', Property(fixed="2.0")), + ('objects', ListProperty(STIXObjectProperty)), + ]) def __init__(self, *args, **kwargs): # Add any positional arguments to the 'objects' kwarg. diff --git a/stix2/sro.py b/stix2/sro.py index cf26c32..23f0dd0 100644 --- a/stix2/sro.py +++ b/stix2/sro.py @@ -3,7 +3,7 @@ from collections import OrderedDict from .base import _STIXBase -from .other import ExternalReference, GranularMarking +from .common import ExternalReference, GranularMarking from .properties import (BooleanProperty, IDProperty, IntegerProperty, ListProperty, ReferenceProperty, StringProperty, TimestampProperty, TypeProperty)