ePMP Templates questions

I am using a ePMP 2000 AP and a force 180 SM. I am trying to create service plans for my Sm, there is sample template for QOS already. So I created mine  but seems to be working only if my template is assign to both AP and SM. If assigned to the SM only won't work. If I do something like that won't be cutting my AP bandwidth for other SMs? Is this the right way to do it? I am using the cloud service.

The default QoS example combines AP and SM specific parameters into a single template for simplicity.  QoS requires setup on both the AP and SMs.  The AP's bandwidth is not limited by this though.  Only SMs are limited by these settings.

The way that QoS works with ePMP is that one or more MIR Profiles are created on the AP.  These profiles define separate plans for limiting MIR on SMs.  This does not limit the AP.  Then SMs are assigned to one of these profiles which actually controls their QoS.  So if we broke the default template into an AP-only and SM-only template we would get the following:

AP template that creates the profiles and enables MIR:

{
    "device_props": {
        "wirelessMIREnable": "1",
        "wirelessMIRProfileTable": [
            {
                "wirelessMIRProfileNumber": "0",
                "wirelessMIRProfileDescription": "default",
                "wirelessDLMIR": "100000",
                "wirelessULMIR": "100000"
            },
            {
                "wirelessMIRProfileNumber": "1",
                "wirelessMIRProfileDescription": "Gold Plan",
                "wirelessDLMIR": "25000",
                "wirelessULMIR": "6000"
            }
        ]
    }
}

SM template to assign device to "Gold Plan":

{
    "device_props": {
        "wirelessMIRSTAProfileNumber": "1"
    }
}

SM templat to assign device to "Default" plan:

{
    "device_props": {
        "wirelessMIRSTAProfileNumber": "0"
    }
}

You could also use replacement variables to have a single SM template and then set the profile number on devices on the fly when pushing the configuration.  The below example supports this while defaulting to the "Default" plan if you don't set a device-unique value.

{
    "device_props": {
        "wirelessMIRSTAProfileNumber": "${MIR_PROFILE=0}"
    }
}