+
+ @staticmethod
+ def create_vxlan_interface(node, vni, source_ip, destination_ip):
+ """Create VXLAN interface and return index of created interface
+
+ Executes "vxlan_add_del_tunnel src {src} dst {dst} vni {vni}" VAT
+ command on the node.
+
+ :param node: Node where to create VXLAN interface
+ :param vni: VXLAN Network Identifier
+ :param source_ip: Source IP of a VXLAN Tunnel End Point
+ :param destination_ip: Destination IP of a VXLAN Tunnel End Point
+ :type node: dict
+ :type vni: int
+ :type source_ip: str
+ :type destination_ip: str
+ :return: SW IF INDEX of created interface
+ :rtype: int
+ """
+
+ output = VatExecutor.cmd_from_template(node, "vxlan_create.vat",
+ src=source_ip,
+ dst=destination_ip,
+ vni=vni)
+ output = output[0]
+
+ if output["retval"] == 0:
+ return output["sw_if_index"]
+ else:
+ raise RuntimeError('Unable to create VXLAN interface on node {}'.\
+ format(node))