blob: 15c1ec0541b981c8cb59e988686b3571967af92b [file] [log] [blame]
Jian Li4b5048a2020-10-08 02:57:45 +09001/*
2 * Copyright 2020-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.openstacknetworking.api;
17
18import org.onlab.packet.IpAddress;
19import org.onlab.packet.IpPrefix;
20import org.onlab.packet.MacAddress;
21
22/**
23 * An interface which defines how to integrate openstack with kubernetes.
24 */
25public interface OpenstackK8sIntegrationService {
26
27 /**
28 * Installs K8S pass-through CNI related flow rules.
29 *
30 * @param k8sNodeIp kubernetes node IP address
31 * @param podCidr kubernetes POD CIDR
32 * @param serviceCidr kubernetes service CIDR
33 * @param podGatewayIp kubernetes POD's gateway IP
34 * @param osK8sIntPortName openstack k8s integration patch port name
35 * @param k8sIntOsPortMac k8s integration to openstack patch port MAC
36 */
37 void installCniPtNodeRules(IpAddress k8sNodeIp, IpPrefix podCidr,
38 IpPrefix serviceCidr, IpAddress podGatewayIp,
39 String osK8sIntPortName, MacAddress k8sIntOsPortMac);
40
41 /**
42 * Uninstalls K8S pass-through CNI related flow rules.
43 *
44 * @param k8sNodeIp kubernetes node IP address
45 * @param podCidr kubernetes POD CIDR
46 * @param serviceCidr kubernetes service CIDR
47 * @param podGatewayIp kubernetes POD's gateway IP
48 * @param osK8sIntPortName openstack k8s integration patch port name
49 * @param k8sIntOsPortMac k8s integration to openstack patch port MAC
50 */
51 void uninstallCniPtNodeRules(IpAddress k8sNodeIp, IpPrefix podCidr,
52 IpPrefix serviceCidr, IpAddress podGatewayIp,
53 String osK8sIntPortName, MacAddress k8sIntOsPortMac);
Jian Li6d2ffbf2020-11-04 15:58:18 +090054
55 /**
56 * Installs K8S pass-through CNI related node port flow rules.
57 *
58 * @param k8sNodeIp kubernetes node IP address
59 * @param osK8sExtPortName openstack k8s external patch port name
60 */
61 void installCniPtNodePortRules(IpAddress k8sNodeIp, String osK8sExtPortName);
62
63 /**
64 * Uninstalls K8S pass-through CNI related node port flow rules.
65 *
66 * @param k8sNodeIp kubernetes node IP address
67 * @param osK8sExtPortName openstack k8s external patch port name
68 */
69 void uninstallCniPtNodePortRules(IpAddress k8sNodeIp, String osK8sExtPortName);
Jian Li4b5048a2020-10-08 02:57:45 +090070}