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


Python BaseTopology.get_topology方法代码示例

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


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

示例1: update_topology_defaults

# 需要导入模块: from topology import BaseTopology [as 别名]
# 或者: from topology.BaseTopology import get_topology [as 别名]
def update_topology_defaults(top_id, data, user=""):
    serializer = TopologyPostDefaultsSerializer(data=data)
    if not serializer.is_valid():
        raise IgniteException(serializer.errors)

    BaseTopology.get_object(top_id, user).update_defaults(serializer.data)
    serializer = TopologySerializer(BaseTopology.get_topology(top_id))
    return serializer.data
开发者ID:datacenter,项目名称:ignite,代码行数:10,代码来源:services.py

示例2: add_topology_link

# 需要导入模块: from topology import BaseTopology [as 别名]
# 或者: from topology.BaseTopology import get_topology [as 别名]
def add_topology_link(top_id, data, user=""):
    serializer = LinkPostSerializer(data=data)
    if not serializer.is_valid():
        raise IgniteException(serializer.errors)

    BaseTopology.get_object(top_id, user).add_link(serializer.data)
    serializer = TopologySerializer(BaseTopology.get_topology(top_id))
    return serializer.data
开发者ID:datacenter,项目名称:ignite,代码行数:10,代码来源:services.py

示例3: update_topology_switch

# 需要导入模块: from topology import BaseTopology [as 别名]
# 或者: from topology.BaseTopology import get_topology [as 别名]
def update_topology_switch(top_id, switch_id, data, user=""):
    serializer = TopologySwitchPutSerializer(data=data)
    if not serializer.is_valid():
        raise IgniteException(serializer.errors)

    BaseTopology.get_object(top_id, user).update_switch(switch_id,
                                                        serializer.data)
    serializer = TopologySerializer(BaseTopology.get_topology(top_id))
    return serializer.data
开发者ID:datacenter,项目名称:ignite,代码行数:11,代码来源:services.py

示例4: get_fabric

# 需要导入模块: from topology import BaseTopology [as 别名]
# 或者: from topology.BaseTopology import get_topology [as 别名]
def get_fabric(fab_id):
    # get topology info, then add fabric info
    top = BaseTopology.get_topology(fab_id)
    top.site = top.fabric.site
    return top
开发者ID:hasebrand,项目名称:ignite,代码行数:7,代码来源:fabric.py

示例5: delete_topology_link

# 需要导入模块: from topology import BaseTopology [as 别名]
# 或者: from topology.BaseTopology import get_topology [as 别名]
def delete_topology_link(top_id, link_id, user=""):
    BaseTopology.get_object(top_id, user).delete_link(link_id)
    serializer = TopologySerializer(BaseTopology.get_topology(top_id))
    return serializer.data
开发者ID:datacenter,项目名称:ignite,代码行数:6,代码来源:services.py

示例6: delete_topology_switch

# 需要导入模块: from topology import BaseTopology [as 别名]
# 或者: from topology.BaseTopology import get_topology [as 别名]
def delete_topology_switch(top_id, switch_id, user=""):
    BaseTopology.get_object(top_id, user).delete_switch(switch_id)
    serializer = TopologySerializer(BaseTopology.get_topology(top_id))
    return serializer.data
开发者ID:datacenter,项目名称:ignite,代码行数:6,代码来源:services.py

示例7: get_topology

# 需要导入模块: from topology import BaseTopology [as 别名]
# 或者: from topology.BaseTopology import get_topology [as 别名]
def get_topology(top_id):
    top = BaseTopology.get_topology(top_id)
    serializer = TopologySerializer(top)
    return serializer.data
开发者ID:datacenter,项目名称:ignite,代码行数:6,代码来源:services.py

示例8: clear_topology

# 需要导入模块: from topology import BaseTopology [as 别名]
# 或者: from topology.BaseTopology import get_topology [as 别名]
def clear_topology(top_id, user=""):
    BaseTopology.clear_topology(top_id, user)
    serializer = TopologySerializer(BaseTopology.get_topology(top_id))
    return serializer.data
开发者ID:datacenter,项目名称:ignite,代码行数:6,代码来源:services.py

示例9: get_fabric

# 需要导入模块: from topology import BaseTopology [as 别名]
# 或者: from topology.BaseTopology import get_topology [as 别名]
def get_fabric(fab_id):
    # get topology info, then add fabric info
    top = BaseTopology.get_topology(fab_id)
    top.site = top.fabric.site
    top.maintenance_group_count = maintenance_group_count(fab_id)
    return top
开发者ID:datacenter,项目名称:ignite,代码行数:8,代码来源:fabric.py


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