CenturyLinkCloud / clc-java-sdk

Apache License 2.0
6 stars 4 forks source link

Claim network response has changed #200

Closed khomco closed 8 years ago

khomco commented 8 years ago

Currently the NetworkClient marshals the response of the claim of a network as follows:

experimentalClient("/networks/{accountAlias}/{dataCenterId}/claim")
                .resolveTemplate(DATACENTER_ID, dataCenterId)
                .request()
                .post(entity(new HashMap<>(), APPLICATION_JSON_TYPE))
                .readEntity(Link.class);

which expects the API to return JSON like the following:

{
      "rel":"status",
      "href":"/v2/operations/alias/status/wa1-12345",
      "id":"wa1-12345"
}

However, the API has changed to the following form of response (https://www.ctl.io/api-docs/v2/#networks-claim-network):

{
  "operationId": "c387aa9873ab4f7399ea8964dd61510d",
  "uri": "/v2-experimental/operations/{accountAlias}/status/{operationId}"
}

Note that the status URL is against the v2-experimental API

push1st1k commented 8 years ago

fixed https://github.com/CenturyLinkCloud/clc-java-sdk/commit/18ac066bcc807200360f312829a44eaa2067d949