Network Services REST API¶
-
class
hpsdnclient.net.
NetMixin
(controller, auth)¶ Network Service REST API Methods
This class contains methods that call the Network Services REST API functions in the HP VAN SDN Controller
- Topology Service
- Node Service
- Link Service
- Path Planner
- Path Diagnostics Service
-
create_diag_observation_post
(observation)¶ Creates a diagnostic observation post
Parameters: observation (hpsdnclient.datatypes.Observation) – The observation post to create
-
create_diag_packet
(packet)¶ Create a diagnostic packet
Parameters: packet (str) – The packet to create
-
delete_diag_observation_post
(observation)¶ Delete a diagnostic observation post
Parameters: observation (str) – The observation post to delete
-
delete_diag_packet
(packet_uid)¶ Delete a diagnostic packet
Parameters: packet_uid (str) – The uid of the packet to be deleted
-
get_arps
(vid=None, ip=None)¶ Provides ARP details for the given IP address and VLAN ID
Parameters: - vid (str) – Return ARPs in the provided VLAN ID
- ip (str) – Return only the ARP for the specified IP Address
Returns: List of ARPs
Return type: list
-
get_cluster_broadcast_tree
(cluster_id)¶ Gets the broadcast tree for a specific cluster
Parameters: cluster_id (str) – The cluster ID Returns: The broadcast tree for the provided cluster ID Return type: hpsdnclient.datatypes.Cluster
-
get_clusters
()¶ Gets a list of clusters
Returns: A list of clusters Return type: list
-
get_diag_observation_posts
(packet_uid=None, packet_type=None)¶ Gets a list of diagnostic observation posts
Parameters: - packet_uid (str) – Only return OP’s with the provided Packet UID
- packet_type (str) – Return only OP’s with the provided Packet Type
Returns: List of OP’s
Return type: list
-
get_diag_packet
(packet_uid)¶ Get diagnostic packet details for the provided packet UID
Parameters: packet_uid (str) – The packet UID to get details for Returns: Diagnostic Packet Details Return type: hpsdnclient.datatypes.Packet
-
get_diag_packet_nexthop
(packet_uid, dpid)¶ Show next hop information for packet at a given Datapath ID
Parameters: - packet_uid (str) – The packet UID
- dpid (str) – The Datapath ID
Returns: The next hop
Return type: hpsdnclient.datatypes.NextHop
-
get_diag_packet_path
(packet_uid)¶ Get expected paths for diagnostic packet
Parameters: packet_uid – The UID of the diagnostic packet Returns: Path Return type: hpsdnclient.datatypes.Path
-
get_diag_packets
(packet_type=None)¶ Get a list of all diagnostic packets in the system
Parameters: packet_type – Filter result by provided packet type Returns: A list of diagnostics packets Return type: list
-
get_forward_path
(src_dpid, dst_dpid)¶ Gets the shortest computed path between src_dpid and dst_dpid
Parameters: - src_dpid (str) – The source DPID
- dst_dpid (str) – THe destination DPID
Returns: The shortest path between the two DPID’s
Return type:
-
get_links
(dpid=None)¶ Returns a list of all links discovered by the SDN controller
Parameters: dpid (str) – Return only the links for the specified DPID Returns: A list of Links Return type: list
-
get_lldp_suppressed_ports
()¶ Gets a list of LLDP suppressed ports from the controller
Returns: A list of ports in the LLDP suppressed state Return type: list
-
get_nodes
(ip=None, vid=None, dpid=None, port=None)¶ Get all Nodes discovered by the controller
- With ip` and
vid
returns node details - With
vid
returns Nodes in the specified VLAN - With
dpid
returns Nodes attached to the specified DPID - With
dpid
andport
returns Nodes for given port/DPID
Parameters: - ip (str) – IP address
- vid (str) – VLAN ID
- dpid (str) – Datapath ID
- port (str) – Port
- With ip` and
-
remove_lldp_suppressed
(ports)¶ Removes ports from LLDP suppressed state
Params hpsdnclient.datatypes.LldpProperties ports: The ports to be removed from LLDP suppressed state
-
set_diag_packet_action
(packet_uid, action)¶ Performs the specified simulation action on a packet
Parameters: - packet_uid (str) – The packet UID
- action (str) – The action to perform
-
set_lldp_suppressed
(ports)¶ Puts the provided ports in to LLDP suppressed state
Params str ports: The ports to be suppressed