# Copyright (c) 2018 Amdocs, Bell Canada
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

GLOBAL_PRELOAD_PARAMETERS = {
    # heat template parameter values common to all heat template continaing these parameters
     "defaults" : {
         'key_name' : 'vfw_key${uuid}',
         "pub_key" : "{{ .Values.vnfPubKey }}",
         "repo_url_blob" : "https://nexus.onap.org/content/repositories/raw",
         "repo_url_artifacts" : "https://nexus.onap.org/content/groups/staging",
         "demo_artifacts_version" : "${GLOBAL_INJECTED_ARTIFACTS_VERSION}",
         "onap_private_net_id" : "${GLOBAL_INJECTED_NETWORK}",
         "onap_private_subnet_id" : "{{ .Values.openStackPrivateSubnetId }}",
         "onap_private_net_cidr" : "{{ .Values.openStackPrivateNetCidr }}",
         "dcae_collector_ip" : "{{ .Values.dcaeCollectorIp }}",
         "dcae_collector_port" : "30235",
         "public_net_id" : "${GLOBAL_INJECTED_PUBLIC_NET_ID}",
         "cloud_env" : "${GLOBAL_INJECTED_CLOUD_ENV}",
         "install_script_version" : "${GLOBAL_INJECTED_SCRIPT_VERSION}",
     },

# ##
    # heat template parameter values for heat template instances created during Vnf-Orchestration test cases
    # ##
    "Vnf-Orchestration" : {
        "vfw_preload.template": {
            "unprotected_private_net_id" : "vofwl01_unprotected${hostid}",
            "unprotected_private_net_cidr" : "192.168.10.0/24",
            "protected_private_net_id" : "vofwl01_protected${hostid}",
            "protected_private_net_cidr" : "192.168.20.0/24",
            "vfw_private_ip_0" : "192.168.10.100",
            "vfw_private_ip_1" : "192.168.20.100",
            "vfw_private_ip_2" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.1",
            "vpg_private_ip_0" : "192.168.10.200",
            "vpg_private_ip_1" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.2",
            "vsn_private_ip_0" : "192.168.20.250",
            "vsn_private_ip_1" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.3",
            'vfw_name_0':'vofwl01fwl${hostid}',
            'vpg_name_0':'vofwl01pgn${hostid}',
            "vfw_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "vfw_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
            'vsn_name_0':'vofwl01snk${hostid}'
        },
        "vfwsnk_preload.template": {
            "unprotected_private_net_id" : "vofwlsnk_unprotected${hostid}",
            "unprotected_private_subnet_id" : "vofwlsnk_unprotected_sub${hostid}",
            "unprotected_private_net_cidr" : "192.168.10.0/24",
            "protected_private_net_id" : "vofwlsnk_protected${hostid}",
            "protected_private_subnet_id" : "vofwlsnk_protected_sub${hostid}",
            "protected_private_net_cidr" : "192.168.20.0/24",
            "vfw_private_ip_0" : "192.168.10.100",
            "vfw_private_ip_1" : "192.168.20.100",
            "vfw_private_ip_2" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.101",
            "vpg_private_ip_0" : "192.168.10.200",
            "vsn_private_ip_0" : "192.168.20.250",
            "vsn_private_ip_1" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.102",
            'vfw_name_0':'vofwl01fwl${hostid}',
            'vsn_name_0':'vofwl01snk${hostid}',
            "image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
        },
        "vpkg_preload.template": {
            "unprotected_private_net_id" : "vofwlsnk_unprotected${hostid}",
            "unprotected_private_subnet_id" : "vofwlsnk_unprotected_sub${hostid}",
            "unprotected_private_net_cidr" : "192.168.10.0/24",
            "protected_private_net_cidr" : "192.168.20.0/24",
            "vfw_private_ip_0" : "192.168.10.100",
            "vpg_private_ip_0" : "192.168.10.200",
            "vpg_private_ip_1" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.103",
            "vsn_private_ip_0" : "192.168.20.250",
            'vpg_name_0':'vofwl01pgn${hostid}',
            "image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
        },
        "vlb_preload.template" : {
            "vlb_image_name" : "${GLOBAL_INJECTED_UBUNTU_1604_IMAGE}",
            "vlb_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
            "vlb_private_net_id" : "volb01_private${hostid}",
            "pktgen_private_net_id" : "volb01_pktgen${hostid}",
            "vlb_private_net_cidr" : "192.168.30.0/24",
            "vlb_private_ip_0" : "192.168.30.100",
            "vlb_private_ip_1" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.4",
            "vdns_private_ip_0" : "192.168.30.110",
            "vdns_private_ip_1" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.5",
            'vlb_name_0':'vovlblb${hostid}',
            'vdns_name_0':'vovlbdns${hostid}',
            "pktgen_private_net_cidr" : "192.168.9.0/24",
            "vpg_private_ip_1" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.7",
            "pg_int" : "192.168.9.109",
            "vpg_private_ip_0" : "192.168.9.110",
            "vlb_private_ip_2" : "192.168.9.111",
            "vip" : "192.168.9.112",
            "gre_ipaddr" : "192.168.30.112",
            "vpg_name_0" : "vovlbpgn${hostid}",
            "vnf_id" : "vLoadBalancer_${hostid}",
            "vf_module_id" : "vLoadBalancer"

        },
        "dnsscaling_preload.template" : {
            "vlb_private_net_id" : "volb01_private${hostid}",
            "vlb_private_ip_0" : "192.168.30.100",
            "vlb_private_ip_1" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.4",
            "vdns_private_ip_0" : "192.168.30.222",
            "vdns_private_ip_1" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.6",
            'scaling_vdns_name_0':'vovlbscaling${hostid}',
            "vlb_private_net_cidr" : "192.168.10.0/24"
        },
        "vims_preload.template" : {
            "bono_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "sprout_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "homer_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "homestead_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "ralf_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "ellis_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "dns_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "bono_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
            "sprout_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
            "homer_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
            "homestead_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
            "ralf_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
            "ellis_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
            "dns_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
            "repo_url" : "http://repo.cw-ngv.com/stable",
            "zone" : "me.cw-ngv.com",
            "dn_range_start" : "2425550000",
            "dn_range_length" : "10000",
            "dnssec_key" : "9FPdYTWhk5+LbhrqtTPQKw=="

        },
        "vvg_preload.template" : {
        }
    },
# heat template parameter values for heat template instances created during Closed-Loop test cases
    "Closed-Loop" : {
                "vfw_preload.template": {
            "unprotected_private_net_id" : "clfwl01_unprotected${hostid}",
            "unprotected_private_net_cidr" : "192.168.110.0/24",
            "protected_private_net_id" : "clfwl01_protected${hostid}",
            "protected_private_net_cidr" : "192.168.120.0/24",
            "vfw_private_ip_0" : "192.168.110.100",
            "vfw_private_ip_1" : "192.168.120.100",
            "vfw_private_ip_2" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.11",
            "vpg_private_ip_0" : "192.168.110.200",
            "vpg_private_ip_1" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.12",
            "vsn_private_ip_0" : "192.168.120.250",
            "vsn_private_ip_1" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.13",
            'vfw_name_0':'clfwl01fwl${hostid}',
            'vpg_name_0':'clfwl01pgn${hostid}',
            "vfw_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "vfw_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
            'vsn_name_0':'clfwl01snk${hostid}'
        },
        "vfwsnk_preload.template": {
            "unprotected_private_net_id" : "clfwlsnk_unprotected${hostid}",
            "unprotected_private_subnet_id" : "clfwlsnk_unprotected_sub${hostid}",
            "unprotected_private_net_cidr" : "192.168.10.0/24",
            "protected_private_net_id" : "clfwlsnk_protected${hostid}",
            "protected_private_subnet_id" : "clfwlsnk_protected_sub${hostid}",
            "protected_private_net_cidr" : "192.168.20.0/24",
            "vfw_private_ip_0" : "192.168.10.100",
            "vfw_private_ip_1" : "192.168.20.100",
            "vfw_private_ip_2" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.111",
            "vpg_private_ip_0" : "192.168.10.200",
            "vsn_private_ip_0" : "192.168.20.250",
            "vsn_private_ip_1" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.112",
            'vfw_name_0':'clfwl01fwl${hostid}',
            'vsn_name_0':'clfwl01snk${hostid}',
            "image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
        },
        "vpkg_preload.template": {
            "unprotected_private_net_id" : "clfwlsnk_unprotected${hostid}",
            "unprotected_private_subnet_id" : "clfwlsnk_unprotected_sub${hostid}",
            "unprotected_private_net_cidr" : "192.168.10.0/24",
            "protected_private_net_cidr" : "192.168.20.0/24",
            "vfw_private_ip_0" : "192.168.10.100",
            "vpg_private_ip_0" : "192.168.10.200",
            "vpg_private_ip_1" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.113",
            "vsn_private_ip_0" : "192.168.20.250",
            'vpg_name_0':'clfwl01pgn${hostid}',
            "image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
        },
        "vlb_preload.template" : {
            "vlb_image_name" : "${GLOBAL_INJECTED_UBUNTU_1604_IMAGE}",
            "vlb_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
            "vlb_private_net_id" : "cllb01_private${hostid}",
            "pktgen_private_net_id" : "cllb01_pktgen${hostid}",
            "vlb_private_net_cidr" : "192.168.30.0/24",
            "vlb_private_ip_0" : "192.168.30.100",
            "vlb_private_ip_1" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.14",
            "vdns_private_ip_0" : "192.168.30.110",
            "vdns_private_ip_1" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.15",
            'vlb_name_0':'clvlblb${hostid}',
            'vdns_name_0':'clvlbdns${hostid}',
            "pktgen_private_net_cidr" : "192.168.9.0/24",
            "vpg_private_ip_1" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.17",
            "pg_int" : "192.168.9.109",
            "vpg_private_ip_0" : "192.168.9.110",
            "vlb_private_ip_2" : "192.168.9.111",
            "vip" : "192.168.9.112",
            "gre_ipaddr" : "192.168.30.112",
            "vpg_name_0" : "clvlbpgn${hostid}",
            "vnf_id" : "vLoadBalancer_${hostid}",
            "vf_module_id" : "vLoadBalancer"
        },
        "dnsscaling_preload.template" : {
            "vlb_private_net_id" : "cllb01_private${hostid}",
            "vlb_private_ip_0" : "192.168.130.100",
            "vlb_private_ip_1" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.14",
            "vdns_private_ip_0" : "192.168.130.222",
            "vdns_private_ip_1" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.16",
            'scaling_vdns_name_0':'clvlbscaling${hostid}',
            "vlb_private_net_cidr" : "192.168.10.0/24"
        },
        "vims_preload.template" : {
            "bono_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "sprout_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "homer_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "homestead_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "ralf_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "ellis_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "dns_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "bono_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
            "sprout_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
            "homer_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
            "homestead_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
            "ralf_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
            "ellis_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
            "dns_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
            "repo_url" : "http://repo.cw-ngv.com/stable",
            "zone" : "me.cw-ngv.com",
            "dn_range_start" : "2425550000",
            "dn_range_length" : "10000",
            "dnssec_key" : "9FPdYTWhk5+LbhrqtTPQKw=="
        },
        "vvg_preload.template" : {
        }
    },
 # heat template parameter values for heat template instances created for hands on demo test case
   "Demo" : {
        "vfw_preload.template": {
            "unprotected_private_net_id" : "demofwl_unprotected",
            "unprotected_private_net_cidr" : "192.168.110.0/24",
            "protected_private_net_id" : "demofwl_protected",
            "protected_private_net_cidr" : "192.168.120.0/24",
            "vfw_private_ip_0" : "192.168.110.100",
            "vfw_private_ip_1" : "192.168.120.100",
            "vfw_private_ip_2" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.11",
            "vpg_private_ip_0" : "192.168.110.200",
            "vpg_private_ip_1" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.12",
            "vsn_private_ip_0" : "192.168.120.250",
            "vsn_private_ip_1" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.13",
            'vfw_name_0':'demofwl01fwl',
            'vpg_name_0':'demofwl01pgn',
            "vfw_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "vfw_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
            'vsn_name_0':'demofwl01snk'
        },
        "vfwsnk_preload.template": {
            "unprotected_private_net_id" : "demofwlsnk_unprotected${hostid}",
            "unprotected_private_subnet_id" : "demofwlsnk_unprotected_sub${hostid}",
            "unprotected_private_net_cidr" : "192.168.10.0/24",
            "protected_private_net_id" : "demofwlsnk_protected${hostid}",
            "protected_private_subnet_id" : "vofwlsnk_protected_sub${hostid}",
            "protected_private_net_cidr" : "192.168.20.0/24",
            "vfw_private_ip_0" : "192.168.10.100",
            "vfw_private_ip_1" : "192.168.20.100",
            "vfw_private_ip_2" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.121",
            "vpg_private_ip_0" : "192.168.10.200",
            "vsn_private_ip_0" : "192.168.20.250",
            "vsn_private_ip_1" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.122",
            'vfw_name_0':'${generic_vnf_name}',
            'vsn_name_0':'demofwl01snk${hostid}',
            "image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
        },
        "vpkg_preload.template": {
            "unprotected_private_net_id" : "demofwlsnk_unprotected${hostid}",
            "unprotected_private_subnet_id" : "demofwlsnk_unprotected_sub${hostid}",
            "unprotected_private_net_cidr" : "192.168.10.0/24",
            "protected_private_net_cidr" : "192.168.20.0/24",
            "vfw_private_ip_0" : "192.168.10.100",
            "vpg_private_ip_0" : "192.168.10.200",
            "vpg_private_ip_1" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.123",
            "vsn_private_ip_0" : "192.168.20.250",
            'vpg_name_0':'demofwl01pgn${hostid}',
            "image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}"
        },
        "vlb_preload.template" : {
            "vlb_image_name" : "${GLOBAL_INJECTED_UBUNTU_1604_IMAGE}",
            "vlb_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
            "vlb_private_net_id" : "demolb_private${hostid}",
            "pktgen_private_net_id" : "demolb_pktgen${hostid}",
            "vlb_private_net_cidr" : "192.168.30.0/24",
            "vlb_private_ip_0" : "192.168.30.100",
            "vlb_private_ip_1" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.24",
            "vdns_private_ip_0" : "192.168.30.110",
            "vdns_private_ip_1" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.25",
            'vlb_name_0':'demovlblb${hostid}',
            'vdns_name_0':'demovlbdns${hostid}',
            "pktgen_private_net_cidr" : "192.168.9.0/24",
            "vpg_private_ip_1" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.27",
            "pg_int" : "192.168.9.109",
            "vpg_private_ip_0" : "192.168.9.110",
            "vlb_private_ip_2" : "192.168.9.111",
            "vip" : "192.168.9.112",
            "gre_ipaddr" : "192.168.30.112",
            "vpg_name_0" : "clvlbpgn${hostid}",
            "vnf_id" : "vLoadBalancer_${hostid}",
            "vf_module_id" : "vLoadBalancer"
        },
        "dnsscaling_preload.template" : {
            "vlb_private_net_id" : "demolb_private${hostid}",
            "vlb_private_ip_0" : "192.168.130.100",
            "vlb_private_ip_1" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.24",
            "vdns_private_ip_0" : "192.168.130.222",
            "vdns_private_ip_1" : "{{.Values.openStackOamNetworkCidrPrefix}}.${ecompnet}.26",
            'scaling_vdns_name_0':'demovlbscaling${hostid}',
            "vlb_private_net_cidr" : "192.168.10.0/24"
        },
        "vims_preload.template" : {
            "bono_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "sprout_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "homer_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "homestead_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "ralf_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "ellis_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "dns_image_name" : "${GLOBAL_INJECTED_UBUNTU_1404_IMAGE}",
            "bono_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
            "sprout_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
            "homer_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
            "homestead_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
            "ralf_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
            "ellis_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
            "dns_flavor_name" : "${GLOBAL_INJECTED_VM_FLAVOR}",
            "repo_url" : "http://repo.cw-ngv.com/stable",
            "zone" : "me.cw-ngv.com",
            "dn_range_start" : "2425550000",
            "dn_range_length" : "10000",
            "dnssec_key" : "9FPdYTWhk5+LbhrqtTPQKw=="
        },
        "vvg_preload.template" : {
        }
    }
}
