packngo icon indicating copy to clipboard operation
packngo copied to clipboard

Creating a Spot Market Request for a plan not available in a facility succeeds

Open t0mk opened this issue 5 years ago • 1 comments

Example: I create a SMR for 2 c3.small.x86 devices in ewr1 over the API (with packngo). c3.small.x86 is not available in ewr1 (I think it's not a matter of capacity, it's just not offered there). The creation of the SMR succeeds, and the SMR API resource has empty "facilities" attribute.

First SMR was created with packngo, for c3.small.x86 in ewr1 (plan not available in facility), second was created with Console, it's for t1.small.x86 in ewr1 (plan available in faclity). You can see that the first resource has empty facilities field. The second is OK.

tomk@xps ~/packetjqgit ±master⚡ » ./packetjq  -p ./packetjq -p "/projects/5347704d-cc09-4458-80c0-a301cdd9705c/spot-market-requests"                                          
{
  "spot_market_requests": [
    {
      "id": "41659234-b66e-4ac4-acbe-a4d700486b95",
      "created_at": "2020-11-24T11:16:14Z",
      "devices_min": 2,
      "devices_max": 2,
      "max_bid_price": 0.0,
      "end_at": null,
      "facilities": [],
      "project": {
        "href": "/projects/5347704d-cc09-4458-80c0-a301cdd9705c"
      },
      "plan": {
        "href": "#18e285e0-1872-11ea-8d71-362b9e155667"
      },
      "devices": [],
      "href": "/spot-market-requests/41659234-b66e-4ac4-acbe-a4d700486b95"
    },
    {
      "id": "2a37e4dd-c9da-4f2f-8a42-4aa555406ebf",
      "created_at": "2020-11-24T11:18:38Z",
      "devices_min": 1,
      "devices_max": 2,
      "max_bid_price": 0.04,
      "end_at": null,
      "facilities": [
        {
          "href": "/facilities/e1e9c52e-a0bc-4117-b996-0fc94843ea09"
        }
      ],
      "project": {
        "href": "/projects/5347704d-cc09-4458-80c0-a301cdd9705c"
      },
      "plan": {
        "href": "#e69c0169-4726-46ea-98f1-939c9e8a3607"
      },
      "devices": [
        {
          "href": "/devices/7fad379b-4dea-4799-bd13-eae3db8616a7"
        },
        {
          "href": "/devices/df287fb3-5eb5-4ca7-8414-80928587a29a"
        }
      ],
      "href": "/spot-market-requests/2a37e4dd-c9da-4f2f-8a42-4aa555406ebf"
    }
  ]
}

@displague This is an API issue, can you please post this to internal tracker?

t0mk avatar Nov 24 '20 12:11 t0mk

Filed an internal ticket, thanks.

displague avatar Nov 24 '20 20:11 displague