# Path: f5_heat/resources/f5_cm_cluster.py
# class UpdateNotAllowed(object):
# class F5CmCluster(resource.Resource):
#     PROPERTIES = (
#         DEVICE_GROUP_NAME,
#         DEVICES,
#         DEVICE_GROUP_PARTITION,
#         DEVICE_GROUP_TYPE
#     ) = (
#         'device_group_name',
#         'devices',
#         'device_group_partition',
#         'device_group_type'
#     )
#     def _set_devices(self):
#     def handle_create(self):
#     def handle_delete(self):
# def resource_mapping():


from f5.sdk_exception import F5SDKError
from f5_heat.resources import f5_cm_cluster
from heat.common.exception import ResourceFailure
from heat.common import template_format
from heat.engine.hot.template import HOTemplate20150430
from heat.engine import rsrc_defn
from heat.engine import template
import mock
import pytest
    template,
    'get_template_class',
    return_value=HOTemplate20150430
)
def mock_template(
        templ_vers,
        templ_class,
        test_templ=cluster_template_defn
):
    '''Mock a Heat template for the Kilo version.'''
    templ_dict = template_format.parse(test_templ)
    return templ_dict


def create_resource_definition(templ_dict):
    '''Create a resource definition.'''
    rsrc_def = rsrc_defn.ResourceDefinition(
        'test_stack',
        templ_dict['resources']['cluster']['type'],
        properties=templ_dict['resources']['cluster']['properties']
    )
    return rsrc_def


@pytest.fixture
def F5CmCluster():
    '''Instantiate the F5CmCluster resource.'''
    template_dict = mock_template()
    rsrc_def = create_resource_definition(template_dict)
    f5_cm_cluster.ClusterManager.__init__ = mock.MagicMock(return_value=None)

# Path: f5_heat/resources/f5_cm_cluster.py
# class UpdateNotAllowed(object):
# class F5CmCluster(resource.Resource):
#     PROPERTIES = (
#         DEVICE_GROUP_NAME,
#         DEVICES,
#         DEVICE_GROUP_PARTITION,
#         DEVICE_GROUP_TYPE
#     ) = (
#         'device_group_name',
#         'devices',
#         'device_group_partition',
#         'device_group_type'
#     )
#     def _set_devices(self):
#     def handle_create(self):
#     def handle_delete(self):
# def resource_mapping():


# Path: f5_heat/resources/test/test_f5_cm_cluster.py
from f5.sdk_exception import F5SDKError
from f5_heat.resources import f5_cm_cluster
from heat.common.exception import ResourceFailure
from heat.common import template_format
from heat.engine.hot.template import HOTemplate20150430
from heat.engine import rsrc_defn
from heat.engine import template
import mock
import pytest

    template,
    'get_template_class',
    return_value=HOTemplate20150430
)
def mock_template(
        templ_vers,
        templ_class,
        test_templ=cluster_template_defn
):
    '''Mock a Heat template for the Kilo version.'''
    templ_dict = template_format.parse(test_templ)
    return templ_dict


def create_resource_definition(templ_dict):
    '''Create a resource definition.'''
    rsrc_def = rsrc_defn.ResourceDefinition(
        'test_stack',
        templ_dict['resources']['cluster']['type'],
        properties=templ_dict['resources']['cluster']['properties']
    )
    return rsrc_def


@pytest.fixture
def F5CmCluster():
    '''Instantiate the F5CmCluster resource.'''
    template_dict = mock_template()
    rsrc_def = create_resource_definition(template_dict)
    f5_cm_cluster.ClusterManager.__init__ = mock.MagicMock(return_value=None)

    f5_cm_cluster.ClusterManager.create = mock.MagicMock()