blob: efa8b6f0de3271bd06184ad9213a23dce5a16c9d [file] [log] [blame]
Jian Lifc55e422019-01-21 14:39:34 +09001/*
2 * Copyright 2019-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.k8snetworking.api;
17
18/**
19 * Service for administering the inventory of kubernetes network, subnet.
20 */
21public interface K8sNetworkAdminService extends K8sNetworkService {
22
23 /**
24 * Creates a kubernetes network with the given information.
25 *
26 * @param network the new network
27 */
28 void createNetwork(K8sNetwork network);
29
30 /**
31 * Updates the kubernetes network with the given information.
32 *
33 * @param network the updated network
34 */
35 void updateNetwork(K8sNetwork network);
36
37 /**
38 * Removes the network.
39 *
40 * @param networkId network identifier
Jian Lifc55e422019-01-21 14:39:34 +090041 */
Jian Li7e8f57e2019-01-24 18:31:03 +090042 void removeNetwork(String networkId);
Jian Lifc55e422019-01-21 14:39:34 +090043
44 /**
45 * Creates a kubernetes port with the given information.
46 *
47 * @param port the new port
48 */
49 void createPort(K8sPort port);
50
51 /**
52 * Updates the kubernetes port with the given information.
53 *
54 * @param port the updated port
55 */
56 void updatePort(K8sPort port);
57
58 /**
59 * Removes the port.
60 *
61 * @param portId port identifier
Jian Lifc55e422019-01-21 14:39:34 +090062 */
Jian Li7e8f57e2019-01-24 18:31:03 +090063 void removePort(String portId);
64
65 /**
66 * Clears the existing network and port states.
67 */
68 void clear();
Jian Lifc55e422019-01-21 14:39:34 +090069}