* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
+ /**
+ * @author Rich Tabedzki
+ *
+ */
package org.onap.ccsdk.sli.adaptors.aai;
import java.io.UnsupportedEncodingException;
import javax.xml.bind.annotation.XmlRootElement;
import org.onap.ccsdk.sli.adaptors.aai.data.AAIDatum;
-import org.onap.aai.inventory.v14.L3Network;
-import org.onap.aai.inventory.v14.L3Networks;
+import org.onap.aai.inventory.v21.L3Network;
+import org.onap.aai.inventory.v21.L3Networks;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
queryParams.put(splitKey[1], encodeQuery(value));
} else {
- String token = String.format("%s/{%s}", splitKey[0], splitKey[1]);
- String encoded_vnf = encodeQuery(value);
- request_url = request_url.replace(token, String.format("%s/%s", splitKey[0], encoded_vnf));
+ String encoded_vnf = encodeQuery(value);
+ if(!resourceName.equals(splitKey[0]) && resourceName.contains(splitKey[0])) {
+ queryParams.put(splitKey[1], encoded_vnf);
+ } else {
+ String token = String.format("%s/{%s}", splitKey[0], splitKey[1]);
+ request_url = request_url.replace(token, String.format("%s/%s", splitKey[0], encoded_vnf));
+ }
}
}