コード例 #1
0
ファイル: cuf_pub_handler.py プロジェクト: xroot88/yagi
 def nova_cuf(self, deployment_info, payload):
     args = dict(region=deployment_info['REGION'],
                 data_center=deployment_info['DATACENTER'],
                 event_type='compute.instance.exists.verified.cuf')
     notification = Notification(payload, **args)
     entity = notification.to_entity()
     payload_body = yagi.serializer.cuf.dump_item(entity)
     return self.unescape_strings(payload_body)
コード例 #2
0
 def nova_cuf(self, deployment_info, payload):
     args = dict(region=deployment_info['REGION'],
                 data_center=deployment_info['DATACENTER'],
                 event_type='compute.instance.exists.verified.cuf')
     notification = Notification(payload, **args)
     entity = notification.to_entity()
     payload_body = yagi.serializer.cuf.dump_item(entity)
     return self.unescape_strings(payload_body)
コード例 #3
0
ファイル: cuf_pub_handler.py プロジェクト: priy1237/yagi
 def nova_cuf(self, deployment_info, payload):
     notification = Notification(payload)
     cuf = notification.convert_to_verified_message_in_cuf_format(
         {'region': deployment_info['REGION'],
          'data_center': deployment_info['DATACENTER']})
     entity = dict(content=cuf,
                   id=str(uuid.uuid4()),
                   event_type='compute.instance.exists.verified.cuf',
                   original_message_id=notification.get_original_message_id())
     payload_body = yagi.serializer.cuf.dump_item(entity)
     return self.unescape_strings(payload_body)
コード例 #4
0
 def nova_cuf(self, deployment_info, payload):
     cuf = Notification(payload). \
         convert_to_verified_message_in_cuf_format(
         {'region': deployment_info['DATACENTER'],
          'data_center': deployment_info['REGION']})
     entity = dict(content=cuf,
                   id=str(uuid.uuid4()),
                   event_type='compute.instance.exists.verified.cuf')
     payload_body = yagi.serializer.cuf.dump_item(entity)
     return payload_body