当前位置: 首页>>代码示例>>Python>>正文


Python Element.pool_name方法代码示例

本文整理汇总了Python中lxml.objectify.Element.pool_name方法的典型用法代码示例。如果您正苦于以下问题:Python Element.pool_name方法的具体用法?Python Element.pool_name怎么用?Python Element.pool_name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在lxml.objectify.Element的用法示例。


在下文中一共展示了Element.pool_name方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _ping_delete

# 需要导入模块: from lxml.objectify import Element [as 别名]
# 或者: from lxml.objectify.Element import pool_name [as 别名]
def _ping_delete(req, soap_action):
    """ Code common to both deleting and pinging connection pools.
    """
    server_id = req.GET.get("server")
    pool_name = req.GET.get("pool_name")

    if not server_id:
        raise ZatoException("No 'server' parameter found, req.GET=[%s]" % req.GET)

    if not pool_name:
        raise ZatoException("No 'pool_name' parameter found, req.GET=[%s]" % req.GET)

    server = Server.objects.get(id=server_id)
    zato_message = Element("{%s}zato_message" % zato_namespace)
    zato_message.pool_name = pool_name

    return invoke_admin_service(server.address, soap_action, etree.tostring(zato_message))
开发者ID:brtsz,项目名称:zato,代码行数:19,代码来源:sql.py

示例2: _change_password

# 需要导入模块: from lxml.objectify import Element [as 别名]
# 或者: from lxml.objectify.Element import pool_name [as 别名]
def _change_password(server_address, params):
    """ Changes the SQL connection pool's password.
    """
    params_no_passwords = copy.deepcopy(params)
    params_no_passwords["password1"] = "***"
    params_no_passwords["password2"] = "***"

    logger.info("About to change an SQL connection pool password, server_address=[%s], params=[%s]" % (server_address, params_no_passwords))

    config_pub_key = str(params["config_pub_key"])
    encrypted_password1 = encrypt(params["password1"], config_pub_key)
    encrypted_password2 = encrypt(params["password2"], config_pub_key)

    zato_message = Element("{%s}zato_message" % zato_namespace)
    zato_message.pool_name = params["pool_name"]
    zato_message.password1 = encrypted_password1
    zato_message.password2 = encrypted_password2

    invoke_admin_service(server_address, "zato:pool.sql.change-password", etree.tostring(zato_message))
开发者ID:brtsz,项目名称:zato,代码行数:21,代码来源:sql.py


注:本文中的lxml.objectify.Element.pool_name方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。