[feature] Add support for licensing different windows images

Bug #1840495 reported by Nick Niehoff on 2019-08-16
This bug affects 2 people
Affects Status Importance Assigned to Milestone

Bug Description

Currently, it is possible to upload multiple Windows images of the same version specifying different names:


etc. This is useful for the different flavors of Windows or for simply 2 very different Windows baselines. However, the Windows licensing features of MAAS only supports a license key for windows/win2016 (or one of the other few predefined names). Microsoft provides different license keys for example for Standard vs Datacenter editions of Windows. Another potential use case is multiple tenants provide their own license keys for Windows. The license key feature in MAAS should be updated to allow adding license keys for any of the images that are uploaded to it with custom names.

Nick Niehoff (nniehoff) on 2019-08-16
summary: - [feature] Add support for different windows images
+ [feature] Add support for licensing different windows images
Andres Rodriguez (andreserl) wrote :

Hi Nick,

Have you looked at https://maas.io/docs/api "License Keys" section? MAAS already supports assigning license keys.

Nick Niehoff (nniehoff) wrote :

   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:

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"

Igor Gnip (igorgnip) on 2019-08-22
tags: added: limitation
Igor Gnip (igorgnip) wrote :

Instead of listing exact names, maybe code could permit all names which start with:


Hard coding exact names prevents having multiple flavors, build numbers, versions.
Possibly strongest case is different set of drivers required for different machines and also UEFI image vs Legacy image.
Perhaps this can be classified as a bug or request for lifting unnecessary limitation.

This is related to https://bugs.launchpad.net/maas/+bug/1836703

Igor Gnip (igorgnip) wrote :

also names starting with:


Changed in maas:
status: New → Triaged
importance: Undecided → Wishlist
milestone: none → next
Blake Rouse (blake-rouse) wrote :

Thanks for your feature request, please could you start a thread over on our Discourse (https://discourse.maas.io/c/features) to discuss the feature?

Changed in maas:
status: Triaged → Invalid
importance: Wishlist → Undecided
milestone: next → none
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers