Apply OrderedDict changes to Bundle.
parent
add14c2490
commit
1329e2e76f
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue