當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。