本文整理汇总了Python中lxml.objectify.Element.security_name方法的典型用法代码示例。如果您正苦于以下问题:Python Element.security_name方法的具体用法?Python Element.security_name怎么用?Python Element.security_name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lxml.objectify.Element
的用法示例。
在下文中一共展示了Element.security_name方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: handle
# 需要导入模块: from lxml.objectify import Element [as 别名]
# 或者: from lxml.objectify.Element import security_name [as 别名]
def handle(self, *args, **kwargs):
params = _get_params(kwargs.get('payload'), ['cluster_id', 'connection', 'transport'], 'data.')
with closing(self.server.odb.session()) as session:
item_list = Element('item_list')
db_items = http_soap_list(session, params['cluster_id'], params['connection'], params['transport'])
for db_item in db_items:
item = Element('item')
item.id = db_item.id
item.name = db_item.name
item.is_active = db_item.is_active
item.is_internal = db_item.is_internal
item.url_path = db_item.url_path
item.method = db_item.method
item.soap_action = db_item.soap_action
item.soap_version = db_item.soap_version
item.service_id = db_item.service_id
item.service_name = db_item.service_name
item.security_id = db_item.security_id
item.security_name = db_item.security_name
item.security_def_type = db_item.security_def_type
item_list.append(item)
return ZATO_OK, etree.tostring(item_list)