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


Python Edge.delete方法代码示例

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


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

示例1: delete_all_edges

# 需要导入模块: from edge import Edge [as 别名]
# 或者: from edge.Edge import delete [as 别名]
def delete_all_edges(options):
    """ Function to delete all edges on given VSM

    @param options cli options to this script
    @return None
    """
    edge  = Edge(vsm_obj)
    edges = (edge.query())
    edge_id = None
    for item in edges.edgePage.list_schema:
       edge.id = item.objectId
       edge.delete()
开发者ID:carriercomm,项目名称:MyProject,代码行数:14,代码来源:nsx_network.py

示例2: DHCP

# 需要导入模块: from edge import Edge [as 别名]
# 或者: from edge.Edge import delete [as 别名]
        ],
    }
    dhcp_client = DHCP(edge_client)
    dhcp_schema_object = dhcp_client.get_schema_object(dhcp_py_dict)
    result_obj_1 = dhcp_client.create(dhcp_schema_object)
    print result_obj_1.status_code

    dhcp_schema = dhcp_client.read()
    dhcp_schema.print_object()

    #Append IPPool to DHCP
    ippool_py_dict = {
                       'autoconfiguredns': True,
                       'defaultGateway': '192.168.0.3',
                       'domainname': 'eng.vmware.com',
                       'primarynameserver': '192.168.0.4',
                       'secondarynameserver': '4.2.2.4',
                       'leasetime': 360000,
                       'iprange': '192.168.0.21-192.168.0.25',
    }
    ippool_client = DHCPIPPool(edge_client)
    ippool_schema_object = ippool_client.get_schema_object(ippool_py_dict)
    result_obj_1 = ippool_client.create(ippool_schema_object)
    print result_obj_1.status_code

    dhcp_schema = dhcp_client.read()
    dhcp_schema.print_object()

    #Delete Gateway Services Edge
    response_status = edge_client.delete()
    print response_status.status_code
开发者ID:carriercomm,项目名称:MyProject,代码行数:33,代码来源:dhcp_ippool.py


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