2 * Copyright 2015 Open Networking Laboratory
\r
4 * Licensed under the Apache License, Version 2.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
16 package org.onosproject.vtnrsc.tenantnetwork;
\r
18 import org.onosproject.vtnrsc.TenantNetwork;
\r
19 import org.onosproject.vtnrsc.TenantNetworkId;
\r
22 * Service for interacting with the inventory of tenantNetwork.
\r
24 public interface TenantNetworkService {
\r
27 * Returns if the tenantNetwork is existed.
\r
29 * @param networkId tenantNetwork identifier
\r
30 * @return true or false if one with the given identifier exists.
\r
32 boolean exists(TenantNetworkId networkId);
\r
35 * Returns the number of tenantNetwork known to the system.
\r
37 * @return number of tenantNetwork.
\r
39 int getNetworkCount();
\r
42 * Returns an iterable collection of the currently known tenantNetwork.
\r
44 * @return collection of tenantNetwork.
\r
46 Iterable<TenantNetwork> getNetworks();
\r
49 * Returns the tenantNetwork with the identifier.
\r
51 * @param networkId TenantNetwork identifier
\r
52 * @return TenantNetwork or null if one with the given identifier is not
\r
55 TenantNetwork getNetwork(TenantNetworkId networkId);
\r
58 * Creates tenantNetworks by networks.
\r
60 * @param networks the collection of tenantNetworks
\r
61 * @return true if all given identifiers created successfully.
\r
63 boolean createNetworks(Iterable<TenantNetwork> networks);
\r
66 * Updates tenantNetworks by tenantNetworks.
\r
68 * @param networks the collection of tenantNetworks
\r
69 * @return true if all given identifiers updated successfully.
\r
71 boolean updateNetworks(Iterable<TenantNetwork> networks);
\r
74 * Deletes tenantNetwork by tenantNetworkIds.
\r
76 * @param networksIds the collection of tenantNetworkIds
\r
77 * @return true if the specified tenantNetworks deleted successfully.
\r
79 boolean removeNetworks(Iterable<TenantNetworkId> networksIds);
\r