当前位置: 首页>>代码示例>>Python>>正文


Python Cluster.get_default_kernel_params方法代码示例

本文整理汇总了Python中nailgun.objects.Cluster.get_default_kernel_params方法的典型用法代码示例。如果您正苦于以下问题:Python Cluster.get_default_kernel_params方法的具体用法?Python Cluster.get_default_kernel_params怎么用?Python Cluster.get_default_kernel_params使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在nailgun.objects.Cluster的用法示例。


在下文中一共展示了Cluster.get_default_kernel_params方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_kernel_params

# 需要导入模块: from nailgun.objects import Cluster [as 别名]
# 或者: from nailgun.objects.Cluster import get_default_kernel_params [as 别名]
    def get_kernel_params(cls, instance):
        """Get kernel params

        Return cluster kernel_params if they weren't replaced by custom params.
        """
        return (instance.kernel_params or
                Cluster.get_default_kernel_params(instance.cluster))
开发者ID:gdyuldin,项目名称:fuel-web,代码行数:9,代码来源:node.py

示例2: get_kernel_params

# 需要导入模块: from nailgun.objects import Cluster [as 别名]
# 或者: from nailgun.objects.Cluster import get_default_kernel_params [as 别名]
 def get_kernel_params(cls, instance):
     """Return cluster kernel_params if they wasnot replaced by
        custom params.
     """
     # return (instance.kernel_params or
     #         Cluster.get_default_kernel_params(instance.cluster))
     if instance.cluster:
         return (instance.kernel_params or Cluster.get_default_kernel_params(instance.cluster))
     else:
         return "console=ttyS0,9600 console=tty0 biosdevname=0 crashkernel=none rootdelay=90 nomodeset"
开发者ID:zbwzy,项目名称:nailgun,代码行数:12,代码来源:node.py

示例3: add_into_cluster

# 需要导入模块: from nailgun.objects import Cluster [as 别名]
# 或者: from nailgun.objects.Cluster import get_default_kernel_params [as 别名]
    def add_into_cluster(cls, instance, cluster_id):
        """Adds Node to Cluster by its ID.
        Also assigns networks by default for Node.

        :param instance: Node instance
        :param cluster_id: Cluster ID
        :returns: None
        """
        instance.cluster_id = cluster_id
        db().flush()
        db().refresh(instance)
        instance.kernel_params = Cluster.get_default_kernel_params(
            instance.cluster
        )
        db().flush()
        network_manager = Cluster.get_network_manager(instance.cluster)
        network_manager.assign_networks_by_default(instance)
开发者ID:koder-ua,项目名称:fuel-web,代码行数:19,代码来源:node.py

示例4: get_kernel_params

# 需要导入模块: from nailgun.objects import Cluster [as 别名]
# 或者: from nailgun.objects.Cluster import get_default_kernel_params [as 别名]
 def get_kernel_params(cls, instance):
     """Return cluster kernel_params if they wasnot replaced by
        custom params.
     """
     return instance.kernel_params or Cluster.get_default_kernel_params(instance.cluster)
开发者ID:blkart,项目名称:fuel-web,代码行数:7,代码来源:node.py


注:本文中的nailgun.objects.Cluster.get_default_kernel_params方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。