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


Python Transport.mapper方法代碼示例

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


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

示例1: main

# 需要導入模塊: from tambo import Transport [as 別名]
# 或者: from tambo.Transport import mapper [as 別名]
    def main(self, argv):
        # Console Logger
        sh = logging.StreamHandler()
        sh.setFormatter(log.color_format())
        sh.setLevel(logging.DEBUG)

        root_logger = logging.getLogger()
        root_logger.setLevel(logging.DEBUG)
        root_logger.addHandler(sh)

        self.api_credentials()

        # TODO: Need to implement `--filename` and make it available
        options = [['--log', '--logging']]
        parser = Transport(argv, mapper=self.mapper,
                           options=options, check_help=False,
                           check_version=False)
        parser.parse_args()
        chacractl.config['verbosity'] = parser.get('--log', 'info')
        parser.catch_help = self.help()
        parser.catch_version = chacractl.__version__
        parser.mapper = self.mapper
        if len(argv) <= 1:
            return parser.print_help()
        parser.dispatch()
        parser.catches_help()
        parser.catches_version()
開發者ID:ceph,項目名稱:chacractl,代碼行數:29,代碼來源:main.py

示例2: main

# 需要導入模塊: from tambo import Transport [as 別名]
# 或者: from tambo.Transport import mapper [as 別名]
 def main(self, argv):
     parser = Transport(argv, mapper=self.mapper,
                        options=[], check_help=False,
                        check_version=False)
     parser.parse_args()
     parser.catch_help = self.help(parser.subhelp())
     parser.catch_version = ceph_installer.__version__
     parser.mapper = self.mapper
     if len(argv) <= 1:
         return parser.print_help()
     parser.dispatch()
     parser.catches_help()
     parser.catches_version()
開發者ID:b-ranto,項目名稱:ceph-installer,代碼行數:15,代碼來源:main.py

示例3: main

# 需要導入模塊: from tambo import Transport [as 別名]
# 或者: from tambo.Transport import mapper [as 別名]
 def main(self, argv):
     options = []
     parser = Transport(argv, mapper=self.mapper,
                        options=options, check_help=False,
                        check_version=False)
     parser.parse_args()
     parser.catch_help = self.help()
     parser.catch_version = rhcephpkg.__version__
     parser.mapper = self.mapper
     if len(argv) <= 1:
         return parser.print_help()
     parser.dispatch()
     parser.catches_help()
     parser.catches_version()
開發者ID:ktdreyer,項目名稱:rhcephpkg,代碼行數:16,代碼來源:main.py

示例4: main

# 需要導入模塊: from tambo import Transport [as 別名]
# 或者: from tambo.Transport import mapper [as 別名]
 def main(self, argv):
     options = [['--log', '--logging']]
     parser = Transport(argv, mapper=self.mapper,
                        options=options, check_help=False,
                        check_version=False)
     parser.parse_args()
     merfi.config['verbosity'] = parser.get('--log', 'info')
     merfi.config['check'] = parser.has('--check')
     parser.catch_help = self.help()
     parser.catch_version = merfi.__version__
     parser.mapper = self.mapper
     if len(argv) <= 1:
         return parser.print_help()
     parser.dispatch()
     parser.catches_help()
     parser.catches_version()
開發者ID:alfredodeza,項目名稱:merfi,代碼行數:18,代碼來源:main.py

示例5: main

# 需要導入模塊: from tambo import Transport [as 別名]
# 或者: from tambo.Transport import mapper [as 別名]
    def main(self, argv):
        parser = Transport(argv, mapper=self.mapper,
                           check_help=False,
                           check_version=False)
        parser.parse_args()
        parser.catch_help = self.help()
        parser.catch_version = wari.__version__
        parser.mapper = self.mapper
        if len(argv) <= 1:
            return parser.print_help()

        # create the connection and set the collection
        conn = wari.db.get_connection()
        wari.db.connection = conn
        wari.db.collection = conn['wari']

        parser.dispatch()
        parser.catches_help()
        parser.catches_version()
        conn.close()
開發者ID:alfredodeza,項目名稱:wari,代碼行數:22,代碼來源:main.py


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