Redefine respository structure

Change the file structure to make appropriate for stand alone parser.

Change-Id: I6d5259b61b1cd82949262fee4930fa66703ad036
This commit is contained in:
spzala
2015-08-25 08:16:57 -07:00
parent 92a153300c
commit 0a1568ba38
194 changed files with 157 additions and 176 deletions

View File

@@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from translator.toscalib.properties import Property from toscaparser.properties import Property
class Capability(object): class Capability(object):

View File

@@ -16,7 +16,7 @@ TOSCA exception classes
import logging import logging
import sys import sys
from translator.toscalib.utils.gettextutils import _ from toscaparser.utils.gettextutils import _
log = logging.getLogger(__name__) log = logging.getLogger(__name__)

View File

@@ -10,17 +10,17 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from translator.toscalib.common.exception import MissingRequiredFieldError from toscaparser.common.exception import MissingRequiredFieldError
from translator.toscalib.common.exception import TypeMismatchError from toscaparser.common.exception import TypeMismatchError
from translator.toscalib.common.exception import UnknownFieldError from toscaparser.common.exception import UnknownFieldError
from translator.toscalib.elements.constraints import Schema from toscaparser.elements.constraints import Schema
from translator.toscalib.elements.datatype import DataType from toscaparser.elements.datatype import DataType
from translator.toscalib.elements.scalarunit import ScalarUnit_Frequency from toscaparser.elements.scalarunit import ScalarUnit_Frequency
from translator.toscalib.elements.scalarunit import ScalarUnit_Size from toscaparser.elements.scalarunit import ScalarUnit_Size
from translator.toscalib.elements.scalarunit import ScalarUnit_Time from toscaparser.elements.scalarunit import ScalarUnit_Time
from translator.toscalib.utils.gettextutils import _ from toscaparser.utils.gettextutils import _
from translator.toscalib.utils import validateutils from toscaparser.utils import validateutils
class DataEntity(object): class DataEntity(object):

View File

@@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from translator.toscalib.elements.statefulentitytype import StatefulEntityType from toscaparser.elements.statefulentitytype import StatefulEntityType
class ArtifactTypeDef(StatefulEntityType): class ArtifactTypeDef(StatefulEntityType):

View File

@@ -10,8 +10,8 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from translator.toscalib.elements.property_definition import PropertyDef from toscaparser.elements.property_definition import PropertyDef
from translator.toscalib.elements.statefulentitytype import StatefulEntityType from toscaparser.elements.statefulentitytype import StatefulEntityType
class CapabilityTypeDef(StatefulEntityType): class CapabilityTypeDef(StatefulEntityType):

View File

@@ -14,11 +14,11 @@ import collections
import datetime import datetime
import re import re
from translator.toscalib.common.exception import InvalidSchemaError from toscaparser.common.exception import InvalidSchemaError
from translator.toscalib.common.exception import ValidationError from toscaparser.common.exception import ValidationError
from translator.toscalib.elements import scalarunit from toscaparser.elements import scalarunit
from translator.toscalib.functions import is_function from toscaparser.functions import is_function
from translator.toscalib.utils.gettextutils import _ from toscaparser.utils.gettextutils import _
class Schema(collections.Mapping): class Schema(collections.Mapping):

View File

@@ -11,7 +11,7 @@
# under the License. # under the License.
from translator.toscalib.elements.statefulentitytype import StatefulEntityType from toscaparser.elements.statefulentitytype import StatefulEntityType
class DataType(StatefulEntityType): class DataType(StatefulEntityType):

View File

@@ -12,7 +12,7 @@
import logging import logging
import os import os
import translator.toscalib.utils.yamlparser import toscaparser.utils.yamlparser
log = logging.getLogger('tosca') log = logging.getLogger('tosca')
@@ -30,7 +30,7 @@ class EntityType(object):
os.path.dirname(os.path.abspath(__file__)), os.path.dirname(os.path.abspath(__file__)),
"TOSCA_definition_1_0.yaml") "TOSCA_definition_1_0.yaml")
loader = translator.toscalib.utils.yamlparser.load_yaml loader = toscaparser.utils.yamlparser.load_yaml
TOSCA_DEF = loader(TOSCA_DEF_FILE) TOSCA_DEF = loader(TOSCA_DEF_FILE)

