示例#1
0
def create_event(ctx, **kwargs):
    values = {
        'stack_id': 'test_stack_id',
        'resource_action': 'create',
        'resource_status': 'complete',
        'resource_name': 'res',
        'physical_resource_id': UUID1,
        'resource_status_reason': "create_complete",
        'resource_properties': {'name': 'foo'}
    }
    values.update(kwargs)
    return db_api.event_create(ctx, values)
示例#2
0
def create_event(ctx, **kwargs):
    values = {
        'stack_id': 'test_stack_id',
        'resource_action': 'create',
        'resource_status': 'complete',
        'resource_name': 'res',
        'physical_resource_id': UUID1,
        'resource_status_reason': "create_complete",
        'resource_properties': {'name': 'foo'}
    }
    values.update(kwargs)
    return db_api.event_create(ctx, values)
示例#3
0
文件: event.py 项目: kyuhwi-choi/heat
 def create(cls, context, values):
     # Using dict() allows us to be done with the sqlalchemy/model
     # layer in one call, rather than hitting that layer for every
     # field in _from_db_object().
     return cls._from_db_object(context, cls(context=context),
                                dict(db_api.event_create(context, values)))
示例#4
0
文件: event.py 项目: hongbin/heat
 def create(cls, context, values):
     # Using dict() allows us to be done with the sqlalchemy/model
     # layer in one call, rather than hitting that layer for every
     # field in _from_db_object().
     return cls._from_db_object(context, cls(context=context),
                                dict(db_api.event_create(context, values)))
示例#5
0
 def create(cls, context, values):
     return cls._from_db_object(context, cls(),
                                db_api.event_create(context, values))
示例#6
0
文件: event.py 项目: slackwei/heat
 def create(cls, context, values):
     return cls._from_db_object(context, cls(),
                                db_api.event_create(context, values))