Esempio n. 1
0
 def test_load_config(self):
     reservation_ports = get_reservation_resources(self.session, self.context.reservation.reservation_id,
                                                   'Generic Traffic Generator Port',
                                                   'PerfectStorm Chassis Shell 2G.GenericTrafficGeneratorPort',
                                                   'Ixia Chassis Shell 2G.GenericTrafficGeneratorPort')
     set_family_attribute(self.session, reservation_ports[0], 'Logical Name', 'Traffic1@Network1')
     set_family_attribute(self.session, reservation_ports[1], 'Logical Name', 'Traffic2@Network2')
     self.driver.load_config(self.context, 'E:/workspace/python/PyIxLoad/ixload/test/configs/test_config_840.rxf')
 def _load_config(self, config):
     reservation_ports = get_reservation_resources(self.session, self.context.reservation.reservation_id,
                                                   'Generic Traffic Generator Port',
                                                   'PerfectStorm Chassis Shell 2G.GenericTrafficGeneratorPort',
                                                   'Ixia Chassis Shell 2G.GenericTrafficGeneratorPort')
     set_family_attribute(self.session, reservation_ports[0], 'Logical Name', 'Traffic1@Network1')
     set_family_attribute(self.session, reservation_ports[1], 'Logical Name', 'Traffic2@Network2')
     self.session.ExecuteCommand(self.context.reservation.reservation_id, 'IxLoad Controller', 'Service',
                                 'load_config', [InputNameValue('ixl_config_file_name', config)])
 def test_load_config(self):
     self.reservation_ports = get_reservation_resources(
         self.session, self.context.reservation.reservation_id,
         'Xena Chassis Shell 2G.GenericTrafficGeneratorPort')
     set_family_attribute(self.session, self.reservation_ports[0],
                          'Logical Name', 'test_config')
     set_family_attribute(self.session, self.reservation_ports[1],
                          'Logical Name', 'test_config')
     self.driver.load_config(self.context, os.path.dirname(__file__))
Esempio n. 4
0
 def test_load_config(self):
     self.reservation_ports = get_reservation_resources(
         self.session, self.context.reservation.reservation_id,
         'Xena Chassis Shell 2G.GenericTrafficGeneratorPort')
     set_family_attribute(self.session, self.reservation_ports[0],
                          'Logical Name', 'test_config')
     set_family_attribute(self.session, self.reservation_ports[1],
                          'Logical Name', 'test_config')
     self._exec_command(
         'load_config',
         InputNameValue('xena_configs_folder', path.dirname(__file__)))
 def _load_config(self, config, ports):
     reservation_ports = get_reservation_resources(
         self.session, self.context.reservation.reservation_id,
         'Traffic Generator Test IP')
     for index, name in ports.items():
         set_family_attribute(self.session, reservation_ports[index],
                              'Logical Name', name)
     self.session.ExecuteCommand(self.context.reservation.reservation_id,
                                 'IxChariot Controller', 'Service',
                                 'load_config',
                                 [InputNameValue('ixc_config', config)])
 def test_load_config(self):
     reservation_ports = get_reservation_resources(
         self.session, self.context.reservation.reservation_id,
         'Generic Traffic Generator Port',
         'PerfectStorm Chassis Shell 2G.GenericTrafficGeneratorPort',
         'Ixia Chassis Shell 2G.GenericTrafficGeneratorPort')
     set_family_attribute(self.session, reservation_ports[0],
                          'Logical Name', 'Port 1')
     set_family_attribute(self.session, reservation_ports[1],
                          'Logical Name', 'Port 2')
     self.driver.load_config(self.context,
                             path.join(path.dirname(__file__), config))
Esempio n. 7
0
 def _load_config(self, config):
     reservation_ports = get_reservation_resources(
         self.session, self.context.reservation.reservation_id,
         'Generic Traffic Generator Port',
         'STC Chassis Shell 2G.GenericTrafficGeneratorPort')
     set_family_attribute(self.session, reservation_ports[0],
                          'Logical Name', 'Client 1')
     set_family_attribute(self.session, reservation_ports[1],
                          'Logical Name', 'Server 1')
     self.session.ExecuteCommand(
         self.context.reservation.reservation_id, 'Avalanche Controller',
         'Service', 'load_config',
         [InputNameValue('avl_config_file_name', config)])
 def test_run_sequencer(self):
     reservation_ports = get_reservation_resources(
         self.session, self.context.reservation.reservation_id,
         'Generic Traffic Generator Port',
         'PerfectStorm Chassis Shell 2G.GenericTrafficGeneratorPort',
         'STC Chassis Shell 2G.GenericTrafficGeneratorPort')
     set_family_attribute(self.session, reservation_ports[0],
                          'Logical Name', 'Port 1')
     set_family_attribute(self.session, reservation_ports[1],
                          'Logical Name', 'Port 2')
     self.driver.load_config(
         self.context,
         path.join(path.dirname(__file__), 'test_sequencer.tcc'))
     self.driver.sequencer_command(self.context, 'Start')
     self.driver.sequencer_command(self.context, 'Wait')
