Sho SHIMIZU | b2b2d98 | 2015-09-11 15:35:06 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame^] | 2 | * Copyright 2015-present Open Networking Laboratory |
Sho SHIMIZU | b2b2d98 | 2015-09-11 15:35:06 -0700 | [diff] [blame] | 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.vtnrsc.tenantnetwork; |
| 17 | |
| 18 | import org.onosproject.vtnrsc.TenantNetwork; |
| 19 | import org.onosproject.vtnrsc.TenantNetworkId; |
| 20 | |
| 21 | /** |
| 22 | * Service for interacting with the inventory of tenantNetwork. |
| 23 | */ |
| 24 | public interface TenantNetworkService { |
| 25 | |
| 26 | /** |
| 27 | * Returns if the tenantNetwork is existed. |
| 28 | * |
| 29 | * @param networkId tenantNetwork identifier |
| 30 | * @return true or false if one with the given identifier exists. |
| 31 | */ |
| 32 | boolean exists(TenantNetworkId networkId); |
| 33 | |
| 34 | /** |
| 35 | * Returns the number of tenantNetwork known to the system. |
| 36 | * |
| 37 | * @return number of tenantNetwork. |
| 38 | */ |
| 39 | int getNetworkCount(); |
| 40 | |
| 41 | /** |
| 42 | * Returns an iterable collection of the currently known tenantNetwork. |
| 43 | * |
| 44 | * @return collection of tenantNetwork. |
| 45 | */ |
| 46 | Iterable<TenantNetwork> getNetworks(); |
| 47 | |
| 48 | /** |
| 49 | * Returns the tenantNetwork with the identifier. |
| 50 | * |
| 51 | * @param networkId TenantNetwork identifier |
| 52 | * @return TenantNetwork or null if one with the given identifier is not |
| 53 | * known. |
| 54 | */ |
| 55 | TenantNetwork getNetwork(TenantNetworkId networkId); |
| 56 | |
| 57 | /** |
| 58 | * Creates tenantNetworks by networks. |
| 59 | * |
| 60 | * @param networks the collection of tenantNetworks |
| 61 | * @return true if all given identifiers created successfully. |
| 62 | */ |
| 63 | boolean createNetworks(Iterable<TenantNetwork> networks); |
| 64 | |
| 65 | /** |
| 66 | * Updates tenantNetworks by tenantNetworks. |
| 67 | * |
| 68 | * @param networks the collection of tenantNetworks |
| 69 | * @return true if all given identifiers updated successfully. |
| 70 | */ |
| 71 | boolean updateNetworks(Iterable<TenantNetwork> networks); |
| 72 | |
| 73 | /** |
| 74 | * Deletes tenantNetwork by tenantNetworkIds. |
| 75 | * |
| 76 | * @param networksIds the collection of tenantNetworkIds |
| 77 | * @return true if the specified tenantNetworks deleted successfully. |
| 78 | */ |
| 79 | boolean removeNetworks(Iterable<TenantNetworkId> networksIds); |
| 80 | } |