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


Python Pool.vrf方法代码示例

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


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

示例1: Prefix

# 需要导入模块: from pynipap import Pool [as 别名]
# 或者: from pynipap.Pool import vrf [as 别名]
    print "done"


    # Create prefixes
    print "Creating prefixes... "
    sql = "SELECT * FROM ip_net_plan order by schema, prefix"
    curs_pg_old.execute(sql)
    i = 0
    t = time.time()
    for r in curs_pg_old:
        p = Prefix()

        # find VRF
        if r['vrf'] is not None:
            p.vrf = vrfs[r['vrf'].strip()]
        elif r['schema'] in s_vrfs:
            p.vrf = s_vrfs[r['schema']]
        
        # the rest of the prefix attributes...
        p.prefix = r['prefix']
        p.description = r['description']
        p.comment = r['comment']
        p.node = r['node']
        if r['pool'] is not None:
            p.pool = pools[r['pool']]
        p.type = r['type']
        p.country = r['country']
        p.order_id = r['order_id']
        p.customer_id = r['customer_id']
        p.external_key = r['external_key']
开发者ID:Cougar,项目名称:NIPAP,代码行数:32,代码来源:convert.py

示例2: str

# 需要导入模块: from pynipap import Pool [as 别名]
# 或者: from pynipap.Pool import vrf [as 别名]
        if 'country' in request.params:
            if request.params['country'].strip() == '':
                p.country = None
            else:
                p.country = request.params['country']

        if 'order_id' in request.params:
            if request.params['order_id'].strip() == '':
                p.order_id = None
            else:
                p.order_id = request.params['order_id']

        if 'vrf' in request.params:
            if request.params['vrf'].strip() == '':
                p.vrf = None
            else:
                p.vrf = request.params['vrf']

        if 'alarm_priority' in request.params:
            p.alarm_priority = request.params['alarm_priority']
        if 'monitor' in request.params:
            if request.params['monitor'] == 'true':
                p.monitor = True
            else:
                p.monitor = False

        log.debug('request: %s' % str(request.params))

        # arguments
        args = {}
开发者ID:tobbakko,项目名称:NIPAP,代码行数:32,代码来源:xhr.py


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