Search in sources :

Example 6 with Deleteelement

use of org.onap.namingservice.model.Deleteelement in project so by onap.

the class NamingServiceResources method deleteInstanceGroupName.

public String deleteInstanceGroupName(InstanceGroup instanceGroup) throws BadResponseException, IOException {
    Deleteelement deleteElement = namingRequestObjectBuilder.deleteElementMapper(instanceGroup.getId());
    List<Deleteelement> deleteElements = new ArrayList<>();
    deleteElements.add(deleteElement);
    return (namingClient.deleteNameGenRequest(namingRequestObjectBuilder.nameGenDeleteRequestMapper(deleteElements)));
}
Also used : Deleteelement(org.onap.namingservice.model.Deleteelement) ArrayList(java.util.ArrayList)

Example 7 with Deleteelement

use of org.onap.namingservice.model.Deleteelement in project so by onap.

the class NamingServiceResources method deleteServiceInstanceName.

public String deleteServiceInstanceName(NamingRequestObject namingRequestObject) throws BadResponseException, IOException {
    HashMap<String, String> nsRequestObject = namingRequestObject.getNamingRequestObjectMap();
    Deleteelement delElement = new Deleteelement();
    nsRequestObject.forEach((k, v) -> delElement.setExternalKey(v));
    List<Deleteelement> delElements = new ArrayList<>();
    delElements.add(delElement);
    return (namingClient.deleteNameGenRequest(namingRequestObjectBuilder.nameGenDeleteRequestMapper(delElements)));
}
Also used : Deleteelement(org.onap.namingservice.model.Deleteelement) ArrayList(java.util.ArrayList)

Aggregations

Deleteelement (org.onap.namingservice.model.Deleteelement)7 ArrayList (java.util.ArrayList)4 Test (org.junit.Test)3 NameGenDeleteRequest (org.onap.namingservice.model.NameGenDeleteRequest)3 List (java.util.List)1 NameGenDeleteResponse (org.onap.namingservice.model.NameGenDeleteResponse)1 ResponseEntity (org.springframework.http.ResponseEntity)1