blob: a403d0e145a6786e0fa32f8d5e117cc84aa0e36a [file] [log] [blame]
Jian Lie2a04ce2020-07-01 19:07:02 +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.k8snode.api;
17
18import org.onosproject.event.AbstractEvent;
19
20/**
21 * Describes Kubernetes host init state event.
22 */
23public class K8sHostEvent extends AbstractEvent<K8sHostEvent.Type, K8sHost> {
24
25 /**
26 * Lists of kubernetes host event types.
27 */
28 public enum Type {
29
30 /**
31 * Signifies that new host is created.
32 */
33 K8S_HOST_CREATED,
34
35 /**
36 * Signifies that the host is updated.
37 */
38 K8S_HOST_UPDATED,
39
40 /**
41 * Signifies that the host state is completed.
42 */
43 K8S_HOST_COMPLETE,
44
45 /**
46 * Signifies that the host is removed.
47 */
48 K8S_HOST_REMOVED,
49
50 /**
51 * Signifies that the host state is incomplete.
52 */
53 K8S_HOST_INCOMPLETE,
54
55 /**
56 * Signifies that a set of nodes have been added into the host.
57 */
58 K8S_NODES_ADDED,
59
60 /**
61 * Signifies that a set of nodes have been removed from the host.
62 */
63 K8S_NODES_REMOVED,
64 }
65
66 /**
67 * Creates an event with the given type and host.
68 *
69 * @param type event type
70 * @param subject kubernetes host
71 */
72 public K8sHostEvent(Type type, K8sHost subject) {
73 super(type, subject);
74 }
75}