2 Library for the robot based system test tool of the OpenDaylight project.
3 Authors: Vaibhav Bhatnagar@Brocade
8 from robot.libraries.BuiltIn import BuiltIn
11 class CapwapLibrary(object):
12 """Provide many methods to simulate WTPs and their functions."""
15 self.builtin = BuiltIn()
17 def send_discover(self, ac_ip, wtp_ip="", ip="ip", port=5246):
18 """Send Discover CAPWAP Packet from a WTP."""
42 self.builtin.log("Sending Discover Packet to: %s" % ac_ip, "DEBUG")
43 session = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP)
44 session.sendto(data, (ac_ip, port))
45 self.builtin.log("Packet Sent", "DEBUG")
48 """Get Host IP Address."""
49 ip_addr = socket.gethostbyname(socket.gethostname())
52 def get_simulated_wtpip(self, controller):
53 """Get the Simulated WTP ip based on the controller."""
54 if controller == "127.0.0.1":
57 exp_ip = self.get_hostip()