blob: c6e92fc2193d3e3fd548234c9115db7e89c704e1 [file] [log] [blame]
Jian Li1cf51882019-02-26 14:41:20 +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
18import io.fabric8.kubernetes.api.model.extensions.Ingress;
19import org.onosproject.event.AbstractEvent;
20
21/**
22 * Describes kubernetes ingress event.
23 */
24public class K8sIngressEvent extends AbstractEvent<K8sIngressEvent.Type, Ingress> {
25
26 /**
27 * Creates an event of a given type for the specified kubernetes ingress.
28 *
29 * @param type kubernetes ingress event type
30 * @param subject kubernetes ingress
31 */
32 public K8sIngressEvent(Type type, Ingress subject) {
33 super(type, subject);
34 }
35
36 /**
37 * Kubernetes ingress events.
38 */
39 public enum Type {
40
41 /**
42 * Signifies that a new kubernetes ingress is created.
43 */
44 K8S_INGRESS_CREATED,
45
46 /**
47 * Signifies that the kubernetes ingress is updated.
48 */
49 K8S_INGRESS_UPDATED,
50
51 /**
52 * Signifies that the kubernetes ingress is removed.
53 */
54 K8S_INGRESS_REMOVED,
55 }
56}