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()
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()
], } 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