[CORD-2553] update playbook according to new spgwc image
Change-Id: Ibefa140c20b892879ffa3c116e5c14d470c8d2d8
diff --git a/xos/synchronizer/steps/roles/build_and_run/tasks/main.yml b/xos/synchronizer/steps/roles/build_and_run_4_1/tasks/main.yml
similarity index 62%
copy from xos/synchronizer/steps/roles/build_and_run/tasks/main.yml
copy to xos/synchronizer/steps/roles/build_and_run_4_1/tasks/main.yml
index ff7ff63..16a5672 100644
--- a/xos/synchronizer/steps/roles/build_and_run/tasks/main.yml
+++ b/xos/synchronizer/steps/roles/build_and_run_4_1/tasks/main.yml
@@ -19,16 +19,7 @@
become: yes
template:
src=run_with_log.sh.j2
- dest="{{source_path}}/cp/run_with_log.sh" owner=root group=root mode=755
-
-# Must wait until vSPGW-U successfully runs ngic dp software
-# Must insert codes to wait until above
-# Following codes will be uncommented when vSPGWU playbook is completed
-#- name: wait until vSPGW-U runs successfully
-# wait_for:
-# timeout: 1800
-# path: "{{ source_path }}/cp/finish_vspgwu_flag"
-# msg: Timeout to wait that vSPGWU runs successfully
+ dest="{{source_path_4_1}}/cp/run_with_log.sh" owner=root group=root mode=755
# This part should be run after user plane (data plane) runs in vSPGW-U
# If not, vSPGW-U and vSPGW-C will not be working well
@@ -36,12 +27,12 @@
become: yes
shell: "{{ item }}"
args:
- chdir: "{{ source_path }}/cp"
+ chdir: "{{ source_path_4_1 }}/cp"
environment:
- NG_CORE: "{{ source_path }}"
- RTE_SDK: "{{ source_path }}/dpdk"
+ NG_CORE: "{{ source_path_4_1 }}"
+ RTE_SDK: "{{ source_path_4_1 }}/dpdk"
RTE_TARGET: "x86_64-native-linuxapp-gcc"
- HYPERSCANDIR: "/root/ngic/hyperscan-4.1.0"
+ HYPERSCANDIR: "{{ source_path_4_1 }}/hyperscan-4.1.0"
with_items:
- make clean
- make
@@ -50,4 +41,4 @@
# Finish
- name: write flag
become: yes
- shell: "echo 1 > {{source_path}}/cp/finish_flag_build_and_run"
\ No newline at end of file
+ shell: "echo 1 > {{source_path_4_1}}/cp/finish_flag_build_and_run"
\ No newline at end of file
diff --git a/xos/synchronizer/steps/roles/build_and_run/templates/run_with_log.sh.j2 b/xos/synchronizer/steps/roles/build_and_run_4_1/templates/run_with_log.sh.j2
similarity index 100%
rename from xos/synchronizer/steps/roles/build_and_run/templates/run_with_log.sh.j2
rename to xos/synchronizer/steps/roles/build_and_run_4_1/templates/run_with_log.sh.j2
diff --git a/xos/synchronizer/steps/roles/build_and_run/tasks/main.yml b/xos/synchronizer/steps/roles/build_and_run_5_0/tasks/main.yml
similarity index 62%
rename from xos/synchronizer/steps/roles/build_and_run/tasks/main.yml
rename to xos/synchronizer/steps/roles/build_and_run_5_0/tasks/main.yml
index ff7ff63..ab19acc 100644
--- a/xos/synchronizer/steps/roles/build_and_run/tasks/main.yml
+++ b/xos/synchronizer/steps/roles/build_and_run_5_0/tasks/main.yml
@@ -19,16 +19,7 @@
become: yes
template:
src=run_with_log.sh.j2
- dest="{{source_path}}/cp/run_with_log.sh" owner=root group=root mode=755
-
-# Must wait until vSPGW-U successfully runs ngic dp software
-# Must insert codes to wait until above
-# Following codes will be uncommented when vSPGWU playbook is completed
-#- name: wait until vSPGW-U runs successfully
-# wait_for:
-# timeout: 1800
-# path: "{{ source_path }}/cp/finish_vspgwu_flag"
-# msg: Timeout to wait that vSPGWU runs successfully
+ dest="{{source_path_5_0}}/cp/run_with_log.sh" owner=root group=root mode=755
# This part should be run after user plane (data plane) runs in vSPGW-U
# If not, vSPGW-U and vSPGW-C will not be working well
@@ -36,12 +27,12 @@
become: yes
shell: "{{ item }}"
args:
- chdir: "{{ source_path }}/cp"
+ chdir: "{{ source_path_5_0 }}/cp"
environment:
- NG_CORE: "{{ source_path }}"
- RTE_SDK: "{{ source_path }}/dpdk"
+ NG_CORE: "{{ source_path_5_0 }}"
+ RTE_SDK: "{{ source_path_5_0 }}/dpdk"
RTE_TARGET: "x86_64-native-linuxapp-gcc"
- HYPERSCANDIR: "/root/ngic/hyperscan-4.1.0"
+ HYPERSCANDIR: "{{ source_path_5_0 }}/hyperscan-4.1.0"
with_items:
- make clean
- make
@@ -50,4 +41,4 @@
# Finish
- name: write flag
become: yes
- shell: "echo 1 > {{source_path}}/cp/finish_flag_build_and_run"
\ No newline at end of file
+ shell: "echo 1 > {{source_path_5_0}}/cp/finish_flag_build_and_run"
\ No newline at end of file
diff --git a/xos/synchronizer/steps/roles/build_and_run/templates/run_with_log.sh.j2 b/xos/synchronizer/steps/roles/build_and_run_5_0/templates/run_with_log.sh.j2
similarity index 100%
copy from xos/synchronizer/steps/roles/build_and_run/templates/run_with_log.sh.j2
copy to xos/synchronizer/steps/roles/build_and_run_5_0/templates/run_with_log.sh.j2
diff --git a/xos/synchronizer/steps/roles/interface_config/tasks/main.yml b/xos/synchronizer/steps/roles/interface_config_4_1/tasks/main.yml
similarity index 82%
rename from xos/synchronizer/steps/roles/interface_config/tasks/main.yml
rename to xos/synchronizer/steps/roles/interface_config_4_1/tasks/main.yml
index 78bb7b0..e8534c0 100644
--- a/xos/synchronizer/steps/roles/interface_config/tasks/main.yml
+++ b/xos/synchronizer/steps/roles/interface_config_4_1/tasks/main.yml
@@ -22,7 +22,7 @@
become: yes
template:
src=interface.cfg.j2
- dest="{{source_path}}/config/interface.cfg" owner=root group=root mode=755
+ dest="{{source_path_4_1}}/config/interface.cfg" owner=root group=root mode=755
- name: get date
shell: date +"%Y-%m-%d_%H-%M"
@@ -36,8 +36,8 @@
become: yes
template:
src=cp_config.cfg.j2
- dest="{{source_path}}/config/cp_config.cfg" owner=root group=root mode=755
+ dest="{{source_path_4_1}}/config/cp_config.cfg" owner=root group=root mode=755
- name: write flag for interface_config
become: yes
- shell: "echo 1 > {{source_path}}/cp/finish_flag_interface_config"
\ No newline at end of file
+ shell: "echo 1 > {{source_path_4_1}}/cp/finish_flag_interface_config"
\ No newline at end of file
diff --git a/xos/synchronizer/steps/roles/interface_config/templates/cp_config.cfg.j2 b/xos/synchronizer/steps/roles/interface_config_4_1/templates/cp_config.cfg.j2
similarity index 100%
rename from xos/synchronizer/steps/roles/interface_config/templates/cp_config.cfg.j2
rename to xos/synchronizer/steps/roles/interface_config_4_1/templates/cp_config.cfg.j2
diff --git a/xos/synchronizer/steps/roles/interface_config/templates/interface.cfg.j2 b/xos/synchronizer/steps/roles/interface_config_4_1/templates/interface.cfg.j2
similarity index 100%
rename from xos/synchronizer/steps/roles/interface_config/templates/interface.cfg.j2
rename to xos/synchronizer/steps/roles/interface_config_4_1/templates/interface.cfg.j2
diff --git a/xos/synchronizer/steps/roles/interface_config/tasks/main.yml b/xos/synchronizer/steps/roles/interface_config_5_0/tasks/main.yml
similarity index 82%
copy from xos/synchronizer/steps/roles/interface_config/tasks/main.yml
copy to xos/synchronizer/steps/roles/interface_config_5_0/tasks/main.yml
index 78bb7b0..f00a434 100644
--- a/xos/synchronizer/steps/roles/interface_config/tasks/main.yml
+++ b/xos/synchronizer/steps/roles/interface_config_5_0/tasks/main.yml
@@ -22,7 +22,7 @@
become: yes
template:
src=interface.cfg.j2
- dest="{{source_path}}/config/interface.cfg" owner=root group=root mode=755
+ dest="{{source_path_5_0}}/config/interface.cfg" owner=root group=root mode=755
- name: get date
shell: date +"%Y-%m-%d_%H-%M"
@@ -36,8 +36,8 @@
become: yes
template:
src=cp_config.cfg.j2
- dest="{{source_path}}/config/cp_config.cfg" owner=root group=root mode=755
+ dest="{{source_path_5_0}}/config/cp_config.cfg" owner=root group=root mode=755
- name: write flag for interface_config
become: yes
- shell: "echo 1 > {{source_path}}/cp/finish_flag_interface_config"
\ No newline at end of file
+ shell: "echo 1 > {{source_path_5_0}}/cp/finish_flag_interface_config"
\ No newline at end of file
diff --git a/xos/synchronizer/steps/roles/interface_config_5_0/templates/cp_config.cfg.j2 b/xos/synchronizer/steps/roles/interface_config_5_0/templates/cp_config.cfg.j2
new file mode 100644
index 0000000..640e43b
--- /dev/null
+++ b/xos/synchronizer/steps/roles/interface_config_5_0/templates/cp_config.cfg.j2
@@ -0,0 +1,15 @@
+NOW={{ date }}
+FILE="logs/cp_{{ date }}.log"
+#SPGW_CFG:: SGWC=01; PGWC=02; SPGWC=03
+SPGW_CFG=03
+S11_MME_IP={{ s11_mme_ip }}
+S11_SGW_IP={{ s11_sgw_ip }}
+S5S8_SGWC_IP=10.1.20.50
+S5S8_PGWC_IP=10.1.20.60
+S1U_SGW_IP={{ s1u_sgw_ip }}
+S5S8_SGWU_IP=12.1.1.93
+S5S8_PGWU_IP=14.1.1.93
+IP_POOL_IP={{ ip_addr_pool }}
+IP_POOL_MASK={{ ip_pool_mask }}
+APN=apn1
+MEMORY=1024
diff --git a/xos/synchronizer/steps/roles/interface_config_5_0/templates/interface.cfg.j2 b/xos/synchronizer/steps/roles/interface_config_5_0/templates/interface.cfg.j2
new file mode 100644
index 0000000..e922fec
--- /dev/null
+++ b/xos/synchronizer/steps/roles/interface_config_5_0/templates/interface.cfg.j2
@@ -0,0 +1,52 @@
+; Copyright (c) 2017 Intel Corporation
+;
+; 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.
+
+; scenario: {{ scenario }}
+
+[0]
+; please refer to INSTALL.MD for complete description of these parameters
+zmq_protocol = tcp
+
+; zmq publisher and subscriber ip:port. To be configured to an available ip
+; on the FPC Host. The port values are defined by the FPC Project.
+; These values are unused when DSDN_ODL_BUILD CFLAG not defined in
+; ng-core_cfg.mk
+zmq_sub_ip = {{ zmq_sub_ip }}
+zmq_sub_port = 5560
+zmq_pub_ip = {{ zmq_pub_ip }}
+zmq_pub_port = 5559
+
+; DP and CP communication ip:port: To be configured to available ip:ports on
+; the DP and CP Hosts respectively. Used for messages to communicate over UDP
+; including table creation, table entries; and when DSDN_ODL_BUILD CFLAG is NOT
+; defined, session establishment, modification, deletion, etc.
+dp_comm_ip = {{ dp_comm_ip }}
+dp_comm_port = 20
+cp_comm_ip = {{ cp_comm_ip }}
+cp_comm_port = 21
+
+; FPC ip:port: To be configured to an available IP of FPC host. The fpc_port
+; is defined by the FPC project.
+; These values are unused when DSDN_ODL_BUILD CFLAG not defined in
+; ng-core_cfg.mk
+fpc_ip = {{ fpc_ip }}
+fpc_port = 8070
+fpc_topology_port = 8181
+
+; The CP Northbound server ip:port: May be configured to any available ip:port
+; on the CP Host.
+; These values are unused when DSDN_ODL_BUILD CFLAG not defined in
+; ng-core_cfg.mk
+cp_nb_ip = {{ cp_nb_server_ip }}
+cp_nb_port = 9997
diff --git a/xos/synchronizer/steps/sync_vspgwctenant.py b/xos/synchronizer/steps/sync_vspgwctenant.py
index fd38894..715916e 100644
--- a/xos/synchronizer/steps/sync_vspgwctenant.py
+++ b/xos/synchronizer/steps/sync_vspgwctenant.py
@@ -37,25 +37,18 @@
scenario = self.get_scenario(o)
- if scenario == 'normal_scenario':
- return self.get_values_for_normal_scenario(o)
- elif scenario == 'normal_scenario_without_sdncontroller':
- return self.get_values_for_normal_scenario_wo_sdncontroller(o)
- elif scenario == 'emulator_scenario':
- return self.get_values_for_emulator_scenario(o)
- elif scenario == 'emulator_scenario_without_sdncontroller':
- return self.get_values_for_emulator_scenario_wo_sdncontroller(o)
- elif scenario == 'hardware_scenario':
- return self.get_values_for_hardware_scenario(o)
- elif scenario == 'hardware_scenario_without_sdncontroller':
- return self.get_values_for_hardware_scenario_wo_sdncontroller(o)
+ if scenario == 'cord_4_1_scenario':
+ return self.get_values_for_CORD_4_1(o)
+ elif scenario == 'cord_5_0_scenario':
+ return self.get_values_for_CORD_5_0(o)
else:
return self.get_extra_attributes_for_manual(o)
# fields for manual case
def get_extra_attributes_for_manual(self, o):
fields = {}
- fields['scenario'] = self.get_scenario(o)
+ fields['scenario'] = "manual"
+ fields['cord_version'] = "manual"
# for interface.cfg file
fields['zmq_sub_ip'] = "manual"
fields['zmq_pub_ip'] = "manual"
@@ -75,104 +68,10 @@
return fields
- def get_values_for_normal_scenario(self, o):
+ def get_values_for_CORD_4_1(self, o):
fields = {}
- fields['scenario'] = "normal_scenario"
- # for interface.cfg file
- fields['zmq_sub_ip'] = self.get_ip_address_from_peer_service_instance(
- 'sbi_network', "SDNControllerServiceInstance", o, 'zmq_sub_ip')
- fields['zmq_pub_ip'] = self.get_ip_address_from_peer_service_instance(
- 'sbi_network', "SDNControllerServiceInstance", o, 'zmq_pub_ip')
- fields['dp_comm_ip'] = self.get_ip_address_from_peer_service_instance(
- 'sbi_network', "VSPGWUTenant", o, 'dp_comm_ip')
- fields['cp_comm_ip'] = self.get_ip_address_from_peer_service_instance_instance(
- 'nbi_network', o, o, 'cp_comm_ip')
- fields['fpc_ip'] = self.get_ip_address_from_peer_service_instance(
- 'nbi_network', "SDNControllerServiceInstance", o, 'fpc_ip')
- fields['cp_nb_server_ip'] = self.get_ip_address_from_peer_service_instance_instance(
- 'nbi_network', o, o, 'cp_nb_server_ip')
-
- # for cp_config.cfg file
- fields['s11_sgw_ip'] = self.get_ip_address_from_peer_service_instance_instance(
- 's11_network', o, o, 's11_sgw_ip')
- fields['s1u_sgw_ip'] = self.get_ip_address_from_peer_service_instance(
- 's1u_network', "VSPGWUTenant", o, 's1u_sgw_ip')
- fields['s11_mme_ip'] = self.get_ip_address_from_peer_service_instance(
- 's11_network', "VMMETenant", o, 's11_mme_ip')
-
- # for rules setup in ONOS
- fields['sgi_as_ip'] = self.get_ip_address_from_peer_service_instance(
- 'sgi_network', "VENBServiceInstance", o, 'sgi_as_ip')
- fields['sgi_spgwu_ip'] = self.get_ip_address_from_peer_service_instance(
- 'sgi_network', "VSPGWUTenant", o, 'sgi_spgwu_ip')
-
- return fields
-
- def get_values_for_normal_scenario_wo_sdncontroller(self, o):
- fields = {}
- fields['scenario'] = "normal_scenario_without_sdncontroller"
- # for interface.cfg file
- fields['zmq_sub_ip'] = "127.0.0.1"
- fields['zmq_pub_ip'] = "127.0.0.1"
- fields['dp_comm_ip'] = self.get_ip_address_from_peer_service_instance(
- 'spgw_network', "VSPGWUTenant", o, 'dp_comm_ip')
- fields['cp_comm_ip'] = self.get_ip_address_from_peer_service_instance_instance(
- 'spgw_network', o, o, 'cp_comm_ip')
- fields['fpc_ip'] = "127.0.0.1"
- fields['cp_nb_server_ip'] = "127.0.0.1"
-
- # for cp_config.cfg file
- fields['s11_sgw_ip'] = self.get_ip_address_from_peer_service_instance_instance(
- 's11_network', o, o, 's11_sgw_ip')
- fields['s1u_sgw_ip'] = self.get_ip_address_from_peer_service_instance(
- 's1u_network', "VSPGWUTenant", o, 's1u_sgw_ip')
- fields['s11_mme_ip'] = self.get_ip_address_from_peer_service_instance(
- 's11_network', "VMMETenant", o, 's11_mme_ip')
-
- # for rules setup in ONOS
- fields['sgi_as_ip'] = self.get_ip_address_from_peer_service_instance(
- 'sgi_network', "VENBServiceInstance", o, 'sgi_as_ip')
- fields['sgi_spgwu_ip'] = self.get_ip_address_from_peer_service_instance(
- 'sgi_network', "VSPGWUTenant", o, 'sgi_spgwu_ip')
-
- return fields
-
- def get_values_for_emulator_scenario(self, o):
- fields = {}
- fields['scenario'] = "emulator_scenario"
- # for interface.cfg file
- fields['zmq_sub_ip'] = self.get_ip_address_from_peer_service_instance(
- 'sbi_network', "SDNControllerServiceInstance", o, 'zmq_sub_ip')
- fields['zmq_pub_ip'] = self.get_ip_address_from_peer_service_instance(
- 'sbi_network', "SDNControllerServiceInstance", o, 'zmq_pub_ip')
- fields['dp_comm_ip'] = self.get_ip_address_from_peer_service_instance(
- 'sbi_network', "VSPGWUTenant", o, 'dp_comm_ip')
- fields['cp_comm_ip'] = self.get_ip_address_from_peer_service_instance_instance(
- 'nbi_network', o, o, 'cp_comm_ip')
- fields['fpc_ip'] = self.get_ip_address_from_peer_service_instance(
- 'nbi_network', "SDNControllerServiceInstance", o, 'fpc_ip')
- fields['cp_nb_server_ip'] = self.get_ip_address_from_peer_service_instance_instance(
- 'nbi_network', o, o, 'cp_nb_server_ip')
-
- # for cp_config.cfg file
- fields['s11_sgw_ip'] = self.get_ip_address_from_peer_service_instance_instance(
- 's11_network', o, o, 's11_sgw_ip')
- fields['s1u_sgw_ip'] = self.get_ip_address_from_peer_service_instance(
- 's1u_network', "VSPGWUTenant", o, 's1u_sgw_ip')
- fields['s11_mme_ip'] = self.get_ip_address_from_peer_service_instance(
- 's11_network', "VENBServiceInstance", o, 's11_mme_ip')
-
- # for rules setup in ONOS
- fields['sgi_as_ip'] = self.get_ip_address_from_peer_service_instance(
- 'sgi_network', "VENBServiceInstance", o, 'sgi_as_ip')
- fields['sgi_spgwu_ip'] = self.get_ip_address_from_peer_service_instance(
- 'sgi_network', "VSPGWUTenant", o, 'sgi_spgwu_ip')
-
- return fields
-
- def get_values_for_emulator_scenario_wo_sdncontroller(self, o):
- fields = {}
- fields['scenario'] = "emulator_scenario_without_sdncontroller"
+ fields['cord_version'] = "4.1"
+ fields['scenario'] = "cord_4_1_scenario"
# for interface.cfg file
fields['zmq_sub_ip'] = "127.0.0.1"
fields['zmq_pub_ip'] = "127.0.0.1"
@@ -199,42 +98,10 @@
return fields
- def get_values_for_hardware_scenario(self, o):
+ def get_values_for_CORD_5_0(self, o):
fields = {}
- fields['scenario'] = "hardware_scenario"
-
- # for interface.cfg file
- fields['zmq_sub_ip'] = self.get_ip_address_from_peer_service_instance(
- 'sbi_network', "SDNControllerServiceInstance", o, 'zmq_sub_ip')
- fields['zmq_pub_ip'] = self.get_ip_address_from_peer_service_instance(
- 'sbi_network', "SDNControllerServiceInstance", o, 'zmq_pub_ip')
- fields['dp_comm_ip'] = self.get_ip_address_from_peer_service_instance(
- 'sbi_network', "VSPGWUTenant", o, 'dp_comm_ip')
- fields['cp_comm_ip'] = self.get_ip_address_from_peer_service_instance_instance(
- 'nbi_network', o, o, 'cp_comm_ip')
- fields['fpc_ip'] = self.get_ip_address_from_peer_service_instance(
- 'nbi_network', "SDNControllerServiceInstance", o, 'fpc_ip')
- fields['cp_nb_server_ip'] = self.get_ip_address_from_peer_service_instance_instance(
- 'nbi_network', o, o, 'cp_nb_server_ip')
-
- # for cp_config.cfg file
- fields['s11_sgw_ip'] = self.get_ip_address_from_peer_service_instance_instance(
- 's11_network', o, o, 's11_sgw_ip')
- fields['s1u_sgw_ip'] = self.get_ip_address_from_peer_service_instance(
- 'flat_network_s1u', "VSPGWUTenant", o, 's1u_sgw_ip')
- fields['s11_mme_ip'] = self.get_ip_address_from_peer_service_instance(
- 's11_network', "VMMETenant", o, 's11_mme_ip')
-
- # for rules setup in ONOS
- fields['sgi_as_ip'] = "manual"
- fields['sgi_spgwu_ip'] = self.get_ip_address_from_peer_service_instance(
- 'sgi_network', "VSPGWUTenant", o, 'sgi_spgwu_ip')
-
- return fields
-
- def get_values_for_hardware_scenario_wo_sdncontroller(self, o):
- fields = {}
- fields['scenario'] = "hardware_scenario_without_sdncontroller"
+ fields['cord_version'] = "5.0"
+ fields['scenario'] = "cord_5_0_scenario"
# for interface.cfg file
fields['zmq_sub_ip'] = "127.0.0.1"
@@ -250,12 +117,17 @@
fields['s11_sgw_ip'] = self.get_ip_address_from_peer_service_instance_instance(
's11_network', o, o, 's11_sgw_ip')
fields['s1u_sgw_ip'] = self.get_ip_address_from_peer_service_instance(
- 'flat_network_s1u', "VSPGWUTenant", o, 's1u_sgw_ip')
+ 's1u_network', "VSPGWUTenant", o, 's1u_sgw_ip')
fields['s11_mme_ip'] = self.get_ip_address_from_peer_service_instance(
's11_network', "VMMETenant", o, 's11_mme_ip')
# for rules setup in ONOS
- fields['sgi_as_ip'] = "manual"
+ internetemulator_flag = self.has_instance("InternetEmulatorServiceInstance", o)
+ if (internetemulator_flag):
+ fields['sgi_as_ip'] = self.get_ip_address_from_peer_service_instance(
+ 'sgi_network', "InternetEmulatorServiceInstance", o, 'sgi_as_ip')
+ else:
+ fields['sgi_as_ip'] = o.appserver_ip_addr
fields['sgi_spgwu_ip'] = self.get_ip_address_from_peer_service_instance(
'sgi_network', "VSPGWUTenant", o, 'sgi_spgwu_ip')
@@ -269,26 +141,27 @@
"SDNControllerServiceInstance", o)
vspgwu_flag = self.has_instance("VSPGWUTenant", o)
internetemulator_flag = self.has_instance(
- "SDNControllerServiceInstance", o)
+ "InternetEmulatorServiceInstance", o)
+ vhss_flag = self.has_instance("VHSSTenant", o)
+ hssdb_flag = self.has_instance("HSSDBServiceInstance", o)
- if vmme_flag and venb_flag and sdncontroller_flag and vspgwu_flag and internetemulator_flag:
- return 'normal_scenario'
+ if (o.blueprint == "build") or (o.blueprint == "MCORD 4.1"):
+ if not venb_flag:
+ self.defer_sync(o, "Waiting for eNB image to become available")
+ if not vspgwu_flag:
+ self.defer_sync(o, "Waiting for SPGWU image to become available")
+ return 'cord_4_1_scenario'
- if vmme_flag and venb_flag and (not sdncontroller_flag) and vspgwu_flag and internetemulator_flag:
- return 'normal_scenario_without_sdncontroller'
-
- if (not vmme_flag) and venb_flag and sdncontroller_flag and vspgwu_flag and (not internetemulator_flag):
- return 'emulator_scenario'
-
- if (not vmme_flag) and venb_flag and (not sdncontroller_flag) and vspgwu_flag and (
- not internetemulator_flag):
- return 'emulator_scenario_without_sdncontroller'
-
- if vmme_flag and sdncontroller_flag and vspgwu_flag and (not internetemulator_flag):
- return 'hardware_scenario'
-
- if vmme_flag and (not sdncontroller_flag) and vspgwu_flag and (not internetemulator_flag):
- return 'hardware_scenario_without_sdncontroller'
+ if (o.blueprint == "mcord_5") or (o.blueprint == "MCORD 5"):
+ if not hssdb_flag:
+ self.defer_sync(o, "Waiting for HSS_DB image to become available")
+ if not vhss_flag:
+ self.defer_sync(o, "Waiting for vHSS image to become available")
+ if not vmme_flag:
+ self.defer_sync(o, "Waiting for vMME image to become available")
+ if not vspgwu_flag:
+ self.defer_sync(o, "Waiting for vSPGWU image to become available")
+ return 'cord_5_0_scenario'
return 'manual'
diff --git a/xos/synchronizer/steps/vspgwctenant_playbook.yaml b/xos/synchronizer/steps/vspgwctenant_playbook.yaml
index fc42ef6..2beb699 100644
--- a/xos/synchronizer/steps/vspgwctenant_playbook.yaml
+++ b/xos/synchronizer/steps/vspgwctenant_playbook.yaml
@@ -21,7 +21,8 @@
become_user: root
become_method: sudo
vars:
- - source_path: /root/ngic
+ - source_path_4_1: /root/ngic
+ - source_path_5_0: /home/ngic/ngic
- zmq_sub_ip: {{ zmq_sub_ip }}
- zmq_pub_ip: {{ zmq_pub_ip }}
- dp_comm_ip: {{ dp_comm_ip }}
@@ -38,24 +39,15 @@
- ip_addr_pool: "16.0.0.0"
- ip_pool_mask: "255.0.0.0"
- ip_pool_mask_int: "8"
+ - cord_version: {{ cord_version }}
roles:
- - interface_config
- - build_and_run
+ - { role: interface_config_4_1, when: cord_version == "4.1" }
+ - { role: build_and_run_4_1, when: cord_version == "4.1" }
+ - { role: interface_config_5_0, when: cord_version == "5.0" }
+ - { role: build_and_run_5_0, when: cord_version == "5.0" }
- hosts: localhost
vars:
- - source_path: /root/ngic
- - zmq_sub_ip: {{ zmq_sub_ip }}
- - zmq_pub_ip: {{ zmq_pub_ip }}
- - dp_comm_ip: {{ dp_comm_ip }}
- - cp_comm_ip: {{ cp_comm_ip }}
- - fpc_ip: {{ fpc_ip }}
- - cp_nb_server_ip: {{ cp_nb_server_ip }}
- - s11_sgw_ip: {{ s11_sgw_ip }}
- - s11_mme_ip: {{ s11_mme_ip }}
- - s1u_sgw_ip: {{ s1u_sgw_ip }}
- - scenario: {{ scenario }}
- - cpu_hexacode: "0x0e"
- sgi_as_ip: {{ sgi_as_ip }}
- sgi_spgwu_ip: {{ sgi_spgwu_ip }}
- ip_addr_pool: "16.0.0.0"