blob: 1b85dc9bcce609fe43227e0c190b1dec0bf8b71c [file] [log] [blame]
Jian Li3defa842019-02-12 00:31:35 +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.k8snode.api;
17
18import org.onosproject.event.AbstractEvent;
19
20/**
21 * Describes kubernetes API server config event.
22 */
23public class K8sApiConfigEvent extends AbstractEvent<K8sApiConfigEvent.Type, K8sApiConfig> {
24
25 /**
26 * Lists of kubernetes API server config event types.
27 */
28 public enum Type {
29 /**
30 * Signifies that API config is created.
31 */
32 K8S_API_CONFIG_CREATED,
33
34 /**
35 * Signifies that API config is updated.
36 */
37 K8S_API_CONFIG_UPDATED,
38
39 /**
40 * Signifies that API config is removed.
41 */
42 K8S_API_CONFIG_REMOVED,
43 }
44
45 /**
46 * Creates an event with the given type and node.
47 *
48 * @param type event type
49 * @param subject kubernetes API config
50 */
51 public K8sApiConfigEvent(Type type, K8sApiConfig subject) {
52 super(type, subject);
53 }
54}