Ejemplo n.º 1
0
 def _create_event(self, event_data, event_json_string):
     params = dict(
         resource_id=event_data.get('entityuuid'),
         description=event_data.get('description'),
         username=self._get_user_name(event_data.get('user')),
         account=self._get_account_name(event_data.get('account')),
         date=parse(event_data.get('eventDateTime')).replace(tzinfo=None),
         region=self.region,
         original_event=event_json_string
     )
     return EventFactory.create_event(event_key=event_data.get('event'), **params)
Ejemplo n.º 2
0
    def _create_event(self, event_data, event_json_string):

        params = dict(
            resource_id=event_data.get('entityuuid'),
            description=event_data.get('description'),
            username=self._get_user_name(event_data.get('user')),
            account=self._get_account_name(event_data.get('account')),
            date=parse(event_data.get('eventDateTime')).replace(tzinfo=None),
            region=self.region,
            original_event=event_json_string)
        return EventFactory.create_event(event_key=event_data.get('event'),
                                         **params)
Ejemplo n.º 3
0
 def test_create_lb_event(self):
     event = EventFactory.create_event('LB.CREATE')
     self.assertEquals(LoadBalancerEvent, event.__class__)
Ejemplo n.º 4
0
 def test_create_volume_event(self):
     event = EventFactory.create_event('VOLUME.CREATE')
     self.assertEquals(VolumeEvent, event.__class__)
Ejemplo n.º 5
0
 def test_create_network_event(self):
     event = EventFactory.create_event('NETWORK.CREATE')
     self.assertEquals(NetworkEvent, event.__class__)
Ejemplo n.º 6
0
 def test_create_vm_event(self):
     event = EventFactory.create_event('VM.CREATE')
     self.assertEquals(VirtualMachineEvent, event.__class__)
Ejemplo n.º 7
0
 def test_create_generic_event(self):
     event = EventFactory.create_event('USER.LOGIN')
     self.assertEquals(Event, event.__class__)
Ejemplo n.º 8
0
 def test_create_router_event(self):
     event = EventFactory.create_event('ROUTER.REBOOT')
     self.assertEquals(RouterEvent, event.__class__)
Ejemplo n.º 9
0
 def test_create_service_offering_event(self):
     event = EventFactory.create_event('SERVICE.OFFERING.CREATE')
     self.assertEquals(ServiceOfferingEvent, event.__class__)
Ejemplo n.º 10
0
 def test_create_project_event(self):
     event = EventFactory.create_event('PROJECT.CREATE')
     self.assertEquals(ProjectEvent, event.__class__)
Ejemplo n.º 11
0
 def test_create_lb_event(self):
     event = EventFactory.create_event('LB.CREATE')
     self.assertEquals(LoadBalancerEvent, event.__class__)
Ejemplo n.º 12
0
 def test_create_volume_event(self):
     event = EventFactory.create_event('VOLUME.CREATE')
     self.assertEquals(VolumeEvent, event.__class__)
Ejemplo n.º 13
0
 def test_create_network_event(self):
     event = EventFactory.create_event('NETWORK.CREATE')
     self.assertEquals(NetworkEvent, event.__class__)
Ejemplo n.º 14
0
 def test_create_vm_event(self):
     event = EventFactory.create_event('VM.CREATE')
     self.assertEquals(VirtualMachineEvent, event.__class__)
Ejemplo n.º 15
0
 def test_create_generic_event(self):
     event = EventFactory.create_event('USER.LOGIN')
     self.assertEquals(Event, event.__class__)
Ejemplo n.º 16
0
 def test_create_project_event(self):
     event = EventFactory.create_event('PROJECT.CREATE')
     self.assertEquals(ProjectEvent, event.__class__)
Ejemplo n.º 17
0
 def test_create_service_offering_event(self):
     event = EventFactory.create_event('SERVICE.OFFERING.CREATE')
     self.assertEquals(ServiceOfferingEvent, event.__class__)
Ejemplo n.º 18
0
 def test_create_router_event(self):
     event = EventFactory.create_event('ROUTER.REBOOT')
     self.assertEquals(RouterEvent, event.__class__)
Ejemplo n.º 19
0
 def test_create_snapshot_event(self):
     event = EventFactory.create_event('VMSNAPSHOT.CREATE')
     self.assertEquals(VirtualMachineSnapshotEvent, event.__class__)
Ejemplo n.º 20
0
 def test_create_snapshot_event(self):
     event = EventFactory.create_event('VMSNAPSHOT.CREATE')
     self.assertEquals(VirtualMachineSnapshotEvent, event.__class__)