• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python http_utils.create_manager函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: interface_remove_ip

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

      DELETE /v1/interfaces/<interface_id>/vlans/<vlan_id>

    Detach VLAN from interface
    """
    manager = create_manager("base")
    interface = manager.interface_remove_vlan(interface_id, vlan_id)
    clear_cache()
    return interface
开发者ID:akaKuruma,项目名称:simplenet,代码行数:12,代码来源:base.py


示例17: dhcp_list

def dhcp_list():
    """
    ::

      GET /v1/dhcps

    Retrieves all dhcps entries
    """
    manager = create_manager("dhcp")
    try:
        _list = getattr(manager, "dhcp_list")
        return _list()
    except AttributeError:
        raise FeatureNotAvailable()
开发者ID:akaKuruma,项目名称:simplenet,代码行数:14,代码来源:base.py


示例18: switches_list

def switches_list():
    """
    ::

      GET /v1/switches

    Retrieves all switches entries
    """
    manager = create_manager("switch")
    try:
        _list = getattr(manager, "switch_list")
        return _list()
    except AttributeError:
        raise FeatureNotAvailable()
开发者ID:akaKuruma,项目名称:simplenet,代码行数:14,代码来源:switch.py


示例19: generic_resource_info

def generic_resource_info(resource, resource_id):
    """
    ::

      GET /<resource>/<resource_id>/info

    Retrieves resource information
    """
    manager = create_manager(generic_router(resource))
    try:
        _info = getattr(manager, '%s_info' % resource[:-1])
        return _info(resource_id)
    except AttributeError:
        raise FeatureNotAvailable()
开发者ID:pombredanne,项目名称:simplenet,代码行数:14,代码来源:base.py


示例20: generic_resources_list

def generic_resources_list(resource):
    """
    ::

      GET /<resource>/list

    Retrieves all entries from resource
    """
    manager = create_manager(generic_router(resource))
    try:
        _list = getattr(manager, '%s_list' % resource[:-1])
        return _list()
    except AttributeError:
        raise FeatureNotAvailable()
开发者ID:pombredanne,项目名称:simplenet,代码行数:14,代码来源:base.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python dispatchprocessor.dispatchList函数代码示例发布时间:2022-05-27
下一篇:
Python screen_handler.ScreenHandler类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap