本文整理汇总了Python中cloudinit.sources.DataSourceAltCloud.read_user_data_callback方法的典型用法代码示例。如果您正苦于以下问题:Python DataSourceAltCloud.read_user_data_callback方法的具体用法?Python DataSourceAltCloud.read_user_data_callback怎么用?Python DataSourceAltCloud.read_user_data_callback使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cloudinit.sources.DataSourceAltCloud
的用法示例。
在下文中一共展示了DataSourceAltCloud.read_user_data_callback方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_callback_non_dc
# 需要导入模块: from cloudinit.sources import DataSourceAltCloud [as 别名]
# 或者: from cloudinit.sources.DataSourceAltCloud import read_user_data_callback [as 别名]
def test_callback_non_dc(self):
'''Test read_user_data_callback() with only non-DC file.'''
_remove_user_data_files(self.mount_dir,
dc_file=True,
non_dc_file=False)
self.assertEqual('test user data',
dsac.read_user_data_callback(self.mount_dir))
示例2: test_callback_none
# 需要导入模块: from cloudinit.sources import DataSourceAltCloud [as 别名]
# 或者: from cloudinit.sources.DataSourceAltCloud import read_user_data_callback [as 别名]
def test_callback_none(self):
'''Test read_user_data_callback() no files are found.'''
_remove_user_data_files(self.mount_dir)
self.assertIsNone(dsac.read_user_data_callback(self.mount_dir))
示例3: test_callback_both
# 需要导入模块: from cloudinit.sources import DataSourceAltCloud [as 别名]
# 或者: from cloudinit.sources.DataSourceAltCloud import read_user_data_callback [as 别名]
def test_callback_both(self):
'''Test read_user_data_callback() with both files.'''
self.assertEqual('test user data',
dsac.read_user_data_callback(self.mount_dir))