本文整理汇总了Python中nailgun.plugins.manager.PluginManager.get_network_roles方法的典型用法代码示例。如果您正苦于以下问题:Python PluginManager.get_network_roles方法的具体用法?Python PluginManager.get_network_roles怎么用?Python PluginManager.get_network_roles使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nailgun.plugins.manager.PluginManager
的用法示例。
在下文中一共展示了PluginManager.get_network_roles方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_network_roles
# 需要导入模块: from nailgun.plugins.manager import PluginManager [as 别名]
# 或者: from nailgun.plugins.manager.PluginManager import get_network_roles [as 别名]
def get_network_roles(cls, instance):
"""Method for receiving network roles for particular cluster
:param instance: nailgun.db.sqlalchemy.models.Cluster instance
:returns: List of network roles' descriptions
"""
return instance.release.network_roles_metadata + PluginManager.get_network_roles(instance)
示例2: get_network_roles
# 需要导入模块: from nailgun.plugins.manager import PluginManager [as 别名]
# 或者: from nailgun.plugins.manager.PluginManager import get_network_roles [as 别名]
def get_network_roles(
cls, instance, merge_policy=NetworkRoleMergePolicy()):
"""Method for receiving network roles for particular cluster
:param instance: nailgun.db.sqlalchemy.models.Cluster instance
:param merge_policy: the policy to merge same roles
:returns: List of network roles' descriptions
"""
return PluginManager.get_network_roles(instance, merge_policy)