本文整理匯總了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()
示例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()
示例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()
示例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()
示例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()