return result
return not result
+ def type(self):
+ return self.t['Type']
+
def identifier(self):
'''Return an identifier for this resource'''
return identifier.ResourceIdentifier(resource_name=self.name,
'resource_status': new_state,
'name': new_state,
'resource_status_reason': reason,
- 'resource_type': self.t['Type'],
+ 'resource_type': self.type(),
'resource_properties': dict(self.properties)}
try:
db_api.event_create(self.context, ev)
properties_schema = {}
def handle_create(self):
- logger.warning('Creating generic resource (Type "%s")' %
- self.t['Type'])
+ logger.warning('Creating generic resource (Type "%s")' % self.type())
def handle_update(self):
- logger.warning('Updating generic resource (Type "%s")' %
- self.t['Type'])
+ logger.warning('Updating generic resource (Type "%s")' % self.type())
res.state_set('blarg', 'wibble')
self.assertEqual(res.state_description, 'wibble')
+ def test_type(self):
+ tmpl = {'Type': 'Foo'}
+ res = resource.GenericResource('test_resource', tmpl, self.stack)
+ self.assertEqual(res.type(), 'Foo')
+
def test_created_time(self):
tmpl = {'Type': 'Foo'}
res = resource.GenericResource('test_res_new', tmpl, self.stack)