I have a single, but large python script that acts as the back end task executor to a LAMP stack. I need licensing built in to break down certain functionality by limiting # of uses etc.
Within python script:
Remove "free=[0|1] logic that currently defines the licensed tier.
Add entitlements mask:
o Expiration Date
o Number of target clients (base=100, then increments of 1000)
o Specific Feature toggling for several features controlled by python script: (feature [true | false]
Read/decrypt the license file and populate the entitlements mask
Add enforcement hooks against the entitlements mask:
o At the beginning of the code, ensure the current date is not creater than expiration date, if it is, reset the entitlements mask to
default (free) settings
o In "Run" the loop that cycles through the targets needs to count and break the loop when the number of targets exceeds the number of targets in the entitlements mask
o In the "agent" section, check that the agent entitlement is in place prior to generating and staging the iOS and Android agents
o In the "client-side" section, check that the client-side entitlement is in place prior to running client-side tasks.
o In the "messaging-app" task section, check that the messaging -app entitlement is in place prior to running messaging-app delivery methods
*** Notes ***
Development environment is pre-provisioned with automated tests created.
Since all of the work is done within a single python script it will be easy to test.
This will allow for quick feedback that the code works as expected.