Merge "Separate implementation of custom types and base types"
This commit is contained in:
0
translator/hot/tosca/custom_types/__init__.py
Normal file
0
translator/hot/tosca/custom_types/__init__.py
Normal file
@@ -11,14 +11,16 @@
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from translator.hot.tosca.tosca_elasticsearch import ToscaElasticsearch
|
||||
from translator.hot.tosca.custom_types.tosca_elasticsearch import (
|
||||
ToscaElasticsearch
|
||||
)
|
||||
from translator.toscalib.tests.base import TestCase
|
||||
|
||||
|
||||
class ToscaElasticsearchTest(TestCase):
|
||||
|
||||
@mock.patch('translator.toscalib.nodetemplate.NodeTemplate')
|
||||
@mock.patch('translator.hot.tosca.tosca_elasticsearch.'
|
||||
@mock.patch('translator.hot.tosca.custom_types.tosca_elasticsearch.'
|
||||
'HotResource.__init__')
|
||||
def test_init(self, mock_hotres_init, mock_node):
|
||||
ToscaElasticsearch(mock_node)
|
||||
@@ -28,7 +30,7 @@ class ToscaElasticsearchTest(TestCase):
|
||||
'tosca.nodes.SoftwareComponent.Elasticsearch')
|
||||
|
||||
@mock.patch('translator.toscalib.nodetemplate.NodeTemplate')
|
||||
@mock.patch('translator.hot.tosca.tosca_elasticsearch.'
|
||||
@mock.patch('translator.hot.tosca.custom_types.tosca_elasticsearch.'
|
||||
'HotResource.__init__')
|
||||
def test_handle_properties(self, mock_hotres_init, mock_node):
|
||||
p = ToscaElasticsearch(mock_node)
|
||||
|
||||
@@ -11,14 +11,15 @@
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from translator.hot.tosca.tosca_kibana import ToscaKibana
|
||||
from translator.hot.tosca.custom_types.tosca_kibana import ToscaKibana
|
||||
from translator.toscalib.tests.base import TestCase
|
||||
|
||||
|
||||
class ToscaKibanaTest(TestCase):
|
||||
|
||||
@mock.patch('translator.toscalib.nodetemplate.NodeTemplate')
|
||||
@mock.patch('translator.hot.tosca.tosca_kibana.HotResource.__init__')
|
||||
@mock.patch('translator.hot.tosca.custom_types.tosca_kibana.'
|
||||
'HotResource.__init__')
|
||||
def test_init(self, mock_hotres_init, mock_node):
|
||||
ToscaKibana(mock_node)
|
||||
# Make sure base class gets called
|
||||
@@ -27,7 +28,8 @@ class ToscaKibanaTest(TestCase):
|
||||
'tosca.nodes.SoftwareComponent.Kibana')
|
||||
|
||||
@mock.patch('translator.toscalib.nodetemplate.NodeTemplate')
|
||||
@mock.patch('translator.hot.tosca.tosca_kibana.HotResource.__init__')
|
||||
@mock.patch('translator.hot.tosca.custom_types.tosca_kibana.'
|
||||
'HotResource.__init__')
|
||||
def test_handle_properties(self, mock_hotres_init, mock_node):
|
||||
p = ToscaKibana(mock_node)
|
||||
self.assertIsNone(p.handle_properties())
|
||||
|
||||
@@ -14,25 +14,29 @@
|
||||
import six
|
||||
|
||||
from translator.hot.syntax.hot_resource import HotResource
|
||||
from translator.hot.tosca.custom_types.tosca_collectd import ToscaCollectd
|
||||
from translator.hot.tosca.custom_types.tosca_elasticsearch import (
|
||||
ToscaElasticsearch
|
||||
)
|
||||
from translator.hot.tosca.custom_types.tosca_kibana import ToscaKibana
|
||||
from translator.hot.tosca.custom_types.tosca_logstash import ToscaLogstash
|
||||
from translator.hot.tosca.custom_types.tosca_nodejs import ToscaNodejs
|
||||
from translator.hot.tosca.custom_types.tosca_paypalpizzastore import (
|
||||
ToscaPaypalPizzaStore
|
||||
)
|
||||
from translator.hot.tosca.custom_types.tosca_rsyslog import ToscaRsyslog
|
||||
from translator.hot.tosca.custom_types.tosca_wordpress import ToscaWordpress
|
||||
from translator.hot.tosca.tosca_block_storage import ToscaBlockStorage
|
||||
from translator.hot.tosca.tosca_block_storage_attachment import (
|
||||
ToscaBlockStorageAttachment
|
||||
)
|
||||
from translator.hot.tosca.tosca_collectd import ToscaCollectd
|
||||
from translator.hot.tosca.tosca_compute import ToscaCompute
|
||||
from translator.hot.tosca.tosca_database import ToscaDatabase
|
||||
from translator.hot.tosca.tosca_dbms import ToscaDbms
|
||||
from translator.hot.tosca.tosca_elasticsearch import ToscaElasticsearch
|
||||
from translator.hot.tosca.tosca_kibana import ToscaKibana
|
||||
from translator.hot.tosca.tosca_logstash import ToscaLogstash
|
||||
from translator.hot.tosca.tosca_network_network import ToscaNetwork
|
||||
from translator.hot.tosca.tosca_network_port import ToscaNetworkPort
|
||||
from translator.hot.tosca.tosca_nodejs import ToscaNodejs
|
||||
from translator.hot.tosca.tosca_object_storage import ToscaObjectStorage
|
||||
from translator.hot.tosca.tosca_paypalpizzastore import ToscaPaypalPizzaStore
|
||||
from translator.hot.tosca.tosca_rsyslog import ToscaRsyslog
|
||||
from translator.hot.tosca.tosca_webserver import ToscaWebserver
|
||||
from translator.hot.tosca.tosca_wordpress import ToscaWordpress
|
||||
from translator.toscalib.functions import GetAttribute
|
||||
from translator.toscalib.functions import GetInput
|
||||
from translator.toscalib.functions import GetProperty
|
||||
|
||||
Reference in New Issue
Block a user