View File

@@ -10,8 +10,8 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from translator.toscalib.common.exception import UnknownFieldError from toscaparser.common.exception import UnknownFieldError
from translator.toscalib.elements.statefulentitytype import StatefulEntityType from toscaparser.elements.statefulentitytype import StatefulEntityType
SECTIONS = (LIFECYCLE, CONFIGURE, LIFECYCLE_SHORTNAME, SECTIONS = (LIFECYCLE, CONFIGURE, LIFECYCLE_SHORTNAME,
CONFIGURE_SHORTNAME) = \ CONFIGURE_SHORTNAME) = \

View File

@@ -10,11 +10,11 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from translator.toscalib.elements.capabilitytype import CapabilityTypeDef from toscaparser.elements.capabilitytype import CapabilityTypeDef
import translator.toscalib.elements.interfaces as ifaces import toscaparser.elements.interfaces as ifaces
from translator.toscalib.elements.interfaces import InterfacesDef from toscaparser.elements.interfaces import InterfacesDef
from translator.toscalib.elements.relationshiptype import RelationshipType from toscaparser.elements.relationshiptype import RelationshipType
from translator.toscalib.elements.statefulentitytype import StatefulEntityType from toscaparser.elements.statefulentitytype import StatefulEntityType
class NodeType(StatefulEntityType): class NodeType(StatefulEntityType):

View File

@@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from translator.toscalib.common.exception import InvalidSchemaError from toscaparser.common.exception import InvalidSchemaError
class PropertyDef(object): class PropertyDef(object):

View File

@@ -10,7 +10,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from translator.toscalib.elements.statefulentitytype import StatefulEntityType from toscaparser.elements.statefulentitytype import StatefulEntityType
class RelationshipType(StatefulEntityType): class RelationshipType(StatefulEntityType):

View File

@@ -13,8 +13,8 @@
import logging import logging
import re import re
from translator.toscalib.utils.gettextutils import _ from toscaparser.utils.gettextutils import _
from translator.toscalib.utils import validateutils from toscaparser.utils import validateutils
log = logging.getLogger('tosca') log = logging.getLogger('tosca')

View File

@@ -10,10 +10,10 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from translator.toscalib.common.exception import InvalidTypeError from toscaparser.common.exception import InvalidTypeError
from translator.toscalib.elements.attribute_definition import AttributeDef from toscaparser.elements.attribute_definition import AttributeDef
from translator.toscalib.elements.entitytype import EntityType from toscaparser.elements.entitytype import EntityType
from translator.toscalib.elements.property_definition import PropertyDef from toscaparser.elements.property_definition import PropertyDef
class StatefulEntityType(EntityType): class StatefulEntityType(EntityType):

View File

@@ -10,14 +10,14 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from translator.toscalib.capabilities import Capability from toscaparser.capabilities import Capability
from translator.toscalib.common.exception import MissingRequiredFieldError from toscaparser.common.exception import MissingRequiredFieldError
from translator.toscalib.common.exception import UnknownFieldError from toscaparser.common.exception import UnknownFieldError
from translator.toscalib.common.exception import ValidationError from toscaparser.common.exception import ValidationError
from translator.toscalib.elements.interfaces import InterfacesDef from toscaparser.elements.interfaces import InterfacesDef
from translator.toscalib.elements.nodetype import NodeType from toscaparser.elements.nodetype import NodeType
from translator.toscalib.elements.relationshiptype import RelationshipType from toscaparser.elements.relationshiptype import RelationshipType
from translator.toscalib.properties import Property from toscaparser.properties import Property
class EntityTemplate(object): class EntityTemplate(object):

View File

