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

#
#    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.

from oslo.config import cfg

cfg.CONF.import_opt('instance_user', 'heat.common.config')

from heat.common import exception
from heat.engine import clients
from heat.engine import scheduler
from heat.engine.resources import nova_utils
from heat.engine import resource
from heat.openstack.common.gettextutils import _
from heat.openstack.common import log as logging
from heat.openstack.common import uuidutils

logger = logging.getLogger(__name__)


class Server(resource.Resource):

    block_mapping_schema = {
        'device_name': {
            'Type': 'String',
            'Required': True,
            'Description': _('A device name where the volume will be '
                             'attached in the system at /dev/device_name. '
                             'This value is typically vda.')},
        'volume_id': {
            'Type': 'String',
            'Description': _('The ID of the volume to boot from. Only one of '
                             'volume_id or snapshot_id should be provided.')},
        'snapshot_id': {
            'Type': 'String',
            'Description': _('The ID of the snapshot to create a volume '
                             'from.')},
        'volume_size': {
            'Type': 'String',
            'Description': _('The size of the volume, in GB. It is safe to '
                             'leave this blank and have the Compute service '
                             'infer the size.')},
        'delete_on_termination': {
            'Type': 'Boolean',
            'Description': _('Indicate whether the volume should be deleted '
                             'when the server is terminated.')}
    }

    networks_schema = {
        'uuid': {
            'Type': 'String',
            'Description': _('DEPRECATED! ID of network '
                             'to create a port on.')},
        'network': {
            'Type': 'String',
            'Description': _('Name or ID of network to create a port on.')},
        'fixed_ip': {
            'Type': 'String',
            'Description': _('Fixed IP address to specify for the port '
                             'created on the requested network.')},
        'port': {
            'Type': 'String',
            'Description': _('ID of an existing port to associate with '
                             'this server.')},
    }

    properties_schema = {
        'name': {
            'Type': 'String',
            'Description': _('Optional server name.')},
        'image': {
            'Type': 'String',<commit_msg>Remove redundant word from OS::Nova::Server<commit_after># vim: tabstop=4 shiftwidth=4 softtabstop=4

#
#    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.

from oslo.config import cfg

cfg.CONF.import_opt('instance_user', 'heat.common.config')

from heat.common import exception
from heat.engine import clients
from heat.engine import scheduler
from heat.engine.resources import nova_utils
from heat.engine import resource
from heat.openstack.common.gettextutils import _
from heat.openstack.common import log as logging
from heat.openstack.common import uuidutils

logger = logging.getLogger(__name__)


class Server(resource.Resource):

    block_mapping_schema = {
        'device_name': {
            'Type': 'String',
            'Required': True,
            'Description': _('A device name where the volume will be '
                             'attached in the system at /dev/device_name. '
                             'This value is typically vda.')},
        'volume_id': {
            'Type': 'String',
            'Description': _('The ID of the volume to boot from. Only one of '
                             'volume_id or snapshot_id should be provided.')},
        'snapshot_id': {
            'Type': 'String',
            'Description': _('The ID of the snapshot to create a volume '
                             'from.')},
        'volume_size': {
            'Type': 'String',
            'Description': _('The size of the volume, in GB. It is safe to '
                             'leave this blank and have the Compute service '
                             'infer the size.')},
        'delete_on_termination': {
            'Type': 'Boolean',
            'Description': _('Indicate whether the volume should be deleted '
                             'when the server is terminated.')}
    }

    networks_schema = {
        'uuid': {
            'Type': 'String',
            'Description': _('DEPRECATED! ID of network '
                             'to create a port on.')},
        'network': {
            'Type': 'String',
            'Description': _('Name or ID of network to create a port on.')},
        'fixed_ip': {
            'Type': 'String',
            'Description': _('Fixed IP address to specify for the port '
                             'created on the requested network.')},
        'port': {
            'Type': 'String',
            'Description': _('ID of an existing port to associate with '
                             'this server.')},
    }

    properties_schema = {
        'name': {
            'Type': 'String',
            'Description': _('Server name.')},
        'image': {
            'Type': 'String',
{'fraction_non_alphanumeric': 0.1028787163756489, 'fraction_numerical': 0.0022022966808242883, 'mean_word_length': 1.9058500914076781, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5978402', 'n_tokens_mistral': 1617, 'n_tokens_neox': 1590, 'n_words': 600}