當前位置: 首頁>>代碼示例>>Python>>正文


Python PlumberyNodes.polish_blueprint方法代碼示例

本文整理匯總了Python中plumbery.nodes.PlumberyNodes.polish_blueprint方法的典型用法代碼示例。如果您正苦於以下問題:Python PlumberyNodes.polish_blueprint方法的具體用法?Python PlumberyNodes.polish_blueprint怎麽用?Python PlumberyNodes.polish_blueprint使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在plumbery.nodes.PlumberyNodes的用法示例。


在下文中一共展示了PlumberyNodes.polish_blueprint方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: polish_blueprint

# 需要導入模塊: from plumbery.nodes import PlumberyNodes [as 別名]
# 或者: from plumbery.nodes.PlumberyNodes import polish_blueprint [as 別名]
    def polish_blueprint(self, names, polishers):
        """
        Walks a named blueprint for this facility and polish related resources

        :param names: the name(s) of the blueprint(s) to polish
        :type names: ``str`` or ``list`` of ``str``

        :param polishers: polishers to be applied
        :type polishers: list of :class:`plumbery.PlumberyPolisher`

        """

        if isinstance(polishers, str):
            polishers = PlumberyPolisher.filter(self.plumbery.polishers,
                                                polishers)

        self.power_on()
        infrastructure = PlumberyInfrastructure(self)
        nodes = PlumberyNodes(self)

        for polisher in polishers:
            polisher.move_to(self)

        for name in self.expand_blueprint(names):

            blueprint = self.get_blueprint(name)

            container = infrastructure.get_container(blueprint)

            for polisher in polishers:
                polisher.shine_container(container)

            nodes.polish_blueprint(blueprint, polishers, container)
開發者ID:bernard357,項目名稱:plumbery,代碼行數:35,代碼來源:facility.py


注:本文中的plumbery.nodes.PlumberyNodes.polish_blueprint方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。