<commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4

# Copyright (c) 2011 University of Southern California
#
#    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.
#
"""
A connection to a hypervisor through baremetal.

**Related Flags**

:baremetal_type:  Baremetal domain type.
:baremetal_uri:  Override for the default baremetal URI (baremetal_type).
:rescue_image_id:  Rescue ami image (default: ami-rescue).
:rescue_kernel_id:  Rescue aki image (default: aki-rescue).
:rescue_ramdisk_id:  Rescue ari image (default: ari-rescue).
:injected_network_template:  Template file for injected network
:allow_project_net_traffic:  Whether to allow in project network traffic

"""

import hashlib
import multiprocessing
import os
import random
import shutil
import subprocess
import sys
import tempfile
import time
import uuid

from eventlet import greenthread
from eventlet import tpool

from nova import context as nova_context
from nova import db
from nova import exception
from nova import flags
from nova import ipv6
from nova import log as logging
from nova import utils
from nova import vnc
from nova.auth import manager
from nova.compute import instance_types
from nova.compute import power_state
from nova.compute import vm_states
from nova.virt import disk
from nova.virt import driver
from nova.virt import images
from nova.virt.libvirt import netutils
from nova.virt.baremetal import nodes
from nova.virt.baremetal import dom
from nova.virt.libvirt import utils as libvirt_utils


Template = None

LOG = logging.getLogger('nova.virt.baremetal.proxy')

FLAGS = flags.FLAGS
flags.DEFINE_string('baremetal_injected_network_template',
                    utils.abspath('virt/interfaces.template'),
                    'Template file for injected network')
flags.DEFINE_string('baremetal_type',
                    'baremetal',
                    'baremetal domain type')
flags.DEFINE_string('baremetal_uri',
                    '',
                    'Override the default baremetal URI')
flags.DEFINE_bool('baremetal_allow_project_net_traffic',
                  True,<commit_msg>netutils location has been changed.<commit_after># vim: tabstop=4 shiftwidth=4 softtabstop=4

# Copyright (c) 2011 University of Southern California
#
#    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.
#
"""
A connection to a hypervisor through baremetal.

**Related Flags**

:baremetal_type:  Baremetal domain type.
:baremetal_uri:  Override for the default baremetal URI (baremetal_type).
:rescue_image_id:  Rescue ami image (default: ami-rescue).
:rescue_kernel_id:  Rescue aki image (default: aki-rescue).
:rescue_ramdisk_id:  Rescue ari image (default: ari-rescue).
:injected_network_template:  Template file for injected network
:allow_project_net_traffic:  Whether to allow in project network traffic

"""

import hashlib
import multiprocessing
import os
import random
import shutil
import subprocess
import sys
import tempfile
import time
import uuid

from eventlet import greenthread
from eventlet import tpool

from nova import context as nova_context
from nova import db
from nova import exception
from nova import flags
from nova import ipv6
from nova import log as logging
from nova import utils
from nova import vnc
from nova.auth import manager
from nova.compute import instance_types
from nova.compute import power_state
from nova.compute import vm_states
from nova.virt import disk
from nova.virt import driver
from nova.virt import images
from nova.virt import netutils
from nova.virt.baremetal import nodes
from nova.virt.baremetal import dom
from nova.virt.libvirt import utils as libvirt_utils


Template = None

LOG = logging.getLogger('nova.virt.baremetal.proxy')

FLAGS = flags.FLAGS
flags.DEFINE_string('baremetal_injected_network_template',
                    utils.abspath('virt/interfaces.template'),
                    'Template file for injected network')
flags.DEFINE_string('baremetal_type',
                    'baremetal',
                    'baremetal domain type')
flags.DEFINE_string('baremetal_uri',
                    '',
                    'Override the default baremetal URI')
flags.DEFINE_bool('baremetal_allow_project_net_traffic',
                  True,
{'fraction_non_alphanumeric': 0.06228505922812381, 'fraction_numerical': 0.0045854031333588076, 'mean_word_length': 3.878844361602982, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1180923', 'n_tokens_mistral': 1537, 'n_tokens_neox': 1446, 'n_words': 561}