Jian Li | fc55e42 | 2019-01-21 14:39:34 +0900 | [diff] [blame^] | 1 | /* |
| 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 | */ |
| 16 | package org.onosproject.k8snetworking.api; |
| 17 | |
| 18 | import org.onosproject.event.AbstractEvent; |
| 19 | |
| 20 | /** |
| 21 | * Describes kubernetes network service event. |
| 22 | */ |
| 23 | public class K8sNetworkEvent extends AbstractEvent<K8sNetworkEvent.Type, K8sNetwork> { |
| 24 | |
| 25 | /** |
| 26 | * Creates an event of a given type for the specified network. |
| 27 | * |
| 28 | * @param type kubernetes network event type |
| 29 | * @param subject kubernetes network |
| 30 | */ |
| 31 | protected K8sNetworkEvent(Type type, K8sNetwork subject) { |
| 32 | super(type, subject); |
| 33 | } |
| 34 | |
| 35 | /** |
| 36 | * Kubernetes network events. |
| 37 | */ |
| 38 | public enum Type { |
| 39 | |
| 40 | /** |
| 41 | * Signifies that a new kubernetes network is created. |
| 42 | */ |
| 43 | K8S_NETWORK_CREATED, |
| 44 | |
| 45 | /** |
| 46 | * Signifies that the kubernetes network is updated. |
| 47 | */ |
| 48 | K8S_NETWORK_UPDATED, |
| 49 | |
| 50 | /** |
| 51 | * Signifies that the kubernetes network is removed. |
| 52 | */ |
| 53 | K8S_NETWORK_REMOVED, |
| 54 | } |
| 55 | } |