Esempio n. 1
0
 def does_traffic_flow(self, delay_time):
     time.sleep(delay_time)
     if self.traffic_started:
         for dest_addr in self.dest_addr_list:
             if not ping(dest_addr):
                 return False
         return True
     else:
         return False
Esempio n. 2
0
 def step8(self):
     # --------------------------------------------------------------------------------------------------------------
     # 8. Verify that the remaining VNF instance(s) are still running and reachable via their management network
     # --------------------------------------------------------------------------------------------------------------
     LOG.info(
         'Verifying that the remaining VNF instance(s) are still running and reachable via their management '
         'network')
     for vnf_info in self.ns_info_after_scale_in.vnf_info:
         mgmt_addr_list = self.mano.get_vnf_mgmt_addr_list(
             vnf_info.vnf_instance_id)
         for mgmt_addr in mgmt_addr_list:
             if not ping(mgmt_addr):
                 raise TestRunError(
                     'Unable to PING IP address %s belonging to %s' %
                     (mgmt_addr, vnf_info.vnf_product_name))
 def step6(self):
     # --------------------------------------------------------------------------------------------------------------
     # 6. Verify that the additional VNFC instance(s) are running and reachable via the management network
     # --------------------------------------------------------------------------------------------------------------
     LOG.info(
         'Verifying that the additional VNFC instance(s) are running and reachable via the management network'
     )
     for vnf_info in self.ns_info_after_scale_out.vnf_info:
         mgmt_addr_list = self.mano.get_vnf_mgmt_addr_list(
             vnf_info.vnf_instance_id,
             self.tc_input['mano'].get('query_params'))
         for mgmt_addr in mgmt_addr_list:
             if not ping(mgmt_addr):
                 raise TestRunError(
                     'Unable to PING IP address %s belonging to VNF %s' %
                     (mgmt_addr, vnf_info.vnf_product_name))
Esempio n. 4
0
 def step8(self):
     # --------------------------------------------------------------------------------------------------------------
     # 8. Verify that the VNF instance(s) in the nesting NS are running and reachable via the management network
     # --------------------------------------------------------------------------------------------------------------
     LOG.info(
         'Verifying that the VNF instance(s) in the nesting NS are running and reachable via the management'
         ' network')
     for vnf_info in self.ns_info_nesting_after_instantiation.vnf_info:
         mgmt_addr_list = self.mano.get_vnf_mgmt_addr_list(
             vnf_info.vnf_instance_id,
             self.tc_input['mano'].get('query_params'))
         for mgmt_addr in mgmt_addr_list:
             if not ping(mgmt_addr):
                 raise TestRunError(
                     'Unable to PING IP address %s belonging to the nesting NS VNF %s'
                     % (mgmt_addr, vnf_info.vnf_product_name))
Esempio n. 5
0
 def step7(self):
     # --------------------------------------------------------------------------------------------------------------
     # 7. Verify that VNF instance(s) inside the nested NS are still running and reachable through the management
     #    network
     # --------------------------------------------------------------------------------------------------------------
     LOG.info(
         'Verifying that VNF instance(s) inside the nested NS are still running and reachable through the '
         'management network')
     for vnf_info in self.ns_info_nested_after_instantiation.vnf_info:
         mgmt_addr_list = self.mano.get_vnf_mgmt_addr_list(
             vnf_info.vnf_instance_id,
             self.nested_ns_params.get('query_params'))
         for mgmt_addr in mgmt_addr_list:
             if not ping(mgmt_addr):
                 raise TestRunError(
                     'Unable to PING IP address %s belonging to nested NS VNF %s'
                     % (mgmt_addr, vnf_info.vnf_product_name))
 def step5(self):
     # --------------------------------------------------------------------------------------------------------------
     # 5. Verify that the impacted VNF instance(s) are running and reachable through the management network
     # --------------------------------------------------------------------------------------------------------------
     LOG.info(
         'Verifying that the impacted VNF instance(s) are running and reachable through the management network'
     )
     self.ns_info_after_update = self.mano.ns_query(
         query_filter={
             'ns_instance_id': self.ns_instance_id,
             'additional_param': self.tc_input['mano'].get('query_params')
         })
     for vnf_info in self.ns_info_after_update.vnf_info:
         mgmt_addr_list = self.mano.get_vnf_mgmt_addr_list(
             vnf_info.vnf_instance_id,
             self.tc_input['mano'].get('query_params'))
         for mgmt_addr in mgmt_addr_list:
             if not ping(mgmt_addr):
                 raise TestRunError(
                     'Unable to PING IP address %s belonging to VNF %s' %
                     (mgmt_addr, vnf_info.vnf_product_name))
Esempio n. 7
0
 def any_traffic_loss(self, delay_time, tolerance):
     for dest_addr in self.dest_addr_list:
         if not ping(dest_addr):
             return True
     return False