本文整理汇总了Python中SoftLayer.CLI.Table.align['property']方法的典型用法代码示例。如果您正苦于以下问题:Python Table.align['property']方法的具体用法?Python Table.align['property']怎么用?Python Table.align['property']使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SoftLayer.CLI.Table
的用法示例。
在下文中一共展示了Table.align['property']方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: topic_table
# 需要导入模块: from SoftLayer.CLI import Table [as 别名]
# 或者: from SoftLayer.CLI.Table import align['property'] [as 别名]
def topic_table(topic):
t = Table(['property', 'value'])
t.align['property'] = 'r'
t.align['value'] = 'l'
t.add_row(['name', topic['name']])
t.add_row(['tags', listing(topic['tags'] or [])])
return t
示例2: topic_table
# 需要导入模块: from SoftLayer.CLI import Table [as 别名]
# 或者: from SoftLayer.CLI.Table import align['property'] [as 别名]
def topic_table(topic):
""" Returns a table with details about a topic """
table = Table(['property', 'value'])
table.align['property'] = 'r'
table.align['value'] = 'l'
table.add_row(['name', topic['name']])
table.add_row(['tags', listing(topic['tags'] or [])])
return table
示例3: subscription_table
# 需要导入模块: from SoftLayer.CLI import Table [as 别名]
# 或者: from SoftLayer.CLI.Table import align['property'] [as 别名]
def subscription_table(sub):
t = Table(['property', 'value'])
t.align['property'] = 'r'
t.align['value'] = 'l'
t.add_row(['id', sub['id']])
t.add_row(['endpoint_type', sub['endpoint_type']])
for k, v in sub['endpoint'].items():
t.add_row([k, v])
return t
示例4: subscription_table
# 需要导入模块: from SoftLayer.CLI import Table [as 别名]
# 或者: from SoftLayer.CLI.Table import align['property'] [as 别名]
def subscription_table(sub):
""" Returns a table with details about a subscription """
table = Table(['property', 'value'])
table.align['property'] = 'r'
table.align['value'] = 'l'
table.add_row(['id', sub['id']])
table.add_row(['endpoint_type', sub['endpoint_type']])
for key, val in sub['endpoint'].items():
table.add_row([key, val])
return table
示例5: message_table
# 需要导入模块: from SoftLayer.CLI import Table [as 别名]
# 或者: from SoftLayer.CLI.Table import align['property'] [as 别名]
def message_table(message):
t = Table(['property', 'value'])
t.align['property'] = 'r'
t.align['value'] = 'l'
t.add_row(['id', message['id']])
t.add_row(['initial_entry_time', message['initial_entry_time']])
t.add_row(['visibility_delay', message['visibility_delay']])
t.add_row(['visibility_interval', message['visibility_interval']])
t.add_row(['fields', message['fields']])
return [t, message['body']]
示例6: message_table
# 需要导入模块: from SoftLayer.CLI import Table [as 别名]
# 或者: from SoftLayer.CLI.Table import align['property'] [as 别名]
def message_table(message):
""" Returns a table with details about a message """
table = Table(['property', 'value'])
table.align['property'] = 'r'
table.align['value'] = 'l'
table.add_row(['id', message['id']])
table.add_row(['initial_entry_time', message['initial_entry_time']])
table.add_row(['visibility_delay', message['visibility_delay']])
table.add_row(['visibility_interval', message['visibility_interval']])
table.add_row(['fields', message['fields']])
return [table, message['body']]
示例7: queue_table
# 需要导入模块: from SoftLayer.CLI import Table [as 别名]
# 或者: from SoftLayer.CLI.Table import align['property'] [as 别名]
def queue_table(queue):
t = Table(['property', 'value'])
t.align['property'] = 'r'
t.align['value'] = 'l'
t.add_row(['name', queue['name']])
t.add_row(['message_count', queue['message_count']])
t.add_row(['visible_message_count', queue['visible_message_count']])
t.add_row(['tags', listing(queue['tags'] or [])])
t.add_row(['expiration', queue['expiration']])
t.add_row(['visibility_interval', queue['visibility_interval']])
return t
示例8: queue_table
# 需要导入模块: from SoftLayer.CLI import Table [as 别名]
# 或者: from SoftLayer.CLI.Table import align['property'] [as 别名]
def queue_table(queue):
""" Returns a table with details about a queue """
table = Table(['property', 'value'])
table.align['property'] = 'r'
table.align['value'] = 'l'
table.add_row(['name', queue['name']])
table.add_row(['message_count', queue['message_count']])
table.add_row(['visible_message_count', queue['visible_message_count']])
table.add_row(['tags', listing(queue['tags'] or [])])
table.add_row(['expiration', queue['expiration']])
table.add_row(['visibility_interval', queue['visibility_interval']])
return table