# Path: mistralclient/utils.py
# def do_action_on_many(action, resources, success_msg, error_msg):
# def load_content(content):
# def load_file(path):
# def get_contents_if_file(contents_or_file_name):
# def load_json(input_string):


import copy
import urllib
from oslo_serialization import jsonutils
from keystoneauth1 import exceptions
from mistralclient import utils
        )

        return "%s [%s]" % (self.resource_name, values)


def _check_items(obj, searches):
    try:
        return all(getattr(obj, attr) == value for (attr, value) in searches)
    except AttributeError:
        return False


def extract_json(response, response_key):
    if response_key is not None:
        return get_json(response)[response_key]
    else:
        return get_json(response)


class ResourceManager(object):
    resource_class = None

    def __init__(self, http_client, enforce_raw_definitions=False):
        self.http_client = http_client
        self.enforce_raw_definitions = enforce_raw_definitions

    def get_contents_if_file(self, contents_or_file_name):
        if self.enforce_raw_definitions:
            return contents_or_file_name
        else:

# Path: mistralclient/utils.py
# def do_action_on_many(action, resources, success_msg, error_msg):
# def load_content(content):
# def load_file(path):
# def get_contents_if_file(contents_or_file_name):
# def load_json(input_string):


# Path: mistralclient/api/base.py
import copy
import urllib
from oslo_serialization import jsonutils
from keystoneauth1 import exceptions
from mistralclient import utils

        )

        return "%s [%s]" % (self.resource_name, values)


def _check_items(obj, searches):
    try:
        return all(getattr(obj, attr) == value for (attr, value) in searches)
    except AttributeError:
        return False


def extract_json(response, response_key):
    if response_key is not None:
        return get_json(response)[response_key]
    else:
        return get_json(response)


class ResourceManager(object):
    resource_class = None

    def __init__(self, http_client, enforce_raw_definitions=False):
        self.http_client = http_client
        self.enforce_raw_definitions = enforce_raw_definitions

    def get_contents_if_file(self, contents_or_file_name):
        if self.enforce_raw_definitions:
            return contents_or_file_name
        else:

            return utils.get_contents_if_file(contents_or_file_name)