mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-13 01:58:22 +00:00
chg: [AIL2AIL Sync] update exchange format
This commit is contained in:
parent
f4102dd242
commit
b9ad0b1bce
2 changed files with 10 additions and 6 deletions
|
@ -1205,11 +1205,13 @@ def create_ail_stream(Object):
|
||||||
'type': Object.get_type()}
|
'type': Object.get_type()}
|
||||||
|
|
||||||
# OBJECT META
|
# 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:id'] = Object.get_id()
|
||||||
ail_stream['meta']['ail:tags'] = Object.get_tags()
|
ail_stream['meta']['tags'] = Object.get_tags()
|
||||||
# GLOBAL PAYLOAD
|
# GLOBAL META
|
||||||
ail_stream['meta']['ail:uuid'] = get_ail_uuid()
|
ail_stream['meta']['uuid_org'] = get_ail_uuid()
|
||||||
|
|
||||||
# OBJECT PAYLOAD
|
# OBJECT PAYLOAD
|
||||||
ail_stream['payload'] = Object.get_ail_2_ail_payload()
|
ail_stream['payload'] = Object.get_ail_2_ail_payload()
|
||||||
|
|
|
@ -637,8 +637,7 @@ class Item(AbstractObject):
|
||||||
return content.decode()
|
return content.decode()
|
||||||
|
|
||||||
def get_ail_2_ail_payload(self):
|
def get_ail_2_ail_payload(self):
|
||||||
payload = {'raw': self.get_gzip_content(b64=True),
|
payload = {'raw': self.get_gzip_content(b64=True)}
|
||||||
'compress': 'gzip'}
|
|
||||||
return payload
|
return payload
|
||||||
|
|
||||||
# # TODO:
|
# # TODO:
|
||||||
|
@ -667,6 +666,9 @@ class Item(AbstractObject):
|
||||||
def get_svg_icon(self):
|
def get_svg_icon(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def get_misp_object(self):
|
||||||
|
pass
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
############################################################################
|
############################################################################
|
||||||
############################################################################
|
############################################################################
|
||||||
|
|
Loading…
Reference in a new issue