Translator is enabled to exectue within other shell environments by installing as a library (in addition to command line). As such, a separate package "translator" is installed, and pulls in everything under the translator/ directory. Originally the design for custom classes was to allow users to specify their own locations for custom classes that they define outside of the translator code. In order for this to work in the shell environments, the user would need to install these classes via a setup.py script. For now this is too heavy of a requirement to place on the user, so the design for this fix is that the user will need to manually copy over their custom classes to the translator/custom directory. We will revist the option to install custom classes via a user defined setup.py at a later date. Change-Id: Ib132d9fe768a954a226724929c074034cf898da3
31 lines
1.0 KiB
Python
Executable File
31 lines
1.0 KiB
Python
Executable File
#
|
|
# 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.
|
|
|
|
from translator.hot.syntax.hot_resource import HotResource
|
|
|
|
# Name used to dynamically load appropriate map class.
|
|
TARGET_CLASS_NAME = 'ToscaElasticsearch'
|
|
|
|
|
|
class ToscaElasticsearch(HotResource):
|
|
'''Translate TOSCA type tosca.nodes.SoftwareComponent.Elasticsearch.'''
|
|
|
|
toscatype = 'tosca.nodes.SoftwareComponent.Elasticsearch'
|
|
|
|
def __init__(self, nodetemplate):
|
|
super(ToscaElasticsearch, self).__init__(nodetemplate)
|
|
pass
|
|
|
|
def handle_properties(self):
|
|
pass
|