本文整理汇总了Python中nailgun.orchestrator.provisioning_serializers.get_serializer_for_cluster函数的典型用法代码示例。如果您正苦于以下问题:Python get_serializer_for_cluster函数的具体用法?Python get_serializer_for_cluster怎么用?Python get_serializer_for_cluster使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_serializer_for_cluster函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_cloud_init_templates_serialization
def test_cloud_init_templates_serialization(self):
release = self.env.create_release(api=False, version='2014.2-6.1.1')
cluster = self.env.create_cluster(api=False, release_id=release.id)
serializer = ps.get_serializer_for_cluster(cluster)
self.assertEqual(
serializer.serialize_cloud_init_templates(release), {
'boothook': 'boothook_fuel_6.1.1_centos.jinja2',
'cloud_config': 'cloud_config_fuel_6.1.1_centos.jinja2',
'meta_data': 'meta_data_fuel_6.1.1_centos.jinja2'
}
)
示例2: test_env_6_1
def test_env_6_1(self):
cluster = self._get_cluster('2014.2-6.1')
serializer = ps.get_serializer_for_cluster(cluster)
self.assertIs(serializer, ps.ProvisioningSerializer61)
示例3: test_env_5_0_1
def test_env_5_0_1(self):
cluster = self._get_cluster('2014.1.1-5.0.1')
serializer = ps.get_serializer_for_cluster(cluster)
self.assertIs(serializer, ps.ProvisioningSerializer)
示例4: test_env_9_0
def test_env_9_0(self):
cluster = self._get_cluster('2016.1-9.0')
serializer = ps.get_serializer_for_cluster(cluster)
self.assertIs(serializer, ps.ProvisioningSerializer90)