<commit_before># Copyright (c) 2015 Infoblox Inc.
# All Rights Reserved.
#
#    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.

import logging

from heat.common.i18n import _
from heat.engine import attributes
from heat.engine import constraints
from heat.engine import properties
from heat.engine import resource
from heat.engine import support

from heat_infoblox import constants
from heat_infoblox import resource_utils

import infoblox_netmri as netmri

LOG = logging.getLogger(__name__)


class NetMRIJob(resource.Resource):
    '''A resource which represents a job executed in NetMRI.'''

    PROPERTIES = (
        SOURCE, SCRIPT, JOB_SPEC, TEMPLATE,
        WAIT, INPUTS, TARGETS,
        DEVICE_ID, DEVICE_IP_ADDR, DEVICE_NET_IP_ADDR,
        NETWORK_VIEW
    ) = (
        'source', 'script', 'job_specification', 'config_template',
        'wait', 'inputs', 'targets',
        'device_id', 'device_ip_address', 'device_netview_ip_addr',
        'network_view'
    )

    ATTRIBUTES = (
        JOB,
        JOB_DETAILS
    ) = (
        'job',
        'job_details'
    )

    support_status = support.SupportStatus(support.UNSUPPORTED)

    properties_schema = {
        constants.CONNECTION:
            resource_utils.connection_schema(constants.NETMRI),<commit_msg>Use two argument form for support_status<commit_after># Copyright (c) 2015 Infoblox Inc.
# All Rights Reserved.
#
#    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.

import logging

from heat.common.i18n import _
from heat.engine import attributes
from heat.engine import constraints
from heat.engine import properties
from heat.engine import resource
from heat.engine import support

from heat_infoblox import constants
from heat_infoblox import resource_utils

import infoblox_netmri as netmri

LOG = logging.getLogger(__name__)


class NetMRIJob(resource.Resource):
    '''A resource which represents a job executed in NetMRI.'''

    PROPERTIES = (
        SOURCE, SCRIPT, JOB_SPEC, TEMPLATE,
        WAIT, INPUTS, TARGETS,
        DEVICE_ID, DEVICE_IP_ADDR, DEVICE_NET_IP_ADDR,
        NETWORK_VIEW
    ) = (
        'source', 'script', 'job_specification', 'config_template',
        'wait', 'inputs', 'targets',
        'device_id', 'device_ip_address', 'device_netview_ip_addr',
        'network_view'
    )

    ATTRIBUTES = (
        JOB,
        JOB_DETAILS
    ) = (
        'job',
        'job_details'
    )

    support_status = support.SupportStatus(
        support.UNSUPPORTED,
        _('See support.infoblox.com for support.'))

    properties_schema = {
        constants.CONNECTION:
            resource_utils.connection_schema(constants.NETMRI),
{'fraction_non_alphanumeric': 0.07859078590785908, 'fraction_numerical': 0.005420054200542005, 'mean_word_length': 3.213470319634703, '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': '4876018', 'n_tokens_mistral': 1093, 'n_tokens_neox': 1047, 'n_words': 349}