aboutsummaryrefslogtreecommitdiffstats
path: root/samples/vnf_samples/nsut/prox/configs
AgeCommit message (Expand)AuthorFilesLines
2018-06-07Fix latency in l2 and l3 PROX generator config filesXavier Simonart4-20/+85
2018-05-09Fix Prox L2fwd generator packetAbhijit Sinha2-12/+7
2018-03-15NSB PROX L3FWD Dropping packetsDanielMartinBuckley6-91/+197
2018-02-28Addition of storage of extra counters for GrafanaDanielMartinBuckley2-8/+18
2017-11-14NSB Prox BM test case fixes for scale upAbhijit Sinha4-204/+46
2017-11-09Merge "NSB Prox LW_AFTR Test"Ross Brattain3-0/+65934
2017-11-07Fixed incorrect Copyright NoticeDanielMartinBuckley1-27/+10
2017-11-07NSB Prox LW_AFTR TestDanielMartinBuckley3-0/+65934
2017-10-11Bug in NSB Prox ACL Test 4 PortDanielMartinBuckley1-1/+1
2017-10-06NSB Prox vPE TestAbhijit Sinha7-0/+4764
2017-10-02Prox L3FWD 2-port test fixAbhijit Sinha1-5/+0
2017-09-28Addition of Prox NSB BNG and BNG-QoS testAbhijit Sinha6-0/+66380
2017-09-20Addition of PROX NSB tests to yardstickDanielMartinBuckley11-72/+794
2017-09-06Addition of Prox NSB tests in yardstickAbhijit Sinha7-0/+532
2017-09-04Addition of Prox NSB changes in yardstickabhijitsinha12-0/+1030
2017-08-14PROX VNF and TGRoss Brattain9-0/+33529
class="nn">lxml import etree from dha_adapters.libvirt_adapter import LibvirtAdapter from common import ( exec_cmd, log, delete, ) class ExecutionEnvironment(object): def __init__(self, storage_dir, dha_file, root_dir): self.storage_dir = storage_dir self.dha = LibvirtAdapter(dha_file) self.root_dir = root_dir self.parser = etree.XMLParser(remove_blank_text=True) self.fuel_node_id = self.dha.get_fuel_node_id() def delete_vm(self, node_id): vm_name = self.dha.get_node_property(node_id, 'libvirtName') r, c = exec_cmd('virsh dumpxml %s' % vm_name, False) if c: return self.undefine_vm_delete_disk(r, vm_name) def undefine_vm_delete_disk(self, printout, vm_name): disk_files = [] xml_dump = etree.fromstring(printout, self.parser) disks = xml_dump.xpath('/domain/devices/disk') for disk in disks: sources = disk.xpath('source') for source in sources: source_file = source.get('file') if source_file: disk_files.append(source_file) log('Deleting VM %s with disks %s' % (vm_name, disk_files)) exec_cmd('virsh destroy %s' % vm_name, False) exec_cmd('virsh undefine %s' % vm_name, False) for file in disk_files: delete(file) def define_vm(self, vm_name, temp_vm_file, disk_path): log('Creating VM %s with disks %s' % (vm_name, disk_path)) with open(temp_vm_file) as f: vm_xml = etree.parse(f) names = vm_xml.xpath('/domain/name') for name in names: name.text = vm_name uuids = vm_xml.xpath('/domain/uuid') for uuid in uuids: uuid.getparent().remove(uuid) disks = vm_xml.xpath('/domain/devices/disk') for disk in disks: if (disk.get('type') == 'file' and disk.get('device') == 'disk'): sources = disk.xpath('source') for source in sources: disk.remove(source) source = etree.Element('source') source.set('file', disk_path) disk.append(source) with open(temp_vm_file, 'w') as f: vm_xml.write(f, pretty_print=True, xml_declaration=True) exec_cmd('virsh define %s' % temp_vm_file)