@@ -15,8 +15,8 @@
import abc import abc
import six import six
from translator.toscalib.common.exception import UnknownInputError from toscaparser.common.exception import UnknownInputError
from translator.toscalib.utils.gettextutils import _ from toscaparser.utils.gettextutils import _
GET_PROPERTY = 'get_property' GET_PROPERTY = 'get_property'
@@ -161,7 +161,7 @@ class GetAttribute(Function):
def _find_host_containing_attribute(self, node_template_name=SELF): def _find_host_containing_attribute(self, node_template_name=SELF):
node_template = self._find_node_template(node_template_name) node_template = self._find_node_template(node_template_name)
from translator.toscalib.elements.entitytype import EntityType from toscaparser.elements.entitytype import EntityType
hosted_on_rel = EntityType.TOSCA_DEF[HOSTED_ON] hosted_on_rel = EntityType.TOSCA_DEF[HOSTED_ON]
for r in node_template.requirements: for r in node_template.requirements:
for requirement, target_name in r.items(): for requirement, target_name in r.items():

View File

@@ -13,17 +13,17 @@
import logging import logging
from translator.toscalib.common.exception import TypeMismatchError from toscaparser.common.exception import TypeMismatchError
from translator.toscalib.common.exception import UnknownFieldError from toscaparser.common.exception import UnknownFieldError
from translator.toscalib.elements.interfaces import CONFIGURE from toscaparser.elements.interfaces import CONFIGURE
from translator.toscalib.elements.interfaces import CONFIGURE_SHORTNAME from toscaparser.elements.interfaces import CONFIGURE_SHORTNAME
from translator.toscalib.elements.interfaces import InterfacesDef from toscaparser.elements.interfaces import InterfacesDef
from translator.toscalib.elements.interfaces import LIFECYCLE from toscaparser.elements.interfaces import LIFECYCLE
from translator.toscalib.elements.interfaces import LIFECYCLE_SHORTNAME from toscaparser.elements.interfaces import LIFECYCLE_SHORTNAME
from translator.toscalib.elements.relationshiptype import RelationshipType from toscaparser.elements.relationshiptype import RelationshipType
from translator.toscalib.entity_template import EntityTemplate from toscaparser.entity_template import EntityTemplate
from translator.toscalib.relationship_template import RelationshipTemplate from toscaparser.relationship_template import RelationshipTemplate
from translator.toscalib.utils.gettextutils import _ from toscaparser.utils.gettextutils import _
log = logging.getLogger('tosca') log = logging.getLogger('tosca')

View File

@@ -13,12 +13,12 @@
import logging import logging
from translator.toscalib.common.exception import MissingRequiredFieldError from toscaparser.common.exception import MissingRequiredFieldError
from translator.toscalib.common.exception import UnknownFieldError from toscaparser.common.exception import UnknownFieldError
from translator.toscalib.dataentity import DataEntity from toscaparser.dataentity import DataEntity
from translator.toscalib.elements.constraints import Schema from toscaparser.elements.constraints import Schema
from translator.toscalib.elements.entitytype import EntityType from toscaparser.elements.entitytype import EntityType
from translator.toscalib.utils.gettextutils import _ from toscaparser.utils.gettextutils import _
log = logging.getLogger('tosca') log = logging.getLogger('tosca')

View File

@@ -10,9 +10,9 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from translator.toscalib.dataentity import DataEntity from toscaparser.dataentity import DataEntity
from translator.toscalib.elements.constraints import Schema from toscaparser.elements.constraints import Schema
from translator.toscalib.functions import is_function from toscaparser.functions import is_function
class Property(object): class Property(object):

View File

@@ -13,8 +13,8 @@
import logging import logging
from translator.toscalib.entity_template import EntityTemplate from toscaparser.entity_template import EntityTemplate
from translator.toscalib.properties import Property from toscaparser.properties import Property
SECTIONS = (DERIVED_FROM, PROPERTIES, REQUIREMENTS, SECTIONS = (DERIVED_FROM, PROPERTIES, REQUIREMENTS,
INTERFACES, CAPABILITIES, TYPE) = \ INTERFACES, CAPABILITIES, TYPE) = \

View File

@@ -21,7 +21,7 @@ import fixtures
import testscenarios import testscenarios
import testtools import testtools
from translator.toscalib.tosca_template import ToscaTemplate from toscaparser.tosca_template import ToscaTemplate
_TRUE_VALUES = ('True', 'true', '1', 'yes') _TRUE_VALUES = ('True', 'true', '1', 'yes')

Some files were not shown because too many files have changed in this diff Show More