Apply OrderedDict changes to Bundle.

stix2.1
Emmanuelle Vargas-Gonzalez 2017-08-14 09:24:41 -04:00
parent add14c2490
commit 1329e2e76f
1 changed files with 9 additions and 6 deletions

View File

@ -1,5 +1,7 @@
"""STIX 2 Bundle object""" """STIX 2 Bundle object"""
from collections import OrderedDict
from .base import _STIXBase from .base import _STIXBase
from .properties import IDProperty, Property, TypeProperty from .properties import IDProperty, Property, TypeProperty
@ -7,12 +9,13 @@ from .properties import IDProperty, Property, TypeProperty
class Bundle(_STIXBase): class Bundle(_STIXBase):
_type = 'bundle' _type = 'bundle'
_properties = { _properties = OrderedDict()
'type': TypeProperty(_type), _properties = _properties.update([
'id': IDProperty(_type), ('type', TypeProperty(_type)),
'spec_version': Property(fixed="2.0"), ('id', IDProperty(_type)),
'objects': Property(), ('spec_version', Property(fixed="2.0")),
} ('objects', Property()),
])
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
# Add any positional arguments to the 'objects' kwarg. # Add any positional arguments to the 'objects' kwarg.