本文整理汇总了Python中st2common.models.db.liveaction.LiveActionDB.name方法的典型用法代码示例。如果您正苦于以下问题:Python LiveActionDB.name方法的具体用法?Python LiveActionDB.name怎么用?Python LiveActionDB.name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类st2common.models.db.liveaction.LiveActionDB
的用法示例。
在下文中一共展示了LiveActionDB.name方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: TriggerInstanceDB
# 需要导入模块: from st2common.models.db.liveaction import LiveActionDB [as 别名]
# 或者: from st2common.models.db.liveaction.LiveActionDB import name [as 别名]
'actions': ['action1.yaml', 'a2.yaml'],
'triggertypes': ['triggertype1.yaml'],
'triggers': ['trigger1.yaml']
}
FIXTURES_2 = {
'rules': ['rule1.yaml', 'rule2.yaml']
}
MOCK_TRIGGER_INSTANCE = TriggerInstanceDB()
MOCK_TRIGGER_INSTANCE.id = 'triggerinstance-test'
MOCK_TRIGGER_INSTANCE.payload = {'t1_p': 't1_p_v'}
MOCK_TRIGGER_INSTANCE.occurrence_time = datetime.datetime.utcnow()
MOCK_LIVEACTION = LiveActionDB()
MOCK_LIVEACTION.id = 'liveaction-test-1.id'
MOCK_LIVEACTION.name = 'liveaction-test-1.name'
MOCK_LIVEACTION.status = 'requested'
class EnforceTest(DbTestCase):
models = None
@classmethod
def setUpClass(cls):
super(EnforceTest, cls).setUpClass()
# Create TriggerTypes before creation of Rule to avoid failure. Rule requires the
# Trigger and therefore TriggerType to be created prior to rule creation.
cls.models = FixturesLoader().save_fixtures_to_db(
fixtures_pack=PACK, fixtures_dict=FIXTURES_1)
cls.models.update(FixturesLoader().save_fixtures_to_db(