本文整理汇总了Python中mosclient.common.utils.print_dict函数的典型用法代码示例。如果您正苦于以下问题:Python print_dict函数的具体用法?Python print_dict怎么用?Python print_dict使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了print_dict函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: do_CreateVolume
def do_CreateVolume(client, args):
""" Create Volume """
val = client.CreateVolume(args.name,
disksize=args.disksize,
zone=args.zone)
utils.print_dict(val)
示例2: do_CreateRedis
def do_CreateRedis(client, args):
""" Create redis """
val = client.CreateRedis(args.mem,
duration=args.duration,
name=args.name,
zone=args.zone)
utils.print_dict(val)
示例3: do_CreateInstance
def do_CreateInstance(client, args):
""" Create servers """
val = client.CreateInstance(args.image, args.instance_type,
duration=args.duration,
name=args.name,
keypair=args.keypair,
datadisk=args.datadisk,
bandwidth=args.bandwidth)
utils.print_dict(val)
示例4: do_CreateRDS
def do_CreateRDS(client, args):
""" Create rds """
val = client.CreateRDS(args.rds_type,
args.datadisk,
args.engine,
args.username,
args.password,
args.name,
args.zone,
args.duration)
utils.print_dict(val)
示例5: do_ImportKeyPair
def do_ImportKeyPair(client, args):
""" Import SSH keypairs """
if args.key_file is not None:
with open(args.key_file) as pf:
pubkey = pf.read()
else:
pubkey = sys.stdin.read()
if pubkey is not None and len(pubkey) > 0:
val = client.ImportKeyPair(args.name, pubkey)
utils.print_dict(val)
else:
raise Exception('No public key provided')
示例6: do_ConfigAddress
def do_ConfigAddress(client, args):
"""Config EIP """
val = client.ConfigAddress(args.id, args.name)
utils.print_dict(val)
示例7: do_ReleaseAddress
def do_ReleaseAddress(client, args):
"""Release EIP """
val = client.ReleaseAddress(args.id)
utils.print_dict(val)
示例8: do_AllocateAddress
def do_AllocateAddress(client, args):
""" Allocate EIP """
val = client.AllocateAddress(args.name, args.billingModel, args.zoneId)
utils.print_dict(val)
示例9: do_DisableRDSAlarm
def do_DisableRDSAlarm(client, args):
"""Disable a metric check"""
val = client.DisableRDSAlarm(args.mid)
utils.print_dict(val)
示例10: do_DisableTCPAlarm
def do_DisableTCPAlarm(client, args):
"""Disable a tcp check"""
val = client.DisableTCPAlarm(args.mid)
utils.print_dict(val)
示例11: do_RecoverVolume
def do_RecoverVolume(client, args):
"""Recover Volume"""
val = client.RecoverVolume(args.ebs_snapshot_id)
utils.print_dict(val)
示例12: do_DisassociateAddress
def do_DisassociateAddress(client, args):
"""unbind eip to cloud service"""
val = client.DisassociateAddress(args.id)
utils.print_dict(val)
示例13: do_DisableAliveAlarm
def do_DisableAliveAlarm(client, args):
"""Disable a alive check"""
val = client.DisableAliveAlarm(args.mid)
utils.print_dict(val)
示例14: do_CreateTCPAlarm
def do_CreateTCPAlarm(client, args):
"""Create tcp check"""
val = client.CreateTCPAlarm(args.iid, args.tcp_port, args.description)
utils.print_dict(val)
示例15: do_EnableRedisAlarm
def do_EnableRedisAlarm(client, args):
"""Enable a metric check"""
val = client.EnableRedisAlarm(args.mid)
utils.print_dict(val)