本文整理汇总了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()
示例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