|
|
|
@ -12,9 +12,7 @@
|
|
|
|
|
# under the License.
|
|
|
|
|
|
|
|
|
|
import mock
|
|
|
|
|
from oslo_utils import importutils
|
|
|
|
|
import six
|
|
|
|
|
import testtools
|
|
|
|
|
|
|
|
|
|
from heat.common import exception
|
|
|
|
|
from heat.common import template_format
|
|
|
|
@ -22,13 +20,10 @@ from heat.engine import resource
|
|
|
|
|
from heat.engine import resources
|
|
|
|
|
from heat.engine.resources.openstack.manila import security_service
|
|
|
|
|
from heat.engine import scheduler
|
|
|
|
|
from heat.engine import stack as stack_parser
|
|
|
|
|
from heat.engine import template
|
|
|
|
|
from heat.tests import common
|
|
|
|
|
from heat.tests import utils
|
|
|
|
|
|
|
|
|
|
manila_client = importutils.try_import('manilaclient.v1.client')
|
|
|
|
|
|
|
|
|
|
stack_template = '''
|
|
|
|
|
heat_template_version: 2013-05-23
|
|
|
|
|
|
|
|
|
@ -174,10 +169,3 @@ class ManilaSecurityServiceTest(common.HeatTestCase):
|
|
|
|
|
scheduler.TaskRunner(ss.update, new_ss))
|
|
|
|
|
msg = 'The Resource security_service requires replacement.'
|
|
|
|
|
self.assertEqual(msg, six.text_type(err))
|
|
|
|
|
|
|
|
|
|
@testtools.skipIf(manila_client is not None,
|
|
|
|
|
'Tests manila client not installed')
|
|
|
|
|
def test_no_client(self):
|
|
|
|
|
tmpl = template.Template((template_format.parse(stack_template)))
|
|
|
|
|
stack = stack_parser.Stack(utils.dummy_context(), 'foo', tmpl)
|
|
|
|
|
self.assertRaises(exception.ResourceTypeNotFound, stack.validate)
|
|
|
|
|