POST https://api.linode.com/v4/linode/instances in openapi.yaml is missing the image option

Because the image option is missing from the API v4 spec for POST https://api.linode.com/v4/linode/instances, linode-cli v2.0.2 does not support this option either, meaning that creating a running Linode instance is more complicated than it needs to be. How do we fix this?

I have confirmed that https://cloud.linode.com/linodes uses the same API endpoint, POST https://api.linode.com/v4/linode/instances, and it passes the image option in the payload:

{
"region":"eu-west",
"type":"g6-nanode1",
"label":null,
"root_pass":"",
"image":"linode/containerlinux",
"backups_enabled":false,
"booted":true
}

6 Replies

That's an excellent idea. I can see where you're coming from, and we can certainly look into making a change so deploying a Linode's a bit easier in our APIv4 and CLI. We'll review /linode/instances and see what can be done from our end.

Thanks for the detailed error report - I'm looking into this now. I'll update this when I have a fix up.

This is now fixed in the CLI, the spec/docs fixes should be out shortly. You can get the fixed CLI with a pip install --upgrade linode-cli - you're looking for version 2.0.3. Sorry for the inconvenience, and thank you again for the detailed report.

I can confirm that this now works in linode-cli v2.0.3, thank you for the super awesome turn-around!

While not a biggie, I'm now seeing this line after every single linode-cli invocation:

Parsing failed when comparing local version DEVELOPMENT with server version 4.0.2.  If this problem persists, please open a ticket with linode-cli support ticket-create

I'm managing all deps with pipenv, this is what my Pipfile.lock looks like:

{
    "_meta": {
        "hash": {
            "sha256": "a41d9fe3fe1ccaf96fc2b817fa146e9288b7308176ceb14a2d78bb9ba668bdf3"
        },
        "pipfile-spec": 6,
        "requires": {
            "python_version": "3.6"
        },
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": {
        "certifi": {
            "hashes": [
                "sha256:13e698f54293db9f89122b0581843a782ad0934a4fe0172d2a980ba77fc61bb7",
                "sha256:9fa520c1bacfb634fa7af20a76bcbd3d5fb390481724c597da32c719a7dca4b0"
            ],
            "version": "==2018.4.16"
        },
        "chardet": {
            "hashes": [
                "sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae",
                "sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"
            ],
            "version": "==3.0.4"
        },
        "colorclass": {
            "hashes": [
                "sha256:b05c2a348dfc1aff2d502527d78a5b7b7e2f85da94a96c5081210d8e9ee8e18b"
            ],
            "version": "==2.2.0"
        },
        "enum34": {
            "hashes": [
                "sha256:2d81cbbe0e73112bdfe6ef8576f2238f2ba27dd0d55752a776c41d38b7da2850",
                "sha256:644837f692e5f550741432dd3f223bbb9852018674981b1664e5dc339387588a",
                "sha256:6bd0f6ad48ec2aa117d3d141940d484deccda84d4fcd884f5c3d93c23ecd8c79",
                "sha256:8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1"
            ],
            "version": "==1.1.6"
        },
        "idna": {
            "hashes": [
                "sha256:156a6814fb5ac1fc6850fb002e0852d56c0c8d2531923a51032d1b70760e186e",
                "sha256:684a38a6f903c1d71d6d5fac066b58d7768af4de2b832e426ec79c30daa94a16"
            ],
            "version": "==2.7"
        },
        "linode-cli": {
            "hashes": [
                "sha256:c6dba7acb1d88ec4f72edc3c692e64964ce378e48ff6a6eef1ac320913d2b97e"
            ],
            "index": "pypi",
            "version": "==2.0.3"
        },
        "pyyaml": {
            "hashes": [
                "sha256:0c507b7f74b3d2dd4d1322ec8a94794927305ab4cebbe89cc47fe5e81541e6e8",
                "sha256:16b20e970597e051997d90dc2cddc713a2876c47e3d92d59ee198700c5427736",
                "sha256:3262c96a1ca437e7e4763e2843746588a965426550f3797a79fca9c6199c431f",
                "sha256:326420cbb492172dec84b0f65c80942de6cedb5233c413dd824483989c000608",
                "sha256:4474f8ea030b5127225b8894d626bb66c01cda098d47a2b0d3429b6700af9fd8",
                "sha256:592766c6303207a20efc445587778322d7f73b161bd994f227adaa341ba212ab",
                "sha256:5ac82e411044fb129bae5cfbeb3ba626acb2af31a8d17d175004b70862a741a7",
                "sha256:5f84523c076ad14ff5e6c037fe1c89a7f73a3e04cf0377cb4d017014976433f3",
                "sha256:827dc04b8fa7d07c44de11fabbc888e627fa8293b695e0f99cb544fdfa1bf0d1",
                "sha256:b4c423ab23291d3945ac61346feeb9a0dc4184999ede5e7c43e1ffb975130ae6",
                "sha256:bc6bced57f826ca7cb5125a10b23fd0f2fff3b7c4701d64c439a300ce665fff8",
                "sha256:c01b880ec30b5a6e6aa67b09a2fe3fb30473008c85cd6a67359a1b15ed6d83a4",
                "sha256:ca233c64c6e40eaa6c66ef97058cdc80e8d0157a443655baa1b2966e812807ca",
                "sha256:e863072cdf4c72eebf179342c94e6989c67185842d9997960b3e69290b2fa269"
            ],
            "version": "==3.12"
        },
        "requests": {
            "hashes": [
                "sha256:63b52e3c866428a224f97cab011de738c36aec0185aa91cfacd418b5d58911d1",
                "sha256:ec22d826a36ed72a7358ff3fe56cbd4ba69dd7a6718ffd450ff0e9df7a47ce6a"
            ],
            "version": "==2.19.1"
        },
        "terminaltables": {
            "hashes": [
                "sha256:f3eb0eb92e3833972ac36796293ca0906e998dc3be91fbe1f8615b331b853b81"
            ],
            "version": "==3.1.0"
        },
        "urllib3": {
            "hashes": [
                "sha256:a68ac5e15e76e7e5dd2b8f94007233e01effe3e50e8daddf69acfd81cb686baf",
                "sha256:b5725a0bd4ba422ab0e66e89e030c806576753ea3ee08554382c14e685d117b5"
            ],
            "version": "==1.23"
        }
    },
    "develop": {}
}

Thank you again! I built that CLI locally and forgot to tell it what spec version I was building against. Version 2.0.4 just shipped with this fixed, and the API docs are updated as well.

linode-cli v2.0.4 is golden, thank you!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct