Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

get_licensed_modules does not find GTM/DNS license #34

Open
alonsocamaro opened this issue Jul 22, 2016 · 1 comment
Open

get_licensed_modules does not find GTM/DNS license #34

alonsocamaro opened this issue Jul 22, 2016 · 1 comment

Comments

@alonsocamaro
Copy link

alonsocamaro commented Jul 22, 2016

In the os-license.sh:get_licensed_modules function

enabled_modules variable returns the GTM/DNS license as "dnsgtm"

# enabled_modules=$(awk '/^mod.*enabled/ { print $1 }' /config/bigip.license | sed 's/mod_//' | tr '\n' ' ')
# echo $enabled_modules
ltm ilx aml dnsgtm cgnat asm apm am afw afm


and provisionable_modules / get_supported_modules funtion returns the following tokens

# get_supported_modules
afm am apm asm avr fps gtm ilx lc ltm pem swg

which makes the following comparison to do not work

if [[ "$provisionable_modules" == *"$module"* ]]; then

@alonsocamaro
Copy link
Author

A fix is the following:

root@node-1:~/onboarding/os-functions# diff -u10 os-license.sh*
--- os-license.sh   2016-08-04 17:56:46.909058172 +0000
+++ os-license.sh.orig  2016-08-04 17:57:07.544995194 +0000
@@ -120,21 +120,20 @@
        provisionable_modules=$(get_supported_modules)
        enabled_modules=$(awk '/^mod.*enabled/ { print $1 }' /config/bigip.license |
                                 sed 's/mod_//' | tr '\n' ' ')

        for module in $enabled_modules; do
            case $module in
                wo@(c|m)) module="wom" ;;
                wa?(m)) module="wam" ;;
                af@(m|w)) module="afm" ;;
                am) module="apm" ;;
-               dnsgtm) module="gtm" ;;
            esac

            if [[ "$provisionable_modules" == *"$module"* ]]; then
                licensed_modules="$licensed_modules $module"
                log "Found license for $(upcase $module) module..."
            fi
        done

        echo "$licensed_modules"
    else

Test:

With old function:

[root@bigip1:Active:Standalone] os-functions # get_licensed_modules 
  ltm ilx asm apm apm afm afm ltm ilx gtm asm apm apm afm afm ltm ilx asm apm apm afm afm

With new function:

[root@bigip1:Active:Standalone] os-functions # get_licensed_modules 
  ltm ilx asm apm apm afm afm ltm ilx gtm asm apm apm afm afm

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants