<commit_before># -*- coding: UTF-8 -*-

from __future__ import unicode_literals
from behave import step

@step('Create Core-5.3 box on system broker')
def create_box_on_system_broker(context):
    context.execute_steps("""
        * Wait for "virt-install -q -r 128 --name Core-5.3 --nodisks --cdrom /tmp/Core-5.3.iso --os-type linux --accelerate --connect qemu:///system --wait 0" end
        * Wait for "sleep 10" end
        """)

@step('Import Core-5.3 box on system broker')
def import_box_on_system_broker(context):
    context.execute_steps("""
        * Wait for "virt-install -q -r 128 --name Core-5.3 --import --disk /tmp/Core-5.3.qcow2 --os-type linux --accelerate --connect qemu:///system --wait 0" end
        * Wait for "sleep 10" end
        """)

@step('Connect to system broker')
def connect_to_filled_system_broker(context):
    context.execute_steps("""
        * Create new box from url "qemu:///system"
        * Wait for "sleep 1" end
        * Press "Create"
        * Save IP for machine "Core-5.3"
        """)

@step('Connect to empty system broker')
def connect_to_empty_system_broker(context):
    context.execute_steps("""
        * Create new box from url "qemu:///system"
        * Wait for "sleep 2" end
        * Press "Create"
        """)<commit_msg>tests: Step to import multiple VMs to system broker<commit_after># -*- coding: UTF-8 -*-

from __future__ import unicode_literals
from behave import step

@step('Create Core-5.3 box on system broker')
def create_box_on_system_broker(context):
    context.execute_steps("""
        * Wait for "virt-install -q -r 128 --name Core-5.3 --nodisks --cdrom /tmp/Core-5.3.iso --os-type linux --accelerate --connect qemu:///system --wait 0" end
        * Wait for "sleep 10" end
        """)

@step('Import Core-5.3 box on system broker as "{name}"')
def import_box_on_system_broker(context, name):
    if name != 'Core-5.3':
        context.execute_steps("""
                              * Wait for "cp /tmp/Core-5.3.qcow2 /tmp/%s.qcow2" end
                              """ % name)

    context.execute_steps("""
        * Wait for "virt-install -q -r 128 --name %s --import --disk /tmp/%s.qcow2 --os-type linux --accelerate --connect qemu:///system --wait 0" end
        * Wait for "sleep 10" end
        """ % (name, name))

@step('Import Core-5.3 box on system broker')
def import_box_on_system_broker(context):
    context.execute_steps("""
        * Import Core-5.3 box on system broker as "Core-5.3"
        """)

@step('Connect to system broker')
def connect_to_filled_system_broker(context):
    context.execute_steps("""
        * Create new box from url "qemu:///system"
        * Wait for "sleep 1" end
        * Press "Create"
        * Save IP for machine "Core-5.3"
        """)

@step('Connect to empty system broker')
def connect_to_empty_system_broker(context):
    context.execute_steps("""
        * Create new box from url "qemu:///system"
        * Wait for "sleep 2" end
        * Press "Create"
        """)
{'fraction_non_alphanumeric': 0.14385382059800664, 'fraction_numerical': 0.022591362126245847, 'mean_word_length': 2.456946039035591, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4094981', 'n_tokens_mistral': 1003, 'n_tokens_neox': 959, 'n_words': 287}