Esempio n. 9
0
 def negative_tests(self):
     test_config = os.path.dirname(__file__).replace('\\', '/') + '/test_config.rxf'
     reservation_ports = get_reservation_resources(self.session, self.context.reservation.reservation_id,
                                                   'Generic Traffic Generator Port'
                                                   'PerfectStorm Chassis Shell 2G.GenericTrafficGeneratorPort',
                                                   'Ixia Chassis Shell 2G.GenericTrafficGeneratorPort')
     assert(len(reservation_ports) == 2)
     set_family_attribute(self.session, reservation_ports[0], 'Logical Name', 'Traffic1@Network1')
     set_family_attribute(self.session, reservation_ports[1], 'Logical Name', '')
     self.assertRaises(Exception, self.driver.load_config, self.context, test_config)
     set_family_attribute(self.session, reservation_ports[1], 'Logical Name', 'Traffic1@Network1')
     self.assertRaises(Exception, self.driver.load_config, self.context, test_config)
     set_family_attribute(self.session, reservation_ports[1], 'Logical Name', 'Port x')
     self.assertRaises(Exception, self.driver.load_config, self.context, test_config)
     # cleanup
     set_family_attribute(self.session, reservation_ports[1], 'Logical Name', 'Traffic2@Network2')
 def negative_tests(self):
     reservation_ports = get_reservation_resources(
         self.session, self.context.reservation.reservation_id,
         'Generic Traffic Generator Port',
         'PerfectStorm Chassis Shell 2G.GenericTrafficGeneratorPort',
         'Ixia Chassis Shell 2G.GenericTrafficGeneratorPort')
     assert (len(reservation_ports) == 2)
     set_family_attribute(self.session, reservation_ports[0],
                          'Logical Name', 'Port 1')
     set_family_attribute(self.session, reservation_ports[1],
                          'Logical Name', '')
     self.assertRaises(Exception, self.driver.load_config, self.context,
                       path.join(path.dirname(__file__), config))
     set_family_attribute(self.session, reservation_ports[1],
                          'Logical Name', 'Port 1')
     self.assertRaises(Exception, self.driver.load_config, self.context,
                       path.join(path.dirname(__file__), config))
     set_family_attribute(self.session, reservation_ports[1],
                          'Logical Name', 'Port x')
     self.assertRaises(Exception, self.driver.load_config, self.context,
                       path.join(path.dirname(__file__), config))
     # cleanup
     set_family_attribute(self.session, reservation_ports[1],
                          'Logical Name', 'Port 2')
 def _load_config(self, config_name, scenario):
     config_file = path.join(path.dirname(__file__),
                             '{}.bbp'.format(config_name))
     reservation_ports = get_reservation_resources(
         self.session, self.context.reservation.reservation_id,
         'ByteBlower Chassis Shell 2G.GenericTrafficGeneratorPort',
         'ByteBlower Chassis Shell 2G.ByteBlowerEndPoint')
     set_family_attribute(self.session, reservation_ports[0],
                          'Logical Name', 'WAN_PORT')
     set_family_attribute(self.session, reservation_ports[1],
                          'Logical Name', 'PORT_45')
     set_family_attribute(self.session, reservation_ports[2],
                          'Logical Name', 'PC1x2G')
     self.driver.load_config(self.context, config_file, scenario)
Esempio n. 12
0
 def _load_config(self, config_name, scenario):
     config_file = path.join(path.dirname(__file__),
                             '{}.bbp'.format(config_name))
     reservation_ports = get_reservation_resources(
         self.session, self.context.reservation.reservation_id,
         'ByteBlower Chassis Shell 2G.GenericTrafficGeneratorPort',
         'ByteBlower Chassis Shell 2G.ByteBlowerEndPoint')
     set_family_attribute(self.session, reservation_ports[0],
                          'Logical Name', 'WAN_PORT')
     set_family_attribute(self.session, reservation_ports[1],
                          'Logical Name', 'PORT_45')
     set_family_attribute(self.session, reservation_ports[2],
                          'Logical Name', 'PC1x2G')
     self.session.ExecuteCommand(
         self.context.reservation.reservation_id, namespace, 'Service',
         'load_config', [
             InputNameValue('config_file_location', config_file),
             InputNameValue('scenario', scenario)
         ])