chg: [interoperability] Removed changes on interoperability parameters
- Since the code changed a lot, there is no longer need to deal with it in the classes defined in the files concerned herepull/1/head
parent
d229bd3cd1
commit
9a966f45c3
|
@ -35,14 +35,6 @@ class Bundle(_STIXBase20):
|
||||||
|
|
||||||
kwargs['objects'] = obj_list + kwargs.get('objects', [])
|
kwargs['objects'] = obj_list + kwargs.get('objects', [])
|
||||||
|
|
||||||
allow_custom = kwargs.get('allow_custom', False)
|
|
||||||
self._allow_custom = allow_custom
|
|
||||||
self._properties['objects'].contained.allow_custom = allow_custom
|
|
||||||
interoperability = kwargs.get('interoperability', False)
|
|
||||||
self.__interoperability = interoperability
|
|
||||||
self._properties['id'].interoperability = interoperability
|
|
||||||
self._properties['objects'].contained.interoperability = interoperability
|
|
||||||
|
|
||||||
super(Bundle, self).__init__(**kwargs)
|
super(Bundle, self).__init__(**kwargs)
|
||||||
|
|
||||||
def get_obj(self, obj_uuid):
|
def get_obj(self, obj_uuid):
|
||||||
|
|
|
@ -147,12 +147,6 @@ class MarkingDefinition(_STIXBase20, _MarkingsMixin):
|
||||||
if not isinstance(kwargs['definition'], marking_type):
|
if not isinstance(kwargs['definition'], marking_type):
|
||||||
defn = _get_dict(kwargs['definition'])
|
defn = _get_dict(kwargs['definition'])
|
||||||
kwargs['definition'] = marking_type(**defn)
|
kwargs['definition'] = marking_type(**defn)
|
||||||
interoperability = kwargs.get('interoperability', False)
|
|
||||||
self._properties['id'].interoperability = interoperability
|
|
||||||
if kwargs.get('created_by_ref'):
|
|
||||||
self._properties['created_by_ref'].interoperability = interoperability
|
|
||||||
if kwargs.get('object_marking_refs'):
|
|
||||||
self._properties['object_marking_refs'].contained.interoperability = interoperability
|
|
||||||
|
|
||||||
super(MarkingDefinition, self).__init__(**kwargs)
|
super(MarkingDefinition, self).__init__(**kwargs)
|
||||||
|
|
||||||
|
|
|
@ -248,12 +248,6 @@ class Report(_DomainObject):
|
||||||
('granular_markings', ListProperty(GranularMarking)),
|
('granular_markings', ListProperty(GranularMarking)),
|
||||||
])
|
])
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
|
||||||
self._properties['object_refs'].contained.allow_custom = kwargs.get('allow_custom', False)
|
|
||||||
self._properties['object_refs'].contained.interoperability = kwargs.get('interoperability', False)
|
|
||||||
|
|
||||||
super(Report, self).__init__(*args, **kwargs)
|
|
||||||
|
|
||||||
|
|
||||||
class ThreatActor(_DomainObject):
|
class ThreatActor(_DomainObject):
|
||||||
"""For more detailed information on this object's properties, see
|
"""For more detailed information on this object's properties, see
|
||||||
|
|
|
@ -48,9 +48,6 @@ class Relationship(_RelationshipObject):
|
||||||
kwargs['relationship_type'] = relationship_type
|
kwargs['relationship_type'] = relationship_type
|
||||||
if target_ref and not kwargs.get('target_ref'):
|
if target_ref and not kwargs.get('target_ref'):
|
||||||
kwargs['target_ref'] = target_ref
|
kwargs['target_ref'] = target_ref
|
||||||
interoperability = kwargs.get('interoperability', False)
|
|
||||||
self._properties['source_ref'].interoperability = interoperability
|
|
||||||
self._properties['target_ref'].interoperability = interoperability
|
|
||||||
|
|
||||||
super(Relationship, self).__init__(**kwargs)
|
super(Relationship, self).__init__(**kwargs)
|
||||||
|
|
||||||
|
@ -86,11 +83,5 @@ class Sighting(_RelationshipObject):
|
||||||
# Allow sighting_of_ref as a positional arg.
|
# Allow sighting_of_ref as a positional arg.
|
||||||
if sighting_of_ref and not kwargs.get('sighting_of_ref'):
|
if sighting_of_ref and not kwargs.get('sighting_of_ref'):
|
||||||
kwargs['sighting_of_ref'] = sighting_of_ref
|
kwargs['sighting_of_ref'] = sighting_of_ref
|
||||||
interoperability = kwargs.get('interoperability', False)
|
|
||||||
self._properties['sighting_of_ref'].interoperability = interoperability
|
|
||||||
if kwargs.get('observed_data_refs'):
|
|
||||||
self._properties['observed_data_refs'].contained.interoperability = interoperability
|
|
||||||
if kwargs.get('where_sighted_refs'):
|
|
||||||
self._properties['where_sighted_refs'].contained.interoperability = interoperability
|
|
||||||
|
|
||||||
super(Sighting, self).__init__(**kwargs)
|
super(Sighting, self).__init__(**kwargs)
|
||||||
|
|
|
@ -12,9 +12,6 @@ class _STIXBase21(_STIXBase):
|
||||||
class _Observable(_Observable, _STIXBase21):
|
class _Observable(_Observable, _STIXBase21):
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
interoperability = kwargs.get('interoperability', False)
|
|
||||||
self.__interoperability = interoperability
|
|
||||||
self._properties['id'].interoperability = interoperability
|
|
||||||
super(_Observable, self).__init__(**kwargs)
|
super(_Observable, self).__init__(**kwargs)
|
||||||
if 'id' not in kwargs:
|
if 'id' not in kwargs:
|
||||||
# Specific to 2.1+ observables: generate a deterministic ID
|
# Specific to 2.1+ observables: generate a deterministic ID
|
||||||
|
|
|
@ -32,14 +32,6 @@ class Bundle(_STIXBase21):
|
||||||
|
|
||||||
kwargs['objects'] = obj_list + kwargs.get('objects', [])
|
kwargs['objects'] = obj_list + kwargs.get('objects', [])
|
||||||
|
|
||||||
allow_custom = kwargs.get('allow_custom', False)
|
|
||||||
self._allow_custom = allow_custom
|
|
||||||
self._properties['objects'].contained.allow_custom = allow_custom
|
|
||||||
interoperability = kwargs.get('interoperability', False)
|
|
||||||
self.__interoperability = interoperability
|
|
||||||
self._properties['id'].interoperability = interoperability
|
|
||||||
self._properties['objects'].contained.interoperability = interoperability
|
|
||||||
|
|
||||||
super(Bundle, self).__init__(**kwargs)
|
super(Bundle, self).__init__(**kwargs)
|
||||||
|
|
||||||
def get_obj(self, obj_uuid):
|
def get_obj(self, obj_uuid):
|
||||||
|
|
|
@ -222,12 +222,6 @@ class MarkingDefinition(_STIXBase21, _MarkingsMixin):
|
||||||
if not isinstance(kwargs['definition'], marking_type):
|
if not isinstance(kwargs['definition'], marking_type):
|
||||||
defn = _get_dict(kwargs['definition'])
|
defn = _get_dict(kwargs['definition'])
|
||||||
kwargs['definition'] = marking_type(**defn)
|
kwargs['definition'] = marking_type(**defn)
|
||||||
interoperability = kwargs.get('interoperability', False)
|
|
||||||
self._properties['id'].interoperability = interoperability
|
|
||||||
if kwargs.get('created_by_ref'):
|
|
||||||
self._properties['created_by_ref'].interoperability = interoperability
|
|
||||||
if kwargs.get('object_marking_refs'):
|
|
||||||
self._properties['object_marking_refs'].contained.interoperability = interoperability
|
|
||||||
|
|
||||||
super(MarkingDefinition, self).__init__(**kwargs)
|
super(MarkingDefinition, self).__init__(**kwargs)
|
||||||
|
|
||||||
|
|
|
@ -698,11 +698,6 @@ class Report(_DomainObject):
|
||||||
('extensions', ExtensionsProperty(spec_version='2.1')),
|
('extensions', ExtensionsProperty(spec_version='2.1')),
|
||||||
])
|
])
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
|
||||||
self._properties['object_refs'].contained.interoperability = kwargs.get('interoperability', False)
|
|
||||||
|
|
||||||
super(Report, self).__init__(*args, **kwargs)
|
|
||||||
|
|
||||||
|
|
||||||
class ThreatActor(_DomainObject):
|
class ThreatActor(_DomainObject):
|
||||||
"""For more detailed information on this object's properties, see
|
"""For more detailed information on this object's properties, see
|
||||||
|
|
|
@ -55,9 +55,6 @@ class Relationship(_RelationshipObject):
|
||||||
kwargs['relationship_type'] = relationship_type
|
kwargs['relationship_type'] = relationship_type
|
||||||
if target_ref and not kwargs.get('target_ref'):
|
if target_ref and not kwargs.get('target_ref'):
|
||||||
kwargs['target_ref'] = target_ref
|
kwargs['target_ref'] = target_ref
|
||||||
interoperability = kwargs.get('interoperability', False)
|
|
||||||
self._properties['source_ref'].interoperability = interoperability
|
|
||||||
self._properties['target_ref'].interoperability = interoperability
|
|
||||||
|
|
||||||
super(Relationship, self).__init__(**kwargs)
|
super(Relationship, self).__init__(**kwargs)
|
||||||
|
|
||||||
|
@ -108,12 +105,6 @@ class Sighting(_RelationshipObject):
|
||||||
# Allow sighting_of_ref as a positional arg.
|
# Allow sighting_of_ref as a positional arg.
|
||||||
if sighting_of_ref and not kwargs.get('sighting_of_ref'):
|
if sighting_of_ref and not kwargs.get('sighting_of_ref'):
|
||||||
kwargs['sighting_of_ref'] = sighting_of_ref
|
kwargs['sighting_of_ref'] = sighting_of_ref
|
||||||
interoperability = kwargs.get('interoperability', False)
|
|
||||||
self._properties['sighting_of_ref'].interoperability = interoperability
|
|
||||||
if kwargs.get('observed_data_refs'):
|
|
||||||
self._properties['observed_data_refs'].contained.interoperability = interoperability
|
|
||||||
if kwargs.get('where_sighted_refs'):
|
|
||||||
self._properties['where_sighted_refs'].contained.interoperability = interoperability
|
|
||||||
|
|
||||||
super(Sighting, self).__init__(**kwargs)
|
super(Sighting, self).__init__(**kwargs)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue