2 * Copyright (C) 2018 Bell Canada.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 package org.onap.ccsdk.sli.adaptors.netbox.api;
19 import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
20 import org.onap.ccsdk.sli.core.sli.SvcLogicJavaPlugin;
21 import org.onap.ccsdk.sli.core.sli.SvcLogicResource.QueryStatus;
24 * This client is meant to interact both with the IPAM system, and the SDNC DB, in order to provide, at any time,
25 * an up to date status of the assigned resources.
27 public interface NetboxClient extends SvcLogicJavaPlugin {
30 * Assign next available IP in prefix and store it in the SDNC database, table IPAM_IP_ASSIGNEMENT.
32 * @param parameters HashMap<String,String> of parameters passed by the DG to this function
34 * <thead><th>parameter</th><th>Mandatory/Optional</th><th>description</th></thead>
36 * <tr><td>service_instance_id</td><td>Mandatory</td><td>The service instance ID uniquely identifying the service.</td></tr>
37 * <tr><td>vf_module_id</td><td>Mandatory</td><td>The VF module ID uniquely identifying the VF.</td></tr>
38 * <tr><td>prefix_id</td><td>Mandatory</td><td>The prefix from which to get next available IP.</td></tr>
42 QueryStatus assignIpAddress(Map<String, String> parameters, SvcLogicContext ctx);
45 * Release the IP and update the entry in the SDNC database, table IPAM_IP_ASSIGNEMENT.
47 * @param parameters HashMap<String,String> of parameters passed by the DG to this function
49 * <thead><th>parameter</th><th>Mandatory/Optional</th><th>description</th></thead>
51 * <tr><td>service_instance_id</td><td>Mandatory</td><td>The service instance ID uniquely identifying the service.</td></tr>
52 * <tr><td>vf_module_id</td><td>Mandatory</td><td>The VF module ID uniquely identifying the VF.</td></tr>
53 * <tr><td>ip_address_id</td><td>Mandatory</td><td>The IP to release.</td></tr>
57 QueryStatus unassignIpAddress(Map<String, String> parameters, SvcLogicContext ctx);