ExternalNetworkDeviceManager nwDeviceMgr;
ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name);
nwDeviceMgr = locator.getManager(ExternalNetworkDeviceManager.class);
boolean result = nwDeviceMgr.deleteNetworkDevice(this);
if (result) {
SuccessResponse response = new SuccessResponse(getCommandName());
response.setResponseName(getCommandName());
this.setResponseObject(response);
} else {
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to delete network device:" + getId());
}
} catch (InvalidParameterValueException ipve) {