Comment 2 for bug 1840495

Revision history for this message
Nick Niehoff (nniehoff) wrote :

Andres,
   Yes, if I submit a POST with the valid headers to /MAAS/api/2.0/license-keys/ with osystem=windows, distro_series=win2016-std, license_key=validkey to the license-keys endpoint I get:

{
    "distro_series": [
        "'windows/win2016-std' is not a valid distro_series. It should be one of: 'windows/win2016'."
    ]
}

If I try the same thing with distro_series=win2016 I get:

'LicenseKey' object is not iterable

which may be a separate bug. When I use the CLI:

$ maas admin license-keys create osystem=windows distro_series=win2016-std license_key=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

I get:

{"distro_series": ["'windows/win2016-std' is not a valid distro_series. It should be one of: 'windows/win2016'."]}

$ maas admin license-keys create osystem=windows distro_series=win2016 license_key=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

On the cli with distro_series=win2016:

Success.
Machine-readable output follows:
{
    "osystem": "windows",
    "distro_series": "win2016",
    "license_key": "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
    "resource_uri": "/MAAS/api/2.0/license-key/windows/win2016"
}