blob: df9081fae9fb3012a8a77990d304a64a0cf558a0 [file] [log] [blame]
Daniel Parkd846cb72022-09-26 22:58:53 +09001/*
2 * Copyright 2022-present Open Networking Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.kubevirtnode.api;
17
18import org.onlab.packet.IpAddress;
19import org.onlab.packet.MacAddress;
20
21/**
22 * Representation of a Kubernetes external load balancer interface for kubevirt node.
23 */
24public interface KubernetesExternalLbInterface {
25
26 /**
27 * Returns the name of the elb bridge.
28 * Using this bridge, TEG internally communicates with data IP's in worker nodes.
29 *
30 * @return gateway bridge name
31 */
32 String externalLbBridgeName();
33
34 /**
35 * Returns the internal Ip Address of TEG for kubernetes external lb purpose.
36 *
37 * @return elb ip address
38 */
39 IpAddress externalLbIp();
40
41 /**
42 * Returns the gateway IP of the elb IP.
43 *
44 * @return elb gw ip address
45 */
46 IpAddress externalLbGwIp();
47
48 /**
49 * Returns the mac address of the elb gw.
50 *
51 * @return elb gw mac address
52 */
53 MacAddress externalLbGwMac();
54
55
56 interface Builder {
57
58 /**
59 * Builds an immutable kubernetes external load balancer interface instance.
60 *
61 * @return external load balancer interface instance
62 */
63 KubernetesExternalLbInterface build();
64
65 /**
66 * Returns kubernetes external load balancer interface builder with supplied elb bridge name.
67 *
68 * @param elbBridgeName elb bridge name
69 * @return kubernetes external load balancer interface builder
70 */
71 Builder externalLbBridgeName(String elbBridgeName);
72
73 /**
74 * Returns kubernetes external load balancer interface builder with supplied supplied elb Ip address.
75 *
76 * @param elbIp elb ip address
77 * @return kubernetes external load balancer interface builder
78 */
79 Builder externalLbIp(IpAddress elbIp);
80
81 /**
82 * Returns kubernetes external load balancer interface builder with supplied supplied elb gw Ip address.
83 *
84 * @param elbGwIp elb gw ip address
85 * @return kubernetes external load balancer interface builder
86 */
87 Builder externallbGwIp(IpAddress elbGwIp);
88
89 /**
90 * Returns kubernetes external load balancer interface builder with supplied supplied elb gw MAC address.
91 *
92 * @param elbGwMac elb gw mac address
93 * @return kubernetes external load balancer interface builder
94 */
95 Builder externalLbGwMac(MacAddress elbGwMac);
96 }
97}