chg: [AIL2AIL Sync] update exchange format

pull/586/head
Terrtia 2022-06-02 16:42:20 +02:00
parent f4102dd242
commit b9ad0b1bce
No known key found for this signature in database
GPG Key ID: 1E1B1F50D84613D0
2 changed files with 10 additions and 6 deletions

View File

@ -1205,11 +1205,13 @@ def create_ail_stream(Object):
'type': Object.get_type()}
# OBJECT META
ail_stream['meta'] = {'ail_mime-type': 'text/plain'}
ail_stream['meta'] = {'ail:mime-type': 'text/plain'}
ail_stream['meta']['compress'] = 'gzip'
ail_stream['meta']['encoding'] = 'base64'
ail_stream['meta']['ail:id'] = Object.get_id()
ail_stream['meta']['ail:tags'] = Object.get_tags()
# GLOBAL PAYLOAD
ail_stream['meta']['ail:uuid'] = get_ail_uuid()
ail_stream['meta']['tags'] = Object.get_tags()
# GLOBAL META
ail_stream['meta']['uuid_org'] = get_ail_uuid()
# OBJECT PAYLOAD
ail_stream['payload'] = Object.get_ail_2_ail_payload()

View File

@ -637,8 +637,7 @@ class Item(AbstractObject):
return content.decode()
def get_ail_2_ail_payload(self):
payload = {'raw': self.get_gzip_content(b64=True),
'compress': 'gzip'}
payload = {'raw': self.get_gzip_content(b64=True)}
return payload
# # TODO:
@ -667,6 +666,9 @@ class Item(AbstractObject):
def get_svg_icon(self):
pass
def get_misp_object(self):
pass
############################################################################
############################################################################
############################################################################