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


Python http_utils.create_manager函数代码示例

本文整理汇总了Python中simplenet.common.http_utils.create_manager函数的典型用法代码示例。如果您正苦于以下问题:Python create_manager函数的具体用法?Python create_manager怎么用?Python create_manager使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: policy_info

def policy_info(network_appliance, owner_type, policy_id):
    """
    ::

      GET /<network_appliance>/policy/<owner_type>/<policy_id>/info

    Get policy informations
    """
    manager = create_manager(network_appliance)
    return manager.policy_info(owner_type, policy_id)
开发者ID:pombredanne,项目名称:simplenet,代码行数:10,代码来源:policy.py

示例2: policy_list

def policy_list(network_appliance, owner_type):
    """
    ::

      GET /<network_appliance>/policy/<owner_type>/list

    Get all policy
    """
    manager = create_manager(network_appliance)
    return manager.policy_list(owner_type)
开发者ID:pombredanne,项目名称:simplenet,代码行数:10,代码来源:policy.py

示例3: policy_list_by_owner

def policy_list_by_owner(owner_type, owner_id):
    """
    ::

      GET /v1/firewalls/policies/by-owner/<owner_type>/<owner_id>

    Get all policy from a given owner
    """
    manager = create_manager('firewall')
    return manager.policy_list_by_owner(owner_type, owner_id)
开发者ID:akaKuruma,项目名称:simplenet,代码行数:10,代码来源:policy.py

示例4: policy_info

def policy_info(owner_type, id):
    """
    ::

      GET /v1/firewalls/policies/<owner_type>/<id>

    Get policy informations
    """
    manager = create_manager('firewall')
    return manager.policy_info(owner_type, id)
开发者ID:akaKuruma,项目名称:simplenet,代码行数:10,代码来源:policy.py

示例5: policy_delete

def policy_delete(owner_type, id):
    """
    ::

      DELETE /v1/firewalls/policies/<owner_type>/<owner_id>

    Deletes policy
    """
    manager = create_manager('firewall')
    return manager.policy_delete(owner_type, id)
开发者ID:akaKuruma,项目名称:simplenet,代码行数:10,代码来源:policy.py

示例6: policy_list_by_owner

def policy_list_by_owner(network_appliance, owner_type, owner_id):
    """
    ::

      GET /<network_appliance>/policy/by-owner/<owner_type>/<owner_id>/list

    Get all policy from a given owner
    """
    manager = create_manager(network_appliance)
    return manager.policy_list_by_owner(owner_type, owner_id)
开发者ID:pombredanne,项目名称:simplenet,代码行数:10,代码来源:policy.py

示例7: policy_list

def policy_list(owner_type):
    """
    ::

      GET /v1/firewalls/policies/<owner_type>

    Get all policy
    """
    manager = create_manager('firewall')
    return manager.policy_list(owner_type)
开发者ID:akaKuruma,项目名称:simplenet,代码行数:10,代码来源:policy.py

示例8: policy_delete

def policy_delete(network_appliance, owner_type, policy_id):
    """
    ::

      DELETE /<network_appliance>/policy/<owner_type>/<policy_id>/delete

    Deletes policy
    """
    manager = create_manager(network_appliance)
    return manager.policy_delete(owner_type, policy_id)
开发者ID:pombredanne,项目名称:simplenet,代码行数:10,代码来源:policy.py

示例9: switch_remove_interface

def switch_remove_interface(switch_id, interface_id):
    """
    ::

      DELETE /v1/switches/<switch_id>/interfaces/<interface_id>

    Detach Interface to Switch
    """
    manager = create_manager("switch")
    interface = manager.switch_remove_interface(switch_id, interface_id)
    return interface
开发者ID:akaKuruma,项目名称:simplenet,代码行数:11,代码来源:switch.py

示例10: firewall_remove_anycast

def firewall_remove_anycast(firewall_id, anycast_id):
    """
    ::

      POST /firewalls/<firewall_id>/anycasts/<anycast_id>

    Attach anycasts to firewall device
    """
    manager = create_manager('firewall')
    firewall = manager.firewall_remove_anycast(firewall_id, anycast_id)
    return firewall
开发者ID:pombredanne,项目名称:simplenet,代码行数:11,代码来源:base.py

示例11: interface_remove_ip

def interface_remove_ip(interface_id, ip_id):
    """
    ::

      DELETE /interfaces/<interface_id>/ips/<ip_id>

    Detach ip from interface
    """
    manager = create_manager('base')
    interface = manager.interface_remove_ip(interface_id, ip_id)
    return interface
开发者ID:pombredanne,项目名称:simplenet,代码行数:11,代码来源:base.py

示例12: firewall_remove_vlan

def firewall_remove_vlan(firewall_id, vlan_id):
    """
    ::

      POST /firewalls/<firewall_id>/vlans/<vlan_id>

    Attach vlan to firewall device
    """
    manager = create_manager('firewall')
    firewall = manager.firewall_remove_vlan(firewall_id, vlan_id)
    return firewall
开发者ID:pombredanne,项目名称:simplenet,代码行数:11,代码来源:base.py

示例13: dhcp_remove_vlan

def dhcp_remove_vlan(dhcp_id, vlan_id):
    """
    ::

      POST /dhcps/<dhcp_id>/vlans/<vlan_id>

    Attach vlan to DHCP device
    """
    manager = create_manager('dhcp')
    dhcp = manager.dhcp_remove_vlan(dhcp_id, vlan_id)
    return dhcp
开发者ID:pombredanne,项目名称:simplenet,代码行数:11,代码来源:base.py

示例14: dhcp_remove_vlan

def dhcp_remove_vlan(dhcp_id, vlan_id):
    """
    ::

      DELETE /v1/dhcps/<dhcp_id>/vlans/<vlan_id>

    Detach vlan to DHCP device
    """
    manager = create_manager("dhcp")
    dhcp = manager.dhcp_remove_vlan(dhcp_id, vlan_id)
    clear_cache()
    return dhcp
开发者ID:akaKuruma,项目名称:simplenet,代码行数:12,代码来源:base.py

示例15: firewall_remove_anycast

def firewall_remove_anycast(firewall_id, anycast_id):
    """
    ::

      DELETE /v1/firewalls/<firewall_id>/anycasts/<anycast_id>

    Detach anycasts to firewall device
    """
    manager = create_manager("firewall")
    firewall = manager.firewall_remove_anycast(firewall_id, anycast_id)
    clear_cache()
    return firewall
开发者ID:akaKuruma,项目名称:simplenet,代码行数:12,代码来源:base.py


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