Exemple #1
0
 def test_event_object_resource_properties_data(self):
     cfg.CONF.set_override('encrypt_parameters_and_properties',
                           True,
                           enforce_type=True)
     data = {'p1': 'hello', 'p2': 'too soon?'}
     rpd_obj = rpd_object.ResourcePropertiesData().create(self.ctx, data)
     rpd_db_obj = self.ctx.session.query(models.ResourcePropertiesData).get(
         rpd_obj.id)
     e_obj = event_object.Event().create(
         self.ctx, {
             'stack_id': self.stack.id,
             'uuid': str(uuid.uuid4()),
             'rsrc_prop_data': rpd_db_obj
         })
     e_obj = event_object.Event().get_by_id(utils.dummy_context(), e_obj.id)
     # properties data appears unencrypted to event object
     self.assertEqual(data, e_obj.rsrc_prop_data.data)
Exemple #2
0
 def test_event_object_resource_properties_data(self):
     cfg.CONF.set_override('encrypt_parameters_and_properties', True)
     data = {'p1': 'hello', 'p2': 'too soon?'}
     rpd_obj = rpd_object.ResourcePropertiesData().create(self.ctx, data)
     e_obj = event_object.Event().create(
         self.ctx, {
             'stack_id': self.stack.id,
             'uuid': str(uuid.uuid4()),
             'rsrc_prop_data_id': rpd_obj.id
         })
     e_obj = event_object.Event.get_all_by_stack(utils.dummy_context(),
                                                 self.stack.id)[0]
     # properties data appears unencrypted to event object
     self.assertEqual(data, e_obj.resource_properties)