Merge "Adding VXLAN interfaces for DPDK blueprint"
[yaml_builds.git] / tools / j2 / set_site_env.sh
1 #!/bin/bash
2 ##############################################################################
3 # Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.        #
4 #                                                                            #
5 # Licensed under the Apache License, Version 2.0 (the "License"); you may    #
6 # not use this file except in compliance with the License.                   #
7 #                                                                            #
8 # You may obtain a copy of the License at                                    #
9 #       http://www.apache.org/licenses/LICENSE-2.0                           #
10 #                                                                            #
11 # Unless required by applicable law or agreed to in writing, software        #
12 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT  #
13 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.           #
14 # See the License for the specific language governing permissions and        #
15 # limitations under the License.                                             #
16 ##############################################################################
17
18 {% if 'site_type' in yaml %}
19 export SITE_TYPE={{yaml.site_type}}
20 echo SITE_TYPE=$SITE_TYPE
21 export AIRSHIP_TREASUREMAP=/opt/akraino/yaml_builds/site_type/{{yaml.site_type}}/airship-treasuremap
22 echo AIRSHIP_TREASUREMAP=$AIRSHIP_TREASUREMAP
23 export AIRSHIP_TEMPLATES=/opt/akraino/yaml_builds/site_type/{{yaml.site_type}}/templates/
24 echo AIRSHIP_TEMPLATES=$AIRSHIP_TEMPLATES
25 {% else %}
26 # ASSUME SRIOV FOR BACKWARD COMPATIBILITY
27 export SITE_TYPE=sriov
28 echo SITE_TYPE=$SITE_TYPE
29 export AIRSHIP_TREASUREMAP=/opt/akraino/yaml_builds/site_type/sriov/airship-treasuremap
30 echo AIRSHIP_TREASUREMAP=$AIRSHIP_TREASUREMAP
31 export AIRSHIP_TEMPLATES=/opt/akraino/yaml_builds/site_type/sriov/templates/
32 echo AIRSHIP_TEMPLATES=$AIRSHIP_TEMPLATES
33 {% endif %}
34 export GENESIS_HOST={{yaml.genesis.host}}
35 echo GENESIS_HOST=$GENESIS_HOST
36 export PXE_INTERFACE={{yaml.networks.pxe.interface}}
37 echo PXE_INTERFACE=$PXE_INTERFACE
38 export HOST_INTERFACE={{yaml.networks.host.interface}}
39 echo HOST_INTERFACE=$HOST_INTERFACE
40 export GENESIS_NAME={{yaml.genesis.name}}
41 echo GENESIS_NAME=$GENESIS_NAME