Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

OperationStatus cannt map the status WAITING_FOR_CONNECTION #53

Closed
crmolinaz opened this issue Nov 29, 2017 · 2 comments
Closed

OperationStatus cannt map the status WAITING_FOR_CONNECTION #53

crmolinaz opened this issue Nov 29, 2017 · 2 comments

Comments

@crmolinaz
Copy link
Collaborator

Hi,
when try to register a device in the cloud as parent device, there is a method in DeviceControlApi.createNewDevice that receive an operation as parameter. This method also, doesnt get the result fron the CoT, is a bug too. Then, when i do the request manually, i try to check the status of the operation and get this error that describe below:

java.lang.IllegalArgumentException: No enum constant com.telekom.m2m.cot.restsdk.devicecontrol.OperationStatus.WAITING_FOR_CONNECTION

In the class OperationStatus doesnt exists a map for that value, can you please fix this? also will be nice to have the other bug mentioned before, because the method DeviceControlApi.createNewDevice doesnt get the response from the CoT, is returning the same parameter given.

Thanks.

jogehl added a commit to jogehl/cot-java-rest-sdk that referenced this issue Mar 12, 2018
jogehl added a commit to jogehl/cot-java-rest-sdk that referenced this issue Mar 12, 2018
jogehl added a commit to jogehl/cot-java-rest-sdk that referenced this issue Mar 12, 2018
jogehl added a commit to jogehl/cot-java-rest-sdk that referenced this issue Mar 12, 2018
@rokkbert
Copy link
Contributor

WAITING_FOR_CONNECTION is not a valid status of an Operation, I think. It's only a status for a NewDeviceRequest. I'm not sure how this exception could be produced.
But it doesn't seem logical that the createNewDevice method takes an Operation as a parameter, much less to return that parameter.

@crmolinaz
Copy link
Collaborator Author

crmolinaz commented Mar 15, 2018

I checked out the documentation on the cumulocity website and I found that the object that I need is a newDeviceRequestResponse that has a similar structure to Operations.

An operation can handle just 4 states, so this issue should be closed.

Thanks for the answer, I was waiting since November.

Andyck added a commit that referenced this issue Mar 27, 2018
…_status_WAITING_FOR_CONNECTION

Issue #53 operation cannot map the status waiting for connection
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants