Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ScenarioEndpointCurrent Response CodeProposed Response CodeComments
Create CM HandlePOST /v1/ch201 (Created)200 204 ( OK NO_CONTENT )
Update CM HandlePOST /v1/ch201 (Created) 200 204 ( OK NO_CONTENT )
Remove CM HandlePOST /v1/ch201 (Created) 200 204 ( OK NO_CONTENT
Create ,Update or Remove CM Handle in the same requestPOST /v1/ch201 (Created) 200 204 ( OK NO_CONTENT


As we are using a common payload to handle the Create , Update and Remove operation hence there is a need to streamline the response code in case of successful execution of the request.

...

Code Block
languagejava
titleNetworkCmProxyInventoryController
linenumberstrue
	@Override
    public ResponseEntity<Void> updateDmiPluginRegistration(
            final @Valid RestDmiPluginRegistration restDmiPluginRegistration) {
        final DmiPluginRegistration dmiPluginRegistration = convertRestObjectToJavaApiObject(restDmiPluginRegistration);
        networkCmProxyDataService.updateDmiRegistrationAndSyncModule(dmiPluginRegistration);
        if (dmiPluginRegistration.getCreatedCmHandles() == null) {
            return new ResponseEntity<>(HttpStatus.NO_CONTENT);
        }
        return new ResponseEntity<>(HttpStatus.OK);
    }