From 04387deeab820e75c6d37d2ddd5b514cb7bcfd9e Mon Sep 17 00:00:00 2001 From: Pavel Aharoni Date: Sun, 11 Jun 2017 14:33:57 +0300 Subject: [SDC-32] separate Tosca Parser from DC Change-Id: I7e7f31ff2bd92fec22031f75b7051d129a21d01b Signed-off-by: Pavel Aharoni --- jtosca/pom.xml | 43 - .../openecomp/sdc/toscaparser/api/Capability.java | 121 - .../openecomp/sdc/toscaparser/api/DataEntity.java | 450 -- .../sdc/toscaparser/api/EntityTemplate.java | 832 --- .../org/openecomp/sdc/toscaparser/api/Group.java | 137 - .../sdc/toscaparser/api/ImportsLoader.java | 728 --- .../sdc/toscaparser/api/NodeTemplate.java | 755 --- .../org/openecomp/sdc/toscaparser/api/Policy.java | 187 - .../openecomp/sdc/toscaparser/api/Property.java | 177 - .../sdc/toscaparser/api/RelationshipTemplate.java | 199 - .../openecomp/sdc/toscaparser/api/Repository.java | 117 - .../sdc/toscaparser/api/SubstitutionMappings.java | 520 -- .../sdc/toscaparser/api/TopologyTemplate.java | 857 --- .../openecomp/sdc/toscaparser/api/ToscaGraph.java | 109 - .../sdc/toscaparser/api/ToscaTemplate.java | 1002 ---- .../openecomp/sdc/toscaparser/api/Triggers.java | 183 - .../sdc/toscaparser/api/UnsupportedType.java | 78 - .../toscaparser/api/common/ExceptionCollector.java | 122 - .../toscaparser/api/common/JToscaException.java | 27 - .../sdc/toscaparser/api/common/TOSCAException.java | 39 - .../toscaparser/api/elements/ArtifactTypeDef.java | 105 - .../sdc/toscaparser/api/elements/AttributeDef.java | 40 - .../api/elements/CapabilityTypeDef.java | 222 - .../sdc/toscaparser/api/elements/DataType.java | 116 - .../sdc/toscaparser/api/elements/EntityType.java | 418 -- .../sdc/toscaparser/api/elements/GroupType.java | 215 - .../toscaparser/api/elements/InterfacesDef.java | 228 - .../sdc/toscaparser/api/elements/Metadata.java | 35 - .../sdc/toscaparser/api/elements/NodeType.java | 523 -- .../sdc/toscaparser/api/elements/PolicyType.java | 290 - .../sdc/toscaparser/api/elements/PortSpec.java | 160 - .../sdc/toscaparser/api/elements/PropertyDef.java | 231 - .../toscaparser/api/elements/RelationshipType.java | 103 - .../sdc/toscaparser/api/elements/ScalarUnit.java | 262 - .../api/elements/ScalarUnitFrequency.java | 14 - .../toscaparser/api/elements/ScalarUnitSize.java | 19 - .../toscaparser/api/elements/ScalarUnitTime.java | 17 - .../api/elements/StatefulEntityType.java | 220 - .../toscaparser/api/elements/TypeValidation.java | 151 - .../api/elements/constraints/Constraint.java | 237 - .../api/elements/constraints/Equal.java | 61 - .../api/elements/constraints/GreaterOrEqual.java | 113 - .../api/elements/constraints/GreaterThan.java | 102 - .../api/elements/constraints/InRange.java | 171 - .../api/elements/constraints/Length.java | 79 - .../api/elements/constraints/LessOrEqual.java | 106 - .../api/elements/constraints/LessThan.java | 104 - .../api/elements/constraints/MaxLength.java | 90 - .../api/elements/constraints/MinLength.java | 90 - .../api/elements/constraints/Pattern.java | 96 - .../api/elements/constraints/Schema.java | 278 - .../api/elements/constraints/ValidValues.java | 84 - .../sdc/toscaparser/api/extensions/ExtTools.java | 210 - .../sdc/toscaparser/api/functions/Concat.java | 77 - .../sdc/toscaparser/api/functions/Function.java | 191 - .../toscaparser/api/functions/GetAttribute.java | 535 -- .../sdc/toscaparser/api/functions/GetInput.java | 110 - .../api/functions/GetOperationOutput.java | 225 - .../sdc/toscaparser/api/functions/GetProperty.java | 636 --- .../sdc/toscaparser/api/functions/Token.java | 112 - .../sdc/toscaparser/api/parameters/Input.java | 226 - .../sdc/toscaparser/api/parameters/Output.java | 109 - .../openecomp/sdc/toscaparser/api/prereq/CSAR.java | 782 --- .../sdc/toscaparser/api/utils/CopyUtils.java | 29 - .../sdc/toscaparser/api/utils/DumpUtils.java | 55 - .../toscaparser/api/utils/JToscaErrorCodes.java | 32 - .../api/utils/TOSCAVersionProperty.java | 182 - .../toscaparser/api/utils/ThreadLocalsHolder.java | 24 - .../sdc/toscaparser/api/utils/UrlUtils.java | 123 - .../sdc/toscaparser/api/utils/ValidateUtils.java | 409 -- .../src/main/resources/TOSCA_definition_1_0.yaml | 967 ---- .../extensions/nfv/TOSCA_nfv_definition_1_0.yaml | 240 - jtosca/src/main/resources/extensions/nfv/nfv.py | 19 - .../JToscaMetadataParse.java | 26 - .../src/test/resources/csars/csar_hello_world.csar | Bin 936 -> 0 bytes .../resources/csars/service-ServiceFdnt-csar.csar | Bin 40171 -> 0 bytes jython-tosca-parser/.gitignore | 96 - jython-tosca-parser/pom.xml | 82 - .../openecomp/sdc/toscaparser/JythonRuntime.java | 53 - .../org/openecomp/sdc/toscaparser/ToscaParser.java | 36 - .../sdc/toscaparser/ToscaParserFactory.java | 48 - .../openecomp/sdc/toscaparser/api/Capability.java | 38 - .../sdc/toscaparser/api/EntityTemplate.java | 75 - .../org/openecomp/sdc/toscaparser/api/Group.java | 32 - .../openecomp/sdc/toscaparser/api/Metadata.java | 28 - .../sdc/toscaparser/api/NodeTemplate.java | 32 - .../openecomp/sdc/toscaparser/api/Property.java | 48 - .../toscaparser/api/StatefulEntityTypeFactory.java | 28 - .../sdc/toscaparser/api/SubstitutionMappings.java | 67 - .../sdc/toscaparser/api/TopologyTemplate.java | 75 - .../sdc/toscaparser/api/ToscaTemplate.java | 63 - .../sdc/toscaparser/api/ToscaTemplateFactory.java | 14 - .../sdc/toscaparser/api/elements/GroupType.java | 30 - .../sdc/toscaparser/api/elements/NodeType.java | 27 - .../api/elements/StatefulEntityType.java | 31 - .../sdc/toscaparser/api/parameters/Input.java | 47 - .../sdc/toscaparser/jython/JyCapability.java | 9 - .../sdc/toscaparser/jython/JyEntityTemplate.java | 16 - .../openecomp/sdc/toscaparser/jython/JyGroup.java | 10 - .../sdc/toscaparser/jython/JyNodeTemplate.java | 9 - .../sdc/toscaparser/jython/JyProperty.java | 11 - .../toscaparser/jython/JySubstitutionMappings.java | 16 - .../sdc/toscaparser/jython/JyTopologyTemplate.java | 16 - .../sdc/toscaparser/jython/JyToscaTemplate.java | 14 - .../toscaparser/jython/elements/JyGroupType.java | 7 - .../toscaparser/jython/elements/JyNodeType.java | 8 - .../jython/elements/JyStatefulEntityType.java | 7 - .../sdc/toscaparser/jython/parameters/JyInput.java | 10 - .../sdc/toscaparser/utils/JarExtractor.java | 87 - .../sdc/toscaparser/utils/PythonType.java | 47 - .../sdc/toscaparser/utils/PythonUtils.java | 13 - .../src/main/resources/Lib/site-packages/README | 2 - .../Lib/site-packages/_markerlib/__init__.py | 16 - .../Lib/site-packages/_markerlib/markers.py | 119 - .../babel-2.3.4-py2.7.egg/EGG-INFO/PKG-INFO | 24 - .../babel-2.3.4-py2.7.egg/EGG-INFO/SOURCES.txt | 838 --- .../EGG-INFO/dependency_links.txt | 1 - .../EGG-INFO/entry_points.txt | 22 - .../babel-2.3.4-py2.7.egg/EGG-INFO/not-zip-safe | 1 - .../babel-2.3.4-py2.7.egg/EGG-INFO/requires.txt | 1 - .../babel-2.3.4-py2.7.egg/EGG-INFO/top_level.txt | 1 - .../babel-2.3.4-py2.7.egg/babel/__init__.py | 24 - .../babel-2.3.4-py2.7.egg/babel/_compat.py | 76 - .../babel-2.3.4-py2.7.egg/babel/core.py | 1135 ---- .../babel-2.3.4-py2.7.egg/babel/dates.py | 1754 ------ .../babel-2.3.4-py2.7.egg/babel/global.dat | Bin 216908 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/languages.py | 71 - .../babel-2.3.4-py2.7.egg/babel/lists.py | 48 - .../babel-2.3.4-py2.7.egg/babel/locale-data/af.dat | Bin 139823 -> 0 bytes .../babel/locale-data/af_NA.dat | Bin 1048 -> 0 bytes .../babel/locale-data/af_ZA.dat | Bin 566 -> 0 bytes .../babel/locale-data/agq.dat | Bin 17147 -> 0 bytes .../babel/locale-data/agq_CM.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/ak.dat | Bin 15689 -> 0 bytes .../babel/locale-data/ak_GH.dat | Bin 547 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/am.dat | Bin 169168 -> 0 bytes .../babel/locale-data/am_ET.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/ar.dat | Bin 271795 -> 0 bytes .../babel/locale-data/ar_001.dat | Bin 1641 -> 0 bytes .../babel/locale-data/ar_AE.dat | Bin 996 -> 0 bytes .../babel/locale-data/ar_BH.dat | Bin 609 -> 0 bytes .../babel/locale-data/ar_DJ.dat | Bin 587 -> 0 bytes .../babel/locale-data/ar_DZ.dat | Bin 2185 -> 0 bytes .../babel/locale-data/ar_EG.dat | Bin 646 -> 0 bytes .../babel/locale-data/ar_EH.dat | Bin 547 -> 0 bytes .../babel/locale-data/ar_ER.dat | Bin 568 -> 0 bytes .../babel/locale-data/ar_IL.dat | Bin 1153 -> 0 bytes .../babel/locale-data/ar_IQ.dat | Bin 2293 -> 0 bytes .../babel/locale-data/ar_JO.dat | Bin 2293 -> 0 bytes .../babel/locale-data/ar_KM.dat | Bin 1099 -> 0 bytes .../babel/locale-data/ar_KW.dat | Bin 609 -> 0 bytes .../babel/locale-data/ar_LB.dat | Bin 2294 -> 0 bytes .../babel/locale-data/ar_LY.dat | Bin 653 -> 0 bytes .../babel/locale-data/ar_MA.dat | Bin 2522 -> 0 bytes .../babel/locale-data/ar_MR.dat | Bin 1911 -> 0 bytes .../babel/locale-data/ar_OM.dat | Bin 609 -> 0 bytes .../babel/locale-data/ar_PS.dat | Bin 2231 -> 0 bytes .../babel/locale-data/ar_QA.dat | Bin 609 -> 0 bytes .../babel/locale-data/ar_SA.dat | Bin 609 -> 0 bytes .../babel/locale-data/ar_SD.dat | Bin 609 -> 0 bytes .../babel/locale-data/ar_SO.dat | Bin 566 -> 0 bytes .../babel/locale-data/ar_SS.dat | Bin 589 -> 0 bytes .../babel/locale-data/ar_SY.dat | Bin 2293 -> 0 bytes .../babel/locale-data/ar_TD.dat | Bin 547 -> 0 bytes .../babel/locale-data/ar_TN.dat | Bin 2185 -> 0 bytes .../babel/locale-data/ar_YE.dat | Bin 609 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/as.dat | Bin 5997 -> 0 bytes .../babel/locale-data/as_IN.dat | Bin 589 -> 0 bytes .../babel/locale-data/asa.dat | Bin 16000 -> 0 bytes .../babel/locale-data/asa_TZ.dat | Bin 547 -> 0 bytes .../babel/locale-data/ast.dat | Bin 193669 -> 0 bytes .../babel/locale-data/ast_ES.dat | Bin 584 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/az.dat | Bin 167241 -> 0 bytes .../babel/locale-data/az_Cyrl.dat | Bin 6368 -> 0 bytes .../babel/locale-data/az_Cyrl_AZ.dat | Bin 566 -> 0 bytes .../babel/locale-data/az_Latn.dat | Bin 2190 -> 0 bytes .../babel/locale-data/az_Latn_AZ.dat | Bin 566 -> 0 bytes .../babel/locale-data/bas.dat | Bin 16947 -> 0 bytes .../babel/locale-data/bas_CM.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/be.dat | Bin 208958 -> 0 bytes .../babel/locale-data/be_BY.dat | Bin 566 -> 0 bytes .../babel/locale-data/bem.dat | Bin 6317 -> 0 bytes .../babel/locale-data/bem_ZM.dat | Bin 547 -> 0 bytes .../babel/locale-data/bez.dat | Bin 16790 -> 0 bytes .../babel/locale-data/bez_TZ.dat | Bin 547 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/bg.dat | Bin 201277 -> 0 bytes .../babel/locale-data/bg_BG.dat | Bin 584 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/bm.dat | Bin 15789 -> 0 bytes .../babel/locale-data/bm_ML.dat | Bin 547 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/bn.dat | Bin 223766 -> 0 bytes .../babel/locale-data/bn_BD.dat | Bin 566 -> 0 bytes .../babel/locale-data/bn_IN.dat | Bin 589 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/bo.dat | Bin 22376 -> 0 bytes .../babel/locale-data/bo_CN.dat | Bin 566 -> 0 bytes .../babel/locale-data/bo_IN.dat | Bin 662 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/br.dat | Bin 213765 -> 0 bytes .../babel/locale-data/br_FR.dat | Bin 584 -> 0 bytes .../babel/locale-data/brx.dat | Bin 123783 -> 0 bytes .../babel/locale-data/brx_IN.dat | Bin 589 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/bs.dat | Bin 204664 -> 0 bytes .../babel/locale-data/bs_Cyrl.dat | Bin 176748 -> 0 bytes .../babel/locale-data/bs_Cyrl_BA.dat | Bin 566 -> 0 bytes .../babel/locale-data/bs_Latn.dat | Bin 1962 -> 0 bytes .../babel/locale-data/bs_Latn_BA.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/ca.dat | Bin 181358 -> 0 bytes .../babel/locale-data/ca_AD.dat | Bin 584 -> 0 bytes .../babel/locale-data/ca_ES.dat | Bin 584 -> 0 bytes .../babel/locale-data/ca_ES_VALENCIA.dat | Bin 3634 -> 0 bytes .../babel/locale-data/ca_FR.dat | Bin 603 -> 0 bytes .../babel/locale-data/ca_IT.dat | Bin 584 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/ce.dat | Bin 115248 -> 0 bytes .../babel/locale-data/ce_RU.dat | Bin 566 -> 0 bytes .../babel/locale-data/cgg.dat | Bin 16127 -> 0 bytes .../babel/locale-data/cgg_UG.dat | Bin 547 -> 0 bytes .../babel/locale-data/chr.dat | Bin 21275 -> 0 bytes .../babel/locale-data/chr_US.dat | Bin 584 -> 0 bytes .../babel/locale-data/ckb.dat | Bin 22012 -> 0 bytes .../babel/locale-data/ckb_IQ.dat | Bin 609 -> 0 bytes .../babel/locale-data/ckb_IR.dat | Bin 1161 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/cs.dat | Bin 249805 -> 0 bytes .../babel/locale-data/cs_CZ.dat | Bin 584 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/cu.dat | Bin 19015 -> 0 bytes .../babel/locale-data/cu_RU.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/cy.dat | Bin 255597 -> 0 bytes .../babel/locale-data/cy_GB.dat | Bin 584 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/da.dat | Bin 172184 -> 0 bytes .../babel/locale-data/da_DK.dat | Bin 584 -> 0 bytes .../babel/locale-data/da_GL.dat | Bin 1123 -> 0 bytes .../babel/locale-data/dav.dat | Bin 16064 -> 0 bytes .../babel/locale-data/dav_KE.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/de.dat | Bin 187430 -> 0 bytes .../babel/locale-data/de_AT.dat | Bin 1980 -> 0 bytes .../babel/locale-data/de_BE.dat | Bin 584 -> 0 bytes .../babel/locale-data/de_CH.dat | Bin 1957 -> 0 bytes .../babel/locale-data/de_DE.dat | Bin 584 -> 0 bytes .../babel/locale-data/de_LI.dat | Bin 1277 -> 0 bytes .../babel/locale-data/de_LU.dat | Bin 603 -> 0 bytes .../babel/locale-data/dje.dat | Bin 16011 -> 0 bytes .../babel/locale-data/dje_NE.dat | Bin 547 -> 0 bytes .../babel/locale-data/dsb.dat | Bin 160703 -> 0 bytes .../babel/locale-data/dsb_DE.dat | Bin 584 -> 0 bytes .../babel/locale-data/dua.dat | Bin 5129 -> 0 bytes .../babel/locale-data/dua_CM.dat | Bin 566 -> 0 bytes .../babel/locale-data/dyo.dat | Bin 10433 -> 0 bytes .../babel/locale-data/dyo_SN.dat | Bin 547 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/dz.dat | Bin 86701 -> 0 bytes .../babel/locale-data/dz_BT.dat | Bin 566 -> 0 bytes .../babel/locale-data/ebu.dat | Bin 16052 -> 0 bytes .../babel/locale-data/ebu_KE.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/ee.dat | Bin 128168 -> 0 bytes .../babel/locale-data/ee_GH.dat | Bin 547 -> 0 bytes .../babel/locale-data/ee_TG.dat | Bin 1099 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/el.dat | Bin 210928 -> 0 bytes .../babel/locale-data/el_CY.dat | Bin 566 -> 0 bytes .../babel/locale-data/el_GR.dat | Bin 584 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/en.dat | Bin 160407 -> 0 bytes .../babel/locale-data/en_001.dat | Bin 13573 -> 0 bytes .../babel/locale-data/en_150.dat | Bin 1509 -> 0 bytes .../babel/locale-data/en_AG.dat | Bin 585 -> 0 bytes .../babel/locale-data/en_AI.dat | Bin 1137 -> 0 bytes .../babel/locale-data/en_AS.dat | Bin 566 -> 0 bytes .../babel/locale-data/en_AT.dat | Bin 1115 -> 0 bytes .../babel/locale-data/en_AU.dat | Bin 13184 -> 0 bytes .../babel/locale-data/en_BB.dat | Bin 566 -> 0 bytes .../babel/locale-data/en_BE.dat | Bin 1995 -> 0 bytes .../babel/locale-data/en_BI.dat | Bin 568 -> 0 bytes .../babel/locale-data/en_BM.dat | Bin 585 -> 0 bytes .../babel/locale-data/en_BS.dat | Bin 769 -> 0 bytes .../babel/locale-data/en_BW.dat | Bin 2436 -> 0 bytes .../babel/locale-data/en_BZ.dat | Bin 2908 -> 0 bytes .../babel/locale-data/en_CA.dat | Bin 5475 -> 0 bytes .../babel/locale-data/en_CC.dat | Bin 1118 -> 0 bytes .../babel/locale-data/en_CH.dat | Bin 1011 -> 0 bytes .../babel/locale-data/en_CK.dat | Bin 1118 -> 0 bytes .../babel/locale-data/en_CM.dat | Bin 1368 -> 0 bytes .../babel/locale-data/en_CX.dat | Bin 1118 -> 0 bytes .../babel/locale-data/en_CY.dat | Bin 566 -> 0 bytes .../babel/locale-data/en_DE.dat | Bin 867 -> 0 bytes .../babel/locale-data/en_DG.dat | Bin 1099 -> 0 bytes .../babel/locale-data/en_DK.dat | Bin 2233 -> 0 bytes .../babel/locale-data/en_DM.dat | Bin 585 -> 0 bytes .../babel/locale-data/en_ER.dat | Bin 818 -> 0 bytes .../babel/locale-data/en_FI.dat | Bin 2218 -> 0 bytes .../babel/locale-data/en_FJ.dat | Bin 603 -> 0 bytes .../babel/locale-data/en_FK.dat | Bin 1141 -> 0 bytes .../babel/locale-data/en_FM.dat | Bin 547 -> 0 bytes .../babel/locale-data/en_GB.dat | Bin 5110 -> 0 bytes .../babel/locale-data/en_GD.dat | Bin 566 -> 0 bytes .../babel/locale-data/en_GG.dat | Bin 1204 -> 0 bytes .../babel/locale-data/en_GH.dat | Bin 820 -> 0 bytes .../babel/locale-data/en_GI.dat | Bin 1159 -> 0 bytes .../babel/locale-data/en_GM.dat | Bin 816 -> 0 bytes .../babel/locale-data/en_GU.dat | Bin 646 -> 0 bytes .../babel/locale-data/en_GY.dat | Bin 625 -> 0 bytes .../babel/locale-data/en_HK.dat | Bin 1966 -> 0 bytes .../babel/locale-data/en_IE.dat | Bin 2145 -> 0 bytes .../babel/locale-data/en_IL.dat | Bin 1355 -> 0 bytes .../babel/locale-data/en_IM.dat | Bin 1204 -> 0 bytes .../babel/locale-data/en_IN.dat | Bin 2103 -> 0 bytes .../babel/locale-data/en_IO.dat | Bin 1099 -> 0 bytes .../babel/locale-data/en_JE.dat | Bin 1204 -> 0 bytes .../babel/locale-data/en_JM.dat | Bin 1557 -> 0 bytes .../babel/locale-data/en_KE.dat | Bin 1389 -> 0 bytes .../babel/locale-data/en_KI.dat | Bin 566 -> 0 bytes .../babel/locale-data/en_KN.dat | Bin 566 -> 0 bytes .../babel/locale-data/en_KY.dat | Bin 750 -> 0 bytes .../babel/locale-data/en_LC.dat | Bin 566 -> 0 bytes .../babel/locale-data/en_LR.dat | Bin 816 -> 0 bytes .../babel/locale-data/en_LS.dat | Bin 816 -> 0 bytes .../babel/locale-data/en_MG.dat | Bin 1369 -> 0 bytes .../babel/locale-data/en_MH.dat | Bin 1299 -> 0 bytes .../babel/locale-data/en_MO.dat | Bin 761 -> 0 bytes .../babel/locale-data/en_MP.dat | Bin 1280 -> 0 bytes .../babel/locale-data/en_MS.dat | Bin 1118 -> 0 bytes .../babel/locale-data/en_MT.dat | Bin 1885 -> 0 bytes .../babel/locale-data/en_MU.dat | Bin 1369 -> 0 bytes .../babel/locale-data/en_MW.dat | Bin 817 -> 0 bytes .../babel/locale-data/en_MY.dat | Bin 647 -> 0 bytes .../babel/locale-data/en_NA.dat | Bin 816 -> 0 bytes .../babel/locale-data/en_NF.dat | Bin 1118 -> 0 bytes .../babel/locale-data/en_NG.dat | Bin 818 -> 0 bytes .../babel/locale-data/en_NL.dat | Bin 982 -> 0 bytes .../babel/locale-data/en_NR.dat | Bin 1118 -> 0 bytes .../babel/locale-data/en_NU.dat | Bin 1118 -> 0 bytes .../babel/locale-data/en_NZ.dat | Bin 2169 -> 0 bytes .../babel/locale-data/en_PG.dat | Bin 566 -> 0 bytes .../babel/locale-data/en_PH.dat | Bin 587 -> 0 bytes .../babel/locale-data/en_PK.dat | Bin 1917 -> 0 bytes .../babel/locale-data/en_PN.dat | Bin 1118 -> 0 bytes .../babel/locale-data/en_PR.dat | Bin 566 -> 0 bytes .../babel/locale-data/en_PW.dat | Bin 731 -> 0 bytes .../babel/locale-data/en_RW.dat | Bin 1369 -> 0 bytes .../babel/locale-data/en_SB.dat | Bin 566 -> 0 bytes .../babel/locale-data/en_SC.dat | Bin 1119 -> 0 bytes .../babel/locale-data/en_SD.dat | Bin 859 -> 0 bytes .../babel/locale-data/en_SE.dat | Bin 1363 -> 0 bytes .../babel/locale-data/en_SG.dat | Bin 1627 -> 0 bytes .../babel/locale-data/en_SH.dat | Bin 1141 -> 0 bytes .../babel/locale-data/en_SI.dat | Bin 868 -> 0 bytes .../babel/locale-data/en_SL.dat | Bin 817 -> 0 bytes .../babel/locale-data/en_SS.dat | Bin 839 -> 0 bytes .../babel/locale-data/en_SX.dat | Bin 1121 -> 0 bytes .../babel/locale-data/en_SZ.dat | Bin 816 -> 0 bytes .../babel/locale-data/en_TC.dat | Bin 547 -> 0 bytes .../babel/locale-data/en_TK.dat | Bin 1118 -> 0 bytes .../babel/locale-data/en_TO.dat | Bin 567 -> 0 bytes .../babel/locale-data/en_TT.dat | Bin 585 -> 0 bytes .../babel/locale-data/en_TV.dat | Bin 1118 -> 0 bytes .../babel/locale-data/en_TZ.dat | Bin 1370 -> 0 bytes .../babel/locale-data/en_UG.dat | Bin 1370 -> 0 bytes .../babel/locale-data/en_UM.dat | Bin 584 -> 0 bytes .../babel/locale-data/en_US.dat | Bin 584 -> 0 bytes .../babel/locale-data/en_US_POSIX.dat | Bin 1165 -> 0 bytes .../babel/locale-data/en_VC.dat | Bin 566 -> 0 bytes .../babel/locale-data/en_VG.dat | Bin 547 -> 0 bytes .../babel/locale-data/en_VI.dat | Bin 584 -> 0 bytes .../babel/locale-data/en_VU.dat | Bin 567 -> 0 bytes .../babel/locale-data/en_WS.dat | Bin 587 -> 0 bytes .../babel/locale-data/en_ZA.dat | Bin 2922 -> 0 bytes .../babel/locale-data/en_ZM.dat | Bin 816 -> 0 bytes .../babel/locale-data/en_ZW.dat | Bin 2858 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/eo.dat | Bin 40545 -> 0 bytes .../babel/locale-data/eo_001.dat | Bin 784 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/es.dat | Bin 168560 -> 0 bytes .../babel/locale-data/es_419.dat | Bin 11003 -> 0 bytes .../babel/locale-data/es_AR.dat | Bin 7088 -> 0 bytes .../babel/locale-data/es_BO.dat | Bin 671 -> 0 bytes .../babel/locale-data/es_CL.dat | Bin 4670 -> 0 bytes .../babel/locale-data/es_CO.dat | Bin 7594 -> 0 bytes .../babel/locale-data/es_CR.dat | Bin 646 -> 0 bytes .../babel/locale-data/es_CU.dat | Bin 587 -> 0 bytes .../babel/locale-data/es_DO.dat | Bin 2978 -> 0 bytes .../babel/locale-data/es_EA.dat | Bin 547 -> 0 bytes .../babel/locale-data/es_EC.dat | Bin 2606 -> 0 bytes .../babel/locale-data/es_ES.dat | Bin 584 -> 0 bytes .../babel/locale-data/es_GQ.dat | Bin 830 -> 0 bytes .../babel/locale-data/es_GT.dat | Bin 4102 -> 0 bytes .../babel/locale-data/es_HN.dat | Bin 2579 -> 0 bytes .../babel/locale-data/es_IC.dat | Bin 547 -> 0 bytes .../babel/locale-data/es_MX.dat | Bin 35554 -> 0 bytes .../babel/locale-data/es_NI.dat | Bin 600 -> 0 bytes .../babel/locale-data/es_PA.dat | Bin 2959 -> 0 bytes .../babel/locale-data/es_PE.dat | Bin 3264 -> 0 bytes .../babel/locale-data/es_PH.dat | Bin 1163 -> 0 bytes .../babel/locale-data/es_PR.dat | Bin 3102 -> 0 bytes .../babel/locale-data/es_PY.dat | Bin 4608 -> 0 bytes .../babel/locale-data/es_SV.dat | Bin 599 -> 0 bytes .../babel/locale-data/es_US.dat | Bin 2027 -> 0 bytes .../babel/locale-data/es_UY.dat | Bin 2167 -> 0 bytes .../babel/locale-data/es_VE.dat | Bin 2900 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/et.dat | Bin 170724 -> 0 bytes .../babel/locale-data/et_EE.dat | Bin 584 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/eu.dat | Bin 137460 -> 0 bytes .../babel/locale-data/eu_ES.dat | Bin 584 -> 0 bytes .../babel/locale-data/ewo.dat | Bin 17392 -> 0 bytes .../babel/locale-data/ewo_CM.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/fa.dat | Bin 179114 -> 0 bytes .../babel/locale-data/fa_AF.dat | Bin 5342 -> 0 bytes .../babel/locale-data/fa_IR.dat | Bin 609 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/ff.dat | Bin 15918 -> 0 bytes .../babel/locale-data/ff_CM.dat | Bin 566 -> 0 bytes .../babel/locale-data/ff_GN.dat | Bin 567 -> 0 bytes .../babel/locale-data/ff_MR.dat | Bin 1143 -> 0 bytes .../babel/locale-data/ff_SN.dat | Bin 547 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/fi.dat | Bin 195501 -> 0 bytes .../babel/locale-data/fi_FI.dat | Bin 584 -> 0 bytes .../babel/locale-data/fil.dat | Bin 143422 -> 0 bytes .../babel/locale-data/fil_PH.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/fo.dat | Bin 133426 -> 0 bytes .../babel/locale-data/fo_DK.dat | Bin 605 -> 0 bytes .../babel/locale-data/fo_FO.dat | Bin 584 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/fr.dat | Bin 188924 -> 0 bytes .../babel/locale-data/fr_BE.dat | Bin 2382 -> 0 bytes .../babel/locale-data/fr_BF.dat | Bin 547 -> 0 bytes .../babel/locale-data/fr_BI.dat | Bin 568 -> 0 bytes .../babel/locale-data/fr_BJ.dat | Bin 547 -> 0 bytes .../babel/locale-data/fr_BL.dat | Bin 547 -> 0 bytes .../babel/locale-data/fr_CA.dat | Bin 26044 -> 0 bytes .../babel/locale-data/fr_CD.dat | Bin 567 -> 0 bytes .../babel/locale-data/fr_CF.dat | Bin 547 -> 0 bytes .../babel/locale-data/fr_CG.dat | Bin 547 -> 0 bytes .../babel/locale-data/fr_CH.dat | Bin 3339 -> 0 bytes .../babel/locale-data/fr_CI.dat | Bin 547 -> 0 bytes .../babel/locale-data/fr_CM.dat | Bin 566 -> 0 bytes .../babel/locale-data/fr_DJ.dat | Bin 1163 -> 0 bytes .../babel/locale-data/fr_DZ.dat | Bin 1205 -> 0 bytes .../babel/locale-data/fr_FR.dat | Bin 584 -> 0 bytes .../babel/locale-data/fr_GA.dat | Bin 547 -> 0 bytes .../babel/locale-data/fr_GF.dat | Bin 650 -> 0 bytes .../babel/locale-data/fr_GN.dat | Bin 567 -> 0 bytes .../babel/locale-data/fr_GP.dat | Bin 584 -> 0 bytes .../babel/locale-data/fr_GQ.dat | Bin 547 -> 0 bytes .../babel/locale-data/fr_HT.dat | Bin 1409 -> 0 bytes .../babel/locale-data/fr_KM.dat | Bin 567 -> 0 bytes .../babel/locale-data/fr_LU.dat | Bin 645 -> 0 bytes .../babel/locale-data/fr_MA.dat | Bin 1297 -> 0 bytes .../babel/locale-data/fr_MC.dat | Bin 584 -> 0 bytes .../babel/locale-data/fr_MF.dat | Bin 547 -> 0 bytes .../babel/locale-data/fr_MG.dat | Bin 567 -> 0 bytes .../babel/locale-data/fr_ML.dat | Bin 547 -> 0 bytes .../babel/locale-data/fr_MQ.dat | Bin 584 -> 0 bytes .../babel/locale-data/fr_MR.dat | Bin 1143 -> 0 bytes .../babel/locale-data/fr_MU.dat | Bin 567 -> 0 bytes .../babel/locale-data/fr_NC.dat | Bin 547 -> 0 bytes .../babel/locale-data/fr_NE.dat | Bin 547 -> 0 bytes .../babel/locale-data/fr_PF.dat | Bin 547 -> 0 bytes .../babel/locale-data/fr_PM.dat | Bin 547 -> 0 bytes .../babel/locale-data/fr_RE.dat | Bin 584 -> 0 bytes .../babel/locale-data/fr_RW.dat | Bin 567 -> 0 bytes .../babel/locale-data/fr_SC.dat | Bin 567 -> 0 bytes .../babel/locale-data/fr_SN.dat | Bin 547 -> 0 bytes .../babel/locale-data/fr_SY.dat | Bin 1205 -> 0 bytes .../babel/locale-data/fr_TD.dat | Bin 1123 -> 0 bytes .../babel/locale-data/fr_TG.dat | Bin 547 -> 0 bytes .../babel/locale-data/fr_TN.dat | Bin 1205 -> 0 bytes .../babel/locale-data/fr_VU.dat | Bin 1143 -> 0 bytes .../babel/locale-data/fr_WF.dat | Bin 547 -> 0 bytes .../babel/locale-data/fr_YT.dat | Bin 547 -> 0 bytes .../babel/locale-data/fur.dat | Bin 34852 -> 0 bytes .../babel/locale-data/fur_IT.dat | Bin 584 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/fy.dat | Bin 100316 -> 0 bytes .../babel/locale-data/fy_NL.dat | Bin 584 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/ga.dat | Bin 233535 -> 0 bytes .../babel/locale-data/ga_IE.dat | Bin 584 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/gd.dat | Bin 248492 -> 0 bytes .../babel/locale-data/gd_GB.dat | Bin 584 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/gl.dat | Bin 142710 -> 0 bytes .../babel/locale-data/gl_ES.dat | Bin 584 -> 0 bytes .../babel/locale-data/gsw.dat | Bin 97113 -> 0 bytes .../babel/locale-data/gsw_CH.dat | Bin 584 -> 0 bytes .../babel/locale-data/gsw_FR.dat | Bin 584 -> 0 bytes .../babel/locale-data/gsw_LI.dat | Bin 584 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/gu.dat | Bin 211032 -> 0 bytes .../babel/locale-data/gu_IN.dat | Bin 589 -> 0 bytes .../babel/locale-data/guz.dat | Bin 15831 -> 0 bytes .../babel/locale-data/guz_KE.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/gv.dat | Bin 3980 -> 0 bytes .../babel/locale-data/gv_IM.dat | Bin 565 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/ha.dat | Bin 18662 -> 0 bytes .../babel/locale-data/ha_GH.dat | Bin 570 -> 0 bytes .../babel/locale-data/ha_NE.dat | Bin 1099 -> 0 bytes .../babel/locale-data/ha_NG.dat | Bin 547 -> 0 bytes .../babel/locale-data/haw.dat | Bin 7593 -> 0 bytes .../babel/locale-data/haw_US.dat | Bin 584 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/he.dat | Bin 213538 -> 0 bytes .../babel/locale-data/he_IL.dat | Bin 609 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/hi.dat | Bin 210471 -> 0 bytes .../babel/locale-data/hi_IN.dat | Bin 589 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/hr.dat | Bin 210737 -> 0 bytes .../babel/locale-data/hr_BA.dat | Bin 586 -> 0 bytes .../babel/locale-data/hr_HR.dat | Bin 566 -> 0 bytes .../babel/locale-data/hsb.dat | Bin 160234 -> 0 bytes .../babel/locale-data/hsb_DE.dat | Bin 584 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/hu.dat | Bin 166162 -> 0 bytes .../babel/locale-data/hu_HU.dat | Bin 584 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/hy.dat | Bin 175191 -> 0 bytes .../babel/locale-data/hy_AM.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/id.dat | Bin 148548 -> 0 bytes .../babel/locale-data/id_ID.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/ig.dat | Bin 6401 -> 0 bytes .../babel/locale-data/ig_NG.dat | Bin 547 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/ii.dat | Bin 3996 -> 0 bytes .../babel/locale-data/ii_CN.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/is.dat | Bin 156562 -> 0 bytes .../babel/locale-data/is_IS.dat | Bin 584 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/it.dat | Bin 163872 -> 0 bytes .../babel/locale-data/it_CH.dat | Bin 3018 -> 0 bytes .../babel/locale-data/it_IT.dat | Bin 584 -> 0 bytes .../babel/locale-data/it_SM.dat | Bin 584 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/ja.dat | Bin 179026 -> 0 bytes .../babel/locale-data/ja_JP.dat | Bin 566 -> 0 bytes .../babel/locale-data/jgo.dat | Bin 12461 -> 0 bytes .../babel/locale-data/jgo_CM.dat | Bin 566 -> 0 bytes .../babel/locale-data/jmc.dat | Bin 15883 -> 0 bytes .../babel/locale-data/jmc_TZ.dat | Bin 547 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/ka.dat | Bin 225045 -> 0 bytes .../babel/locale-data/ka_GE.dat | Bin 566 -> 0 bytes .../babel/locale-data/kab.dat | Bin 16043 -> 0 bytes .../babel/locale-data/kab_DZ.dat | Bin 609 -> 0 bytes .../babel/locale-data/kam.dat | Bin 15969 -> 0 bytes .../babel/locale-data/kam_KE.dat | Bin 566 -> 0 bytes .../babel/locale-data/kde.dat | Bin 16279 -> 0 bytes .../babel/locale-data/kde_TZ.dat | Bin 547 -> 0 bytes .../babel/locale-data/kea.dat | Bin 62931 -> 0 bytes .../babel/locale-data/kea_CV.dat | Bin 547 -> 0 bytes .../babel/locale-data/khq.dat | Bin 15764 -> 0 bytes .../babel/locale-data/khq_ML.dat | Bin 547 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/ki.dat | Bin 15921 -> 0 bytes .../babel/locale-data/ki_KE.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/kk.dat | Bin 169177 -> 0 bytes .../babel/locale-data/kk_KZ.dat | Bin 566 -> 0 bytes .../babel/locale-data/kkj.dat | Bin 4806 -> 0 bytes .../babel/locale-data/kkj_CM.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/kl.dat | Bin 42557 -> 0 bytes .../babel/locale-data/kl_GL.dat | Bin 547 -> 0 bytes .../babel/locale-data/kln.dat | Bin 17900 -> 0 bytes .../babel/locale-data/kln_KE.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/km.dat | Bin 173309 -> 0 bytes .../babel/locale-data/km_KH.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/kn.dat | Bin 222932 -> 0 bytes .../babel/locale-data/kn_IN.dat | Bin 589 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/ko.dat | Bin 153826 -> 0 bytes .../babel/locale-data/ko_KP.dat | Bin 697 -> 0 bytes .../babel/locale-data/ko_KR.dat | Bin 566 -> 0 bytes .../babel/locale-data/kok.dat | Bin 9214 -> 0 bytes .../babel/locale-data/kok_IN.dat | Bin 589 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/ks.dat | Bin 103470 -> 0 bytes .../babel/locale-data/ks_IN.dat | Bin 589 -> 0 bytes .../babel/locale-data/ksb.dat | Bin 15859 -> 0 bytes .../babel/locale-data/ksb_TZ.dat | Bin 547 -> 0 bytes .../babel/locale-data/ksf.dat | Bin 16314 -> 0 bytes .../babel/locale-data/ksf_CM.dat | Bin 566 -> 0 bytes .../babel/locale-data/ksh.dat | Bin 68922 -> 0 bytes .../babel/locale-data/ksh_DE.dat | Bin 584 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/kw.dat | Bin 4353 -> 0 bytes .../babel/locale-data/kw_GB.dat | Bin 584 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/ky.dat | Bin 164403 -> 0 bytes .../babel/locale-data/ky_KG.dat | Bin 566 -> 0 bytes .../babel/locale-data/lag.dat | Bin 16998 -> 0 bytes .../babel/locale-data/lag_TZ.dat | Bin 547 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/lb.dat | Bin 154448 -> 0 bytes .../babel/locale-data/lb_LU.dat | Bin 584 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/lg.dat | Bin 16347 -> 0 bytes .../babel/locale-data/lg_UG.dat | Bin 547 -> 0 bytes .../babel/locale-data/lkt.dat | Bin 12273 -> 0 bytes .../babel/locale-data/lkt_US.dat | Bin 584 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/ln.dat | Bin 20539 -> 0 bytes .../babel/locale-data/ln_AO.dat | Bin 567 -> 0 bytes .../babel/locale-data/ln_CD.dat | Bin 547 -> 0 bytes .../babel/locale-data/ln_CF.dat | Bin 547 -> 0 bytes .../babel/locale-data/ln_CG.dat | Bin 547 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/lo.dat | Bin 197224 -> 0 bytes .../babel/locale-data/lo_LA.dat | Bin 566 -> 0 bytes .../babel/locale-data/lrc.dat | Bin 17802 -> 0 bytes .../babel/locale-data/lrc_IQ.dat | Bin 1185 -> 0 bytes .../babel/locale-data/lrc_IR.dat | Bin 609 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/lt.dat | Bin 239502 -> 0 bytes .../babel/locale-data/lt_LT.dat | Bin 584 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/lu.dat | Bin 15704 -> 0 bytes .../babel/locale-data/lu_CD.dat | Bin 547 -> 0 bytes .../babel/locale-data/luo.dat | Bin 15709 -> 0 bytes .../babel/locale-data/luo_KE.dat | Bin 566 -> 0 bytes .../babel/locale-data/luy.dat | Bin 15663 -> 0 bytes .../babel/locale-data/luy_KE.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/lv.dat | Bin 177028 -> 0 bytes .../babel/locale-data/lv_LV.dat | Bin 566 -> 0 bytes .../babel/locale-data/mas.dat | Bin 17096 -> 0 bytes .../babel/locale-data/mas_KE.dat | Bin 566 -> 0 bytes .../babel/locale-data/mas_TZ.dat | Bin 568 -> 0 bytes .../babel/locale-data/mer.dat | Bin 15894 -> 0 bytes .../babel/locale-data/mer_KE.dat | Bin 566 -> 0 bytes .../babel/locale-data/mfe.dat | Bin 15029 -> 0 bytes .../babel/locale-data/mfe_MU.dat | Bin 547 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/mg.dat | Bin 15882 -> 0 bytes .../babel/locale-data/mg_MG.dat | Bin 547 -> 0 bytes .../babel/locale-data/mgh.dat | Bin 10368 -> 0 bytes .../babel/locale-data/mgh_MZ.dat | Bin 566 -> 0 bytes .../babel/locale-data/mgo.dat | Bin 7778 -> 0 bytes .../babel/locale-data/mgo_CM.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/mk.dat | Bin 203424 -> 0 bytes .../babel/locale-data/mk_MK.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/ml.dat | Bin 249380 -> 0 bytes .../babel/locale-data/ml_IN.dat | Bin 589 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/mn.dat | Bin 155876 -> 0 bytes .../babel/locale-data/mn_MN.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/mr.dat | Bin 209665 -> 0 bytes .../babel/locale-data/mr_IN.dat | Bin 589 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/ms.dat | Bin 122619 -> 0 bytes .../babel/locale-data/ms_BN.dat | Bin 1215 -> 0 bytes .../babel/locale-data/ms_MY.dat | Bin 566 -> 0 bytes .../babel/locale-data/ms_SG.dat | Bin 585 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/mt.dat | Bin 36270 -> 0 bytes .../babel/locale-data/mt_MT.dat | Bin 566 -> 0 bytes .../babel/locale-data/mua.dat | Bin 16399 -> 0 bytes .../babel/locale-data/mua_CM.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/my.dat | Bin 176396 -> 0 bytes .../babel/locale-data/my_MM.dat | Bin 566 -> 0 bytes .../babel/locale-data/mzn.dat | Bin 64352 -> 0 bytes .../babel/locale-data/mzn_IR.dat | Bin 609 -> 0 bytes .../babel/locale-data/naq.dat | Bin 16456 -> 0 bytes .../babel/locale-data/naq_NA.dat | Bin 547 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/nb.dat | Bin 184718 -> 0 bytes .../babel/locale-data/nb_NO.dat | Bin 584 -> 0 bytes .../babel/locale-data/nb_SJ.dat | Bin 565 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/nd.dat | Bin 16292 -> 0 bytes .../babel/locale-data/nd_ZW.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/ne.dat | Bin 210199 -> 0 bytes .../babel/locale-data/ne_IN.dat | Bin 1223 -> 0 bytes .../babel/locale-data/ne_NP.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/nl.dat | Bin 183349 -> 0 bytes .../babel/locale-data/nl_AW.dat | Bin 569 -> 0 bytes .../babel/locale-data/nl_BE.dat | Bin 1800 -> 0 bytes .../babel/locale-data/nl_BQ.dat | Bin 566 -> 0 bytes .../babel/locale-data/nl_CW.dat | Bin 569 -> 0 bytes .../babel/locale-data/nl_NL.dat | Bin 584 -> 0 bytes .../babel/locale-data/nl_SR.dat | Bin 627 -> 0 bytes .../babel/locale-data/nl_SX.dat | Bin 569 -> 0 bytes .../babel/locale-data/nmg.dat | Bin 16022 -> 0 bytes .../babel/locale-data/nmg_CM.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/nn.dat | Bin 91353 -> 0 bytes .../babel/locale-data/nn_NO.dat | Bin 584 -> 0 bytes .../babel/locale-data/nnh.dat | Bin 6549 -> 0 bytes .../babel/locale-data/nnh_CM.dat | Bin 566 -> 0 bytes .../babel/locale-data/nus.dat | Bin 8649 -> 0 bytes .../babel/locale-data/nus_SS.dat | Bin 547 -> 0 bytes .../babel/locale-data/nyn.dat | Bin 16174 -> 0 bytes .../babel/locale-data/nyn_UG.dat | Bin 547 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/om.dat | Bin 7169 -> 0 bytes .../babel/locale-data/om_ET.dat | Bin 566 -> 0 bytes .../babel/locale-data/om_KE.dat | Bin 1139 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/or.dat | Bin 48423 -> 0 bytes .../babel/locale-data/or_IN.dat | Bin 589 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/os.dat | Bin 17087 -> 0 bytes .../babel/locale-data/os_GE.dat | Bin 566 -> 0 bytes .../babel/locale-data/os_RU.dat | Bin 587 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/pa.dat | Bin 202957 -> 0 bytes .../babel/locale-data/pa_Arab.dat | Bin 3946 -> 0 bytes .../babel/locale-data/pa_Arab_PK.dat | Bin 566 -> 0 bytes .../babel/locale-data/pa_Guru.dat | Bin 1254 -> 0 bytes .../babel/locale-data/pa_Guru_IN.dat | Bin 589 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/pl.dat | Bin 204111 -> 0 bytes .../babel/locale-data/pl_PL.dat | Bin 584 -> 0 bytes .../babel/locale-data/prg.dat | Bin 20205 -> 0 bytes .../babel/locale-data/prg_001.dat | Bin 1527 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/ps.dat | Bin 9778 -> 0 bytes .../babel/locale-data/ps_AF.dat | Bin 609 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/pt.dat | Bin 177333 -> 0 bytes .../babel/locale-data/pt_AO.dat | Bin 953 -> 0 bytes .../babel/locale-data/pt_BR.dat | Bin 566 -> 0 bytes .../babel/locale-data/pt_CV.dat | Bin 978 -> 0 bytes .../babel/locale-data/pt_GW.dat | Bin 933 -> 0 bytes .../babel/locale-data/pt_MO.dat | Bin 1550 -> 0 bytes .../babel/locale-data/pt_MZ.dat | Bin 973 -> 0 bytes .../babel/locale-data/pt_PT.dat | Bin 55559 -> 0 bytes .../babel/locale-data/pt_ST.dat | Bin 953 -> 0 bytes .../babel/locale-data/pt_TL.dat | Bin 933 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/qu.dat | Bin 14168 -> 0 bytes .../babel/locale-data/qu_BO.dat | Bin 794 -> 0 bytes .../babel/locale-data/qu_EC.dat | Bin 768 -> 0 bytes .../babel/locale-data/qu_PE.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/rm.dat | Bin 62733 -> 0 bytes .../babel/locale-data/rm_CH.dat | Bin 584 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/rn.dat | Bin 16586 -> 0 bytes .../babel/locale-data/rn_BI.dat | Bin 547 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/ro.dat | Bin 183750 -> 0 bytes .../babel/locale-data/ro_MD.dat | Bin 3002 -> 0 bytes .../babel/locale-data/ro_RO.dat | Bin 566 -> 0 bytes .../babel/locale-data/rof.dat | Bin 15981 -> 0 bytes .../babel/locale-data/rof_TZ.dat | Bin 547 -> 0 bytes .../babel/locale-data/root.dat | Bin 32394 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/ru.dat | Bin 246782 -> 0 bytes .../babel/locale-data/ru_BY.dat | Bin 608 -> 0 bytes .../babel/locale-data/ru_KG.dat | Bin 590 -> 0 bytes .../babel/locale-data/ru_KZ.dat | Bin 587 -> 0 bytes .../babel/locale-data/ru_MD.dat | Bin 585 -> 0 bytes .../babel/locale-data/ru_RU.dat | Bin 566 -> 0 bytes .../babel/locale-data/ru_UA.dat | Bin 1990 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/rw.dat | Bin 6218 -> 0 bytes .../babel/locale-data/rw_RW.dat | Bin 547 -> 0 bytes .../babel/locale-data/rwk.dat | Bin 15872 -> 0 bytes .../babel/locale-data/rwk_TZ.dat | Bin 547 -> 0 bytes .../babel/locale-data/sah.dat | Bin 9453 -> 0 bytes .../babel/locale-data/sah_RU.dat | Bin 566 -> 0 bytes .../babel/locale-data/saq.dat | Bin 16252 -> 0 bytes .../babel/locale-data/saq_KE.dat | Bin 566 -> 0 bytes .../babel/locale-data/sbp.dat | Bin 16288 -> 0 bytes .../babel/locale-data/sbp_TZ.dat | Bin 547 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/se.dat | Bin 42062 -> 0 bytes .../babel/locale-data/se_FI.dat | Bin 3315 -> 0 bytes .../babel/locale-data/se_NO.dat | Bin 584 -> 0 bytes .../babel/locale-data/se_SE.dat | Bin 625 -> 0 bytes .../babel/locale-data/seh.dat | Bin 15810 -> 0 bytes .../babel/locale-data/seh_MZ.dat | Bin 566 -> 0 bytes .../babel/locale-data/ses.dat | Bin 15823 -> 0 bytes .../babel/locale-data/ses_ML.dat | Bin 547 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/sg.dat | Bin 16441 -> 0 bytes .../babel/locale-data/sg_CF.dat | Bin 547 -> 0 bytes .../babel/locale-data/shi.dat | Bin 21851 -> 0 bytes .../babel/locale-data/shi_Latn.dat | Bin 15479 -> 0 bytes .../babel/locale-data/shi_Latn_MA.dat | Bin 609 -> 0 bytes .../babel/locale-data/shi_Tfng.dat | Bin 907 -> 0 bytes .../babel/locale-data/shi_Tfng_MA.dat | Bin 609 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/si.dat | Bin 197766 -> 0 bytes .../babel/locale-data/si_LK.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/sk.dat | Bin 203983 -> 0 bytes .../babel/locale-data/sk_SK.dat | Bin 584 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/sl.dat | Bin 191367 -> 0 bytes .../babel/locale-data/sl_SI.dat | Bin 566 -> 0 bytes .../babel/locale-data/smn.dat | Bin 6162 -> 0 bytes .../babel/locale-data/smn_FI.dat | Bin 584 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/sn.dat | Bin 15996 -> 0 bytes .../babel/locale-data/sn_ZW.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/so.dat | Bin 19319 -> 0 bytes .../babel/locale-data/so_DJ.dat | Bin 587 -> 0 bytes .../babel/locale-data/so_ET.dat | Bin 586 -> 0 bytes .../babel/locale-data/so_KE.dat | Bin 1139 -> 0 bytes .../babel/locale-data/so_SO.dat | Bin 547 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/sq.dat | Bin 142276 -> 0 bytes .../babel/locale-data/sq_AL.dat | Bin 566 -> 0 bytes .../babel/locale-data/sq_MK.dat | Bin 1139 -> 0 bytes .../babel/locale-data/sq_XK.dat | Bin 1118 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/sr.dat | Bin 242940 -> 0 bytes .../babel/locale-data/sr_Cyrl.dat | Bin 1962 -> 0 bytes .../babel/locale-data/sr_Cyrl_BA.dat | Bin 1694 -> 0 bytes .../babel/locale-data/sr_Cyrl_ME.dat | Bin 566 -> 0 bytes .../babel/locale-data/sr_Cyrl_RS.dat | Bin 566 -> 0 bytes .../babel/locale-data/sr_Cyrl_XK.dat | Bin 566 -> 0 bytes .../babel/locale-data/sr_Latn.dat | Bin 199278 -> 0 bytes .../babel/locale-data/sr_Latn_BA.dat | Bin 1694 -> 0 bytes .../babel/locale-data/sr_Latn_ME.dat | Bin 566 -> 0 bytes .../babel/locale-data/sr_Latn_RS.dat | Bin 566 -> 0 bytes .../babel/locale-data/sr_Latn_XK.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/sv.dat | Bin 187879 -> 0 bytes .../babel/locale-data/sv_AX.dat | Bin 584 -> 0 bytes .../babel/locale-data/sv_FI.dat | Bin 1156 -> 0 bytes .../babel/locale-data/sv_SE.dat | Bin 584 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/sw.dat | Bin 147629 -> 0 bytes .../babel/locale-data/sw_CD.dat | Bin 3209 -> 0 bytes .../babel/locale-data/sw_KE.dat | Bin 566 -> 0 bytes .../babel/locale-data/sw_TZ.dat | Bin 547 -> 0 bytes .../babel/locale-data/sw_UG.dat | Bin 568 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/ta.dat | Bin 225730 -> 0 bytes .../babel/locale-data/ta_IN.dat | Bin 589 -> 0 bytes .../babel/locale-data/ta_LK.dat | Bin 1139 -> 0 bytes .../babel/locale-data/ta_MY.dat | Bin 1196 -> 0 bytes .../babel/locale-data/ta_SG.dat | Bin 1215 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/te.dat | Bin 221796 -> 0 bytes .../babel/locale-data/te_IN.dat | Bin 589 -> 0 bytes .../babel/locale-data/teo.dat | Bin 16453 -> 0 bytes .../babel/locale-data/teo_KE.dat | Bin 587 -> 0 bytes .../babel/locale-data/teo_UG.dat | Bin 547 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/th.dat | Bin 211214 -> 0 bytes .../babel/locale-data/th_TH.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/ti.dat | Bin 18082 -> 0 bytes .../babel/locale-data/ti_ER.dat | Bin 2912 -> 0 bytes .../babel/locale-data/ti_ET.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/tk.dat | Bin 109864 -> 0 bytes .../babel/locale-data/tk_TM.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/to.dat | Bin 140521 -> 0 bytes .../babel/locale-data/to_TO.dat | Bin 547 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/tr.dat | Bin 180298 -> 0 bytes .../babel/locale-data/tr_CY.dat | Bin 1142 -> 0 bytes .../babel/locale-data/tr_TR.dat | Bin 566 -> 0 bytes .../babel/locale-data/twq.dat | Bin 15990 -> 0 bytes .../babel/locale-data/twq_NE.dat | Bin 547 -> 0 bytes .../babel/locale-data/tzm.dat | Bin 15993 -> 0 bytes .../babel/locale-data/tzm_MA.dat | Bin 609 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/ug.dat | Bin 116435 -> 0 bytes .../babel/locale-data/ug_CN.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/uk.dat | Bin 253728 -> 0 bytes .../babel/locale-data/uk_UA.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/ur.dat | Bin 159409 -> 0 bytes .../babel/locale-data/ur_IN.dat | Bin 12674 -> 0 bytes .../babel/locale-data/ur_PK.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/uz.dat | Bin 139473 -> 0 bytes .../babel/locale-data/uz_Arab.dat | Bin 4170 -> 0 bytes .../babel/locale-data/uz_Arab_AF.dat | Bin 609 -> 0 bytes .../babel/locale-data/uz_Cyrl.dat | Bin 79024 -> 0 bytes .../babel/locale-data/uz_Cyrl_UZ.dat | Bin 566 -> 0 bytes .../babel/locale-data/uz_Latn.dat | Bin 1286 -> 0 bytes .../babel/locale-data/uz_Latn_UZ.dat | Bin 566 -> 0 bytes .../babel/locale-data/vai.dat | Bin 16503 -> 0 bytes .../babel/locale-data/vai_Latn.dat | Bin 15148 -> 0 bytes .../babel/locale-data/vai_Latn_LR.dat | Bin 547 -> 0 bytes .../babel/locale-data/vai_Vaii.dat | Bin 626 -> 0 bytes .../babel/locale-data/vai_Vaii_LR.dat | Bin 547 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/vi.dat | Bin 151830 -> 0 bytes .../babel/locale-data/vi_VN.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/vo.dat | Bin 4692 -> 0 bytes .../babel/locale-data/vo_001.dat | Bin 784 -> 0 bytes .../babel/locale-data/vun.dat | Bin 15882 -> 0 bytes .../babel/locale-data/vun_TZ.dat | Bin 547 -> 0 bytes .../babel/locale-data/wae.dat | Bin 28598 -> 0 bytes .../babel/locale-data/wae_CH.dat | Bin 584 -> 0 bytes .../babel/locale-data/xog.dat | Bin 16381 -> 0 bytes .../babel/locale-data/xog_UG.dat | Bin 547 -> 0 bytes .../babel/locale-data/yav.dat | Bin 15216 -> 0 bytes .../babel/locale-data/yav_CM.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/yi.dat | Bin 30199 -> 0 bytes .../babel/locale-data/yi_001.dat | Bin 846 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/yo.dat | Bin 22789 -> 0 bytes .../babel/locale-data/yo_BJ.dat | Bin 22077 -> 0 bytes .../babel/locale-data/yo_NG.dat | Bin 547 -> 0 bytes .../babel/locale-data/zgh.dat | Bin 21340 -> 0 bytes .../babel/locale-data/zgh_MA.dat | Bin 609 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/zh.dat | Bin 155809 -> 0 bytes .../babel/locale-data/zh_Hans.dat | Bin 1249 -> 0 bytes .../babel/locale-data/zh_Hans_CN.dat | Bin 566 -> 0 bytes .../babel/locale-data/zh_Hans_HK.dat | Bin 3704 -> 0 bytes .../babel/locale-data/zh_Hans_MO.dat | Bin 3343 -> 0 bytes .../babel/locale-data/zh_Hans_SG.dat | Bin 3539 -> 0 bytes .../babel/locale-data/zh_Hant.dat | Bin 162705 -> 0 bytes .../babel/locale-data/zh_Hant_HK.dat | Bin 42107 -> 0 bytes .../babel/locale-data/zh_Hant_MO.dat | Bin 588 -> 0 bytes .../babel/locale-data/zh_Hant_TW.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/locale-data/zu.dat | Bin 140142 -> 0 bytes .../babel/locale-data/zu_ZA.dat | Bin 566 -> 0 bytes .../babel-2.3.4-py2.7.egg/babel/localedata.py | 227 - .../babel/localtime/__init__.py | 76 - .../babel-2.3.4-py2.7.egg/babel/localtime/_unix.py | 138 - .../babel/localtime/_win32.py | 96 - .../babel/messages/__init__.py | 12 - .../babel/messages/catalog.py | 820 --- .../babel/messages/checkers.py | 173 - .../babel/messages/extract.py | 632 --- .../babel/messages/frontend.py | 1018 ---- .../babel/messages/jslexer.py | 185 - .../babel-2.3.4-py2.7.egg/babel/messages/mofile.py | 213 - .../babel/messages/plurals.py | 252 - .../babel-2.3.4-py2.7.egg/babel/messages/pofile.py | 507 -- .../babel-2.3.4-py2.7.egg/babel/numbers.py | 681 --- .../babel-2.3.4-py2.7.egg/babel/plural.py | 609 --- .../babel-2.3.4-py2.7.egg/babel/support.py | 609 --- .../babel-2.3.4-py2.7.egg/babel/units.py | 276 - .../babel-2.3.4-py2.7.egg/babel/util.py | 275 - .../cliff-2.4.0-py2.7.egg/EGG-INFO/PKG-INFO | 44 - .../cliff-2.4.0-py2.7.egg/EGG-INFO/SOURCES.txt | 84 - .../EGG-INFO/dependency_links.txt | 1 - .../EGG-INFO/entry_points.txt | 18 - .../cliff-2.4.0-py2.7.egg/EGG-INFO/not-zip-safe | 1 - .../cliff-2.4.0-py2.7.egg/EGG-INFO/pbr.json | 1 - .../cliff-2.4.0-py2.7.egg/EGG-INFO/requires.txt | 10 - .../cliff-2.4.0-py2.7.egg/EGG-INFO/top_level.txt | 1 - .../cliff-2.4.0-py2.7.egg/cliff/__init__.py | 0 .../cliff-2.4.0-py2.7.egg/cliff/app.py | 423 -- .../cliff-2.4.0-py2.7.egg/cliff/argparse.py | 30 - .../cliff-2.4.0-py2.7.egg/cliff/columns.py | 40 - .../cliff-2.4.0-py2.7.egg/cliff/command.py | 90 - .../cliff-2.4.0-py2.7.egg/cliff/commandmanager.py | 104 - .../cliff-2.4.0-py2.7.egg/cliff/complete.py | 221 - .../cliff-2.4.0-py2.7.egg/cliff/display.py | 118 - .../cliff/formatters/__init__.py | 0 .../cliff-2.4.0-py2.7.egg/cliff/formatters/base.py | 75 - .../cliff/formatters/commaseparated.py | 63 - .../cliff/formatters/json_format.py | 53 - .../cliff/formatters/shell.py | 65 - .../cliff/formatters/table.py | 203 - .../cliff/formatters/value.py | 44 - .../cliff/formatters/yaml_format.py | 45 - .../cliff-2.4.0-py2.7.egg/cliff/help.py | 96 - .../cliff-2.4.0-py2.7.egg/cliff/interactive.py | 147 - .../cliff-2.4.0-py2.7.egg/cliff/lister.py | 55 - .../cliff-2.4.0-py2.7.egg/cliff/show.py | 59 - .../cliff-2.4.0-py2.7.egg/cliff/tests/__init__.py | 0 .../cliff-2.4.0-py2.7.egg/cliff/tests/test_app.py | 498 -- .../cliff/tests/test_columns.py | 30 - .../cliff/tests/test_command.py | 64 - .../cliff/tests/test_commandmanager.py | 132 - .../cliff/tests/test_complete.py | 173 - .../cliff/tests/test_formatters_csv.py | 85 - .../cliff/tests/test_formatters_json.py | 129 - .../cliff/tests/test_formatters_shell.py | 96 - .../cliff/tests/test_formatters_table.py | 547 -- .../cliff/tests/test_formatters_value.py | 65 - .../cliff/tests/test_formatters_yaml.py | 100 - .../cliff-2.4.0-py2.7.egg/cliff/tests/test_help.py | 180 - .../cliff/tests/test_interactive.py | 74 - .../cliff/tests/test_lister.py | 75 - .../cliff-2.4.0-py2.7.egg/cliff/tests/test_show.py | 84 - .../cliff/tests/test_utils.py | 79 - .../cliff-2.4.0-py2.7.egg/cliff/tests/utils.py | 48 - .../cliff-2.4.0-py2.7.egg/cliff/utils.py | 155 - .../resources/Lib/site-packages/easy-install.pth | 11 - .../resources/Lib/site-packages/easy_install.py | 5 - .../pbr-1.8.0-py2.7.egg/EGG-INFO/PKG-INFO | 58 - .../pbr-1.8.0-py2.7.egg/EGG-INFO/SOURCES.txt | 88 - .../EGG-INFO/dependency_links.txt | 1 - .../pbr-1.8.0-py2.7.egg/EGG-INFO/entry_points.txt | 12 - .../pbr-1.8.0-py2.7.egg/EGG-INFO/not-zip-safe | 1 - .../pbr-1.8.0-py2.7.egg/EGG-INFO/top_level.txt | 1 - .../pbr-1.8.0-py2.7.egg/pbr/__init__.py | 0 .../pbr-1.8.0-py2.7.egg/pbr/builddoc.py | 230 - .../pbr-1.8.0-py2.7.egg/pbr/cmd/__init__.py | 0 .../pbr-1.8.0-py2.7.egg/pbr/cmd/main.py | 110 - .../site-packages/pbr-1.8.0-py2.7.egg/pbr/core.py | 154 - .../pbr-1.8.0-py2.7.egg/pbr/extra_files.py | 35 - .../pbr-1.8.0-py2.7.egg/pbr/find_package.py | 29 - .../site-packages/pbr-1.8.0-py2.7.egg/pbr/git.py | 294 - .../pbr-1.8.0-py2.7.egg/pbr/hooks/__init__.py | 28 - .../pbr-1.8.0-py2.7.egg/pbr/hooks/backwards.py | 33 - .../pbr-1.8.0-py2.7.egg/pbr/hooks/base.py | 34 - .../pbr-1.8.0-py2.7.egg/pbr/hooks/commands.py | 66 - .../pbr-1.8.0-py2.7.egg/pbr/hooks/files.py | 103 - .../pbr-1.8.0-py2.7.egg/pbr/hooks/metadata.py | 32 - .../pbr-1.8.0-py2.7.egg/pbr/options.py | 53 - .../pbr-1.8.0-py2.7.egg/pbr/packaging.py | 677 --- .../pbr-1.8.0-py2.7.egg/pbr/pbr_json.py | 34 - .../pbr-1.8.0-py2.7.egg/pbr/testr_command.py | 156 - .../pbr-1.8.0-py2.7.egg/pbr/tests/__init__.py | 0 .../pbr-1.8.0-py2.7.egg/pbr/tests/base.py | 218 - .../pbr-1.8.0-py2.7.egg/pbr/tests/test_commands.py | 66 - .../pbr-1.8.0-py2.7.egg/pbr/tests/test_core.py | 147 - .../pbr-1.8.0-py2.7.egg/pbr/tests/test_files.py | 78 - .../pbr-1.8.0-py2.7.egg/pbr/tests/test_hooks.py | 100 - .../pbr/tests/test_integration.py | 122 - .../pbr/tests/test_packaging.py | 520 -- .../pbr-1.8.0-py2.7.egg/pbr/tests/test_setup.py | 430 -- .../pbr-1.8.0-py2.7.egg/pbr/tests/test_util.py | 80 - .../pbr-1.8.0-py2.7.egg/pbr/tests/test_version.py | 298 -- .../pbr-1.8.0-py2.7.egg/pbr/tests/test_wsgi.py | 171 - .../pbr/tests/testpackage/CHANGES.txt | 86 - .../pbr/tests/testpackage/LICENSE.txt | 29 - .../pbr/tests/testpackage/MANIFEST.in | 2 - .../pbr/tests/testpackage/README.txt | 148 - .../pbr/tests/testpackage/data_files/a.txt | 0 .../pbr/tests/testpackage/data_files/b.txt | 0 .../pbr/tests/testpackage/data_files/c.rst | 0 .../pbr/tests/testpackage/extra-file.txt | 0 .../pbr/tests/testpackage/git-extra-file.txt | 0 .../tests/testpackage/pbr_testpackage/__init__.py | 3 - .../testpackage/pbr_testpackage/_setup_hooks.py | 65 - .../pbr/tests/testpackage/pbr_testpackage/cmd.py | 26 - .../pbr/tests/testpackage/pbr_testpackage/extra.py | 0 .../testpackage/pbr_testpackage/package_data/1.txt | 0 .../testpackage/pbr_testpackage/package_data/2.txt | 0 .../pbr/tests/testpackage/pbr_testpackage/wsgi.py | 31 - .../pbr/tests/testpackage/setup.cfg | 57 - .../pbr/tests/testpackage/setup.py | 22 - .../pbr/tests/testpackage/src/testext.c | 28 - .../pbr/tests/testpackage/test-requirements.txt | 1 - .../pbr-1.8.0-py2.7.egg/pbr/tests/util.py | 74 - .../site-packages/pbr-1.8.0-py2.7.egg/pbr/util.py | 682 --- .../pbr-1.8.0-py2.7.egg/pbr/version.py | 473 -- .../pip-1.6.dev1.dist-info/DESCRIPTION.rst | 26 - .../site-packages/pip-1.6.dev1.dist-info/METADATA | 54 - .../site-packages/pip-1.6.dev1.dist-info/RECORD | 440 -- .../Lib/site-packages/pip-1.6.dev1.dist-info/WHEEL | 6 - .../pip-1.6.dev1.dist-info/entry_points.txt | 5 - .../pip-1.6.dev1.dist-info/metadata.json | 1 - .../pip-1.6.dev1.dist-info/top_level.txt | 1 - .../resources/Lib/site-packages/pip/__init__.py | 249 - .../resources/Lib/site-packages/pip/__main__.py | 17 - .../Lib/site-packages/pip/_vendor/__init__.py | 8 - .../pip/_vendor/_markerlib/__init__.py | 16 - .../pip/_vendor/_markerlib/markers.py | 119 - .../site-packages/pip/_vendor/colorama/__init__.py | 7 - .../Lib/site-packages/pip/_vendor/colorama/ansi.py | 50 - .../pip/_vendor/colorama/ansitowin32.py | 189 - .../pip/_vendor/colorama/initialise.py | 56 - .../site-packages/pip/_vendor/colorama/win32.py | 134 - .../site-packages/pip/_vendor/colorama/winterm.py | 120 - .../site-packages/pip/_vendor/distlib/__init__.py | 22 - .../pip/_vendor/distlib/_backport/__init__.py | 6 - .../pip/_vendor/distlib/_backport/misc.py | 41 - .../pip/_vendor/distlib/_backport/shutil.py | 761 --- .../pip/_vendor/distlib/_backport/sysconfig.cfg | 84 - .../pip/_vendor/distlib/_backport/sysconfig.py | 788 --- .../pip/_vendor/distlib/_backport/tarfile.py | 2607 --------- .../site-packages/pip/_vendor/distlib/compat.py | 1064 ---- .../site-packages/pip/_vendor/distlib/database.py | 1301 ----- .../Lib/site-packages/pip/_vendor/distlib/index.py | 480 -- .../site-packages/pip/_vendor/distlib/locators.py | 1187 ----- .../site-packages/pip/_vendor/distlib/manifest.py | 364 -- .../site-packages/pip/_vendor/distlib/markers.py | 190 - .../site-packages/pip/_vendor/distlib/metadata.py | 1015 ---- .../site-packages/pip/_vendor/distlib/resources.py | 351 -- .../site-packages/pip/_vendor/distlib/scripts.py | 343 -- .../Lib/site-packages/pip/_vendor/distlib/util.py | 1532 ------ .../site-packages/pip/_vendor/distlib/version.py | 698 --- .../Lib/site-packages/pip/_vendor/distlib/wheel.py | 723 --- .../site-packages/pip/_vendor/html5lib/__init__.py | 23 - .../pip/_vendor/html5lib/constants.py | 3086 ----------- .../pip/_vendor/html5lib/filters/__init__.py | 0 .../pip/_vendor/html5lib/filters/_base.py | 12 - .../html5lib/filters/alphabeticalattributes.py | 20 - .../html5lib/filters/inject_meta_charset.py | 65 - .../pip/_vendor/html5lib/filters/lint.py | 93 - .../pip/_vendor/html5lib/filters/optionaltags.py | 205 - .../pip/_vendor/html5lib/filters/sanitizer.py | 12 - .../pip/_vendor/html5lib/filters/whitespace.py | 38 - .../pip/_vendor/html5lib/html5parser.py | 2725 ---------- .../site-packages/pip/_vendor/html5lib/ihatexml.py | 285 - .../pip/_vendor/html5lib/inputstream.py | 905 ---- .../pip/_vendor/html5lib/sanitizer.py | 271 - .../pip/_vendor/html5lib/serializer/__init__.py | 16 - .../_vendor/html5lib/serializer/htmlserializer.py | 309 -- .../pip/_vendor/html5lib/tokenizer.py | 1731 ------ .../pip/_vendor/html5lib/treebuilders/__init__.py | 76 - .../pip/_vendor/html5lib/treebuilders/_base.py | 377 -- .../pip/_vendor/html5lib/treebuilders/dom.py | 290 - .../pip/_vendor/html5lib/treebuilders/etree.py | 337 -- .../_vendor/html5lib/treebuilders/etree_lxml.py | 369 -- .../pip/_vendor/html5lib/treewalkers/__init__.py | 57 - .../pip/_vendor/html5lib/treewalkers/_base.py | 196 - .../pip/_vendor/html5lib/treewalkers/dom.py | 46 - .../pip/_vendor/html5lib/treewalkers/etree.py | 131 - .../_vendor/html5lib/treewalkers/genshistream.py | 69 - .../pip/_vendor/html5lib/treewalkers/lxmletree.py | 208 - .../pip/_vendor/html5lib/treewalkers/pulldom.py | 63 - .../pip/_vendor/html5lib/trie/__init__.py | 12 - .../pip/_vendor/html5lib/trie/_base.py | 37 - .../pip/_vendor/html5lib/trie/datrie.py | 44 - .../site-packages/pip/_vendor/html5lib/trie/py.py | 67 - .../site-packages/pip/_vendor/html5lib/utils.py | 78 - .../Lib/site-packages/pip/_vendor/pkg_resources.py | 2719 ---------- .../Lib/site-packages/pip/_vendor/re-vendor.py | 34 - .../site-packages/pip/_vendor/requests/__init__.py | 77 - .../site-packages/pip/_vendor/requests/adapters.py | 396 -- .../Lib/site-packages/pip/_vendor/requests/api.py | 120 - .../Lib/site-packages/pip/_vendor/requests/auth.py | 196 - .../site-packages/pip/_vendor/requests/cacert.pem | 5026 ------------------ .../site-packages/pip/_vendor/requests/certs.py | 24 - .../site-packages/pip/_vendor/requests/compat.py | 115 - .../site-packages/pip/_vendor/requests/cookies.py | 454 -- .../pip/_vendor/requests/exceptions.py | 68 - .../site-packages/pip/_vendor/requests/hooks.py | 45 - .../site-packages/pip/_vendor/requests/models.py | 781 --- .../pip/_vendor/requests/packages/__init__.py | 3 - .../_vendor/requests/packages/charade/__init__.py | 66 - .../_vendor/requests/packages/charade/__main__.py | 7 - .../_vendor/requests/packages/charade/big5freq.py | 925 ---- .../requests/packages/charade/big5prober.py | 42 - .../requests/packages/charade/chardistribution.py | 231 - .../packages/charade/charsetgroupprober.py | 106 - .../requests/packages/charade/charsetprober.py | 62 - .../packages/charade/codingstatemachine.py | 61 - .../_vendor/requests/packages/charade/compat.py | 34 - .../_vendor/requests/packages/charade/constants.py | 39 - .../requests/packages/charade/cp949prober.py | 44 - .../_vendor/requests/packages/charade/escprober.py | 86 - .../pip/_vendor/requests/packages/charade/escsm.py | 242 - .../requests/packages/charade/eucjpprober.py | 90 - .../_vendor/requests/packages/charade/euckrfreq.py | 596 --- .../requests/packages/charade/euckrprober.py | 42 - .../_vendor/requests/packages/charade/euctwfreq.py | 428 -- .../requests/packages/charade/euctwprober.py | 41 - .../requests/packages/charade/gb2312freq.py | 472 -- .../requests/packages/charade/gb2312prober.py | 41 - .../requests/packages/charade/hebrewprober.py | 283 - .../_vendor/requests/packages/charade/jisfreq.py | 569 -- .../_vendor/requests/packages/charade/jpcntx.py | 219 - .../packages/charade/langbulgarianmodel.py | 229 - .../requests/packages/charade/langcyrillicmodel.py | 329 -- .../requests/packages/charade/langgreekmodel.py | 225 - .../requests/packages/charade/langhebrewmodel.py | 201 - .../packages/charade/langhungarianmodel.py | 225 - .../requests/packages/charade/langthaimodel.py | 200 - .../requests/packages/charade/latin1prober.py | 139 - .../requests/packages/charade/mbcharsetprober.py | 86 - .../requests/packages/charade/mbcsgroupprober.py | 54 - .../_vendor/requests/packages/charade/mbcssm.py | 575 -- .../requests/packages/charade/sbcharsetprober.py | 120 - .../requests/packages/charade/sbcsgroupprober.py | 69 - .../requests/packages/charade/sjisprober.py | 91 - .../requests/packages/charade/universaldetector.py | 168 - .../requests/packages/charade/utf8prober.py | 76 - .../_vendor/requests/packages/chardet/__init__.py | 32 - .../_vendor/requests/packages/chardet/big5freq.py | 925 ---- .../requests/packages/chardet/big5prober.py | 42 - .../requests/packages/chardet/chardetect.py | 46 - .../requests/packages/chardet/chardistribution.py | 231 - .../packages/chardet/charsetgroupprober.py | 106 - .../requests/packages/chardet/charsetprober.py | 62 - .../packages/chardet/codingstatemachine.py | 61 - .../_vendor/requests/packages/chardet/compat.py | 34 - .../_vendor/requests/packages/chardet/constants.py | 39 - .../requests/packages/chardet/cp949prober.py | 44 - .../_vendor/requests/packages/chardet/escprober.py | 86 - .../pip/_vendor/requests/packages/chardet/escsm.py | 242 - .../requests/packages/chardet/eucjpprober.py | 90 - .../_vendor/requests/packages/chardet/euckrfreq.py | 596 --- .../requests/packages/chardet/euckrprober.py | 42 - .../_vendor/requests/packages/chardet/euctwfreq.py | 428 -- .../requests/packages/chardet/euctwprober.py | 41 - .../requests/packages/chardet/gb2312freq.py | 472 -- .../requests/packages/chardet/gb2312prober.py | 41 - .../requests/packages/chardet/hebrewprober.py | 283 - .../_vendor/requests/packages/chardet/jisfreq.py | 569 -- .../_vendor/requests/packages/chardet/jpcntx.py | 219 - .../packages/chardet/langbulgarianmodel.py | 229 - .../requests/packages/chardet/langcyrillicmodel.py | 329 -- .../requests/packages/chardet/langgreekmodel.py | 225 - .../requests/packages/chardet/langhebrewmodel.py | 201 - .../packages/chardet/langhungarianmodel.py | 225 - .../requests/packages/chardet/langthaimodel.py | 200 - .../requests/packages/chardet/latin1prober.py | 139 - .../requests/packages/chardet/mbcharsetprober.py | 86 - .../requests/packages/chardet/mbcsgroupprober.py | 54 - .../_vendor/requests/packages/chardet/mbcssm.py | 575 -- .../requests/packages/chardet/sbcharsetprober.py | 120 - .../requests/packages/chardet/sbcsgroupprober.py | 69 - .../requests/packages/chardet/sjisprober.py | 91 - .../requests/packages/chardet/universaldetector.py | 170 - .../requests/packages/chardet/utf8prober.py | 76 - .../_vendor/requests/packages/urllib3/__init__.py | 58 - .../requests/packages/urllib3/_collections.py | 103 - .../requests/packages/urllib3/connection.py | 178 - .../requests/packages/urllib3/connectionpool.py | 687 --- .../requests/packages/urllib3/contrib/__init__.py | 0 .../requests/packages/urllib3/contrib/ntlmpool.py | 120 - .../requests/packages/urllib3/contrib/pyopenssl.py | 390 -- .../requests/packages/urllib3/exceptions.py | 121 - .../_vendor/requests/packages/urllib3/fields.py | 177 - .../_vendor/requests/packages/urllib3/filepost.py | 100 - .../requests/packages/urllib3/packages/__init__.py | 4 - .../packages/urllib3/packages/ordered_dict.py | 260 - .../requests/packages/urllib3/packages/six.py | 385 -- .../packages/ssl_match_hostname/__init__.py | 13 - .../packages/ssl_match_hostname/_implementation.py | 105 - .../requests/packages/urllib3/poolmanager.py | 258 - .../_vendor/requests/packages/urllib3/request.py | 141 - .../_vendor/requests/packages/urllib3/response.py | 312 -- .../pip/_vendor/requests/packages/urllib3/util.py | 648 --- .../site-packages/pip/_vendor/requests/sessions.py | 553 -- .../pip/_vendor/requests/status_codes.py | 88 - .../pip/_vendor/requests/structures.py | 128 - .../site-packages/pip/_vendor/requests/utils.py | 663 --- .../resources/Lib/site-packages/pip/_vendor/six.py | 632 --- .../site-packages/pip/backwardcompat/__init__.py | 168 - .../resources/Lib/site-packages/pip/basecommand.py | 208 - .../resources/Lib/site-packages/pip/baseparser.py | 235 - .../resources/Lib/site-packages/pip/cmdoptions.py | 388 -- .../Lib/site-packages/pip/commands/__init__.py | 88 - .../Lib/site-packages/pip/commands/bundle.py | 50 - .../Lib/site-packages/pip/commands/completion.py | 61 - .../Lib/site-packages/pip/commands/freeze.py | 133 - .../Lib/site-packages/pip/commands/help.py | 33 - .../Lib/site-packages/pip/commands/install.py | 362 -- .../Lib/site-packages/pip/commands/list.py | 183 - .../Lib/site-packages/pip/commands/search.py | 146 - .../Lib/site-packages/pip/commands/show.py | 87 - .../Lib/site-packages/pip/commands/uninstall.py | 64 - .../Lib/site-packages/pip/commands/unzip.py | 7 - .../Lib/site-packages/pip/commands/wheel.py | 213 - .../Lib/site-packages/pip/commands/zip.py | 404 -- .../resources/Lib/site-packages/pip/download.py | 729 --- .../resources/Lib/site-packages/pip/exceptions.py | 46 - .../main/resources/Lib/site-packages/pip/index.py | 1106 ---- .../resources/Lib/site-packages/pip/locations.py | 201 - .../main/resources/Lib/site-packages/pip/log.py | 283 - .../resources/Lib/site-packages/pip/pep425tags.py | 102 - .../Lib/site-packages/pip/req/__init__.py | 8 - .../Lib/site-packages/pip/req/req_file.py | 122 - .../Lib/site-packages/pip/req/req_install.py | 1124 ---- .../resources/Lib/site-packages/pip/req/req_set.py | 732 --- .../Lib/site-packages/pip/req/req_uninstall.py | 203 - .../Lib/site-packages/pip/status_codes.py | 6 - .../main/resources/Lib/site-packages/pip/util.py | 810 --- .../Lib/site-packages/pip/vcs/__init__.py | 258 - .../resources/Lib/site-packages/pip/vcs/bazaar.py | 136 - .../resources/Lib/site-packages/pip/vcs/git.py | 221 - .../Lib/site-packages/pip/vcs/mercurial.py | 153 - .../Lib/site-packages/pip/vcs/subversion.py | 285 - .../main/resources/Lib/site-packages/pip/wheel.py | 570 -- .../Lib/site-packages/pkg_resources/__init__.py | 3053 ----------- .../pkg_resources/_vendor/__init__.py | 0 .../pkg_resources/_vendor/packaging/__about__.py | 31 - .../pkg_resources/_vendor/packaging/__init__.py | 24 - .../pkg_resources/_vendor/packaging/_compat.py | 40 - .../pkg_resources/_vendor/packaging/_structures.py | 78 - .../pkg_resources/_vendor/packaging/specifiers.py | 772 --- .../pkg_resources/_vendor/packaging/version.py | 401 -- .../site-packages/pkg_resources/tests/__init__.py | 0 .../pkg_resources/tests/test_pkg_resources.py | 111 - .../pkg_resources/tests/test_resources.py | 661 --- .../site-packages/python_dateutil-2.6.0-py2.7.egg | Bin 324995 -> 0 bytes .../Lib/site-packages/pytz-2016.10-py2.7.egg | Bin 484182 -> 0 bytes .../pyyaml-3.10-py2.7.egg/EGG-INFO/PKG-INFO | 38 - .../pyyaml-3.10-py2.7.egg/EGG-INFO/SOURCES.txt | 24 - .../EGG-INFO/dependency_links.txt | 1 - .../pyyaml-3.10-py2.7.egg/EGG-INFO/not-zip-safe | 1 - .../pyyaml-3.10-py2.7.egg/EGG-INFO/top_level.txt | 2 - .../pyyaml-3.10-py2.7.egg/yaml/__init__.py | 315 -- .../pyyaml-3.10-py2.7.egg/yaml/composer.py | 139 - .../pyyaml-3.10-py2.7.egg/yaml/constructor.py | 675 --- .../pyyaml-3.10-py2.7.egg/yaml/cyaml.py | 85 - .../pyyaml-3.10-py2.7.egg/yaml/dumper.py | 62 - .../pyyaml-3.10-py2.7.egg/yaml/emitter.py | 1140 ---- .../pyyaml-3.10-py2.7.egg/yaml/error.py | 75 - .../pyyaml-3.10-py2.7.egg/yaml/events.py | 86 - .../pyyaml-3.10-py2.7.egg/yaml/loader.py | 40 - .../pyyaml-3.10-py2.7.egg/yaml/nodes.py | 49 - .../pyyaml-3.10-py2.7.egg/yaml/parser.py | 589 -- .../pyyaml-3.10-py2.7.egg/yaml/reader.py | 190 - .../pyyaml-3.10-py2.7.egg/yaml/representer.py | 484 -- .../pyyaml-3.10-py2.7.egg/yaml/resolver.py | 224 - .../pyyaml-3.10-py2.7.egg/yaml/scanner.py | 1457 ----- .../pyyaml-3.10-py2.7.egg/yaml/serializer.py | 111 - .../pyyaml-3.10-py2.7.egg/yaml/tokens.py | 104 - .../requests-2.10.0-py2.7.egg/EGG-INFO/PKG-INFO | 1278 ----- .../requests-2.10.0-py2.7.egg/EGG-INFO/SOURCES.txt | 96 - .../EGG-INFO/dependency_links.txt | 1 - .../EGG-INFO/not-zip-safe | 1 - .../EGG-INFO/requires.txt | 8 - .../EGG-INFO/top_level.txt | 1 - .../requests-2.10.0-py2.7.egg/requests/__init__.py | 89 - .../requests-2.10.0-py2.7.egg/requests/adapters.py | 483 -- .../requests-2.10.0-py2.7.egg/requests/api.py | 149 - .../requests-2.10.0-py2.7.egg/requests/auth.py | 242 - .../requests-2.10.0-py2.7.egg/requests/cacert.pem | 5616 -------------------- .../requests-2.10.0-py2.7.egg/requests/certs.py | 25 - .../requests-2.10.0-py2.7.egg/requests/compat.py | 62 - .../requests-2.10.0-py2.7.egg/requests/cookies.py | 493 -- .../requests/exceptions.py | 114 - .../requests-2.10.0-py2.7.egg/requests/hooks.py | 34 - .../requests-2.10.0-py2.7.egg/requests/models.py | 855 --- .../requests/packages/__init__.py | 36 - .../requests/packages/chardet/__init__.py | 32 - .../requests/packages/chardet/big5freq.py | 925 ---- .../requests/packages/chardet/big5prober.py | 42 - .../requests/packages/chardet/chardetect.py | 80 - .../requests/packages/chardet/chardistribution.py | 231 - .../packages/chardet/charsetgroupprober.py | 106 - .../requests/packages/chardet/charsetprober.py | 62 - .../packages/chardet/codingstatemachine.py | 61 - .../requests/packages/chardet/compat.py | 34 - .../requests/packages/chardet/constants.py | 39 - .../requests/packages/chardet/cp949prober.py | 44 - .../requests/packages/chardet/escprober.py | 86 - .../requests/packages/chardet/escsm.py | 242 - .../requests/packages/chardet/eucjpprober.py | 90 - .../requests/packages/chardet/euckrfreq.py | 596 --- .../requests/packages/chardet/euckrprober.py | 42 - .../requests/packages/chardet/euctwfreq.py | 428 -- .../requests/packages/chardet/euctwprober.py | 41 - .../requests/packages/chardet/gb2312freq.py | 472 -- .../requests/packages/chardet/gb2312prober.py | 41 - .../requests/packages/chardet/hebrewprober.py | 283 - .../requests/packages/chardet/jisfreq.py | 569 -- .../requests/packages/chardet/jpcntx.py | 227 - .../packages/chardet/langbulgarianmodel.py | 229 - .../requests/packages/chardet/langcyrillicmodel.py | 329 -- .../requests/packages/chardet/langgreekmodel.py | 225 - .../requests/packages/chardet/langhebrewmodel.py | 201 - .../packages/chardet/langhungarianmodel.py | 225 - .../requests/packages/chardet/langthaimodel.py | 200 - .../requests/packages/chardet/latin1prober.py | 139 - .../requests/packages/chardet/mbcharsetprober.py | 86 - .../requests/packages/chardet/mbcsgroupprober.py | 54 - .../requests/packages/chardet/mbcssm.py | 572 -- .../requests/packages/chardet/sbcharsetprober.py | 120 - .../requests/packages/chardet/sbcsgroupprober.py | 69 - .../requests/packages/chardet/sjisprober.py | 91 - .../requests/packages/chardet/universaldetector.py | 170 - .../requests/packages/chardet/utf8prober.py | 76 - .../requests/packages/urllib3/__init__.py | 96 - .../requests/packages/urllib3/_collections.py | 324 -- .../requests/packages/urllib3/connection.py | 330 -- .../requests/packages/urllib3/connectionpool.py | 849 --- .../requests/packages/urllib3/contrib/__init__.py | 0 .../requests/packages/urllib3/contrib/appengine.py | 231 - .../requests/packages/urllib3/contrib/ntlmpool.py | 115 - .../requests/packages/urllib3/contrib/pyopenssl.py | 358 -- .../requests/packages/urllib3/contrib/socks.py | 172 - .../requests/packages/urllib3/exceptions.py | 209 - .../requests/packages/urllib3/fields.py | 178 - .../requests/packages/urllib3/filepost.py | 94 - .../requests/packages/urllib3/packages/__init__.py | 5 - .../packages/urllib3/packages/ordered_dict.py | 259 - .../requests/packages/urllib3/packages/six.py | 385 -- .../packages/ssl_match_hostname/__init__.py | 13 - .../packages/ssl_match_hostname/_implementation.py | 105 - .../requests/packages/urllib3/poolmanager.py | 284 - .../requests/packages/urllib3/request.py | 151 - .../requests/packages/urllib3/response.py | 526 -- .../requests/packages/urllib3/util/__init__.py | 46 - .../requests/packages/urllib3/util/connection.py | 101 - .../requests/packages/urllib3/util/request.py | 72 - .../requests/packages/urllib3/util/response.py | 74 - .../requests/packages/urllib3/util/retry.py | 294 - .../requests/packages/urllib3/util/ssl_.py | 320 -- .../requests/packages/urllib3/util/timeout.py | 242 - .../requests/packages/urllib3/util/url.py | 217 - .../requests-2.10.0-py2.7.egg/requests/sessions.py | 689 --- .../requests/status_codes.py | 91 - .../requests/structures.py | 106 - .../requests-2.10.0-py2.7.egg/requests/utils.py | 728 --- .../DESCRIPTION.rst | 227 - .../setuptools-14.3.2.dev0.dist-info/METADATA | 258 - .../setuptools-14.3.2.dev0.dist-info/RECORD | 178 - .../setuptools-14.3.2.dev0.dist-info/WHEEL | 6 - .../dependency_links.txt | 2 - .../entry_points.txt | 61 - .../setuptools-14.3.2.dev0.dist-info/metadata.json | 1 - .../setuptools-14.3.2.dev0.dist-info/top_level.txt | 4 - .../setuptools-14.3.2.dev0.dist-info/zip-safe | 1 - .../Lib/site-packages/setuptools/__init__.py | 149 - .../Lib/site-packages/setuptools/archive_util.py | 170 - .../site-packages/setuptools/command/__init__.py | 18 - .../Lib/site-packages/setuptools/command/alias.py | 78 - .../site-packages/setuptools/command/bdist_egg.py | 470 -- .../site-packages/setuptools/command/bdist_rpm.py | 43 - .../setuptools/command/bdist_wininst.py | 21 - .../site-packages/setuptools/command/build_ext.py | 305 -- .../site-packages/setuptools/command/build_py.py | 215 - .../site-packages/setuptools/command/develop.py | 169 - .../setuptools/command/easy_install.py | 2262 -------- .../site-packages/setuptools/command/egg_info.py | 480 -- .../site-packages/setuptools/command/install.py | 125 - .../setuptools/command/install_egg_info.py | 116 - .../setuptools/command/install_lib.py | 118 - .../setuptools/command/install_scripts.py | 60 - .../setuptools/command/launcher manifest.xml | 15 - .../site-packages/setuptools/command/register.py | 10 - .../Lib/site-packages/setuptools/command/rotate.py | 61 - .../site-packages/setuptools/command/saveopts.py | 22 - .../Lib/site-packages/setuptools/command/sdist.py | 197 - .../Lib/site-packages/setuptools/command/setopt.py | 150 - .../Lib/site-packages/setuptools/command/test.py | 175 - .../setuptools/command/upload_docs.py | 190 - .../Lib/site-packages/setuptools/compat.py | 71 - .../Lib/site-packages/setuptools/depends.py | 215 - .../resources/Lib/site-packages/setuptools/dist.py | 861 --- .../Lib/site-packages/setuptools/extension.py | 57 - .../Lib/site-packages/setuptools/lib2to3_ex.py | 58 - .../Lib/site-packages/setuptools/msvc9_support.py | 63 - .../Lib/site-packages/setuptools/package_index.py | 1049 ---- .../Lib/site-packages/setuptools/py26compat.py | 19 - .../Lib/site-packages/setuptools/py27compat.py | 15 - .../Lib/site-packages/setuptools/py31compat.py | 52 - .../Lib/site-packages/setuptools/sandbox.py | 489 -- .../Lib/site-packages/setuptools/script (dev).tmpl | 5 - .../Lib/site-packages/setuptools/script.tmpl | 3 - .../Lib/site-packages/setuptools/site-patch.py | 76 - .../Lib/site-packages/setuptools/ssl_support.py | 241 - .../Lib/site-packages/setuptools/tests/__init__.py | 323 -- .../Lib/site-packages/setuptools/tests/contexts.py | 85 - .../site-packages/setuptools/tests/environment.py | 60 - .../Lib/site-packages/setuptools/tests/fixtures.py | 27 - .../site-packages/setuptools/tests/py26compat.py | 14 - .../setuptools/tests/script-with-bom.py | 3 - .../Lib/site-packages/setuptools/tests/server.py | 65 - .../setuptools/tests/test_bdist_egg.py | 43 - .../setuptools/tests/test_build_ext.py | 18 - .../site-packages/setuptools/tests/test_develop.py | 103 - .../setuptools/tests/test_dist_info.py | 70 - .../setuptools/tests/test_easy_install.py | 524 -- .../setuptools/tests/test_egg_info.py | 98 - .../setuptools/tests/test_find_packages.py | 170 - .../setuptools/tests/test_integration.py | 99 - .../setuptools/tests/test_markerlib.py | 63 - .../setuptools/tests/test_msvc9compiler.py | 179 - .../setuptools/tests/test_packageindex.py | 203 - .../site-packages/setuptools/tests/test_sandbox.py | 102 - .../site-packages/setuptools/tests/test_sdist.py | 419 -- .../site-packages/setuptools/tests/test_test.py | 91 - .../setuptools/tests/test_upload_docs.py | 59 - .../setuptools/tests/test_windows_wrappers.py | 183 - .../Lib/site-packages/setuptools/tests/textwrap.py | 8 - .../Lib/site-packages/setuptools/unicode_utils.py | 41 - .../Lib/site-packages/setuptools/utils.py | 11 - .../Lib/site-packages/setuptools/version.py | 1 - .../site-packages/setuptools/windows_support.py | 29 - .../six-1.10.0-py2.7.egg/EGG-INFO/PKG-INFO | 32 - .../six-1.10.0-py2.7.egg/EGG-INFO/SOURCES.txt | 15 - .../EGG-INFO/dependency_links.txt | 1 - .../six-1.10.0-py2.7.egg/EGG-INFO/not-zip-safe | 1 - .../six-1.10.0-py2.7.egg/EGG-INFO/top_level.txt | 1 - .../Lib/site-packages/six-1.10.0-py2.7.egg/six.py | 868 --- .../tosca_parser-0.7.0-py2.7.egg/EGG-INFO/PKG-INFO | 75 - .../EGG-INFO/SOURCES.txt | 299 -- .../EGG-INFO/dependency_links.txt | 1 - .../EGG-INFO/entry_points.txt | 3 - .../EGG-INFO/not-zip-safe | 1 - .../tosca_parser-0.7.0-py2.7.egg/EGG-INFO/pbr.json | 1 - .../EGG-INFO/requires.txt | 7 - .../EGG-INFO/top_level.txt | 1 - .../toscaparser/__init__.py | 17 - .../toscaparser/capabilities.py | 52 - .../toscaparser/common/__init__.py | 0 .../toscaparser/common/exception.py | 246 - .../toscaparser/dataentity.py | 182 - .../toscaparser/elements/TOSCA_definition_1_0.yaml | 942 ---- .../toscaparser/elements/__init__.py | 0 .../toscaparser/elements/artifacttype.py | 50 - .../toscaparser/elements/attribute_definition.py | 20 - .../toscaparser/elements/capabilitytype.py | 83 - .../toscaparser/elements/constraints.py | 615 --- .../toscaparser/elements/datatype.py | 57 - .../toscaparser/elements/entity_type.py | 164 - .../toscaparser/elements/grouptype.py | 102 - .../toscaparser/elements/interfaces.py | 87 - .../toscaparser/elements/nodetype.py | 210 - .../toscaparser/elements/policytype.py | 120 - .../toscaparser/elements/portspectype.py | 86 - .../toscaparser/elements/property_definition.py | 100 - .../toscaparser/elements/relationshiptype.py | 49 - .../toscaparser/elements/scalarunit.py | 129 - .../toscaparser/elements/statefulentitytype.py | 99 - .../toscaparser/elements/tosca_type_validation.py | 60 - .../toscaparser/entity_template.py | 349 -- .../toscaparser/extensions/__init__.py | 0 .../toscaparser/extensions/exttools.py | 88 - .../extensions/nfv/TOSCA_nfv_definition_1_0_0.yaml | 240 - .../toscaparser/extensions/nfv/__init__.py | 0 .../toscaparser/extensions/nfv/tests/__init__.py | 0 .../nfv/tests/data/tosca_helloworld_nfv.yaml | 31 - .../extensions/nfv/tests/test_tosca_nfv_tpl.py | 29 - .../nfv/tosca_simple_profile_for_nfv_1_0_0.py | 19 - .../toscaparser/functions.py | 826 --- .../toscaparser/groups.py | 62 - .../toscaparser/imports.py | 287 - .../toscaparser/nodetemplate.py | 307 -- .../toscaparser/parameters.py | 145 - .../toscaparser/policy.py | 77 - .../toscaparser/prereq/__init__.py | 0 .../toscaparser/prereq/csar.py | 294 - .../toscaparser/properties.py | 96 - .../toscaparser/relationship_template.py | 78 - .../toscaparser/repositories.py | 52 - .../toscaparser/shell.py | 108 - .../toscaparser/substitution_mappings.py | 231 - .../toscaparser/tests/__init__.py | 0 .../toscaparser/tests/artifacts/collectd/config.py | 25 - .../toscaparser/tests/artifacts/collectd/create.sh | 5 - .../toscaparser/tests/artifacts/collectd/start.sh | 4 - .../tests/artifacts/elasticsearch/create.sh | 14 - .../tests/artifacts/elasticsearch/start.sh | 4 - .../toscaparser/tests/artifacts/kibana/config.sh | 7 - .../toscaparser/tests/artifacts/kibana/create.sh | 12 - .../toscaparser/tests/artifacts/kibana/start.sh | 4 - .../tests/artifacts/logstash/configure_collectd.py | 28 - .../artifacts/logstash/configure_elasticsearch.py | 26 - .../tests/artifacts/logstash/configure_rsyslog.py | 25 - .../toscaparser/tests/artifacts/logstash/create.sh | 20 - .../toscaparser/tests/artifacts/logstash/start.sh | 4 - .../toscaparser/tests/artifacts/mongodb/config.sh | 7 - .../toscaparser/tests/artifacts/mongodb/create.sh | 14 - .../tests/artifacts/mongodb/create_database.sh | 5 - .../toscaparser/tests/artifacts/mongodb/start.sh | 5 - .../artifacts/mysql/mysql_database_configure.sh | 8 - .../tests/artifacts/mysql/mysql_dbms_configure.sh | 5 - .../tests/artifacts/mysql/mysql_dbms_install.sh | 9 - .../tests/artifacts/mysql/mysql_dbms_start.sh | 2 - .../toscaparser/tests/artifacts/nodejs/config.sh | 28 - .../toscaparser/tests/artifacts/nodejs/create.sh | 7 - .../toscaparser/tests/artifacts/nodejs/start.sh | 3 - .../toscaparser/tests/artifacts/rsyslog/config.sh | 30 - .../toscaparser/tests/artifacts/rsyslog/create.sh | 5 - .../toscaparser/tests/artifacts/rsyslog/start.sh | 4 - .../tests/artifacts/webserver/webserver_install.sh | 5 - .../tests/artifacts/webserver/webserver_start.sh | 2 - .../artifacts/wordpress/wordpress_configure.sh | 4 - .../tests/artifacts/wordpress/wordpress_install.sh | 5 - .../toscaparser/tests/base.py | 65 - .../toscaparser/tests/data/CSAR/csar_elk.csar | Bin 17490 -> 0 bytes .../data/CSAR/tosca_elk/Definitions/collectd.yaml | 13 - .../CSAR/tosca_elk/Definitions/elasticsearch.yaml | 11 - .../data/CSAR/tosca_elk/Definitions/kibana.yaml | 16 - .../data/CSAR/tosca_elk/Definitions/logstash.yaml | 25 - .../Definitions/paypalpizzastore_nodejs_app.yaml | 29 - .../data/CSAR/tosca_elk/Definitions/rsyslog.yaml | 13 - .../data/CSAR/tosca_elk/Definitions/tosca_elk.yaml | 217 - .../data/CSAR/tosca_elk/Python/collectd/config.py | 25 - .../Python/logstash/configure_collectd.py | 28 - .../Python/logstash/configure_elasticsearch.py | 26 - .../tosca_elk/Python/logstash/configure_rsyslog.py | 25 - .../tests/data/CSAR/tosca_elk/README.txt | 5 - .../data/CSAR/tosca_elk/Scripts/collectd/create.sh | 5 - .../data/CSAR/tosca_elk/Scripts/collectd/start.sh | 4 - .../CSAR/tosca_elk/Scripts/elasticsearch/create.sh | 14 - .../CSAR/tosca_elk/Scripts/elasticsearch/start.sh | 4 - .../data/CSAR/tosca_elk/Scripts/kibana/config.sh | 7 - .../data/CSAR/tosca_elk/Scripts/kibana/create.sh | 12 - .../data/CSAR/tosca_elk/Scripts/kibana/start.sh | 4 - .../data/CSAR/tosca_elk/Scripts/logstash/create.sh | 20 - .../data/CSAR/tosca_elk/Scripts/logstash/start.sh | 4 - .../data/CSAR/tosca_elk/Scripts/mongodb/config.sh | 7 - .../data/CSAR/tosca_elk/Scripts/mongodb/create.sh | 14 - .../tosca_elk/Scripts/mongodb/create_database.sh | 5 - .../data/CSAR/tosca_elk/Scripts/mongodb/start.sh | 5 - .../data/CSAR/tosca_elk/Scripts/nodejs/config.sh | 28 - .../data/CSAR/tosca_elk/Scripts/nodejs/create.sh | 7 - .../data/CSAR/tosca_elk/Scripts/nodejs/start.sh | 3 - .../data/CSAR/tosca_elk/Scripts/rsyslog/config.sh | 30 - .../data/CSAR/tosca_elk/Scripts/rsyslog/create.sh | 5 - .../data/CSAR/tosca_elk/Scripts/rsyslog/start.sh | 4 - .../data/CSAR/tosca_elk/TOSCA-Metadata/TOSCA.meta | 4 - .../tosca_single_instance_wordpress.yaml | 109 - .../Definitions/wordpress.yaml | 19 - .../tosca_single_instance_wordpress/README.txt | 22 - .../Scripts/MYSQLDBMS/configure.sh | 5 - .../Scripts/MYSQLDBMS/install.sh | 9 - .../Scripts/MYSQLDBMS/start.sh | 2 - .../Scripts/MYSQLDatabase/configure.sh | 8 - .../Scripts/WebServer/install.sh | 5 - .../Scripts/WebServer/start.sh | 2 - .../Scripts/WordPress/configure.sh | 4 - .../Scripts/WordPress/install.sh | 5 - .../TOSCA-Metadata/TOSCA.meta | 5 - .../containers/test_container_docker_mysql.yaml | 44 - .../tests/data/custom_types/collectd.yaml | 13 - .../custom_types/compute_with_attribute_list.yaml | 13 - .../compute_with_nested_atributes.yaml | 22 - .../tests/data/custom_types/compute_with_prop.yaml | 13 - .../tests/data/custom_types/custom_caps_def.yaml | 22 - .../tests/data/custom_types/custom_interface.yaml | 20 - .../custom_relationship_type_defs.yaml | 23 - .../data/custom_types/db_with_list_param.yaml | 10 - .../tests/data/custom_types/elasticsearch.yaml | 12 - .../tests/data/custom_types/imported_sample.yaml | 38 - .../tests/data/custom_types/kibana.yaml | 14 - .../tests/data/custom_types/logstash.yaml | 25 - .../tests/data/custom_types/nested_rsyslog.yaml | 17 - .../data/custom_types/nested_test_wordpress.yaml | 32 - .../tests/data/custom_types/node_with_cap.yaml | 33 - .../custom_types/paypalpizzastore_nodejs_app.yaml | 29 - .../tests/data/custom_types/rsyslog.yaml | 13 - .../tests/data/custom_types/wordpress.yaml | 19 - .../tests/data/datatypes/custom_datatype_def.yaml | 53 - .../test_custom_datatypes_in_current_template.yaml | 70 - ...est_custom_datatypes_nested_datatype_error.yaml | 25 - .../datatypes/test_custom_datatypes_positive.yaml | 24 - .../test_custom_datatypes_value_error.yaml | 18 - .../datatypes/test_datatype_portspec_add_req.yaml | 41 - .../data/dsl_definitions/test_nested_dsl_def.yaml | 23 - .../functions/test_capabilties_inheritance.yaml | 25 - .../tests/data/functions/test_concat.yaml | 30 - .../tests/data/functions/test_concat_invalid.yaml | 9 - .../functions/test_get_attribute_host_keyword.yaml | 33 - .../test_get_attribute_host_not_found.yaml | 20 - ...test_get_attribute_illegal_host_in_outputs.yaml | 17 - .../test_get_attribute_source_target_keywords.yaml | 30 - .../test_get_attribute_unknown_attribute_name.yaml | 28 - ...t_get_attribute_unknown_node_template_name.yaml | 30 - .../functions/test_get_attribute_with_index.yaml | 19 - .../test_get_attribute_with_index_error.yaml | 19 - .../test_get_attribute_with_nested_params.yaml | 23 - .../functions/test_get_implicit_attribute.yaml | 25 - .../test_get_property_source_target_keywords.yaml | 35 - .../functions/test_get_property_with_host.yaml | 65 - .../functions/test_invalid_function_signature.yaml | 34 - .../tests/data/functions/test_token.yaml | 15 - .../tests/data/functions/test_token_invalid.yaml | 17 - .../test_unknown_capability_property.yaml | 36 - .../functions/test_unknown_input_in_interface.yaml | 20 - .../functions/test_unknown_input_in_property.yaml | 13 - .../tosca_nested_property_names_indexes.yaml | 47 - .../toscaparser/tests/data/groups/definitions.yaml | 10 - .../tests/data/groups/tosca_group_template.yaml | 55 - .../test_custom_interface_in_template.yaml | 23 - .../test_custom_interface_invalid_operation.yaml | 19 - .../data/load_balancer/tosca_load_balancer.yaml | 75 - .../tests/data/node_filter/test_node_filter.yaml | 18 - .../tests/data/policies/custom_definitions.yaml | 10 - .../tests/data/policies/tosca_policy_template.yaml | 85 - .../relationship/test_custom_relationship.yaml | 48 - .../repositories/test_repositories_definition.yaml | 23 - .../tosca_repositories_test_definition.yaml | 26 - .../tests/data/requirements/test_requirements.yaml | 67 - .../tests/data/test_attributes_inheritance.yaml | 28 - .../tests/data/test_available_rel_tpls.yaml | 23 - .../tests/data/test_credential_datatype.yaml | 77 - .../tests/data/test_custom_caps_def.yaml | 13 - .../tests/data/test_endpoint_on_compute.yaml | 21 - .../tests/data/test_instance_nested_imports.yaml | 22 - .../tests/data/test_invalid_input_defaults.yaml | 12 - .../tests/data/test_invalid_section_names.yaml | 25 - .../tests/data/test_invalid_template_version.yaml | 14 - .../data/test_multiple_validation_errors.yaml | 125 - .../tests/data/test_no_inputs_in_template.yaml | 17 - .../tests/data/test_no_outputs_in_template.yaml | 15 - .../test_normative_type_properties_override.yaml | 37 - .../data/test_tosca_custom_rel_with_script.yaml | 23 - .../test_tosca_normative_type_by_shortname.yaml | 34 - .../tests/data/test_tosca_top_level_error1.yaml | 2 - .../tests/data/test_tosca_top_level_error2.yaml | 11 - .../data/topology_template/databasesubsystem.yaml | 81 - .../tests/data/topology_template/definitions.yaml | 74 - .../data/topology_template/queuingsubsystem.yaml | 75 - .../tests/data/topology_template/system.yaml | 62 - .../topology_template/transactionsubsystem.yaml | 88 - .../validate/queuingsubsystem_invalid_input.yaml | 76 - .../validate/system_invalid_input.yaml | 24 - .../test_example_app_substitution_mappings.yaml | 70 - .../test_substitution_mappings_invalid_output.yaml | 31 - .../test_substitution_mappings_valid_output.yaml | 31 - .../toscaparser/tests/data/tosca_elk.yaml | 217 - .../toscaparser/tests/data/tosca_helloworld.yaml | 23 - .../tests/data/tosca_imports_validation.yaml | 45 - .../data/tosca_single_instance_wordpress.yaml | 121 - ...stance_wordpress_with_local_abspath_import.yaml | 122 - ..._single_instance_wordpress_with_url_import.yaml | 120 - .../data/tosca_test_get_operation_output.yaml | 19 - .../v1.0/network/tosca_one_server_one_network.yaml | 43 - .../network/tosca_one_server_three_networks.yaml | 64 - .../network/tosca_server_on_existing_network.yaml | 39 - .../network/tosca_two_servers_one_network.yaml | 79 - .../tosca_blockstorage_with_attachment.yaml | 61 - ...sca_blockstorage_with_attachment_notation1.yaml | 87 - ...sca_blockstorage_with_attachment_notation2.yaml | 99 - ...blockstorage_with_custom_relationship_type.yaml | 64 - ...ca_blockstorage_with_relationship_template.yaml | 59 - ...osca_multiple_blockstorage_with_attachment.yaml | 93 - .../v1.0/storage/tosca_single_object_store.yaml | 17 - .../v1.0/tosca_nodejs_mongodb_two_instances.yaml | 96 - .../spec_samples/v1.0/tosca_single_server.yaml | 32 - .../toscaparser/tests/test_constraints.py | 373 -- .../toscaparser/tests/test_custom_relationships.py | 35 - .../toscaparser/tests/test_datatypes.py | 517 -- .../toscaparser/tests/test_exception.py | 42 - .../toscaparser/tests/test_functions.py | 373 -- .../toscaparser/tests/test_prereq.py | 230 - .../toscaparser/tests/test_properties.py | 368 -- .../toscaparser/tests/test_scalarunit.py | 355 -- .../toscaparser/tests/test_shell.py | 51 - .../toscaparser/tests/test_topology_template.py | 283 - .../toscaparser/tests/test_toscadef.py | 346 -- .../toscaparser/tests/test_toscatpl.py | 840 --- .../toscaparser/tests/test_toscatplvalidation.py | 1784 ------- .../toscaparser/tests/test_utils.py | 48 - .../tests/test_validate_tosca_version.py | 132 - .../toscaparser/topology_template.py | 334 -- .../toscaparser/tosca_template.py | 368 -- .../toscaparser/tpl_relationship_graph.py | 46 - .../toscaparser/triggers.py | 68 - .../toscaparser/unsupportedtype.py | 50 - .../toscaparser/utils/__init__.py | 0 .../toscaparser/utils/gettextutils.py | 23 - .../toscaparser/utils/urlutils.py | 65 - .../toscaparser/utils/validateutils.py | 236 - .../toscaparser/utils/yamlparser.py | 86 - .../unicodecsv-0.14.1-py2.7.egg/EGG-INFO/PKG-INFO | 48 - .../EGG-INFO/SOURCES.txt | 12 - .../EGG-INFO/dependency_links.txt | 1 - .../EGG-INFO/not-zip-safe | 1 - .../EGG-INFO/top_level.txt | 1 - .../unicodecsv/__init__.py | 11 - .../unicodecsv-0.14.1-py2.7.egg/unicodecsv/py2.py | 223 - .../unicodecsv-0.14.1-py2.7.egg/unicodecsv/py3.py | 95 - .../unicodecsv-0.14.1-py2.7.egg/unicodecsv/test.py | 919 ---- pom.xml | 4 +- sdc-distribution-ci/pom.xml | 10 +- sdc-distribution-client/pom.xml | 9 +- sdc-tosca-parser/pom.xml | 141 - .../sdc/tosca/parser/api/ConformanceLevel.java | 25 - .../sdc/tosca/parser/api/ISdcCsarHelper.java | 316 -- .../openecomp/sdc/tosca/parser/api/Version.java | 48 - .../sdc/tosca/parser/config/Configuration.java | 16 - .../tosca/parser/config/ConfigurationManager.java | 110 - .../tosca/parser/config/ErrorConfiguration.java | 46 - .../sdc/tosca/parser/config/ErrorInfo.java | 49 - .../tosca/parser/config/SdcToscaParserErrors.java | 31 - .../parser/exceptions/SdcToscaParserException.java | 20 - .../sdc/tosca/parser/impl/SdcCsarHelperImpl.java | 589 -- .../sdc/tosca/parser/impl/SdcPropertyNames.java | 109 - .../tosca/parser/impl/SdcToscaParserFactory.java | 88 - .../org/openecomp/sdc/tosca/parser/impl/Types.java | 32 - .../sdc/tosca/parser/utils/GeneralUtility.java | 53 - .../sdc/tosca/parser/utils/SdcToscaUtility.java | 19 - .../tosca/parser/utils/YamlToObjectConverter.java | 123 - .../src/main/resources/config/configuration.yaml | 3 - .../main/resources/config/error-configuration.yaml | 18 - .../sdc/impl/SdcToscaParserBasicTest.java | 120 - .../sdc/impl/ToscaParserConfigurationTest.java | 31 - .../sdc/impl/ToscaParserErrorHandlingTest.java | 143 - .../sdc/impl/ToscaParserGeneralUtilTest.java | 23 - .../openecomp/sdc/impl/ToscaParserGroupTest.java | 116 - .../sdc/impl/ToscaParserMetadataTest.java | 67 - .../sdc/impl/ToscaParserNodeTemplateTest.java | 374 -- .../sdc/impl/ToscaParserServiceInputTest.java | 63 - .../sdc/impl/ToscaParserSubsMappingsTest.java | 132 - .../src/test/resources/config/configuration.yaml | 3 - .../test/resources/config/error-configuration.yaml | 18 - .../resources/csars/1service-ServiceWithPorts.csar | Bin 47257 -> 0 bytes .../src/test/resources/csars/csar-invalid-zip.zip | 2 - .../resources/csars/service-Renanatst2-csar.csar | Bin 321286 -> 0 bytes .../csars/service-ServiceFdnt-csar-0904-2.csar | Bin 41437 -> 0 bytes .../csars/service-ServiceFdnt-csar-no-vf.csar | Bin 39954 -> 0 bytes .../csars/service-ServiceFdnt-csar-rainy.csar | Bin 39892 -> 0 bytes .../resources/csars/service-ServiceFdnt-csar.csar | Bin 40171 -> 0 bytes .../csars/service-ServiceFdnt-test-csar.csar | Bin 39938 -> 0 bytes .../csars/service-ServiceFdnt-with-allotted.csar | Bin 45194 -> 0 bytes .../csars/service-ServiceFdnt-with-get-input.csar | Bin 45214 -> 0 bytes .../service-entry-definition-not-defined.csar | Bin 45157 -> 0 bytes .../csars/service-invalid-conformence-level.csar | Bin 45194 -> 0 bytes .../csars/service-invalid-input-args.csar | Bin 106698 -> 0 bytes .../csars/service-invalid-yaml-content-meta.csar | Bin 45198 -> 0 bytes .../csars/service-missing-entry-definition.csar | Bin 42668 -> 0 bytes .../resources/csars/service-missing-meta-file.csar | Bin 44893 -> 0 bytes 1710 files changed, 12 insertions(+), 182018 deletions(-) delete mode 100644 jtosca/pom.xml delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/Capability.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/DataEntity.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/EntityTemplate.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/Group.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/ImportsLoader.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/NodeTemplate.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/Policy.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/Property.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/RelationshipTemplate.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/Repository.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/SubstitutionMappings.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/TopologyTemplate.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/ToscaGraph.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/ToscaTemplate.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/Triggers.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/UnsupportedType.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/common/ExceptionCollector.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/common/JToscaException.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/common/TOSCAException.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/ArtifactTypeDef.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/AttributeDef.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/CapabilityTypeDef.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/DataType.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/EntityType.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/GroupType.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/InterfacesDef.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/Metadata.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/NodeType.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/PolicyType.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/PortSpec.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/PropertyDef.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/RelationshipType.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/ScalarUnit.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/ScalarUnitFrequency.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/ScalarUnitSize.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/ScalarUnitTime.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/StatefulEntityType.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/TypeValidation.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/Constraint.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/Equal.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/GreaterOrEqual.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/GreaterThan.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/InRange.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/Length.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/LessOrEqual.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/LessThan.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/MaxLength.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/MinLength.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/Pattern.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/Schema.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/ValidValues.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/extensions/ExtTools.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/Concat.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/Function.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/GetAttribute.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/GetInput.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/GetOperationOutput.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/GetProperty.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/Token.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/parameters/Input.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/parameters/Output.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/prereq/CSAR.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/CopyUtils.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/DumpUtils.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/JToscaErrorCodes.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/TOSCAVersionProperty.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/ThreadLocalsHolder.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/UrlUtils.java delete mode 100644 jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/ValidateUtils.java delete mode 100644 jtosca/src/main/resources/TOSCA_definition_1_0.yaml delete mode 100644 jtosca/src/main/resources/extensions/nfv/TOSCA_nfv_definition_1_0.yaml delete mode 100644 jtosca/src/main/resources/extensions/nfv/nfv.py delete mode 100644 jtosca/src/test/java/org.openecomp.sdc.toscaparser/JToscaMetadataParse.java delete mode 100644 jtosca/src/test/resources/csars/csar_hello_world.csar delete mode 100644 jtosca/src/test/resources/csars/service-ServiceFdnt-csar.csar delete mode 100644 jython-tosca-parser/.gitignore delete mode 100644 jython-tosca-parser/pom.xml delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/JythonRuntime.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/ToscaParser.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/ToscaParserFactory.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/Capability.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/EntityTemplate.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/Group.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/Metadata.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/NodeTemplate.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/Property.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/StatefulEntityTypeFactory.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/SubstitutionMappings.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/TopologyTemplate.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/ToscaTemplate.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/ToscaTemplateFactory.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/elements/GroupType.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/elements/NodeType.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/elements/StatefulEntityType.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/parameters/Input.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyCapability.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyEntityTemplate.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyGroup.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyNodeTemplate.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyProperty.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JySubstitutionMappings.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyTopologyTemplate.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyToscaTemplate.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/elements/JyGroupType.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/elements/JyNodeType.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/elements/JyStatefulEntityType.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/parameters/JyInput.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/utils/JarExtractor.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/utils/PythonType.java delete mode 100644 jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/utils/PythonUtils.java delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/README delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/_markerlib/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/_markerlib/markers.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/PKG-INFO delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/SOURCES.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/dependency_links.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/entry_points.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/not-zip-safe delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/requires.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/top_level.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/_compat.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/core.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/dates.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/global.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/languages.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/lists.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/af.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/af_NA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/af_ZA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/agq.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/agq_CM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ak.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ak_GH.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/am.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/am_ET.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_001.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_AE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_BH.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_DJ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_DZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_EG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_EH.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_ER.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_IL.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_IQ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_JO.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_KM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_KW.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_LB.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_LY.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_MA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_MR.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_OM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_PS.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_QA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_SA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_SD.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_SO.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_SS.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_SY.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_TD.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_TN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_YE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/as.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/as_IN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/asa.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/asa_TZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ast.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ast_ES.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/az.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/az_Cyrl.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/az_Cyrl_AZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/az_Latn.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/az_Latn_AZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bas.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bas_CM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/be.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/be_BY.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bem.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bem_ZM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bez.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bez_TZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bg.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bg_BG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bm.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bm_ML.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bn.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bn_BD.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bn_IN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bo.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bo_CN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bo_IN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/br.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/br_FR.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/brx.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/brx_IN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bs.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bs_Cyrl.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bs_Cyrl_BA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bs_Latn.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bs_Latn_BA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ca.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ca_AD.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ca_ES.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ca_ES_VALENCIA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ca_FR.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ca_IT.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ce.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ce_RU.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cgg.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cgg_UG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/chr.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/chr_US.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ckb.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ckb_IQ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ckb_IR.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cs.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cs_CZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cu.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cu_RU.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cy.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cy_GB.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/da.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/da_DK.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/da_GL.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dav.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dav_KE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de_AT.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de_BE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de_CH.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de_DE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de_LI.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de_LU.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dje.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dje_NE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dsb.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dsb_DE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dua.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dua_CM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dyo.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dyo_SN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dz.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dz_BT.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ebu.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ebu_KE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ee.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ee_GH.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ee_TG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/el.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/el_CY.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/el_GR.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_001.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_150.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_AG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_AI.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_AS.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_AT.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_AU.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BB.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BI.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BS.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BW.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CC.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CH.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CK.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CX.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CY.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_DE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_DG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_DK.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_DM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_ER.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_FI.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_FJ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_FK.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_FM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GB.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GD.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GH.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GI.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GU.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GY.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_HK.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_IE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_IL.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_IM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_IN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_IO.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_JE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_JM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_KE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_KI.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_KN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_KY.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_LC.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_LR.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_LS.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MH.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MO.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MP.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MS.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MT.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MU.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MW.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MY.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NF.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NL.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NR.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NU.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_PG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_PH.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_PK.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_PN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_PR.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_PW.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_RW.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SB.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SC.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SD.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SH.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SI.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SL.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SS.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SX.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_TC.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_TK.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_TO.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_TT.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_TV.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_TZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_UG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_UM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_US.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_US_POSIX.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_VC.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_VG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_VI.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_VU.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_WS.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_ZA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_ZM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_ZW.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/eo.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/eo_001.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_419.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_AR.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_BO.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_CL.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_CO.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_CR.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_CU.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_DO.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_EA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_EC.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_ES.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_GQ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_GT.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_HN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_IC.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_MX.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_NI.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_PA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_PE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_PH.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_PR.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_PY.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_SV.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_US.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_UY.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_VE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/et.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/et_EE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/eu.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/eu_ES.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ewo.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ewo_CM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fa.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fa_AF.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fa_IR.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ff.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ff_CM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ff_GN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ff_MR.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ff_SN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fi.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fi_FI.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fil.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fil_PH.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fo.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fo_DK.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fo_FO.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_BE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_BF.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_BI.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_BJ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_BL.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CD.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CF.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CH.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CI.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_DJ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_DZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_FR.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_GA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_GF.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_GN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_GP.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_GQ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_HT.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_KM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_LU.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MC.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MF.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_ML.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MQ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MR.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MU.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_NC.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_NE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_PF.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_PM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_RE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_RW.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_SC.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_SN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_SY.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_TD.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_TG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_TN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_VU.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_WF.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_YT.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fur.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fur_IT.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fy.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fy_NL.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ga.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ga_IE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gd.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gd_GB.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gl.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gl_ES.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gsw.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gsw_CH.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gsw_FR.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gsw_LI.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gu.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gu_IN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/guz.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/guz_KE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gv.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gv_IM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ha.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ha_GH.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ha_NE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ha_NG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/haw.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/haw_US.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/he.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/he_IL.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hi.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hi_IN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hr.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hr_BA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hr_HR.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hsb.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hsb_DE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hu.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hu_HU.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hy.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hy_AM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/id.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/id_ID.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ig.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ig_NG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ii.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ii_CN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/is.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/is_IS.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/it.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/it_CH.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/it_IT.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/it_SM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ja.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ja_JP.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/jgo.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/jgo_CM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/jmc.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/jmc_TZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ka.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ka_GE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kab.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kab_DZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kam.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kam_KE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kde.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kde_TZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kea.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kea_CV.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/khq.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/khq_ML.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ki.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ki_KE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kk.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kk_KZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kkj.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kkj_CM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kl.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kl_GL.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kln.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kln_KE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/km.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/km_KH.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kn.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kn_IN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ko.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ko_KP.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ko_KR.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kok.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kok_IN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ks.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ks_IN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ksb.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ksb_TZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ksf.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ksf_CM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ksh.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ksh_DE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kw.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kw_GB.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ky.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ky_KG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lag.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lag_TZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lb.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lb_LU.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lg.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lg_UG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lkt.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lkt_US.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ln.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ln_AO.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ln_CD.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ln_CF.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ln_CG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lo.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lo_LA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lrc.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lrc_IQ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lrc_IR.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lt.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lt_LT.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lu.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lu_CD.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/luo.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/luo_KE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/luy.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/luy_KE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lv.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lv_LV.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mas.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mas_KE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mas_TZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mer.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mer_KE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mfe.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mfe_MU.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mg.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mg_MG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mgh.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mgh_MZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mgo.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mgo_CM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mk.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mk_MK.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ml.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ml_IN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mn.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mn_MN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mr.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mr_IN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ms.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ms_BN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ms_MY.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ms_SG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mt.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mt_MT.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mua.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mua_CM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/my.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/my_MM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mzn.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mzn_IR.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/naq.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/naq_NA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nb.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nb_NO.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nb_SJ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nd.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nd_ZW.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ne.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ne_IN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ne_NP.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_AW.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_BE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_BQ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_CW.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_NL.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_SR.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_SX.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nmg.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nmg_CM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nn.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nn_NO.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nnh.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nnh_CM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nus.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nus_SS.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nyn.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nyn_UG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/om.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/om_ET.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/om_KE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/or.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/or_IN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/os.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/os_GE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/os_RU.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pa.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pa_Arab.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pa_Arab_PK.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pa_Guru.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pa_Guru_IN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pl.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pl_PL.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/prg.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/prg_001.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ps.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ps_AF.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_AO.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_BR.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_CV.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_GW.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_MO.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_MZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_PT.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_ST.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_TL.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/qu.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/qu_BO.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/qu_EC.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/qu_PE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rm.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rm_CH.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rn.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rn_BI.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ro.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ro_MD.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ro_RO.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rof.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rof_TZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/root.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru_BY.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru_KG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru_KZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru_MD.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru_RU.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru_UA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rw.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rw_RW.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rwk.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rwk_TZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sah.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sah_RU.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/saq.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/saq_KE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sbp.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sbp_TZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/se.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/se_FI.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/se_NO.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/se_SE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/seh.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/seh_MZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ses.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ses_ML.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sg.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sg_CF.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/shi.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/shi_Latn.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/shi_Latn_MA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/shi_Tfng.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/shi_Tfng_MA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/si.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/si_LK.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sk.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sk_SK.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sl.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sl_SI.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/smn.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/smn_FI.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sn.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sn_ZW.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/so.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/so_DJ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/so_ET.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/so_KE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/so_SO.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sq.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sq_AL.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sq_MK.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sq_XK.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Cyrl.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Cyrl_BA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Cyrl_ME.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Cyrl_RS.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Cyrl_XK.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Latn.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Latn_BA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Latn_ME.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Latn_RS.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Latn_XK.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sv.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sv_AX.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sv_FI.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sv_SE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sw.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sw_CD.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sw_KE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sw_TZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sw_UG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ta.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ta_IN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ta_LK.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ta_MY.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ta_SG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/te.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/te_IN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/teo.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/teo_KE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/teo_UG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/th.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/th_TH.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ti.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ti_ER.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ti_ET.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tk.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tk_TM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/to.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/to_TO.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tr.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tr_CY.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tr_TR.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/twq.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/twq_NE.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tzm.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tzm_MA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ug.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ug_CN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uk.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uk_UA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ur.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ur_IN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ur_PK.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz_Arab.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz_Arab_AF.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz_Cyrl.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz_Cyrl_UZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz_Latn.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz_Latn_UZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vai.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vai_Latn.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vai_Latn_LR.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vai_Vaii.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vai_Vaii_LR.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vi.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vi_VN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vo.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vo_001.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vun.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vun_TZ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/wae.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/wae_CH.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/xog.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/xog_UG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yav.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yav_CM.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yi.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yi_001.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yo.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yo_BJ.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yo_NG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zgh.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zgh_MA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hans.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hans_CN.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hans_HK.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hans_MO.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hans_SG.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hant.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hant_HK.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hant_MO.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hant_TW.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zu.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zu_ZA.dat delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/localedata.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/localtime/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/localtime/_unix.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/localtime/_win32.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/messages/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/messages/catalog.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/messages/checkers.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/messages/extract.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/messages/frontend.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/messages/jslexer.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/messages/mofile.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/messages/plurals.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/messages/pofile.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/numbers.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/plural.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/support.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/units.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/util.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/EGG-INFO/PKG-INFO delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/EGG-INFO/SOURCES.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/EGG-INFO/dependency_links.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/EGG-INFO/entry_points.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/EGG-INFO/not-zip-safe delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/EGG-INFO/pbr.json delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/EGG-INFO/requires.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/EGG-INFO/top_level.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/app.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/argparse.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/columns.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/command.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/commandmanager.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/complete.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/display.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/formatters/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/formatters/base.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/formatters/commaseparated.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/formatters/json_format.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/formatters/shell.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/formatters/table.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/formatters/value.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/formatters/yaml_format.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/help.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/interactive.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/lister.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/show.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/tests/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/tests/test_app.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/tests/test_columns.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/tests/test_command.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/tests/test_commandmanager.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/tests/test_complete.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/tests/test_formatters_csv.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/tests/test_formatters_json.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/tests/test_formatters_shell.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/tests/test_formatters_table.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/tests/test_formatters_value.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/tests/test_formatters_yaml.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/tests/test_help.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/tests/test_interactive.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/tests/test_lister.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/tests/test_show.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/tests/test_utils.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/tests/utils.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/cliff-2.4.0-py2.7.egg/cliff/utils.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/easy-install.pth delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/easy_install.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/EGG-INFO/PKG-INFO delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/EGG-INFO/SOURCES.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/EGG-INFO/dependency_links.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/EGG-INFO/entry_points.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/EGG-INFO/not-zip-safe delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/EGG-INFO/top_level.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/builddoc.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/cmd/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/cmd/main.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/core.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/extra_files.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/find_package.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/git.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/hooks/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/hooks/backwards.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/hooks/base.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/hooks/commands.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/hooks/files.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/hooks/metadata.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/options.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/packaging.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/pbr_json.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/testr_command.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/base.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/test_commands.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/test_core.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/test_files.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/test_hooks.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/test_integration.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/test_packaging.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/test_setup.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/test_util.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/test_version.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/test_wsgi.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/testpackage/CHANGES.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/testpackage/LICENSE.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/testpackage/MANIFEST.in delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/testpackage/README.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/testpackage/data_files/a.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/testpackage/data_files/b.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/testpackage/data_files/c.rst delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/testpackage/extra-file.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/testpackage/git-extra-file.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/testpackage/pbr_testpackage/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/testpackage/pbr_testpackage/_setup_hooks.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/testpackage/pbr_testpackage/cmd.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/testpackage/pbr_testpackage/extra.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/testpackage/pbr_testpackage/package_data/1.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/testpackage/pbr_testpackage/package_data/2.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/testpackage/pbr_testpackage/wsgi.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/testpackage/setup.cfg delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/testpackage/setup.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/testpackage/src/testext.c delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/testpackage/test-requirements.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/tests/util.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/util.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pbr-1.8.0-py2.7.egg/pbr/version.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip-1.6.dev1.dist-info/DESCRIPTION.rst delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip-1.6.dev1.dist-info/METADATA delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip-1.6.dev1.dist-info/RECORD delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip-1.6.dev1.dist-info/WHEEL delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip-1.6.dev1.dist-info/entry_points.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip-1.6.dev1.dist-info/metadata.json delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip-1.6.dev1.dist-info/top_level.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/__main__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/_markerlib/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/_markerlib/markers.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/colorama/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/colorama/ansi.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/colorama/ansitowin32.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/colorama/initialise.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/colorama/win32.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/colorama/winterm.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/_backport/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/_backport/misc.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/_backport/shutil.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/_backport/sysconfig.cfg delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/_backport/sysconfig.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/_backport/tarfile.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/compat.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/database.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/index.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/locators.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/manifest.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/markers.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/metadata.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/resources.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/scripts.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/util.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/version.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/wheel.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/constants.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/_base.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/alphabeticalattributes.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/inject_meta_charset.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/lint.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/optionaltags.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/sanitizer.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/whitespace.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/html5parser.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/ihatexml.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/inputstream.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/sanitizer.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/serializer/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/serializer/htmlserializer.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/tokenizer.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/treebuilders/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/treebuilders/_base.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/treebuilders/dom.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/treebuilders/etree.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/treebuilders/etree_lxml.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/treewalkers/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/treewalkers/_base.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/treewalkers/dom.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/treewalkers/etree.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/treewalkers/genshistream.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/treewalkers/lxmletree.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/treewalkers/pulldom.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/trie/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/trie/_base.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/trie/datrie.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/trie/py.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/utils.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/pkg_resources.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/re-vendor.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/adapters.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/api.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/auth.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/cacert.pem delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/certs.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/compat.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/cookies.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/exceptions.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/hooks.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/models.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/__main__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/big5freq.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/big5prober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/chardistribution.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/charsetgroupprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/charsetprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/codingstatemachine.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/compat.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/constants.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/cp949prober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/escprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/escsm.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/eucjpprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/euckrfreq.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/euckrprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/euctwfreq.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/euctwprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/gb2312freq.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/gb2312prober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/hebrewprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/jisfreq.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/jpcntx.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/langbulgarianmodel.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/langcyrillicmodel.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/langgreekmodel.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/langhebrewmodel.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/langhungarianmodel.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/langthaimodel.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/latin1prober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/mbcharsetprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/mbcsgroupprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/mbcssm.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/sbcharsetprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/sbcsgroupprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/sjisprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/universaldetector.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/charade/utf8prober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/big5freq.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/big5prober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/chardetect.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/chardistribution.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/charsetgroupprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/charsetprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/codingstatemachine.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/compat.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/constants.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/cp949prober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/escprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/escsm.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/eucjpprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/euckrfreq.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/euckrprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/euctwfreq.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/euctwprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/gb2312freq.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/gb2312prober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/hebrewprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/jisfreq.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/jpcntx.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/langbulgarianmodel.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/langcyrillicmodel.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/langgreekmodel.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/langhebrewmodel.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/langhungarianmodel.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/langthaimodel.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/latin1prober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/mbcharsetprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/mbcsgroupprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/mbcssm.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/sbcharsetprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/sbcsgroupprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/sjisprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/universaldetector.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/chardet/utf8prober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/urllib3/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/urllib3/_collections.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/urllib3/connection.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/urllib3/contrib/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/urllib3/contrib/ntlmpool.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/urllib3/exceptions.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/urllib3/fields.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/urllib3/filepost.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/urllib3/packages/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/urllib3/packages/six.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/urllib3/poolmanager.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/urllib3/request.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/urllib3/response.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/packages/urllib3/util.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/sessions.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/status_codes.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/structures.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/requests/utils.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/six.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/backwardcompat/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/basecommand.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/baseparser.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/cmdoptions.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/commands/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/commands/bundle.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/commands/completion.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/commands/freeze.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/commands/help.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/commands/install.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/commands/list.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/commands/search.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/commands/show.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/commands/uninstall.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/commands/unzip.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/commands/wheel.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/commands/zip.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/download.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/exceptions.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/index.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/locations.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/log.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/pep425tags.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/req/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/req/req_file.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/req/req_install.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/req/req_set.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/req/req_uninstall.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/status_codes.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/util.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/vcs/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/vcs/bazaar.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/vcs/git.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/vcs/mercurial.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/vcs/subversion.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pip/wheel.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pkg_resources/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pkg_resources/_vendor/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pkg_resources/_vendor/packaging/__about__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pkg_resources/_vendor/packaging/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pkg_resources/_vendor/packaging/_compat.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pkg_resources/_vendor/packaging/_structures.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pkg_resources/_vendor/packaging/specifiers.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pkg_resources/_vendor/packaging/version.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pkg_resources/tests/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pkg_resources/tests/test_pkg_resources.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pkg_resources/tests/test_resources.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/python_dateutil-2.6.0-py2.7.egg delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pytz-2016.10-py2.7.egg delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pyyaml-3.10-py2.7.egg/EGG-INFO/PKG-INFO delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pyyaml-3.10-py2.7.egg/EGG-INFO/SOURCES.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pyyaml-3.10-py2.7.egg/EGG-INFO/dependency_links.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pyyaml-3.10-py2.7.egg/EGG-INFO/not-zip-safe delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pyyaml-3.10-py2.7.egg/EGG-INFO/top_level.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pyyaml-3.10-py2.7.egg/yaml/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pyyaml-3.10-py2.7.egg/yaml/composer.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pyyaml-3.10-py2.7.egg/yaml/constructor.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pyyaml-3.10-py2.7.egg/yaml/cyaml.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pyyaml-3.10-py2.7.egg/yaml/dumper.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pyyaml-3.10-py2.7.egg/yaml/emitter.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pyyaml-3.10-py2.7.egg/yaml/error.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pyyaml-3.10-py2.7.egg/yaml/events.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pyyaml-3.10-py2.7.egg/yaml/loader.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pyyaml-3.10-py2.7.egg/yaml/nodes.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pyyaml-3.10-py2.7.egg/yaml/parser.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pyyaml-3.10-py2.7.egg/yaml/reader.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pyyaml-3.10-py2.7.egg/yaml/representer.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pyyaml-3.10-py2.7.egg/yaml/resolver.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pyyaml-3.10-py2.7.egg/yaml/scanner.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pyyaml-3.10-py2.7.egg/yaml/serializer.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/pyyaml-3.10-py2.7.egg/yaml/tokens.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/EGG-INFO/PKG-INFO delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/EGG-INFO/SOURCES.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/EGG-INFO/dependency_links.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/EGG-INFO/not-zip-safe delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/EGG-INFO/requires.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/EGG-INFO/top_level.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/adapters.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/api.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/auth.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/cacert.pem delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/certs.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/compat.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/cookies.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/exceptions.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/hooks.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/models.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/big5freq.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/big5prober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/chardetect.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/chardistribution.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/charsetgroupprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/charsetprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/codingstatemachine.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/compat.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/constants.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/cp949prober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/escprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/escsm.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/eucjpprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/euckrfreq.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/euckrprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/euctwfreq.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/euctwprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/gb2312freq.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/gb2312prober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/hebrewprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/jisfreq.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/jpcntx.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/langbulgarianmodel.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/langcyrillicmodel.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/langgreekmodel.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/langhebrewmodel.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/langhungarianmodel.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/langthaimodel.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/latin1prober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/mbcharsetprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/mbcsgroupprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/mbcssm.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/sbcharsetprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/sbcsgroupprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/sjisprober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/universaldetector.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/chardet/utf8prober.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/_collections.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/connection.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/connectionpool.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/contrib/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/contrib/appengine.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/contrib/ntlmpool.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/contrib/pyopenssl.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/contrib/socks.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/exceptions.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/fields.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/filepost.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/packages/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/packages/ordered_dict.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/packages/six.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/poolmanager.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/request.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/response.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/util/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/util/connection.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/util/request.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/util/response.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/util/retry.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/util/ssl_.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/util/timeout.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/packages/urllib3/util/url.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/sessions.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/status_codes.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/structures.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/requests-2.10.0-py2.7.egg/requests/utils.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools-14.3.2.dev0.dist-info/DESCRIPTION.rst delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools-14.3.2.dev0.dist-info/METADATA delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools-14.3.2.dev0.dist-info/RECORD delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools-14.3.2.dev0.dist-info/WHEEL delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools-14.3.2.dev0.dist-info/dependency_links.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools-14.3.2.dev0.dist-info/entry_points.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools-14.3.2.dev0.dist-info/metadata.json delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools-14.3.2.dev0.dist-info/top_level.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools-14.3.2.dev0.dist-info/zip-safe delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/archive_util.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/command/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/command/alias.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/command/bdist_egg.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/command/bdist_rpm.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/command/bdist_wininst.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/command/build_ext.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/command/build_py.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/command/develop.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/command/easy_install.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/command/egg_info.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/command/install.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/command/install_egg_info.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/command/install_lib.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/command/install_scripts.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/command/launcher manifest.xml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/command/register.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/command/rotate.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/command/saveopts.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/command/sdist.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/command/setopt.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/command/test.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/command/upload_docs.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/compat.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/depends.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/dist.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/extension.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/lib2to3_ex.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/msvc9_support.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/package_index.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/py26compat.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/py27compat.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/py31compat.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/sandbox.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/script (dev).tmpl delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/script.tmpl delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/site-patch.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/ssl_support.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/tests/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/tests/contexts.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/tests/environment.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/tests/fixtures.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/tests/py26compat.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/tests/script-with-bom.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/tests/server.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/tests/test_bdist_egg.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/tests/test_build_ext.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/tests/test_develop.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/tests/test_dist_info.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/tests/test_easy_install.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/tests/test_egg_info.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/tests/test_find_packages.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/tests/test_integration.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/tests/test_markerlib.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/tests/test_msvc9compiler.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/tests/test_packageindex.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/tests/test_sandbox.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/tests/test_sdist.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/tests/test_test.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/tests/test_upload_docs.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/tests/test_windows_wrappers.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/tests/textwrap.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/unicode_utils.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/utils.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/version.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/setuptools/windows_support.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/six-1.10.0-py2.7.egg/EGG-INFO/PKG-INFO delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/six-1.10.0-py2.7.egg/EGG-INFO/SOURCES.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/six-1.10.0-py2.7.egg/EGG-INFO/dependency_links.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/six-1.10.0-py2.7.egg/EGG-INFO/not-zip-safe delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/six-1.10.0-py2.7.egg/EGG-INFO/top_level.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/six-1.10.0-py2.7.egg/six.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/EGG-INFO/PKG-INFO delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/EGG-INFO/SOURCES.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/EGG-INFO/dependency_links.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/EGG-INFO/entry_points.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/EGG-INFO/not-zip-safe delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/EGG-INFO/pbr.json delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/EGG-INFO/requires.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/EGG-INFO/top_level.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/capabilities.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/common/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/common/exception.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/dataentity.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/elements/TOSCA_definition_1_0.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/elements/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/elements/artifacttype.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/elements/attribute_definition.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/elements/capabilitytype.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/elements/constraints.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/elements/datatype.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/elements/entity_type.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/elements/grouptype.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/elements/interfaces.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/elements/nodetype.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/elements/policytype.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/elements/portspectype.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/elements/property_definition.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/elements/relationshiptype.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/elements/scalarunit.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/elements/statefulentitytype.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/elements/tosca_type_validation.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/entity_template.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/extensions/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/extensions/exttools.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/extensions/nfv/TOSCA_nfv_definition_1_0_0.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/extensions/nfv/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/extensions/nfv/tests/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/extensions/nfv/tests/data/tosca_helloworld_nfv.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/extensions/nfv/tests/test_tosca_nfv_tpl.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/extensions/nfv/tosca_simple_profile_for_nfv_1_0_0.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/functions.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/groups.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/imports.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/nodetemplate.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/parameters.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/policy.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/prereq/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/prereq/csar.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/properties.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/relationship_template.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/repositories.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/shell.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/substitution_mappings.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/collectd/config.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/collectd/create.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/collectd/start.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/elasticsearch/create.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/elasticsearch/start.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/kibana/config.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/kibana/create.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/kibana/start.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/logstash/configure_collectd.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/logstash/configure_elasticsearch.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/logstash/configure_rsyslog.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/logstash/create.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/logstash/start.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/mongodb/config.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/mongodb/create.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/mongodb/create_database.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/mongodb/start.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/mysql/mysql_database_configure.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/mysql/mysql_dbms_configure.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/mysql/mysql_dbms_install.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/mysql/mysql_dbms_start.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/nodejs/config.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/nodejs/create.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/nodejs/start.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/rsyslog/config.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/rsyslog/create.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/rsyslog/start.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/webserver/webserver_install.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/webserver/webserver_start.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/wordpress/wordpress_configure.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/artifacts/wordpress/wordpress_install.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/base.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/csar_elk.csar delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Definitions/collectd.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Definitions/elasticsearch.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Definitions/kibana.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Definitions/logstash.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Definitions/paypalpizzastore_nodejs_app.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Definitions/rsyslog.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Definitions/tosca_elk.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Python/collectd/config.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Python/logstash/configure_collectd.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Python/logstash/configure_elasticsearch.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Python/logstash/configure_rsyslog.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/README.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Scripts/collectd/create.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Scripts/collectd/start.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Scripts/elasticsearch/create.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Scripts/elasticsearch/start.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Scripts/kibana/config.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Scripts/kibana/create.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Scripts/kibana/start.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Scripts/logstash/create.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Scripts/logstash/start.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Scripts/mongodb/config.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Scripts/mongodb/create.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Scripts/mongodb/create_database.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Scripts/mongodb/start.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Scripts/nodejs/config.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Scripts/nodejs/create.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Scripts/nodejs/start.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Scripts/rsyslog/config.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Scripts/rsyslog/create.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/Scripts/rsyslog/start.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_elk/TOSCA-Metadata/TOSCA.meta delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Definitions/tosca_single_instance_wordpress.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Definitions/wordpress.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/README.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/MYSQLDBMS/configure.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/MYSQLDBMS/install.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/MYSQLDBMS/start.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/MYSQLDatabase/configure.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/WebServer/install.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/WebServer/start.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/WordPress/configure.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/Scripts/WordPress/install.sh delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/CSAR/tosca_single_instance_wordpress/TOSCA-Metadata/TOSCA.meta delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/containers/test_container_docker_mysql.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/custom_types/collectd.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/custom_types/compute_with_attribute_list.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/custom_types/compute_with_nested_atributes.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/custom_types/compute_with_prop.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/custom_types/custom_caps_def.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/custom_types/custom_interface.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/custom_types/custom_relationship_type_defs.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/custom_types/db_with_list_param.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/custom_types/elasticsearch.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/custom_types/imported_sample.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/custom_types/kibana.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/custom_types/logstash.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/custom_types/nested_rsyslog.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/custom_types/nested_test_wordpress.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/custom_types/node_with_cap.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/custom_types/paypalpizzastore_nodejs_app.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/custom_types/rsyslog.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/custom_types/wordpress.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/datatypes/custom_datatype_def.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/datatypes/test_custom_datatypes_in_current_template.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/datatypes/test_custom_datatypes_nested_datatype_error.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/datatypes/test_custom_datatypes_positive.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/datatypes/test_custom_datatypes_value_error.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/datatypes/test_datatype_portspec_add_req.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/dsl_definitions/test_nested_dsl_def.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/functions/test_capabilties_inheritance.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/functions/test_concat.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/functions/test_concat_invalid.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/functions/test_get_attribute_host_keyword.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/functions/test_get_attribute_host_not_found.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/functions/test_get_attribute_illegal_host_in_outputs.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/functions/test_get_attribute_source_target_keywords.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/functions/test_get_attribute_unknown_attribute_name.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/functions/test_get_attribute_unknown_node_template_name.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/functions/test_get_attribute_with_index.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/functions/test_get_attribute_with_index_error.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/functions/test_get_attribute_with_nested_params.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/functions/test_get_implicit_attribute.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/functions/test_get_property_source_target_keywords.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/functions/test_get_property_with_host.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/functions/test_invalid_function_signature.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/functions/test_token.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/functions/test_token_invalid.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/functions/test_unknown_capability_property.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/functions/test_unknown_input_in_interface.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/functions/test_unknown_input_in_property.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/functions/tosca_nested_property_names_indexes.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/groups/definitions.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/groups/tosca_group_template.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/interfaces/test_custom_interface_in_template.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/interfaces/test_custom_interface_invalid_operation.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/load_balancer/tosca_load_balancer.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/node_filter/test_node_filter.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/policies/custom_definitions.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/policies/tosca_policy_template.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/relationship/test_custom_relationship.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/repositories/test_repositories_definition.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/repositories/tosca_repositories_test_definition.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/requirements/test_requirements.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/test_attributes_inheritance.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/test_available_rel_tpls.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/test_credential_datatype.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/test_custom_caps_def.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/test_endpoint_on_compute.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/test_instance_nested_imports.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/test_invalid_input_defaults.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/test_invalid_section_names.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/test_invalid_template_version.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/test_multiple_validation_errors.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/test_no_inputs_in_template.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/test_no_outputs_in_template.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/test_normative_type_properties_override.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/test_tosca_custom_rel_with_script.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/test_tosca_normative_type_by_shortname.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/test_tosca_top_level_error1.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/test_tosca_top_level_error2.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/topology_template/databasesubsystem.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/topology_template/definitions.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/topology_template/queuingsubsystem.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/topology_template/system.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/topology_template/transactionsubsystem.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/topology_template/validate/queuingsubsystem_invalid_input.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/topology_template/validate/system_invalid_input.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/topology_template/validate/test_example_app_substitution_mappings.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/topology_template/validate/test_substitution_mappings_invalid_output.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/topology_template/validate/test_substitution_mappings_valid_output.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/tosca_elk.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/tosca_helloworld.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/tosca_imports_validation.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/tosca_single_instance_wordpress.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/tosca_single_instance_wordpress_with_local_abspath_import.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/tosca_single_instance_wordpress_with_url_import.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/data/tosca_test_get_operation_output.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/spec_samples/v1.0/network/tosca_one_server_one_network.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/spec_samples/v1.0/network/tosca_one_server_three_networks.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/spec_samples/v1.0/network/tosca_server_on_existing_network.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/spec_samples/v1.0/network/tosca_two_servers_one_network.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/spec_samples/v1.0/storage/tosca_blockstorage_with_attachment.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/spec_samples/v1.0/storage/tosca_blockstorage_with_attachment_notation1.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/spec_samples/v1.0/storage/tosca_blockstorage_with_attachment_notation2.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/spec_samples/v1.0/storage/tosca_blockstorage_with_custom_relationship_type.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/spec_samples/v1.0/storage/tosca_blockstorage_with_relationship_template.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/spec_samples/v1.0/storage/tosca_multiple_blockstorage_with_attachment.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/spec_samples/v1.0/storage/tosca_single_object_store.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/spec_samples/v1.0/tosca_nodejs_mongodb_two_instances.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/spec_samples/v1.0/tosca_single_server.yaml delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/test_constraints.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/test_custom_relationships.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/test_datatypes.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/test_exception.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/test_functions.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/test_prereq.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/test_properties.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/test_scalarunit.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/test_shell.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/test_topology_template.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/test_toscadef.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/test_toscatpl.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/test_toscatplvalidation.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/test_utils.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tests/test_validate_tosca_version.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/topology_template.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tosca_template.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/tpl_relationship_graph.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/triggers.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/unsupportedtype.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/utils/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/utils/gettextutils.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/utils/urlutils.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/utils/validateutils.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/tosca_parser-0.7.0-py2.7.egg/toscaparser/utils/yamlparser.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/unicodecsv-0.14.1-py2.7.egg/EGG-INFO/PKG-INFO delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/unicodecsv-0.14.1-py2.7.egg/EGG-INFO/SOURCES.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/unicodecsv-0.14.1-py2.7.egg/EGG-INFO/dependency_links.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/unicodecsv-0.14.1-py2.7.egg/EGG-INFO/not-zip-safe delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/unicodecsv-0.14.1-py2.7.egg/EGG-INFO/top_level.txt delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/unicodecsv-0.14.1-py2.7.egg/unicodecsv/__init__.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/unicodecsv-0.14.1-py2.7.egg/unicodecsv/py2.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/unicodecsv-0.14.1-py2.7.egg/unicodecsv/py3.py delete mode 100644 jython-tosca-parser/src/main/resources/Lib/site-packages/unicodecsv-0.14.1-py2.7.egg/unicodecsv/test.py delete mode 100644 sdc-tosca-parser/pom.xml delete mode 100644 sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/api/ConformanceLevel.java delete mode 100644 sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/api/ISdcCsarHelper.java delete mode 100644 sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/api/Version.java delete mode 100644 sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/config/Configuration.java delete mode 100644 sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/config/ConfigurationManager.java delete mode 100644 sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/config/ErrorConfiguration.java delete mode 100644 sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/config/ErrorInfo.java delete mode 100644 sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/config/SdcToscaParserErrors.java delete mode 100644 sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/exceptions/SdcToscaParserException.java delete mode 100644 sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/impl/SdcCsarHelperImpl.java delete mode 100644 sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/impl/SdcPropertyNames.java delete mode 100644 sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/impl/SdcToscaParserFactory.java delete mode 100644 sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/impl/Types.java delete mode 100644 sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/utils/GeneralUtility.java delete mode 100644 sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/utils/SdcToscaUtility.java delete mode 100644 sdc-tosca-parser/src/main/java/org/openecomp/sdc/tosca/parser/utils/YamlToObjectConverter.java delete mode 100644 sdc-tosca-parser/src/main/resources/config/configuration.yaml delete mode 100644 sdc-tosca-parser/src/main/resources/config/error-configuration.yaml delete mode 100644 sdc-tosca-parser/src/test/java/org/openecomp/sdc/impl/SdcToscaParserBasicTest.java delete mode 100644 sdc-tosca-parser/src/test/java/org/openecomp/sdc/impl/ToscaParserConfigurationTest.java delete mode 100644 sdc-tosca-parser/src/test/java/org/openecomp/sdc/impl/ToscaParserErrorHandlingTest.java delete mode 100644 sdc-tosca-parser/src/test/java/org/openecomp/sdc/impl/ToscaParserGeneralUtilTest.java delete mode 100644 sdc-tosca-parser/src/test/java/org/openecomp/sdc/impl/ToscaParserGroupTest.java delete mode 100644 sdc-tosca-parser/src/test/java/org/openecomp/sdc/impl/ToscaParserMetadataTest.java delete mode 100644 sdc-tosca-parser/src/test/java/org/openecomp/sdc/impl/ToscaParserNodeTemplateTest.java delete mode 100644 sdc-tosca-parser/src/test/java/org/openecomp/sdc/impl/ToscaParserServiceInputTest.java delete mode 100644 sdc-tosca-parser/src/test/java/org/openecomp/sdc/impl/ToscaParserSubsMappingsTest.java delete mode 100644 sdc-tosca-parser/src/test/resources/config/configuration.yaml delete mode 100644 sdc-tosca-parser/src/test/resources/config/error-configuration.yaml delete mode 100644 sdc-tosca-parser/src/test/resources/csars/1service-ServiceWithPorts.csar delete mode 100644 sdc-tosca-parser/src/test/resources/csars/csar-invalid-zip.zip delete mode 100644 sdc-tosca-parser/src/test/resources/csars/service-Renanatst2-csar.csar delete mode 100644 sdc-tosca-parser/src/test/resources/csars/service-ServiceFdnt-csar-0904-2.csar delete mode 100644 sdc-tosca-parser/src/test/resources/csars/service-ServiceFdnt-csar-no-vf.csar delete mode 100644 sdc-tosca-parser/src/test/resources/csars/service-ServiceFdnt-csar-rainy.csar delete mode 100644 sdc-tosca-parser/src/test/resources/csars/service-ServiceFdnt-csar.csar delete mode 100644 sdc-tosca-parser/src/test/resources/csars/service-ServiceFdnt-test-csar.csar delete mode 100644 sdc-tosca-parser/src/test/resources/csars/service-ServiceFdnt-with-allotted.csar delete mode 100644 sdc-tosca-parser/src/test/resources/csars/service-ServiceFdnt-with-get-input.csar delete mode 100644 sdc-tosca-parser/src/test/resources/csars/service-entry-definition-not-defined.csar delete mode 100644 sdc-tosca-parser/src/test/resources/csars/service-invalid-conformence-level.csar delete mode 100644 sdc-tosca-parser/src/test/resources/csars/service-invalid-input-args.csar delete mode 100644 sdc-tosca-parser/src/test/resources/csars/service-invalid-yaml-content-meta.csar delete mode 100644 sdc-tosca-parser/src/test/resources/csars/service-missing-entry-definition.csar delete mode 100644 sdc-tosca-parser/src/test/resources/csars/service-missing-meta-file.csar diff --git a/jtosca/pom.xml b/jtosca/pom.xml deleted file mode 100644 index 8886012..0000000 --- a/jtosca/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - 4.0.0 - - - org.openecomp.sdc.sdc-distribution-client - sdc-main-distribution-client - 1.1.14-SNAPSHOT - - - jtosca - 0.1.7-SNAPSHOT - - - - - - org.yaml - snakeyaml - ${snakeyaml.version} - compile - - - - org.slf4j - slf4j-api - 1.7.25 - - - - - - junit - junit - 4.12 - - - \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/Capability.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/Capability.java deleted file mode 100644 index 09571db..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/Capability.java +++ /dev/null @@ -1,121 +0,0 @@ -package org.openecomp.sdc.toscaparser.api; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.Map; - -import org.openecomp.sdc.toscaparser.api.elements.CapabilityTypeDef; -import org.openecomp.sdc.toscaparser.api.elements.PropertyDef; - -public class Capability { - - private String name; - private LinkedHashMap _properties; - private CapabilityTypeDef _definition; - - public Capability(String cname, - LinkedHashMap cproperties, - CapabilityTypeDef cdefinition) { - name = cname; - _properties = cproperties; - _definition = cdefinition; - } - - public ArrayList getPropertiesObjects() { - // Return a list of property objects - ArrayList properties = new ArrayList(); - LinkedHashMap props = _properties; - if(props != null) { - for(Map.Entry me: props.entrySet()) { - String pname = me.getKey(); - Object pvalue = me.getValue(); - - LinkedHashMap propsDef = _definition.getPropertiesDef(); - if(propsDef != null) { - PropertyDef pd = (PropertyDef)propsDef.get(pname); - if(pd != null) { - properties.add(new Property(pname,pvalue,pd.getSchema(),null)); - } - } - } - } - return properties; - } - - public LinkedHashMap getProperties() { - // Return a dictionary of property name-object pairs - LinkedHashMap npps = new LinkedHashMap<>(); - for(Property p: getPropertiesObjects()) { - npps.put(p.getName(),p); - } - return npps; - } - - public Object getPropertyValue(String pname) { - // Return the value of a given property name - LinkedHashMap props = getProperties(); - if(props != null && props.get(pname) != null) { - return props.get(name).getValue(); - } - return null; - } - - public String getName() { - return name; - } - - public CapabilityTypeDef getDefinition() { - return _definition; - } - - // setter - public void setProperty(String pname,Object pvalue) { - _properties.put(pname,pvalue); - } - - @Override - public String toString() { - return "Capability{" + - "name='" + name + '\'' + - ", _properties=" + _properties + - ", _definition=" + _definition + - '}'; - } -} - -/*python - -from toscaparser.properties import Property - - -class Capability(object): - '''TOSCA built-in capabilities type.''' - - def __init__(self, name, properties, definition): - self.name = name - self._properties = properties - self.definition = definition - - def get_properties_objects(self): - '''Return a list of property objects.''' - properties = [] - props = self._properties - if props: - for name, value in props.items(): - props_def = self.definition.get_properties_def() - if props_def and name in props_def: - properties.append(Property(name, value, - props_def[name].schema)) - return properties - - def get_properties(self): - '''Return a dictionary of property name-object pairs.''' - return {prop.name: prop - for prop in self.get_properties_objects()} - - def get_property_value(self, name): - '''Return the value of a given property name.''' - props = self.get_properties() - if props and name in props: - return props[name].value -*/ diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/DataEntity.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/DataEntity.java deleted file mode 100644 index 350068b..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/DataEntity.java +++ /dev/null @@ -1,450 +0,0 @@ -package org.openecomp.sdc.toscaparser.api; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.LinkedHashMap; -import java.util.List; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.elements.*; -import org.openecomp.sdc.toscaparser.api.elements.constraints.Constraint; -import org.openecomp.sdc.toscaparser.api.elements.constraints.Schema; -import org.openecomp.sdc.toscaparser.api.functions.Function; -import org.openecomp.sdc.toscaparser.api.utils.TOSCAVersionProperty; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; -import org.openecomp.sdc.toscaparser.api.utils.ValidateUtils; - -public class DataEntity { - // A complex data value entity - - private LinkedHashMap customDef; - private DataType dataType; - private LinkedHashMap schema; - private Object value; - private String propertyName; - - public DataEntity(String _dataTypeName,Object _valueDict, - LinkedHashMap _customDef,String _propName) { - - customDef = _customDef; - dataType = new DataType(_dataTypeName,_customDef); - schema = dataType.getAllProperties(); - value = _valueDict; - propertyName = _propName; - } - - @SuppressWarnings("unchecked") - public Object validate() { - // Validate the value by the definition of the datatype - - // A datatype can not have both 'type' and 'properties' definitions. - // If the datatype has 'type' definition - if(dataType.getValueType() != null) { - value = DataEntity.validateDatatype(dataType.getValueType(),value,null,customDef,null); - Schema schemaCls = new Schema(propertyName,dataType.getDefs()); - for(Constraint constraint: schemaCls.getConstraints()) { - constraint.validate(value); - } - } - // If the datatype has 'properties' definition - else { - if(!(value instanceof LinkedHashMap)) { - //ERROR under investigation - ThreadLocalsHolder.getCollector().appendWarning(String.format( - "TypeMismatchError: \"%s\" is not a map. The type is \"%s\"", - value.toString(),dataType.getType())); - - if (value instanceof List && ((List) value).size() > 0) { - value = ((List) value).get(0); - } - - if (!(value instanceof LinkedHashMap)) { - return value; - } - } - - - - LinkedHashMap valueDict = (LinkedHashMap)value; - ArrayList allowedProps = new ArrayList<>(); - ArrayList requiredProps = new ArrayList<>(); - LinkedHashMap defaultProps = new LinkedHashMap<>(); - if(schema != null) { - allowedProps.addAll(schema.keySet()); - for(String name: schema.keySet()) { - PropertyDef propDef = schema.get(name); - if(propDef.isRequired()) { - requiredProps.add(name); - } - if(propDef.getDefault() != null) { - defaultProps.put(name,propDef.getDefault()); - } - } - } - - // check allowed field - for(String valueKey: valueDict.keySet()) { - //1710 devlop JSON validation - if(!("json").equals(dataType.getType()) && !allowedProps.contains(valueKey)) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "UnknownFieldError: Data value of type \"%s\" contains unknown field \"%s\"", - dataType.getType(),valueKey)); - } - } - - // check default field - for(String defKey: defaultProps.keySet()) { - Object defValue = defaultProps.get(defKey); - if(valueDict.get(defKey) == null) { - valueDict.put(defKey, defValue); - } - - } - - // check missing field - ArrayList missingProp = new ArrayList<>(); - for(String reqKey: requiredProps) { - if(!valueDict.keySet().contains(reqKey)) { - missingProp.add(reqKey); - } - } - if(missingProp.size() > 0) { - ThreadLocalsHolder.getCollector().appendWarning(String.format( - "MissingRequiredFieldError: Data value of type \"%s\" is missing required field(s) \"%s\"", - dataType.getType(),missingProp.toString())); - } - - // check every field - for(String vname: valueDict.keySet()) { - Object vvalue = valueDict.get(vname); - LinkedHashMap schemaName = _findSchema(vname); - if(schemaName == null) { - continue; - } - Schema propSchema = new Schema(vname,schemaName); - // check if field value meets type defined - DataEntity.validateDatatype(propSchema.getType(), - vvalue, - propSchema.getEntrySchema(), - customDef, - null); - - // check if field value meets constraints defined - if(propSchema.getConstraints() != null) { - for(Constraint constraint: propSchema.getConstraints()) { - if(vvalue instanceof ArrayList) { - for(Object val: (ArrayList)vvalue) { - constraint.validate(val); - } - } - else { - constraint.validate(vvalue); - } - } - } - } - } - return value; - } - - private LinkedHashMap _findSchema(String name) { - if(schema != null && schema.get(name) != null) { - return schema.get(name).getSchema(); - } - return null; - } - - public static Object validateDatatype(String type, - Object value, - LinkedHashMap entrySchema, - LinkedHashMap customDef, - String propName) { - // Validate value with given type - - // If type is list or map, validate its entry by entry_schema(if defined) - // If type is a user-defined complex datatype, custom_def is required. - - if(Function.isFunction(value)) { - return value; - } - else if (type == null) { - //NOT ANALYZED - ThreadLocalsHolder.getCollector().appendWarning(String.format( - "MissingType: Type is missing for value \"%s\"", - value.toString())); - return value; - } - else if(type.equals(Schema.STRING)) { - return ValidateUtils.validateString(value); - } - else if(type.equals(Schema.INTEGER)) { - return ValidateUtils.validateInteger(value); - } - else if(type.equals(Schema.FLOAT)) { - return ValidateUtils.validateFloat(value); - } - else if(type.equals(Schema.NUMBER)) { - return ValidateUtils.validateNumeric(value); - } - else if(type.equals(Schema.BOOLEAN)) { - return ValidateUtils.validateBoolean(value); - } - else if(type.equals(Schema.RANGE)) { - return ValidateUtils.validateRange(value); - } - else if(type.equals(Schema.TIMESTAMP)) { - ValidateUtils.validateTimestamp(value); - return value; - } - else if(type.equals(Schema.LIST)) { - ValidateUtils.validateList(value); - if(entrySchema != null) { - DataEntity.validateEntry(value,entrySchema,customDef); - } - return value; - } - else if(type.equals(Schema.SCALAR_UNIT_SIZE)) { - return (new ScalarUnitSize(value)).validateScalarUnit(); - } - else if(type.equals(Schema.SCALAR_UNIT_FREQUENCY)) { - return (new ScalarUnitFrequency(value)).validateScalarUnit(); - } - else if(type.equals(Schema.SCALAR_UNIT_TIME)) { - return (new ScalarUnitTime(value)).validateScalarUnit(); - } - else if(type.equals(Schema.VERSION)) { - return (new TOSCAVersionProperty(value)).getVersion(); - } - else if(type.equals(Schema.MAP)) { - ValidateUtils.validateMap(value); - if(entrySchema != null) { - DataEntity.validateEntry(value,entrySchema,customDef); - } - return value; - } - else if(type.equals(Schema.PORTSPEC)) { - // tODO(TBD) bug 1567063, validate source & target as PortDef type - // as complex types not just as integers - PortSpec.validateAdditionalReq(value,propName,customDef); - } - else { - DataEntity data = new DataEntity(type,value,customDef,null); - return data.validate(); - } - - return value; - } - - @SuppressWarnings("unchecked") - public static Object validateEntry(Object value, - LinkedHashMap entrySchema, - LinkedHashMap customDef) { - - // Validate entries for map and list - Schema schema = new Schema(null,entrySchema); - Object valueob = value; - ArrayList valueList = null; - if(valueob instanceof LinkedHashMap) { - valueList = new ArrayList(((LinkedHashMap)valueob).values()); - } - else if(valueob instanceof ArrayList) { - valueList = (ArrayList)valueob; - } - if(valueList != null) { - for(Object v: valueList) { - DataEntity.validateDatatype(schema.getType(),v,schema.getEntrySchema(),customDef,null); - if(schema.getConstraints() != null) { - for(Constraint constraint: schema.getConstraints()) { - constraint.validate(v); - } - } - } - } - return value; - } - - @Override - public String toString() { - return "DataEntity{" + - "customDef=" + customDef + - ", dataType=" + dataType + - ", schema=" + schema + - ", value=" + value + - ", propertyName='" + propertyName + '\'' + - '}'; - } -} - -/*python - -from toscaparser.common.exception import ExceptionCollector -from toscaparser.common.exception import MissingRequiredFieldError -from toscaparser.common.exception import TypeMismatchError -from toscaparser.common.exception import UnknownFieldError -from toscaparser.elements.constraints import Schema -from toscaparser.elements.datatype import DataType -from toscaparser.elements.portspectype import PortSpec -from toscaparser.elements.scalarunit import ScalarUnit_Frequency -from toscaparser.elements.scalarunit import ScalarUnit_Size -from toscaparser.elements.scalarunit import ScalarUnit_Time -from toscaparser.utils.gettextutils import _ -from toscaparser.utils import validateutils - - -class DataEntity(object): - '''A complex data value entity.''' - - def __init__(self, datatypename, value_dict, custom_def=None, - prop_name=None): - self.custom_def = custom_def - self.datatype = DataType(datatypename, custom_def) - self.schema = self.datatype.get_all_properties() - self.value = value_dict - self.property_name = prop_name - - def validate(self): - '''Validate the value by the definition of the datatype.''' - - # A datatype can not have both 'type' and 'properties' definitions. - # If the datatype has 'type' definition - if self.datatype.value_type: - self.value = DataEntity.validate_datatype(self.datatype.value_type, - self.value, - None, - self.custom_def) - schema = Schema(self.property_name, self.datatype.defs) - for constraint in schema.constraints: - constraint.validate(self.value) - # If the datatype has 'properties' definition - else: - if not isinstance(self.value, dict): - ExceptionCollector.appendException( - TypeMismatchError(what=self.value, - type=self.datatype.type)) - allowed_props = [] - required_props = [] - default_props = {} - if self.schema: - allowed_props = self.schema.keys() - for name, prop_def in self.schema.items(): - if prop_def.required: - required_props.append(name) - if prop_def.default: - default_props[name] = prop_def.default - - # check allowed field - for value_key in list(self.value.keys()): - if value_key not in allowed_props: - ExceptionCollector.appendException( - UnknownFieldError(what=(_('Data value of type "%s"') - % self.datatype.type), - field=value_key)) - - # check default field - for def_key, def_value in list(default_props.items()): - if def_key not in list(self.value.keys()): - self.value[def_key] = def_value - - # check missing field - missingprop = [] - for req_key in required_props: - if req_key not in list(self.value.keys()): - missingprop.append(req_key) - if missingprop: - ExceptionCollector.appendException( - MissingRequiredFieldError( - what=(_('Data value of type "%s"') - % self.datatype.type), required=missingprop)) - - # check every field - for name, value in list(self.value.items()): - schema_name = self._find_schema(name) - if not schema_name: - continue - prop_schema = Schema(name, schema_name) - # check if field value meets type defined - DataEntity.validate_datatype(prop_schema.type, value, - prop_schema.entry_schema, - self.custom_def) - # check if field value meets constraints defined - if prop_schema.constraints: - for constraint in prop_schema.constraints: - if isinstance(value, list): - for val in value: - constraint.validate(val) - else: - constraint.validate(value) - - return self.value - - def _find_schema(self, name): - if self.schema and name in self.schema.keys(): - return self.schema[name].schema - - @staticmethod - def validate_datatype(type, value, entry_schema=None, custom_def=None, - prop_name=None): - '''Validate value with given type. - - If type is list or map, validate its entry by entry_schema(if defined) - If type is a user-defined complex datatype, custom_def is required. - ''' - from toscaparser.functions import is_function - if is_function(value): - return value - if type == Schema.STRING: - return validateutils.validate_string(value) - elif type == Schema.INTEGER: - return validateutils.validate_integer(value) - elif type == Schema.FLOAT: - return validateutils.validate_float(value) - elif type == Schema.NUMBER: - return validateutils.validate_numeric(value) - elif type == Schema.BOOLEAN: - return validateutils.validate_boolean(value) - elif type == Schema.RANGE: - return validateutils.validate_range(value) - elif type == Schema.TIMESTAMP: - validateutils.validate_timestamp(value) - return value - elif type == Schema.LIST: - validateutils.validate_list(value) - if entry_schema: - DataEntity.validate_entry(value, entry_schema, custom_def) - return value - elif type == Schema.SCALAR_UNIT_SIZE: - return ScalarUnit_Size(value).validate_scalar_unit() - elif type == Schema.SCALAR_UNIT_FREQUENCY: - return ScalarUnit_Frequency(value).validate_scalar_unit() - elif type == Schema.SCALAR_UNIT_TIME: - return ScalarUnit_Time(value).validate_scalar_unit() - elif type == Schema.VERSION: - return validateutils.TOSCAVersionProperty(value).get_version() - elif type == Schema.MAP: - validateutils.validate_map(value) - if entry_schema: - DataEntity.validate_entry(value, entry_schema, custom_def) - return value - elif type == Schema.PORTSPEC: - # tODO(TBD) bug 1567063, validate source & target as PortDef type - # as complex types not just as integers - PortSpec.validate_additional_req(value, prop_name, custom_def) - else: - data = DataEntity(type, value, custom_def) - return data.validate() - - @staticmethod - def validate_entry(value, entry_schema, custom_def=None): - '''Validate entries for map and list.''' - schema = Schema(None, entry_schema) - valuelist = value - if isinstance(value, dict): - valuelist = list(value.values()) - for v in valuelist: - DataEntity.validate_datatype(schema.type, v, schema.entry_schema, - custom_def) - if schema.constraints: - for constraint in schema.constraints: - constraint.validate(v) - return value -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/EntityTemplate.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/EntityTemplate.java deleted file mode 100644 index e896905..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/EntityTemplate.java +++ /dev/null @@ -1,832 +0,0 @@ -package org.openecomp.sdc.toscaparser.api; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.Map; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.elements.*; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -public abstract class EntityTemplate { - // Base class for TOSCA templates - - protected static final String DERIVED_FROM = "derived_from"; - protected static final String PROPERTIES = "properties"; - protected static final String REQUIREMENTS = "requirements"; - protected static final String INTERFACES = "interfaces"; - protected static final String CAPABILITIES = "capabilities"; - protected static final String TYPE = "type"; - protected static final String DESCRIPTION = "description"; - protected static final String DIRECTIVES = "directives"; - protected static final String ATTRIBUTES = "attributes"; - protected static final String ARTIFACTS = "artifacts"; - protected static final String NODE_FILTER = "node_filter"; - protected static final String COPY = "copy"; - - protected static final String SECTIONS[] = { - DERIVED_FROM, PROPERTIES, REQUIREMENTS,INTERFACES, - CAPABILITIES, TYPE, DESCRIPTION, DIRECTIVES, - ATTRIBUTES, ARTIFACTS, NODE_FILTER, COPY}; - - private static final String NODE = "node"; - private static final String CAPABILITY = "capability"; - private static final String RELATIONSHIP = "relationship"; - private static final String OCCURRENCES = "occurrences"; - - protected static final String REQUIREMENTS_SECTION[] = { - NODE, CAPABILITY, RELATIONSHIP, OCCURRENCES, NODE_FILTER}; - - //# Special key names - private static final String METADATA = "metadata"; - protected static final String SPECIAL_SECTIONS[] = {METADATA}; - - protected String name; - protected LinkedHashMap entityTpl; - protected LinkedHashMap customDef; - protected StatefulEntityType typeDefinition; - private ArrayList _properties; - private ArrayList _interfaces; - private ArrayList _requirements; - private ArrayList _capabilities; - - // dummy constructor for subclasses that don't want super - public EntityTemplate() { - return; - } - - @SuppressWarnings("unchecked") - public EntityTemplate(String _name, - LinkedHashMap _template, - String _entityName, - LinkedHashMap _customDef) { - name = _name; - entityTpl = _template; - customDef = _customDef; - _validateField(entityTpl); - String type = (String)entityTpl.get("type"); - UnsupportedType.validateType(type); - if(_entityName.equals("node_type")) { - if(type != null) { - typeDefinition = new NodeType(type, customDef); - } - else { - typeDefinition = null; - } - } - if(_entityName.equals("relationship_type")) { - Object relationship = _template.get("relationship"); - type = null; - if(relationship != null && relationship instanceof LinkedHashMap) { - type = (String)((LinkedHashMap)relationship).get("type"); - } - else if(relationship instanceof String) { - type = (String)entityTpl.get("relationship"); - } - else { - type = (String)entityTpl.get("type"); - } - UnsupportedType.validateType(type); - typeDefinition = new RelationshipType(type,null, customDef); - } - if(_entityName.equals("policy_type")) { - if(type == null) { - //msg = (_('Policy definition of "%(pname)s" must have' - // ' a "type" ''attribute.') % dict(pname=name)) - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValidationError: Policy definition of \"%s\" must have a \"type\" attribute",name)); - } - typeDefinition = new PolicyType(type, customDef); - } - if(_entityName.equals("group_type")) { - if(type != null) { - typeDefinition = new GroupType(type, customDef); - } - else { - typeDefinition = null; - } - } - _properties = null; - _interfaces = null; - _requirements = null; - _capabilities = null; - } - - public String getType() { - if(typeDefinition != null) { - String clType = typeDefinition.getClass().getSimpleName(); - if(clType.equals("NodeType")) { - return (String)((NodeType)typeDefinition).getType(); - } - else if(clType.equals("PolicyType")) { - return (String)((PolicyType)typeDefinition).getType(); - } - else if(clType.equals("GroupType")) { - return (String)((GroupType)typeDefinition).getType(); - } - else if(clType.equals("RelationshipType")) { - return (String)((RelationshipType)typeDefinition).getType(); - } - } - return null; - } - - public Object getParentType() { - if(typeDefinition != null) { - String clType = typeDefinition.getClass().getSimpleName(); - if(clType.equals("NodeType")) { - return ((NodeType)typeDefinition).getParentType(); - } - else if(clType.equals("PolicyType")) { - return ((PolicyType)typeDefinition).getParentType(); - } - else if(clType.equals("GroupType")) { - return ((GroupType)typeDefinition).getParentType(); - } - else if(clType.equals("RelationshipType")) { - return ((RelationshipType)typeDefinition).getParentType(); - } - } - return null; - } - - @SuppressWarnings("unchecked") - public ArrayList getRequirements() { - if(_requirements == null) { - _requirements = new ArrayList(); - Object ob = ((EntityType)typeDefinition).getValue(REQUIREMENTS,entityTpl,false); - if(ob != null) { - _requirements.addAll((ArrayList)ob); - } - - } - return _requirements; - } - - public ArrayList getPropertiesObjects() { - // Return properties objects for this template - if(_properties ==null) { - _properties = _createProperties(); - } - return _properties; - } - - public LinkedHashMap getProperties() { - LinkedHashMap props = new LinkedHashMap<>(); - for(Property po: getPropertiesObjects()) { - props.put(((Property)po).getName(),po); - } - return props; - } - - public Object getPropertyValue(String name) { - LinkedHashMap props = getProperties(); - Property p = (Property)props.get(name); - return p != null ? p.getValue() : null; - } - - public ArrayList getInterfaces() { - if(_interfaces == null) { - _interfaces = _createInterfaces(); - } - return _interfaces; - } - - public ArrayList getCapabilitiesObjects() { - // Return capabilities objects for this template - if(_capabilities == null) { - _capabilities = _createCapabilities(); - } - return _capabilities; - - } - - public LinkedHashMap getCapabilities() { - LinkedHashMap caps = new LinkedHashMap(); - for(Capability cap: getCapabilitiesObjects()) { - caps.put(cap.getName(),cap); - } - return caps; - } - - public boolean isDerivedFrom(String typeStr) { - // Returns true if this object is derived from 'type_str'. - // False otherwise - - if(getType() == null) { - return false; - } - else if(getType().equals(typeStr)) { - return true; - } - else if(getParentType() != null) { - return ((EntityType)getParentType()).isDerivedFrom(typeStr); - } - return false; - } - - @SuppressWarnings("unchecked") - private ArrayList _createCapabilities() { - ArrayList capability = new ArrayList(); - LinkedHashMap caps = (LinkedHashMap) - ((EntityType)typeDefinition).getValue(CAPABILITIES,entityTpl,true); - if(caps != null) { - //?!? getCapabilities defined only for NodeType... - LinkedHashMap capabilities = ((NodeType)typeDefinition).getCapabilities(); - for(Map.Entry me: caps.entrySet()) { - String name = me. getKey(); - LinkedHashMap props = (LinkedHashMap)me.getValue(); - if(capabilities.get(name) != null) { - CapabilityTypeDef c = capabilities.get(name); // a CapabilityTypeDef - LinkedHashMap properties = new LinkedHashMap(); - // first use the definition default value - LinkedHashMap cprops = c.getProperties(); - if(cprops != null) { - for(Map.Entry cpe: cprops.entrySet()) { - String propertyName = cpe.getKey(); - LinkedHashMap propertyDef = (LinkedHashMap)cpe.getValue(); - Object dob = propertyDef.get("default"); - if(dob != null) { - properties.put(propertyName, dob); - - } - } - } - // then update (if available) with the node properties - LinkedHashMap pp = (LinkedHashMap)props.get("properties"); - if(pp != null) { - properties.putAll(pp); - } - Capability cap = new Capability(name, properties, c); - capability.add(cap); - } - } - } - return capability; - } - - protected void _validateProperties(LinkedHashMap template,StatefulEntityType entityType) { - @SuppressWarnings("unchecked") - LinkedHashMap properties = (LinkedHashMap)entityType.getValue(PROPERTIES,template,false); - _commonValidateProperties(entityType,properties); - } - - protected void _validateCapabilities() { - //BUG??? getCapabilities only defined in NodeType... - LinkedHashMap typeCapabilities = ((NodeType)typeDefinition).getCapabilities(); - ArrayList allowedCaps = new ArrayList(); - if(typeCapabilities != null) { - allowedCaps.addAll(typeCapabilities.keySet()); - } - @SuppressWarnings("unchecked") - LinkedHashMap capabilities = (LinkedHashMap) - ((EntityType)typeDefinition).getValue(CAPABILITIES, entityTpl, false); - if(capabilities != null) { - _commonValidateField(capabilities, allowedCaps, "capabilities"); - _validateCapabilitiesProperties(capabilities); - } - } - - @SuppressWarnings("unchecked") - private void _validateCapabilitiesProperties(LinkedHashMap capabilities) { - for(Map.Entry me: capabilities.entrySet()) { - String cap = me.getKey(); - LinkedHashMap props = (LinkedHashMap)me.getValue(); - Capability capability = getCapability(cap); - if(capability == null) { - continue; - } - CapabilityTypeDef capabilitydef = capability.getDefinition(); - _commonValidateProperties(capabilitydef,(LinkedHashMap)props.get(PROPERTIES)); - - // validating capability properties values - for(Property prop: getCapability(cap).getPropertiesObjects()) { - prop.validate(); - - if(cap.equals("scalable") && prop.getName().equals("default_instances")) { - LinkedHashMap propDict = (LinkedHashMap)props.get(PROPERTIES); - int minInstances = (int)propDict.get("min_instances"); - int maxInstances = (int)propDict.get("max_instances"); - int defaultInstances = (int)propDict.get("default_instances"); - if(defaultInstances < minInstances || defaultInstances > maxInstances) { - //err_msg = ('"properties" of template "%s": ' - // '"default_instances" value is not between ' - // '"min_instances" and "max_instances".' % - // self.name) - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValidationError: \"properties\" of template \"%s\": \"default_instances\" value is not between \"min_instances\" and \"max_instances\"", - name)); - } - } - } - } - } - - private void _commonValidateProperties(StatefulEntityType entityType,LinkedHashMap properties) { - ArrayList allowedProps = new ArrayList(); - ArrayList requiredProps = new ArrayList(); - for(PropertyDef p: entityType.getPropertiesDefObjects()) { - allowedProps.add(p.getName()); - // If property is 'required' and has no 'default' value then record - if(p.isRequired() && p.getDefault() == null) { - requiredProps.add(p.getName()); - } - } - // validate all required properties have values - if(properties != null) { - ArrayList reqPropsNoValueOrDefault = new ArrayList(); - _commonValidateField(properties, allowedProps, "properties"); - // make sure it's not missing any property required by a tosca type - for(String r: requiredProps) { - if(properties.get(r) == null) { - reqPropsNoValueOrDefault.add(r); - } - } - // Required properties found without value or a default value - if(!reqPropsNoValueOrDefault.isEmpty()) { - ThreadLocalsHolder.getCollector().appendWarning(String.format( - "MissingRequiredFieldError: properties of template \"%s\" are missing field(s): %s", - name,reqPropsNoValueOrDefault.toString())); - } - } - else { - // Required properties in schema, but not in template - if(!requiredProps.isEmpty()) { - ThreadLocalsHolder.getCollector().appendWarning(String.format( - "MissingRequiredFieldError2: properties of template \"%s\" are missing field(s): %s", - name,requiredProps.toString())); - } - } - } - - @SuppressWarnings("unchecked") - private void _validateField(LinkedHashMap template) { - if(!(template instanceof LinkedHashMap)) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "MissingRequiredFieldError: Template \"%s\" is missing required field \"%s\"",name,TYPE)); - return;//??? - } - boolean bBad = false; - Object relationship = ((LinkedHashMap)template).get("relationship"); - if(relationship != null) { - if(!(relationship instanceof String)) { - bBad = (((LinkedHashMap)relationship).get(TYPE) == null); - } - else if(relationship instanceof String) { - bBad = (template.get("relationship") == null); - } - } - else { - bBad = (template.get(TYPE) == null); - } - if(bBad) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "MissingRequiredFieldError: Template \"%s\" is missing required field \"%s\"",name,TYPE)); - } - } - - protected void _commonValidateField(LinkedHashMap schema, ArrayList allowedList,String section) { - for(String sname: schema.keySet()) { - boolean bFound = false; - for(String allowed: allowedList) { - if(sname.equals(allowed)) { - bFound = true; - break; - } - } - if(!bFound) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "UnknownFieldError: Section \"%s\" of template \"%s\" contains unknown field \"%s\"",section,name,sname)); - } - } - - } - - @SuppressWarnings("unchecked") - private ArrayList _createProperties() { - ArrayList props = new ArrayList(); - LinkedHashMap properties = (LinkedHashMap) - ((EntityType)typeDefinition).getValue(PROPERTIES,entityTpl,false); - if(properties == null) { - properties = new LinkedHashMap(); - } - for(Map.Entry me: properties.entrySet()) { - String pname = me.getKey(); - Object pvalue = me.getValue(); - LinkedHashMap propsDef = ((StatefulEntityType)typeDefinition).getPropertiesDef(); - if(propsDef != null && propsDef.get(pname) != null) { - PropertyDef pd = (PropertyDef)propsDef.get(pname); - Property prop = new Property(pname,pvalue,pd.getSchema(),customDef); - props.add(prop); - } - } - ArrayList pds = ((StatefulEntityType)typeDefinition).getPropertiesDefObjects(); - for(Object pdo: pds) { - PropertyDef pd = (PropertyDef)pdo; - if(pd.getDefault() != null && properties.get(pd.getName()) == null) { - Property prop = new Property(pd.getName(),pd.getDefault(),pd.getSchema(),customDef); - props.add(prop); - } - } - return props; - } - - @SuppressWarnings("unchecked") - private ArrayList _createInterfaces() { - ArrayList interfaces = new ArrayList<>(); - LinkedHashMap typeInterfaces = new LinkedHashMap(); - if(typeDefinition instanceof RelationshipType) { - if(entityTpl instanceof LinkedHashMap) { - typeInterfaces = (LinkedHashMap)entityTpl.get(INTERFACES); - if(typeInterfaces == null) { - for(String relName: entityTpl.keySet()) { - Object relValue = entityTpl.get(relName); - if(!relName.equals("type")) { - Object relDef = relValue; - LinkedHashMap rel = null; - if(relDef instanceof LinkedHashMap) { - Object relob = ((LinkedHashMap)relDef).get("relationship"); - if(relob instanceof LinkedHashMap) { - rel = (LinkedHashMap)relob; - } - } - if(rel != null) { - if(rel.get(INTERFACES) != null) { - typeInterfaces = (LinkedHashMap)rel.get(INTERFACES); - break; - } - } - } - } - } - } - } - else { - typeInterfaces = (LinkedHashMap) - ((EntityType)typeDefinition).getValue(INTERFACES,entityTpl,false); - } - if(typeInterfaces != null) { - for(Map.Entry me: typeInterfaces.entrySet()) { - String interfaceType = me.getKey(); - LinkedHashMap value = (LinkedHashMap)me.getValue(); - for(Map.Entry ve: value.entrySet()) { - String op = ve.getKey(); - Object opDef = ve.getValue(); - InterfacesDef iface = new InterfacesDef((EntityType)typeDefinition, - interfaceType, - this, - op, - opDef); - interfaces.add(iface); - } - - } - } - return interfaces; - } - - public Capability getCapability(String name) { - // Provide named capability - // :param name: name of capability - // :return: capability object if found, None otherwise - LinkedHashMap caps = getCapabilities(); - if(caps != null) { - return caps.get(name); - } - return null; - } - - // getter - public String getName() { - return name; - } - - public StatefulEntityType getTypeDefinition() { - return typeDefinition; - } - - public LinkedHashMap getCustomDef() { - return customDef; - } - - @Override - public String toString() { - return "EntityTemplate{" + - "name='" + name + '\'' + - ", entityTpl=" + entityTpl + - ", customDef=" + customDef + - ", typeDefinition=" + typeDefinition + - ", _properties=" + _properties + - ", _interfaces=" + _interfaces + - ", _requirements=" + _requirements + - ", _capabilities=" + _capabilities + - '}'; - } -} - -/*python - -class EntityTemplate(object): - '''Base class for TOSCA templates.''' - - SECTIONS = (DERIVED_FROM, PROPERTIES, REQUIREMENTS, - INTERFACES, CAPABILITIES, TYPE, DESCRIPTION, DIRECTIVES, - ATTRIBUTES, ARTIFACTS, NODE_FILTER, COPY) = \ - ('derived_from', 'properties', 'requirements', 'interfaces', - 'capabilities', 'type', 'description', 'directives', - 'attributes', 'artifacts', 'node_filter', 'copy') - REQUIREMENTS_SECTION = (NODE, CAPABILITY, RELATIONSHIP, OCCURRENCES, NODE_FILTER) = \ - ('node', 'capability', 'relationship', - 'occurrences', 'node_filter') - # Special key names - SPECIAL_SECTIONS = (METADATA) = ('metadata') - - def __init__(self, name, template, entity_name, custom_def=None): - self.name = name - self.entity_tpl = template - self.custom_def = custom_def - self._validate_field(self.entity_tpl) - type = self.entity_tpl.get('type') - UnsupportedType.validate_type(type) - if entity_name == 'node_type': - self.type_definition = NodeType(type, custom_def) \ - if type is not None else None - if entity_name == 'relationship_type': - relationship = template.get('relationship') - type = None - if relationship and isinstance(relationship, dict): - type = relationship.get('type') - elif isinstance(relationship, str): - type = self.entity_tpl['relationship'] - else: - type = self.entity_tpl['type'] - UnsupportedType.validate_type(type) - self.type_definition = RelationshipType(type, - None, custom_def) - if entity_name == 'policy_type': - if not type: - msg = (_('Policy definition of "%(pname)s" must have' - ' a "type" ''attribute.') % dict(pname=name)) - ExceptionCollector.appendException( - ValidationError(msg)) - - self.type_definition = PolicyType(type, custom_def) - if entity_name == 'group_type': - self.type_definition = GroupType(type, custom_def) \ - if type is not None else None - self._properties = None - self._interfaces = None - self._requirements = None - self._capabilities = None - - @property - def type(self): - if self.type_definition: - return self.type_definition.type - - @property - def parent_type(self): - if self.type_definition: - return self.type_definition.parent_type - - @property - def requirements(self): - if self._requirements is None: - self._requirements = self.type_definition.get_value( - self.REQUIREMENTS, - self.entity_tpl) or [] - return self._requirements - - def get_properties_objects(self): - '''Return properties objects for this template.''' - if self._properties is None: - self._properties = self._create_properties() - return self._properties - - def get_properties(self): - '''Return a dictionary of property name-object pairs.''' - return {prop.name: prop - for prop in self.get_properties_objects()} - - def get_property_value(self, name): - '''Return the value of a given property name.''' - props = self.get_properties() - if props and name in props.keys(): - return props[name].value - - @property - def interfaces(self): - if self._interfaces is None: - self._interfaces = self._create_interfaces() - return self._interfaces - - def get_capabilities_objects(self): - '''Return capabilities objects for this template.''' - if not self._capabilities: - self._capabilities = self._create_capabilities() - return self._capabilities - - def get_capabilities(self): - '''Return a dictionary of capability name-object pairs.''' - return {cap.name: cap - for cap in self.get_capabilities_objects()} - - def is_derived_from(self, type_str): - '''Check if object inherits from the given type. - - Returns true if this object is derived from 'type_str'. - False otherwise. - ''' - if not self.type: - return False - elif self.type == type_str: - return True - elif self.parent_type: - return self.parent_type.is_derived_from(type_str) - else: - return False - - def _create_capabilities(self): - capability = [] - caps = self.type_definition.get_value(self.CAPABILITIES, - self.entity_tpl, True) - if caps: - for name, props in caps.items(): - capabilities = self.type_definition.get_capabilities() - if name in capabilities.keys(): - c = capabilities[name] - properties = {} - # first use the definition default value - if c.properties: - for property_name in c.properties.keys(): - prop_def = c.properties[property_name] - if 'default' in prop_def: - properties[property_name] = prop_def['default'] - # then update (if available) with the node properties - if 'properties' in props and props['properties']: - properties.update(props['properties']) - - cap = Capability(name, properties, c) - capability.append(cap) - return capability - - def _validate_properties(self, template, entitytype): - properties = entitytype.get_value(self.PROPERTIES, template) - self._common_validate_properties(entitytype, properties) - - def _validate_capabilities(self): - type_capabilities = self.type_definition.get_capabilities() - allowed_caps = \ - type_capabilities.keys() if type_capabilities else [] - capabilities = self.type_definition.get_value(self.CAPABILITIES, - self.entity_tpl) - if capabilities: - self._common_validate_field(capabilities, allowed_caps, - 'capabilities') - self._validate_capabilities_properties(capabilities) - - def _validate_capabilities_properties(self, capabilities): - for cap, props in capabilities.items(): - capability = self.get_capability(cap) - if not capability: - continue - capabilitydef = capability.definition - self._common_validate_properties(capabilitydef, - props[self.PROPERTIES]) - - # validating capability properties values - for prop in self.get_capability(cap).get_properties_objects(): - prop.validate() - - # tODO(srinivas_tadepalli): temporary work around to validate - # default_instances until standardized in specification - if cap == "scalable" and prop.name == "default_instances": - prop_dict = props[self.PROPERTIES] - min_instances = prop_dict.get("min_instances") - max_instances = prop_dict.get("max_instances") - default_instances = prop_dict.get("default_instances") - if not (min_instances <= default_instances - <= max_instances): - err_msg = ('"properties" of template "%s": ' - '"default_instances" value is not between ' - '"min_instances" and "max_instances".' % - self.name) - ExceptionCollector.appendException( - ValidationError(message=err_msg)) - - def _common_validate_properties(self, entitytype, properties): - allowed_props = [] - required_props = [] - for p in entitytype.get_properties_def_objects(): - allowed_props.append(p.name) - # If property is 'required' and has no 'default' value then record - if p.required and p.default is None: - required_props.append(p.name) - # validate all required properties have values - if properties: - req_props_no_value_or_default = [] - self._common_validate_field(properties, allowed_props, - 'properties') - # make sure it's not missing any property required by a tosca type - for r in required_props: - if r not in properties.keys(): - req_props_no_value_or_default.append(r) - # Required properties found without value or a default value - if req_props_no_value_or_default: - ExceptionCollector.appendException( - MissingRequiredFieldError( - what='"properties" of template "%s"' % self.name, - required=req_props_no_value_or_default)) - else: - # Required properties in schema, but not in template - if required_props: - ExceptionCollector.appendException( - MissingRequiredFieldError( - what='"properties" of template "%s"' % self.name, - required=required_props)) - - def _validate_field(self, template): - if not isinstance(template, dict): - ExceptionCollector.appendException( - MissingRequiredFieldError( - what='Template "%s"' % self.name, required=self.TYPE)) - try: - relationship = template.get('relationship') - if relationship and not isinstance(relationship, str): - relationship[self.TYPE] - elif isinstance(relationship, str): - template['relationship'] - else: - template[self.TYPE] - except KeyError: - ExceptionCollector.appendException( - MissingRequiredFieldError( - what='Template "%s"' % self.name, required=self.TYPE)) - - def _common_validate_field(self, schema, allowedlist, section): - for name in schema: - if name not in allowedlist: - ExceptionCollector.appendException( - UnknownFieldError( - what=('"%(section)s" of template "%(nodename)s"' - % {'section': section, 'nodename': self.name}), - field=name)) - - def _create_properties(self): - props = [] - properties = self.type_definition.get_value(self.PROPERTIES, - self.entity_tpl) or {} - for name, value in properties.items(): - props_def = self.type_definition.get_properties_def() - if props_def and name in props_def: - prop = Property(name, value, - props_def[name].schema, self.custom_def) - props.append(prop) - for p in self.type_definition.get_properties_def_objects(): - if p.default is not None and p.name not in properties.keys(): - prop = Property(p.name, p.default, p.schema, self.custom_def) - props.append(prop) - return props - - def _create_interfaces(self): - interfaces = [] - type_interfaces = None - if isinstance(self.type_definition, RelationshipType): - if isinstance(self.entity_tpl, dict): - if self.INTERFACES in self.entity_tpl: - type_interfaces = self.entity_tpl[self.INTERFACES] - else: - for rel_def, value in self.entity_tpl.items(): - if rel_def != 'type': - rel_def = self.entity_tpl.get(rel_def) - rel = None - if isinstance(rel_def, dict): - rel = rel_def.get('relationship') - if rel: - if self.INTERFACES in rel: - type_interfaces = rel[self.INTERFACES] - break - else: - type_interfaces = self.type_definition.get_value(self.INTERFACES, - self.entity_tpl) - if type_interfaces: - for interface_type, value in type_interfaces.items(): - for op, op_def in value.items(): - iface = InterfacesDef(self.type_definition, - interfacetype=interface_type, - node_template=self, - name=op, - value=op_def) - interfaces.append(iface) - return interfaces - - def get_capability(self, name): - """Provide named capability - - :param name: name of capability - :return: capability object if found, None otherwise - """ - caps = self.get_capabilities() - if caps and name in caps.keys(): - return caps[name] -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/Group.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/Group.java deleted file mode 100644 index 8ed623f..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/Group.java +++ /dev/null @@ -1,137 +0,0 @@ -package org.openecomp.sdc.toscaparser.api; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.Map; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.elements.Metadata; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; -import org.openecomp.sdc.toscaparser.api.utils.ValidateUtils; - -public class Group extends EntityTemplate { - - private static final String TYPE = "type"; - private static final String METADATA = "metadata"; - private static final String DESCRIPTION = "description"; - private static final String PROPERTIES = "properties"; - private static final String MEMBERS = "members"; - private static final String INTERFACES = "interfaces"; - private static final String SECTIONS[] = { - TYPE, METADATA, DESCRIPTION, PROPERTIES, MEMBERS, INTERFACES}; - - private String name; - LinkedHashMap tpl; - ArrayList memberNodes; - LinkedHashMap customDef; - Metadata metaData; - - - public Group(String _name, LinkedHashMap _templates, - ArrayList _memberNodes, - LinkedHashMap _customDef) { - super(_name, _templates, "group_type", _customDef); - - name = _name; - tpl = _templates; - if(tpl.get(METADATA) != null) { - Object metadataObject = tpl.get(METADATA); - ValidateUtils.validateMap(metadataObject); - metaData = new Metadata((Map)metadataObject); - } - memberNodes = _memberNodes; - _validateKeys(); - } - - public Metadata getMetadata() { - return metaData; - } - - public ArrayList getMembers() { - return (ArrayList)entityTpl.get("members"); - } - - public String getDescription() { - return (String)entityTpl.get("description"); - - } - - public ArrayList getMemberNodes() { - return memberNodes; - } - - private void _validateKeys() { - for(String key: entityTpl.keySet()) { - boolean bFound = false; - for(String sect: SECTIONS) { - if(key.equals(sect)) { - bFound = true; - break; - } - } - if(!bFound) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "UnknownFieldError: Groups \"%s\" contains unknown field \"%s\"", - name,key)); - } - } - } - - @Override - public String toString() { - return "Group{" + - "name='" + name + '\'' + - ", tpl=" + tpl + - ", memberNodes=" + memberNodes + - ", customDef=" + customDef + - ", metaData=" + metaData + - '}'; - } -} - -/*python - -from toscaparser.common.exception import ExceptionCollector -from toscaparser.common.exception import UnknownFieldError -from toscaparser.entity_template import EntityTemplate -from toscaparser.utils import validateutils - -SECTIONS = (TYPE, METADATA, DESCRIPTION, PROPERTIES, MEMBERS, INTERFACES) = \ - ('type', 'metadata', 'description', - 'properties', 'members', 'interfaces') - - -class Group(EntityTemplate): - - def __init__(self, name, group_templates, member_nodes, custom_defs=None): - super(Group, self).__init__(name, - group_templates, - 'group_type', - custom_defs) - self.name = name - self.tpl = group_templates - self.meta_data = None - if self.METADATA in self.tpl: - self.meta_data = self.tpl.get(self.METADATA) - validateutils.validate_map(self.meta_data) - self.member_nodes = member_nodes - self._validate_keys() - - @property - def members(self): - return self.entity_tpl.get('members') - - @property - def description(self): - return self.entity_tpl.get('description') - - def get_member_nodes(self): - return self.member_nodes - - def _validate_keys(self): - for key in self.entity_tpl.keys(): - if key not in SECTIONS: - ExceptionCollector.appendException( - UnknownFieldError(what='Groups "%s"' % self.name, - field=key)) -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/ImportsLoader.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/ImportsLoader.java deleted file mode 100644 index a97a360..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/ImportsLoader.java +++ /dev/null @@ -1,728 +0,0 @@ -package org.openecomp.sdc.toscaparser.api; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.elements.TypeValidation; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; -import org.openecomp.sdc.toscaparser.api.utils.UrlUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.yaml.snakeyaml.Yaml; - -import java.io.*; -import java.net.URL; -import java.nio.file.Paths; -import java.util.*; - -public class ImportsLoader { - - private static Logger log = LoggerFactory.getLogger(ImportsLoader.class.getName()); - private static final String FILE = "file"; - private static final String REPOSITORY = "repository"; - private static final String NAMESPACE_URI = "namespace_uri"; - private static final String NAMESPACE_PREFIX = "namespace_prefix"; - private String IMPORTS_SECTION[] = {FILE, REPOSITORY, NAMESPACE_URI, NAMESPACE_PREFIX}; - - private ArrayList importslist; - private String path; - private ArrayList typeDefinitionList; - - private LinkedHashMap customDefs; - private ArrayList> nestedToscaTpls; - private LinkedHashMap repositories; - - @SuppressWarnings("unchecked") - public ImportsLoader(ArrayList_importslist, - String _path, - Object _typeDefinitionList, - LinkedHashMap tpl) { - - this.importslist = _importslist; - customDefs = new LinkedHashMap(); - nestedToscaTpls = new ArrayList>(); - if((_path == null || _path.isEmpty()) && tpl == null) { - //msg = _('Input tosca template is not provided.') - //log.warning(msg) - ThreadLocalsHolder.getCollector().appendException("ValidationError: Input tosca template is not provided"); - } - - this.path = _path; - this.repositories = new LinkedHashMap(); - - if(tpl != null && tpl.get("repositories") != null) { - this.repositories = (LinkedHashMap)tpl.get("repositories"); - } - this.typeDefinitionList = new ArrayList(); - if(_typeDefinitionList != null) { - if(_typeDefinitionList instanceof ArrayList) { - this.typeDefinitionList = (ArrayList)_typeDefinitionList; - } - else { - this.typeDefinitionList.add((String)_typeDefinitionList); - } - } - _validateAndLoadImports(); - } - - public LinkedHashMap getCustomDefs() { - return customDefs; - } - - public ArrayList> getNestedToscaTpls() { - return nestedToscaTpls; - } - - @SuppressWarnings({ "unchecked", "unused" }) - public void _validateAndLoadImports() { - Set importNames = new HashSet(); - - if(importslist == null) { - //msg = _('"imports" keyname is defined without including templates.') - //log.error(msg) - ThreadLocalsHolder.getCollector().appendException( - "ValidationError: \"imports\" keyname is defined without including templates"); - return; - } - - for(Object importDef: importslist) { - String fullFileName = null; - LinkedHashMap customType = null; - if(importDef instanceof LinkedHashMap) { - for(Map.Entry me: ((LinkedHashMap)importDef).entrySet()) { - String importName = me.getKey(); - Object importUri = me.getValue(); - if(importNames.contains(importName)) { - //msg = (_('Duplicate import name "%s" was found.') % import_name) - //log.error(msg) - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValidationError: Duplicate import name \"%s\" was found",importName)); - } - importNames.add(importName); //??? - - // _loadImportTemplate returns 2 objects - Object ffnct[] = _loadImportTemplate(importName, importUri); - fullFileName = (String)ffnct[0]; - customType = (LinkedHashMap)ffnct[1]; - String namespacePrefix = ""; - if(importUri instanceof LinkedHashMap) { - namespacePrefix = (String) - ((LinkedHashMap)importUri).get(NAMESPACE_PREFIX); - } - - if(customType != null) { - TypeValidation tv = new TypeValidation(customType, importDef); - _updateCustomDefs(customType, namespacePrefix); - } - } - } - else { // old style of imports - // _loadImportTemplate returns 2 objects - Object ffnct[] = _loadImportTemplate(null,importDef); - fullFileName = (String)ffnct[0]; - customType = (LinkedHashMap)ffnct[1]; - if(customType != null) { - TypeValidation tv = new TypeValidation(customType,importDef); - _updateCustomDefs(customType,null); - } - } - _updateNestedToscaTpls(fullFileName, customType); - - - } - } - - @SuppressWarnings("unchecked") - private void _updateCustomDefs(LinkedHashMap customType, String namespacePrefix) { - LinkedHashMap outerCustomTypes;// = new LinkedHashMap(); - for(String typeDef: typeDefinitionList) { - if(typeDef.equals("imports")) { - // imports are ArrayList... - customDefs.put("imports",(ArrayList)customType.get(typeDef)); - } - else { - outerCustomTypes = (LinkedHashMap)customType.get(typeDef); - if(outerCustomTypes != null) { - if(namespacePrefix != null && !namespacePrefix.isEmpty()) { - LinkedHashMap prefixCustomTypes = new LinkedHashMap(); - for(Map.Entry me: outerCustomTypes.entrySet()) { - String typeDefKey = me.getKey(); - String nameSpacePrefixToKey = namespacePrefix + "." + typeDefKey; - prefixCustomTypes.put(nameSpacePrefixToKey, outerCustomTypes.get(typeDefKey)); - } - customDefs.putAll(prefixCustomTypes); - } - else { - customDefs.putAll(outerCustomTypes); - } - } - } - } - } - - private void _updateNestedToscaTpls(String fullFileName,LinkedHashMap customTpl) { - if(fullFileName != null && customTpl != null) { - LinkedHashMap tt = new LinkedHashMap(); - tt.put(fullFileName, customTpl); - nestedToscaTpls.add(tt); - } - } - - private void _validateImportKeys(String importName, LinkedHashMap importUri) { - if(importUri.get(FILE) == null) { - //log.warning(_('Missing keyname "file" in import "%(name)s".') % {'name': import_name}) - ThreadLocalsHolder.getCollector().appendException(String.format( - "MissingRequiredFieldError: Import of template \"%s\" is missing field %s",importName,FILE)); - } - for(String key: importUri.keySet()) { - boolean bFound = false; - for(String is: IMPORTS_SECTION) { - if(is.equals(key)) { - bFound = true; - break; - } - } - if(!bFound) { - //log.warning(_('Unknown keyname "%(key)s" error in ' - // 'imported definition "%(def)s".') - // % {'key': key, 'def': import_name}) - ThreadLocalsHolder.getCollector().appendException(String.format( - "UnknownFieldError: Import of template \"%s\" has unknown fiels %s",importName,key)); - } - } - } - - @SuppressWarnings("unchecked") - private Object[] _loadImportTemplate(String importName, Object importUriDef) { - /* - This method loads the custom type definitions referenced in "imports" - section of the TOSCA YAML template by determining whether each import - is specified via a file reference (by relative or absolute path) or a - URL reference. - - Possibilities: - +----------+--------+------------------------------+ - | template | import | comment | - +----------+--------+------------------------------+ - | file | file | OK | - | file | URL | OK | - | preparsed| file | file must be a full path | - | preparsed| URL | OK | - | URL | file | file must be a relative path | - | URL | URL | OK | - +----------+--------+------------------------------+ - */ - Object al[] = new Object[2]; - - boolean shortImportNotation = false; - String fileName; - String repository; - if(importUriDef instanceof LinkedHashMap) { - _validateImportKeys(importName, (LinkedHashMap)importUriDef); - fileName = (String)((LinkedHashMap)importUriDef).get(FILE); - repository = (String)((LinkedHashMap)importUriDef).get(REPOSITORY); - if(repository != null) { - if(!repositories.keySet().contains(repository)) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "InvalidPropertyValueError: Repository \"%s\" not found in \"%s\"", - repository,repositories.keySet().toString())); - } - } - } - else { - fileName = (String)importUriDef; - repository = null; - shortImportNotation = true; - } - - if(fileName == null || fileName.isEmpty()) { - //msg = (_('A template file name is not provided with import ' - // 'definition "%(import_name)s".') - // % {'import_name': import_name}) - //log.error(msg) - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValidationError: A template file name is not provided with import definition \"%s\"",importName)); - al[0] = al[1] = null; - return al; - } - - if(UrlUtils.validateUrl(fileName)) { - try { - al[0] = fileName; - InputStream input = new URL(fileName).openStream(); - Yaml yaml = new Yaml(); - al[1] = yaml.load(input); - return al; - } - catch(IOException e) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ImportError: \"%s\" loading YAML import from \"%s\"",e.getClass().getSimpleName(),fileName)); - al[0] = al[1] = null; - return al; - } - } - else if(repository == null || repository.isEmpty()) { - boolean aFile = false; - String importTemplate = null; - if(path != null && !path.isEmpty()) { - if(UrlUtils.validateUrl(path)) { - File fp = new File(path); - if(fp.isAbsolute()) { - String msg = String.format( - "ImportError: Absolute file name \"%s\" cannot be used in the URL-based input template \"%s\"", - fileName,path); - ThreadLocalsHolder.getCollector().appendException(msg); - al[0] = al[1] = null; - return al; - } - importTemplate = UrlUtils.joinUrl(path,fileName); - aFile = false; - } - else { - - aFile = true; - File fp = new File(path); - if(fp.isFile()) { - File fn = new File(fileName); - if(fn.isFile()) { - importTemplate = fileName; - } - else { - String fullPath = Paths.get(path).toAbsolutePath().getParent().toString() + File.separator + fileName; - File ffp = new File(fullPath); - if(ffp.isFile()) { - importTemplate = fullPath; - } - else { - String dirPath = Paths.get(path).toAbsolutePath().getParent().toString(); - String filePath; - if(Paths.get(fileName).getParent() != null) { - filePath = Paths.get(fileName).getParent().toString(); - } - else { - filePath = ""; - } - if(!filePath.isEmpty() && dirPath.endsWith(filePath)) { - String sFileName = Paths.get(fileName).getFileName().toString(); - importTemplate = dirPath + File.separator + sFileName; - File fit = new File(importTemplate); - if(!fit.isFile()) { - //msg = (_('"%(import_template)s" is' - // 'not a valid file') - // % {'import_template': - // import_template}) - //log.error(msg) - String msg = String.format( - "ValueError: \"%s\" is not a valid file",importTemplate); - ThreadLocalsHolder.getCollector().appendException(msg); - log.debug("ImportsLoader - _loadImportTemplate - {}", msg); - } - } - } - } - } - } - } - else { // template is pre-parsed - File fn = new File(fileName); - if(fn.isAbsolute() && fn.isFile()) { - aFile = true; - importTemplate = fileName; - } - else { - String msg = String.format( - "Relative file name \"%s\" cannot be used in a pre-parsed input template",fileName); - ThreadLocalsHolder.getCollector().appendException("ImportError: " + msg); - al[0] = al[1] = null; - return al; - } - } - - if(importTemplate == null || importTemplate.isEmpty()) { - //log.error(_('Import "%(name)s" is not valid.') % - // {'name': import_uri_def}) - ThreadLocalsHolder.getCollector().appendException(String.format( - "ImportError: Import \"%s\" is not valid",importUriDef)); - al[0] = al[1] = null; - return al; - } - - // for now, this must be a file - if(!aFile) { - log.error("ImportsLoader - _loadImportTemplate - Error!! Expected a file. importUriDef = {}, importTemplate = {}", importUriDef, importTemplate); - ThreadLocalsHolder.getCollector().appendException(String.format( - "ImportError: Import \"%s\" is not a file",importName)); - al[0] = al[1] = null; - return al; - } - try { - al[0] = importTemplate; - InputStream input = new FileInputStream(new File(importTemplate)); - Yaml yaml = new Yaml(); - al[1] = yaml.load(input); - return al; - } - catch(FileNotFoundException e) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ImportError: Failed to load YAML from \"%s\"",importName)); - al[0] = al[1] = null; - return al; - } - catch(Exception e) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ImportError: Exception from SnakeYAML file = \"%s\"",importName)); - al[0] = al[1] = null; - return al; - } - } - - if(shortImportNotation) { - //log.error(_('Import "%(name)s" is not valid.') % import_uri_def) - ThreadLocalsHolder.getCollector().appendException(String.format( - "ImportError: Import \"%s\" is not valid",importName)); - al[0] = al[1] = null; - return al; - } - - String fullUrl = ""; - String repoUrl = ""; - if(repository != null && !repository.isEmpty()) { - if(repositories != null) { - for(String repoName: repositories.keySet()) { - if(repoName.equals(repository)) { - Object repoDef = repositories.get(repoName); - if(repoDef instanceof String) { - repoUrl = (String)repoDef; - } - else if(repoDef instanceof LinkedHashMap) { - repoUrl = (String)((LinkedHashMap)repoDef).get("url"); - } - // Remove leading, ending spaces and strip - // the last character if "/" - repoUrl = repoUrl.trim(); - if(repoUrl.endsWith("/")) { - repoUrl = repoUrl.substring(0,repoUrl.length()-1); - } - fullUrl = repoUrl + "/" + fileName; - break; - } - } - } - if(fullUrl.isEmpty()) { - String msg = String.format( - "referenced repository \"%s\" in import definition \"%s\" not found", - repository,importName); - ThreadLocalsHolder.getCollector().appendException("ImportError: " + msg); - al[0] = al[1] = null; - return al; - } - } - if(UrlUtils.validateUrl(fullUrl)) { - try { - al[0] = fullUrl; - InputStream input = new URL(fullUrl).openStream(); - Yaml yaml = new Yaml(); - al[1] = yaml.load(input); - return al; - } - catch(IOException e) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ImportError: Exception loading YAML import from \"%s\"",fullUrl)); - al[0] = al[1] = null; - return al; - } - } - else { - String msg = String.format( - "repository URL \"%s\" in import definition \"%s\" is not valid", - repoUrl,importName); - ThreadLocalsHolder.getCollector().appendException("ImportError: " + msg); - } - - // if we got here something is wrong with the flow... - log.error("ImportsLoader - _loadImportTemplate - got to dead end (importName {})", importName); - ThreadLocalsHolder.getCollector().appendException(String.format( - "ImportError: _loadImportTemplate got to dead end (importName %s)\n",importName)); - al[0] = al[1] = null; - return al; - } - - @Override - public String toString() { - return "ImportsLoader{" + - "IMPORTS_SECTION=" + Arrays.toString(IMPORTS_SECTION) + - ", importslist=" + importslist + - ", path='" + path + '\'' + - ", typeDefinitionList=" + typeDefinitionList + - ", customDefs=" + customDefs + - ", nestedToscaTpls=" + nestedToscaTpls + - ", repositories=" + repositories + - '}'; - } -} - -/*python - -import logging -import os - -from toscaparser.common.exception import ExceptionCollector -from toscaparser.common.exception import InvalidPropertyValueError -from toscaparser.common.exception import MissingRequiredFieldError -from toscaparser.common.exception import UnknownFieldError -from toscaparser.common.exception import ValidationError -from toscaparser.elements.tosca_type_validation import TypeValidation -from toscaparser.utils.gettextutils import _ -import org.openecomp.sdc.toscaparser.api.utils.urlutils -import org.openecomp.sdc.toscaparser.api.utils.yamlparser - -YAML_LOADER = toscaparser.utils.yamlparser.load_yaml -log = logging.getLogger("tosca") - - -class ImportsLoader(object): - - IMPORTS_SECTION = (FILE, REPOSITORY, NAMESPACE_URI, NAMESPACE_PREFIX) = \ - ('file', 'repository', 'namespace_uri', - 'namespace_prefix') - - def __init__(self, importslist, path, type_definition_list=None, - tpl=None): - self.importslist = importslist - self.custom_defs = {} - if not path and not tpl: - msg = _('Input tosca template is not provided.') - log.warning(msg) - ExceptionCollector.appendException(ValidationError(message=msg)) - self.path = path - self.repositories = {} - if tpl and tpl.get('repositories'): - self.repositories = tpl.get('repositories') - self.type_definition_list = [] - if type_definition_list: - if isinstance(type_definition_list, list): - self.type_definition_list = type_definition_list - else: - self.type_definition_list.append(type_definition_list) - self._validate_and_load_imports() - - def get_custom_defs(self): - return self.custom_defs - - def _validate_and_load_imports(self): - imports_names = set() - - if not self.importslist: - msg = _('"imports" keyname is defined without including ' - 'templates.') - log.error(msg) - ExceptionCollector.appendException(ValidationError(message=msg)) - return - - for import_def in self.importslist: - if isinstance(import_def, dict): - for import_name, import_uri in import_def.items(): - if import_name in imports_names: - msg = (_('Duplicate import name "%s" was found.') % - import_name) - log.error(msg) - ExceptionCollector.appendException( - ValidationError(message=msg)) - imports_names.add(import_name) - - custom_type = self._load_import_template(import_name, - import_uri) - namespace_prefix = None - if isinstance(import_uri, dict): - namespace_prefix = import_uri.get( - self.NAMESPACE_PREFIX) - if custom_type: - TypeValidation(custom_type, import_def) - self._update_custom_def(custom_type, namespace_prefix) - else: # old style of imports - custom_type = self._load_import_template(None, - import_def) - if custom_type: - TypeValidation( - custom_type, import_def) - self._update_custom_def(custom_type, None) - - def _update_custom_def(self, custom_type, namespace_prefix): - outer_custom_types = {} - for type_def in self.type_definition_list: - outer_custom_types = custom_type.get(type_def) - if outer_custom_types: - if type_def == "imports": - self.custom_defs.update({'imports': outer_custom_types}) - else: - if namespace_prefix: - prefix_custom_types = {} - for type_def_key in outer_custom_types.keys(): - namespace_prefix_to_key = (namespace_prefix + - "." + type_def_key) - prefix_custom_types[namespace_prefix_to_key] = \ - outer_custom_types[type_def_key] - self.custom_defs.update(prefix_custom_types) - else: - self.custom_defs.update(outer_custom_types) - - def _validate_import_keys(self, import_name, import_uri_def): - if self.FILE not in import_uri_def.keys(): - log.warning(_('Missing keyname "file" in import "%(name)s".') - % {'name': import_name}) - ExceptionCollector.appendException( - MissingRequiredFieldError( - what='Import of template "%s"' % import_name, - required=self.FILE)) - for key in import_uri_def.keys(): - if key not in self.IMPORTS_SECTION: - log.warning(_('Unknown keyname "%(key)s" error in ' - 'imported definition "%(def)s".') - % {'key': key, 'def': import_name}) - ExceptionCollector.appendException( - UnknownFieldError( - what='Import of template "%s"' % import_name, - field=key)) - - def _load_import_template(self, import_name, import_uri_def): - """Handle custom types defined in imported template files - - This method loads the custom type definitions referenced in "imports" - section of the TOSCA YAML template by determining whether each import - is specified via a file reference (by relative or absolute path) or a - URL reference. - - Possibilities: - +----------+--------+------------------------------+ - | template | import | comment | - +----------+--------+------------------------------+ - | file | file | OK | - | file | URL | OK | - | preparsed| file | file must be a full path | - | preparsed| URL | OK | - | URL | file | file must be a relative path | - | URL | URL | OK | - +----------+--------+------------------------------+ - """ - short_import_notation = False - if isinstance(import_uri_def, dict): - self._validate_import_keys(import_name, import_uri_def) - file_name = import_uri_def.get(self.FILE) - repository = import_uri_def.get(self.REPOSITORY) - repos = self.repositories.keys() - if repository is not None: - if repository not in repos: - ExceptionCollector.appendException( - InvalidPropertyValueError( - what=_('Repository is not found in "%s"') % repos)) - else: - file_name = import_uri_def - repository = None - short_import_notation = True - - if not file_name: - msg = (_('A template file name is not provided with import ' - 'definition "%(import_name)s".') - % {'import_name': import_name}) - log.error(msg) - ExceptionCollector.appendException(ValidationError(message=msg)) - return - - if toscaparser.utils.urlutils.UrlUtils.validate_url(file_name): - return YAML_LOADER(file_name, False) - elif not repository: - import_template = None - if self.path: - if toscaparser.utils.urlutils.UrlUtils.validate_url(self.path): - if os.path.isabs(file_name): - msg = (_('Absolute file name "%(name)s" cannot be ' - 'used in a URL-based input template ' - '"%(template)s".') - % {'name': file_name, 'template': self.path}) - log.error(msg) - ExceptionCollector.appendException(ImportError(msg)) - return - import_template = toscaparser.utils.urlutils.UrlUtils.\ - join_url(self.path, file_name) - a_file = False - else: - a_file = True - main_a_file = os.path.isfile(self.path) - - if main_a_file: - if os.path.isfile(file_name): - import_template = file_name - else: - full_path = os.path.join( - os.path.dirname(os.path.abspath(self.path)), - file_name) - if os.path.isfile(full_path): - import_template = full_path - else: - file_path = file_name.rpartition("/") - dir_path = os.path.dirname(os.path.abspath( - self.path)) - if file_path[0] != '' and dir_path.endswith( - file_path[0]): - import_template = dir_path + "/" +\ - file_path[2] - if not os.path.isfile(import_template): - msg = (_('"%(import_template)s" is' - 'not a valid file') - % {'import_template': - import_template}) - log.error(msg) - ExceptionCollector.appendException - (ValueError(msg)) - else: # template is pre-parsed - if os.path.isabs(file_name) and os.path.isfile(file_name): - a_file = True - import_template = file_name - else: - msg = (_('Relative file name "%(name)s" cannot be used ' - 'in a pre-parsed input template.') - % {'name': file_name}) - log.error(msg) - ExceptionCollector.appendException(ImportError(msg)) - return - - if not import_template: - log.error(_('Import "%(name)s" is not valid.') % - {'name': import_uri_def}) - ExceptionCollector.appendException( - ImportError(_('Import "%s" is not valid.') % - import_uri_def)) - return - return YAML_LOADER(import_template, a_file) - - if short_import_notation: - log.error(_('Import "%(name)s" is not valid.') % import_uri_def) - ExceptionCollector.appendException( - ImportError(_('Import "%s" is not valid.') % import_uri_def)) - return - - full_url = "" - if repository: - if self.repositories: - for repo_name, repo_def in self.repositories.items(): - if repo_name == repository: - # Remove leading, ending spaces and strip - # the last character if "/" - repo_url = ((repo_def['url']).strip()).rstrip("//") - full_url = repo_url + "/" + file_name - - if not full_url: - msg = (_('referenced repository "%(n_uri)s" in import ' - 'definition "%(tpl)s" not found.') - % {'n_uri': repository, 'tpl': import_name}) - log.error(msg) - ExceptionCollector.appendException(ImportError(msg)) - return - - if toscaparser.utils.urlutils.UrlUtils.validate_url(full_url): - return YAML_LOADER(full_url, False) - else: - msg = (_('repository url "%(n_uri)s" is not valid in import ' - 'definition "%(tpl)s".') - % {'n_uri': repo_url, 'tpl': import_name}) - log.error(msg) - ExceptionCollector.appendException(ImportError(msg)) -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/NodeTemplate.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/NodeTemplate.java deleted file mode 100644 index c8af559..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/NodeTemplate.java +++ /dev/null @@ -1,755 +0,0 @@ -package org.openecomp.sdc.toscaparser.api; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.Map; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.elements.*; -import org.openecomp.sdc.toscaparser.api.utils.CopyUtils; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -public class NodeTemplate extends EntityTemplate { - - private LinkedHashMap templates; - private LinkedHashMap customDef; - private ArrayList availableRelTpls; - private LinkedHashMap availableRelTypes; - private LinkedHashMap related; - private ArrayList relationshipTpl; - private LinkedHashMap _relationships; - private SubstitutionMappings subMappingToscaTemplate; - private SubstitutionMappings subMappingToscaTemplate2; - private Metadata metadata; - - private static final String METADATA = "metadata"; - - @SuppressWarnings("unchecked") - public NodeTemplate(String name, - LinkedHashMap ntnodeTemplates, - LinkedHashMap ntcustomDef, - ArrayList ntavailableRelTpls, - LinkedHashMap ntavailableRelTypes) { - - super(name, (LinkedHashMap)ntnodeTemplates.get(name), "node_type", ntcustomDef); - - templates = ntnodeTemplates; - _validateFields((LinkedHashMap)templates.get(name)); - customDef = ntcustomDef; - related = new LinkedHashMap(); - relationshipTpl = new ArrayList(); - availableRelTpls = ntavailableRelTpls; - availableRelTypes = ntavailableRelTypes; - _relationships = new LinkedHashMap(); - subMappingToscaTemplate = null; - subMappingToscaTemplate2 = null; - metadata = _metaData(); - } - - @SuppressWarnings("unchecked") - public LinkedHashMap getRelationships() { - if(_relationships.isEmpty()) { - ArrayList requires = getRequirements(); - if(requires != null && requires instanceof ArrayList) { - for(Object ro: requires) { - LinkedHashMap r = (LinkedHashMap)ro; - for(Map.Entry me: r.entrySet()) { - LinkedHashMap explicit = _getExplicitRelationship(r,me.getValue()); - if(explicit != null) { - // _relationships.putAll(explicit)... - for(Map.Entry ee: explicit.entrySet()) { - _relationships.put(ee.getKey(), ee.getValue()); - } - } - } - } - } - } - return _relationships; - } - - @SuppressWarnings("unchecked") - private LinkedHashMap _getExplicitRelationship(LinkedHashMap req,Object value) { - // Handle explicit relationship - - // For example, - // - req: - // node: DBMS - // relationship: tosca.relationships.HostedOn - - LinkedHashMap explicitRelation = new LinkedHashMap(); - String node; - if(value instanceof LinkedHashMap) { - node = (String)((LinkedHashMap)value).get("node"); - } - else { - node = (String)value; - } - - if(node != null && !node.isEmpty()) { - //msg = _('Lookup by TOSCA types is not supported. ' - // 'Requirement for "%s" can not be full-filled.') % self.name - boolean bFound = false; - for(String k: EntityType.TOSCA_DEF.keySet()) { - if(k.equals(node)) { - bFound = true; - break; - } - } - if(bFound || customDef.get(node) != null) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "NotImplementedError: Lookup by TOSCA types is not supported. Requirement for \"%s\" can not be full-filled", - getName())); - return null; - } - if(templates.get(node) == null) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "KeyError: Node template \"%s\" was not found",node)); - return null; - } - NodeTemplate relatedTpl = new NodeTemplate(node,templates,customDef,null,null); - Object relationship = null; - String relationshipString = null; - if(value instanceof LinkedHashMap) { - relationship = ((LinkedHashMap)value).get("relationship"); - // here relationship can be a string or a LHM with 'type': - } - // check if its type has relationship defined - if(relationship == null) { - ArrayList parentReqs = ((NodeType)typeDefinition).getAllRequirements(); - if(parentReqs == null) { - ThreadLocalsHolder.getCollector().appendException("ValidationError: parent_req is null"); - } - else { - for(String key: req.keySet()) { - boolean bFoundRel = false; - for(Object rdo: parentReqs) { - LinkedHashMap reqDict = (LinkedHashMap)rdo; - LinkedHashMap relDict = (LinkedHashMap)reqDict.get(key); - if(relDict != null) { - relationship = relDict.get("relationship"); - //BUG-python??? need to break twice? - bFoundRel = true; - break; - } - } - if(bFoundRel) { - break; - } - } - } - } - - if(relationship != null) { - // here relationship can be a string or a LHM with 'type': - if(relationship instanceof String) { - relationshipString = (String)relationship; - } - else if(relationship instanceof LinkedHashMap) { - relationshipString = (String)((LinkedHashMap)relationship).get("type"); - } - - boolean foundRelationshipTpl = false; - // apply available relationship templates if found - if(availableRelTpls != null) { - for(RelationshipTemplate tpl: availableRelTpls) { - if(tpl.getName().equals(relationshipString)) { - RelationshipType rtype = new RelationshipType(tpl.getType(),null,customDef); - explicitRelation.put(rtype, relatedTpl); - tpl.setTarget(relatedTpl); - tpl.setSource(this); - relationshipTpl.add(tpl); - foundRelationshipTpl = true; - } - } - } - // create relationship template object. - String relPrfx = EntityType.RELATIONSHIP_PREFIX; - if(!foundRelationshipTpl) { - if(relationship instanceof LinkedHashMap) { - relationshipString = (String)((LinkedHashMap)relationship).get("type"); - if(relationshipString != null) { - if(availableRelTypes != null && !availableRelTypes.isEmpty() && - availableRelTypes.get(relationshipString) != null) { - ; - } - else if(!(relationshipString).startsWith(relPrfx)) { - relationshipString = relPrfx + relationshipString; - } - } - else { - ThreadLocalsHolder.getCollector().appendException(String.format( - "MissingRequiredFieldError: \"relationship\" used in template \"%s\" is missing required field \"type\"", - relatedTpl.getName())); - } - } - for(RelationshipType rtype: ((NodeType)typeDefinition).getRelationship().keySet()) { - if(rtype.getType().equals(relationshipString)) { - explicitRelation.put(rtype,relatedTpl); - relatedTpl._addRelationshipTemplate(req,rtype.getType(),this); - } - else if(availableRelTypes != null && !availableRelTypes.isEmpty()) { - LinkedHashMap relTypeDef = (LinkedHashMap)availableRelTypes.get(relationshipString); - if(relTypeDef != null) { - String superType = (String)relTypeDef.get("derived_from"); - if(superType != null) { - if(!superType.startsWith(relPrfx)) { - superType = relPrfx + superType; - } - if(rtype.getType().equals(superType)) { - explicitRelation.put(rtype,relatedTpl); - relatedTpl._addRelationshipTemplate(req,rtype.getType(),this); - } - } - } - } - } - } - } - } - return explicitRelation; - } - - @SuppressWarnings("unchecked") - private void _addRelationshipTemplate(LinkedHashMap requirement, String rtype, NodeTemplate source) { - LinkedHashMap req = (LinkedHashMap)CopyUtils.copyLhmOrAl(requirement); - req.put("type",rtype); - RelationshipTemplate tpl = new RelationshipTemplate(req, rtype, customDef, this, source); - relationshipTpl.add(tpl); - } - - public ArrayList getRelationshipTemplate() { - return relationshipTpl; - } - - void _addNext(NodeTemplate nodetpl,RelationshipType relationship) { - related.put(nodetpl,relationship); - } - - public ArrayList getRelatedNodes() { - if(related.isEmpty()) { - for(Map.Entry me: ((NodeType)typeDefinition).getRelationship().entrySet()) { - RelationshipType relation = me.getKey(); - NodeType node = me.getValue(); - for(String tpl: templates.keySet()) { - if(tpl.equals(node.getType())) { - //BUG.. python has - // self.related[NodeTemplate(tpl)] = relation - // but NodeTemplate doesn't have a constructor with just name... - //???? - related.put(new NodeTemplate(tpl,null,null,null,null),relation); - } - } - } - } - return new ArrayList(related.keySet()); - } - - public void validate(/*tosca_tpl=none is not used...*/) { - _validateCapabilities(); - _validateRequirements(); - _validateProperties(entityTpl,(NodeType)typeDefinition); - _validateInterfaces(); - for(Property prop: getPropertiesObjects()) { - prop.validate(); - } - } - - private Metadata _metaData() { - if(entityTpl.get(METADATA) != null) { - return new Metadata((Map)entityTpl.get(METADATA)); - } - else { - return null; - } - } - - @SuppressWarnings("unchecked") - private void _validateRequirements() { - ArrayList typeRequires = ((NodeType)typeDefinition).getAllRequirements(); - ArrayList allowedReqs = new ArrayList<>(); - allowedReqs.add("template"); - if(typeRequires != null) { - for(Object to: typeRequires) { - LinkedHashMap treq = (LinkedHashMap)to; - for(Map.Entry me: treq.entrySet()) { - String key = me.getKey(); - Object value = me.getValue(); - allowedReqs.add(key); - if(value instanceof LinkedHashMap) { - allowedReqs.addAll(((LinkedHashMap)value).keySet()); - } - } - - } - } - - ArrayList requires = (ArrayList)((NodeType)typeDefinition).getValue(REQUIREMENTS, entityTpl, false); - if(requires != null) { - if(!(requires instanceof ArrayList)) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "TypeMismatchError: \"requirements\" of template \"%s\" are not of type \"list\"",name)); - } - else { - for(Object ro: requires) { - LinkedHashMap req = (LinkedHashMap)ro; - for(Map.Entry me: req.entrySet()) { - String rl = me.getKey(); - Object vo = me.getValue(); - if(vo instanceof LinkedHashMap) { - LinkedHashMap value = (LinkedHashMap)vo; - _validateRequirementsKeys(value); - _validateRequirementsProperties(value); - allowedReqs.add(rl); - } - } - _commonValidateField(req,allowedReqs,"requirements"); - } - } - } - } - - @SuppressWarnings("unchecked") - private void _validateRequirementsProperties(LinkedHashMap reqs) { - // TO-DO(anyone): Only occurrences property of the requirements is - // validated here. Validation of other requirement properties are being - // validated in different files. Better to keep all the requirements - // properties validation here. - for(Map.Entry me: reqs.entrySet()) { - if(me.getKey().equals("occurrences")) { - ArrayList val = (ArrayList)me.getValue(); - _validateOccurrences(val); - } - - } - } - - private void _validateOccurrences(ArrayList occurrences) { - DataEntity.validateDatatype("list",occurrences,null,null,null); - for(Object val: occurrences) { - DataEntity.validateDatatype("Integer",val,null,null,null); - } - if(occurrences.size() != 2 || - !(0 <= (int)occurrences.get(0) && (int)occurrences.get(0) <= (int)occurrences.get(1)) || - (int)occurrences.get(1) == 0) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "InvalidPropertyValueError: property has invalid value %s",occurrences.toString())); - } - } - - private void _validateRequirementsKeys(LinkedHashMap reqs) { - for(String key: reqs.keySet()) { - boolean bFound = false; - for(int i=0; i< REQUIREMENTS_SECTION.length; i++) { - if(key.equals(REQUIREMENTS_SECTION[i])) { - bFound = true; - break; - } - } - if(!bFound) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "UnknownFieldError: \"requirements\" of template \"%s\" contains unknown field \"%s\"",name,key)); - } - } - } - - @SuppressWarnings("unchecked") - private void _validateInterfaces() { - LinkedHashMap ifaces = (LinkedHashMap) - ((NodeType)typeDefinition).getValue(INTERFACES, entityTpl, false); - if(ifaces != null) { - for(Map.Entry me: ifaces.entrySet()) { - String iname = me.getKey(); - LinkedHashMap value = (LinkedHashMap)me.getValue(); - if(iname.equals(InterfacesDef.LIFECYCLE) || iname.equals(InterfacesDef.LIFECYCLE_SHORTNAME)) { - // maybe we should convert [] to arraylist??? - ArrayList inlo = new ArrayList<>(); - for(int i=0; i irco = new ArrayList<>(); - for(int i=0; i _collectCustomIfaceOperations(String iname) { - ArrayList allowedOperations = new ArrayList<>(); - LinkedHashMap nodetypeIfaceDef = (LinkedHashMap)((NodeType) - typeDefinition).getInterfaces().get(iname); - allowedOperations.addAll(nodetypeIfaceDef.keySet()); - String ifaceType = (String)nodetypeIfaceDef.get("type"); - if(ifaceType != null) { - LinkedHashMap ifaceTypeDef = null; - if(((NodeType)typeDefinition).customDef != null) { - ifaceTypeDef = (LinkedHashMap)((NodeType)typeDefinition).customDef.get(ifaceType); - } - if(ifaceTypeDef == null) { - ifaceTypeDef = (LinkedHashMap)EntityType.TOSCA_DEF.get(ifaceType); - } - allowedOperations.addAll(ifaceTypeDef.keySet()); - } - // maybe we should convert [] to arraylist??? - ArrayList idrw = new ArrayList<>(); - for(int i=0; i nodetemplate) { - for(String ntname: nodetemplate.keySet()) { - boolean bFound = false; - for(int i=0; i< SECTIONS.length; i++) { - if(ntname.equals(SECTIONS[i])) { - bFound = true; - break; - } - } - if(!bFound) { - for(int i=0; i< SPECIAL_SECTIONS.length; i++) { - if(ntname.equals(SPECIAL_SECTIONS[i])) { - bFound = true; - break; - } - } - - } - if(!bFound) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "UnknownFieldError: Node template \"%s\" has unknown field \"%s\"",name,ntname)); - } - } - } - - // getter/setter - - public SubstitutionMappings getSubMappingToscaTemplate() { - return subMappingToscaTemplate; - } - - public void setSubMappingToscaTemplate(SubstitutionMappings sm) { - subMappingToscaTemplate = sm; - } - - // **experimental** (multilevel nesting) - public SubstitutionMappings getSubMappingToscaTemplate2() { - return subMappingToscaTemplate2; - } - - public void setSubMappingToscaTemplate2(SubstitutionMappings sm) { - subMappingToscaTemplate2 = sm; - } - - public Metadata getMetaData() { - return metadata; - } - - public void setMetaData(Metadata metadata) { - this.metadata = metadata; - } - - @Override - public String toString() { - return getName(); - } - -} - -/*python - -from toscaparser.common.exception import ExceptionCollector -from toscaparser.common.exception import InvalidPropertyValueError -from toscaparser.common.exception import MissingRequiredFieldError -from toscaparser.common.exception import TypeMismatchError -from toscaparser.common.exception import UnknownFieldError -from toscaparser.common.exception import ValidationError -from toscaparser.dataentity import DataEntity -from toscaparser.elements.interfaces import CONFIGURE -from toscaparser.elements.interfaces import CONFIGURE_SHORTNAME -from toscaparser.elements.interfaces import INTERFACE_DEF_RESERVED_WORDS -from toscaparser.elements.interfaces import InterfacesDef -from toscaparser.elements.interfaces import LIFECYCLE -from toscaparser.elements.interfaces import LIFECYCLE_SHORTNAME -from toscaparser.elements.relationshiptype import RelationshipType -from toscaparser.entity_template import EntityTemplate -from toscaparser.relationship_template import RelationshipTemplate -from toscaparser.utils.gettextutils import _ - -log = logging.getLogger('tosca') - - -class NodeTemplate(EntityTemplate): - '''Node template from a Tosca profile.''' - def __init__(self, name, node_templates, custom_def=None, - available_rel_tpls=None, available_rel_types=None): - super(NodeTemplate, self).__init__(name, node_templates[name], - 'node_type', - custom_def) - self.templates = node_templates - self._validate_fields(node_templates[name]) - self.custom_def = custom_def - self.related = {} - self.relationship_tpl = [] - self.available_rel_tpls = available_rel_tpls - self.available_rel_types = available_rel_types - self._relationships = {} - self.sub_mapping_tosca_template = None - - @property - def relationships(self): - if not self._relationships: - requires = self.requirements - if requires and isinstance(requires, list): - for r in requires: - for r1, value in r.items(): - explicit = self._get_explicit_relationship(r, value) - if explicit: - for key, value in explicit.items(): - self._relationships[key] = value - return self._relationships - - def _get_explicit_relationship(self, req, value): - """Handle explicit relationship - - For example, - - req: - node: DBMS - relationship: tosca.relationships.HostedOn - """ - explicit_relation = {} - node = value.get('node') if isinstance(value, dict) else value - - if node: - # TO-DO(spzala) implement look up once Glance meta data is available - # to find a matching TOSCA node using the TOSCA types - msg = _('Lookup by TOSCA types is not supported. ' - 'Requirement for "%s" can not be full-filled.') % self.name - if (node in list(self.type_definition.TOSCA_DEF.keys()) - or node in self.custom_def): - ExceptionCollector.appendException(NotImplementedError(msg)) - return - - if node not in self.templates: - ExceptionCollector.appendException( - KeyError(_('Node template "%s" was not found.') % node)) - return - - related_tpl = NodeTemplate(node, self.templates, self.custom_def) - relationship = value.get('relationship') \ - if isinstance(value, dict) else None - # check if it's type has relationship defined - if not relationship: - parent_reqs = self.type_definition.get_all_requirements() - if parent_reqs is None: - ExceptionCollector.appendException( - ValidationError(message='parent_req is ' + - str(parent_reqs))) - else: - for key in req.keys(): - for req_dict in parent_reqs: - if key in req_dict.keys(): - relationship = (req_dict.get(key). - get('relationship')) - break - if relationship: - found_relationship_tpl = False - # apply available relationship templates if found - if self.available_rel_tpls: - for tpl in self.available_rel_tpls: - if tpl.name == relationship: - rtype = RelationshipType(tpl.type, None, - self.custom_def) - explicit_relation[rtype] = related_tpl - tpl.target = related_tpl - tpl.source = self - self.relationship_tpl.append(tpl) - found_relationship_tpl = True - # create relationship template object. - rel_prfx = self.type_definition.RELATIONSHIP_PREFIX - if not found_relationship_tpl: - if isinstance(relationship, dict): - relationship = relationship.get('type') - if relationship: - if self.available_rel_types and \ - relationship in self.available_rel_types.keys(): - pass - elif not relationship.startswith(rel_prfx): - relationship = rel_prfx + relationship - else: - ExceptionCollector.appendException( - MissingRequiredFieldError( - what=_('"relationship" used in template ' - '"%s"') % related_tpl.name, - required=self.TYPE)) - for rtype in self.type_definition.relationship.keys(): - if rtype.type == relationship: - explicit_relation[rtype] = related_tpl - related_tpl._add_relationship_template(req, - rtype.type, - self) - elif self.available_rel_types: - if relationship in self.available_rel_types.keys(): - rel_type_def = self.available_rel_types.\ - get(relationship) - if 'derived_from' in rel_type_def: - super_type = \ - rel_type_def.get('derived_from') - if not super_type.startswith(rel_prfx): - super_type = rel_prfx + super_type - if rtype.type == super_type: - explicit_relation[rtype] = related_tpl - related_tpl.\ - _add_relationship_template( - req, rtype.type, self) - return explicit_relation - - def _add_relationship_template(self, requirement, rtype, source): - req = requirement.copy() - req['type'] = rtype - tpl = RelationshipTemplate(req, rtype, self.custom_def, self, source) - self.relationship_tpl.append(tpl) - - def get_relationship_template(self): - return self.relationship_tpl - - def _add_next(self, nodetpl, relationship): - self.related[nodetpl] = relationship - - @property - def related_nodes(self): - if not self.related: - for relation, node in self.type_definition.relationship.items(): - for tpl in self.templates: - if tpl == node.type: - self.related[NodeTemplate(tpl)] = relation - return self.related.keys() - - def validate(self, tosca_tpl=None): - self._validate_capabilities() - self._validate_requirements() - self._validate_properties(self.entity_tpl, self.type_definition) - self._validate_interfaces() - for prop in self.get_properties_objects(): - prop.validate() - - def _validate_requirements(self): - type_requires = self.type_definition.get_all_requirements() - allowed_reqs = ["template"] - if type_requires: - for treq in type_requires: - for key, value in treq.items(): - allowed_reqs.append(key) - if isinstance(value, dict): - for key in value: - allowed_reqs.append(key) - - requires = self.type_definition.get_value(self.REQUIREMENTS, - self.entity_tpl) - if requires: - if not isinstance(requires, list): - ExceptionCollector.appendException( - TypeMismatchError( - what='"requirements" of template "%s"' % self.name, - type='list')) - else: - for req in requires: - for r1, value in req.items(): - if isinstance(value, dict): - self._validate_requirements_keys(value) - self._validate_requirements_properties(value) - allowed_reqs.append(r1) - self._common_validate_field(req, allowed_reqs, - 'requirements') - - def _validate_requirements_properties(self, requirements): - # TO-DO(anyone): Only occurrences property of the requirements is - # validated here. Validation of other requirement properties are being - # validated in different files. Better to keep all the requirements - # properties validation here. - for key, value in requirements.items(): - if key == 'occurrences': - self._validate_occurrences(value) - break - - def _validate_occurrences(self, occurrences): - DataEntity.validate_datatype('list', occurrences) - for value in occurrences: - DataEntity.validate_datatype('integer', value) - if len(occurrences) != 2 or not (0 <= occurrences[0] <= occurrences[1]) \ - or occurrences[1] == 0: - ExceptionCollector.appendException( - InvalidPropertyValueError(what=(occurrences))) - - def _validate_requirements_keys(self, requirement): - for key in requirement.keys(): - if key not in self.REQUIREMENTS_SECTION: - ExceptionCollector.appendException( - UnknownFieldError( - what='"requirements" of template "%s"' % self.name, - field=key)) - - def _validate_interfaces(self): - ifaces = self.type_definition.get_value(self.INTERFACES, - self.entity_tpl) - if ifaces: - for name, value in ifaces.items(): - if name in (LIFECYCLE, LIFECYCLE_SHORTNAME): - self._common_validate_field( - value, InterfacesDef. - interfaces_node_lifecycle_operations, - 'interfaces') - elif name in (CONFIGURE, CONFIGURE_SHORTNAME): - self._common_validate_field( - value, InterfacesDef. - interfaces_relationship_configure_operations, - 'interfaces') - elif name in self.type_definition.interfaces.keys(): - self._common_validate_field( - value, - self._collect_custom_iface_operations(name), - 'interfaces') - else: - ExceptionCollector.appendException( - UnknownFieldError( - what='"interfaces" of template "%s"' % - self.name, field=name)) - - def _collect_custom_iface_operations(self, name): - allowed_operations = [] - nodetype_iface_def = self.type_definition.interfaces[name] - allowed_operations.extend(nodetype_iface_def.keys()) - if 'type' in nodetype_iface_def: - iface_type = nodetype_iface_def['type'] - if iface_type in self.type_definition.custom_def: - iface_type_def = self.type_definition.custom_def[iface_type] - else: - iface_type_def = self.type_definition.TOSCA_DEF[iface_type] - allowed_operations.extend(iface_type_def.keys()) - allowed_operations = [op for op in allowed_operations if - op not in INTERFACE_DEF_RESERVED_WORDS] - return allowed_operations - - def _validate_fields(self, nodetemplate): - for name in nodetemplate.keys(): - if name not in self.SECTIONS and name not in self.SPECIAL_SECTIONS: - ExceptionCollector.appendException( - UnknownFieldError(what='Node template "%s"' % self.name, - field=name))*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/Policy.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/Policy.java deleted file mode 100644 index a59d9d5..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/Policy.java +++ /dev/null @@ -1,187 +0,0 @@ -package org.openecomp.sdc.toscaparser.api; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.Map; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; -import org.openecomp.sdc.toscaparser.api.utils.ValidateUtils; - -public class Policy extends EntityTemplate { - - - private static final String TYPE = "type"; - private static final String METADATA = "metadata"; - private static final String DESCRIPTION = "description"; - private static final String PROPERTIES = "properties"; - private static final String TARGETS = "targets"; - private static final String TRIGGERS = "triggers"; - private static final String SECTIONS[] = { - TYPE, METADATA, DESCRIPTION, PROPERTIES, TARGETS, TRIGGERS}; - - LinkedHashMap metaData; - ArrayList targetsList; // *** a list of NodeTemplate OR a list of Group *** - String targetsType; - ArrayList triggers; - LinkedHashMap properties; - - public Policy(String _name, - LinkedHashMap _policy, -// ArrayList targetObjects, - ArrayList targetObjects, - String _targetsType, - LinkedHashMap _customDef) { - super(_name,_policy,"policy_type",_customDef); - - metaData = null; - if(_policy.get(METADATA) != null) { - metaData = (LinkedHashMap)_policy.get(METADATA); - ValidateUtils.validateMap(metaData); - } - - targetsList = targetObjects; - targetsType = _targetsType; - triggers = _triggers((LinkedHashMap)_policy.get(TRIGGERS)); - properties = null; - if(_policy.get("properties") != null) { - properties = (LinkedHashMap)_policy.get("properties"); - } - _validateKeys(); - } - - public ArrayList getTargets() { - return (ArrayList)entityTpl.get("targets"); - } - - public ArrayList getDescription() { - return (ArrayList)entityTpl.get("description"); - } - - public ArrayList getmetadata() { - return (ArrayList)entityTpl.get("metadata"); - } - - public String getTargetsType() { - return targetsType; - } - -// public ArrayList getTargetsList() { - public ArrayList getTargetsList() { - return targetsList; - } - - // entityTemplate already has a different getProperties... - // this is to access the local properties variable - public LinkedHashMap getPolicyProperties() { - return properties; - } - - private ArrayList _triggers(LinkedHashMap triggers) { - ArrayList triggerObjs = new ArrayList<>(); - if(triggers != null) { - for(Map.Entry me: triggers.entrySet()) { - String tname = me.getKey(); - LinkedHashMap ttriggerTpl = - (LinkedHashMap)me.getValue(); - Triggers triggersObj = new Triggers(tname,ttriggerTpl); - triggerObjs.add(triggersObj); - } - } - return triggerObjs; - } - - private void _validateKeys() { - for(String key: entityTpl.keySet()) { - boolean bFound = false; - for(int i=0; i customDef; - - public Property(String propname, - Object propvalue, - LinkedHashMap propschemaDict, - LinkedHashMap propcustomDef) { - - name = propname; - value = propvalue; - customDef = propcustomDef; - schema = new Schema(propname, propschemaDict); - } - - public String getType() { - return schema.getType(); - } - - public boolean isRequired() { - return schema.isRequired(); - } - - public String getDescription() { - return schema.getDescription(); - } - - public Object getDefault() { - return schema.getDefault(); - } - - public ArrayList getConstraints() { - return schema.getConstraints(); - } - - public LinkedHashMap getEntrySchema() { - return schema.getEntrySchema(); - } - - - public String getName() { - return name; - } - - public Object getValue() { - return value; - } - - // setter - public Object setValue(Object vob) { - value = vob; - return value; - } - - public void validate() { - // Validate if not a reference property - if(!Function.isFunction(value)) { - if(getType().equals(Schema.STRING)) { - value = value.toString(); - } - value = DataEntity.validateDatatype(getType(),value, - getEntrySchema(), - customDef, - name); - _validateConstraints(); - } - } - - private void _validateConstraints() { - if(getConstraints() != null) { - for(Constraint constraint: getConstraints()) { - constraint.validate(value); - } - } - } - - @Override - public String toString() { - return "Property{" + - "name='" + name + '\'' + - ", value=" + value + - ", schema=" + schema + - ", customDef=" + customDef + - '}'; - } -} - -/*python - -class Property(object): - '''TOSCA built-in Property type.''' - - PROPERTY_KEYS = ( - TYPE, REQUIRED, DESCRIPTION, DEFAULT, CONSTRAINTS - ) = ( - 'type', 'required', 'description', 'default', 'constraints' - ) - - ENTRY_SCHEMA_KEYS = ( - ENTRYTYPE, ENTRYPROPERTIES - ) = ( - 'type', 'properties' - ) - - def __init__(self, property_name, value, schema_dict, custom_def=None): - self.name = property_name - self.value = value - self.custom_def = custom_def - self.schema = Schema(property_name, schema_dict) - - @property - def type(self): - return self.schema.type - - @property - def required(self): - return self.schema.required - - @property - def description(self): - return self.schema.description - - @property - def default(self): - return self.schema.default - - @property - def constraints(self): - return self.schema.constraints - - @property - def entry_schema(self): - return self.schema.entry_schema - - def validate(self): - '''Validate if not a reference property.''' - if not is_function(self.value): - if self.type == Schema.STRING: - self.value = str(self.value) - self.value = DataEntity.validate_datatype(self.type, self.value, - self.entry_schema, - self.custom_def, - self.name) - self._validate_constraints() - - def _validate_constraints(self): - if self.constraints: - for constraint in self.constraints: - constraint.validate(self.value) -*/ diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/RelationshipTemplate.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/RelationshipTemplate.java deleted file mode 100644 index 10d3ad9..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/RelationshipTemplate.java +++ /dev/null @@ -1,199 +0,0 @@ -package org.openecomp.sdc.toscaparser.api; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.Map; - -import org.openecomp.sdc.toscaparser.api.elements.EntityType; -import org.openecomp.sdc.toscaparser.api.elements.PropertyDef; -import org.openecomp.sdc.toscaparser.api.elements.StatefulEntityType; - -public class RelationshipTemplate extends EntityTemplate { - - private static final String DERIVED_FROM = "derived_from"; - private static final String PROPERTIES = "properties"; - private static final String REQUIREMENTS = "requirements"; - private static final String INTERFACES = "interfaces"; - private static final String CAPABILITIES = "capabilities"; - private static final String TYPE = "type"; - @SuppressWarnings("unused") - private static final String SECTIONS[] = { - DERIVED_FROM, PROPERTIES, REQUIREMENTS, INTERFACES, CAPABILITIES, TYPE}; - - private String name; - private NodeTemplate target; - private NodeTemplate source; - private ArrayList _properties; - - public RelationshipTemplate(LinkedHashMap rtrelationshipTemplate, - String rtname, - LinkedHashMap rtcustomDef, - NodeTemplate rttarget, - NodeTemplate rtsource) { - super(rtname,rtrelationshipTemplate,"relationship_type",rtcustomDef); - - name = rtname; - target = rttarget; - source = rtsource; - _properties = null; - } - - public ArrayList getPropertiesObjects() { - // Return properties objects for this template - if(_properties == null) { - _properties = _createRelationshipProperties(); - } - return _properties; - } - - @SuppressWarnings({ "unchecked", "unused" }) - public ArrayList _createRelationshipProperties() { - ArrayList props = new ArrayList (); - LinkedHashMap properties = new LinkedHashMap(); - LinkedHashMap relationship = (LinkedHashMap)entityTpl.get("relationship"); - - if(relationship == null) { - for(Object val: entityTpl.values()) { - if(val instanceof LinkedHashMap) { - relationship = (LinkedHashMap)((LinkedHashMap)val).get("relationship"); - break; - } - } - } - - if(relationship != null) { - properties = (LinkedHashMap)((EntityType)typeDefinition).getValue(PROPERTIES,relationship,false); - } - if(properties == null) { - properties = new LinkedHashMap(); - } - if(properties == null) { - properties = (LinkedHashMap)entityTpl.get(PROPERTIES); - } - if(properties == null) { - properties = new LinkedHashMap(); - } - - if(properties != null) { - for(Map.Entry me: properties.entrySet()) { - String pname = me.getKey(); - Object pvalue = me.getValue(); - LinkedHashMap propsDef = ((StatefulEntityType)typeDefinition).getPropertiesDef(); - if(propsDef != null && propsDef.get(pname) != null) { - if(properties.get(pname) != null) { - pvalue = properties.get(name); - } - PropertyDef pd = (PropertyDef)propsDef.get(pname); - Property prop = new Property(pname,pvalue,pd.getSchema(),customDef); - props.add(prop); - } - } - } - ArrayList pds = ((StatefulEntityType)typeDefinition).getPropertiesDefObjects(); - for(PropertyDef p: pds) { - if(p.getDefault() != null && properties.get(p.getName()) == null) { - Property prop = new Property(p.getName(), (LinkedHashMap)p.getDefault(), p.getSchema(), customDef); - props.add(prop); - } - } - return props; - } - - public void validate() { - _validateProperties(entityTpl,(StatefulEntityType)typeDefinition); - } - - // getters/setters - public NodeTemplate getTarget() { - return target; - } - - public NodeTemplate getSource() { - return source; - } - - public void setSource(NodeTemplate nt) { - source = nt; - } - - public void setTarget(NodeTemplate nt) { - target = nt; - } - - @Override - public String toString() { - return "RelationshipTemplate{" + - "name='" + name + '\'' + - ", target=" + target.getName() + - ", source=" + source.getName() + - ", _properties=" + _properties + - '}'; - } - -} - -/*python - -from toscaparser.entity_template import EntityTemplate -from toscaparser.properties import Property - -SECTIONS = (DERIVED_FROM, PROPERTIES, REQUIREMENTS, - INTERFACES, CAPABILITIES, TYPE) = \ - ('derived_from', 'properties', 'requirements', 'interfaces', - 'capabilities', 'type') - -log = logging.getLogger('tosca') - - -class RelationshipTemplate(EntityTemplate): - '''Relationship template.''' - def __init__(self, relationship_template, name, custom_def=None, - target=None, source=None): - super(RelationshipTemplate, self).__init__(name, - relationship_template, - 'relationship_type', - custom_def) - self.name = name.lower() - self.target = target - self.source = source - - def get_properties_objects(self): - '''Return properties objects for this template.''' - if self._properties is None: - self._properties = self._create_relationship_properties() - return self._properties - - def _create_relationship_properties(self): - props = [] - properties = {} - relationship = self.entity_tpl.get('relationship') - - if not relationship: - for value in self.entity_tpl.values(): - if isinstance(value, dict): - relationship = value.get('relationship') - break - - if relationship: - properties = self.type_definition.get_value(self.PROPERTIES, - relationship) or {} - if not properties: - properties = self.entity_tpl.get(self.PROPERTIES) or {} - - if properties: - for name, value in properties.items(): - props_def = self.type_definition.get_properties_def() - if props_def and name in props_def: - if name in properties.keys(): - value = properties.get(name) - prop = Property(name, value, - props_def[name].schema, self.custom_def) - props.append(prop) - for p in self.type_definition.get_properties_def_objects(): - if p.default is not None and p.name not in properties.keys(): - prop = Property(p.name, p.default, p.schema, self.custom_def) - props.append(prop) - return props - - def validate(self): - self._validate_properties(self.entity_tpl, self.type_definition)*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/Repository.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/Repository.java deleted file mode 100644 index 92a90af..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/Repository.java +++ /dev/null @@ -1,117 +0,0 @@ -package org.openecomp.sdc.toscaparser.api; - -import java.util.LinkedHashMap; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; -import org.openecomp.sdc.toscaparser.api.utils.UrlUtils; - -public class Repository { - - private static final String DESCRIPTION = "description"; - private static final String URL = "url"; - private static final String CREDENTIAL = "credential"; - private static final String SECTIONS[] ={DESCRIPTION, URL, CREDENTIAL}; - - private String name; - private Object reposit; - private String url; - - @SuppressWarnings("unchecked") - public Repository(String repName,Object repValue) { - name = repName; - reposit = repValue; - if(reposit instanceof LinkedHashMap) { - url = (String)((LinkedHashMap)reposit).get("url"); - if(url == null) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "MissingRequiredFieldError: Repository \"%s\" is missing required field \"url\"", - name)); - } - } - loadAndValidate(name,reposit); - } - - @SuppressWarnings("unchecked") - private void loadAndValidate(String val,Object repositDef) { - String keyname = val; - if(repositDef instanceof LinkedHashMap) { - for(String key: ((LinkedHashMap)reposit).keySet()) { - boolean bFound = false; - for(String sect: SECTIONS) { - if(key.equals(sect)) { - bFound = true; - break; - } - } - if(!bFound) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "UnknownFieldError: repositories \"%s\" contains unknown field \"%s\"", - keyname,key)); - } - } - - String repositUrl = (String)((LinkedHashMap)repositDef).get("url"); - if(repositUrl != null) { - boolean urlVal = UrlUtils.validateUrl(repositUrl); - if(!urlVal) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "URLException: repsositories \"%s\" Invalid Url",keyname)); - } - } - } - } - - @Override - public String toString() { - return "Repository{" + - "name='" + name + '\'' + - ", reposit=" + reposit + - ", url='" + url + '\'' + - '}'; - } -} - -/*python - -from toscaparser.common.exception import ExceptionCollector -from toscaparser.common.exception import MissingRequiredFieldError -from toscaparser.common.exception import UnknownFieldError -from toscaparser.common.exception import URLException -from toscaparser.utils.gettextutils import _ -import org.openecomp.sdc.toscaparser.api.utils.urlutils - -SECTIONS = (DESCRIPTION, URL, CREDENTIAL) = \ - ('description', 'url', 'credential') - - -class Repository(object): - def __init__(self, repositories, values): - self.name = repositories - self.reposit = values - if isinstance(self.reposit, dict): - if 'url' not in self.reposit.keys(): - ExceptionCollector.appendException( - MissingRequiredFieldError(what=_('Repository "%s"') - % self.name, required='url')) - self.url = self.reposit['url'] - self.load_and_validate(self.name, self.reposit) - - def load_and_validate(self, val, reposit_def): - self.keyname = val - if isinstance(reposit_def, dict): - for key in reposit_def.keys(): - if key not in SECTIONS: - ExceptionCollector.appendException( - UnknownFieldError(what=_('repositories "%s"') - % self.keyname, field=key)) - - if URL in reposit_def.keys(): - reposit_url = reposit_def.get(URL) - url_val = toscaparser.utils.urlutils.UrlUtils.\ - validate_url(reposit_url) - if url_val is not True: - ExceptionCollector.appendException( - URLException(what=_('repsositories "%s" Invalid Url') - % self.keyname)) -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/SubstitutionMappings.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/SubstitutionMappings.java deleted file mode 100644 index b9c2238..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/SubstitutionMappings.java +++ /dev/null @@ -1,520 +0,0 @@ -package org.openecomp.sdc.toscaparser.api; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.elements.NodeType; -import org.openecomp.sdc.toscaparser.api.elements.PropertyDef; -import org.openecomp.sdc.toscaparser.api.parameters.Input; -import org.openecomp.sdc.toscaparser.api.parameters.Output; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - - -public class SubstitutionMappings { - // SubstitutionMappings class declaration - - // SubstitutionMappings exports the topology template as an - // implementation of a Node type. - - private static final String NODE_TYPE = "node_type"; - private static final String REQUIREMENTS = "requirements"; - private static final String CAPABILITIES = "capabilities"; - - private static final String SECTIONS[] = {NODE_TYPE, REQUIREMENTS, CAPABILITIES}; - - private static final String OPTIONAL_OUTPUTS[] = {"tosca_id", "tosca_name", "state"}; - - private LinkedHashMap subMappingDef; - private ArrayList nodetemplates; - private ArrayList inputs; - private ArrayList outputs; - private ArrayList groups; - private NodeTemplate subMappedNodeTemplate; - private LinkedHashMap customDefs; - private LinkedHashMap _capabilities; - private LinkedHashMap _requirements; - - public SubstitutionMappings(LinkedHashMap smsubMappingDef, - ArrayList smnodetemplates, - ArrayList sminputs, - ArrayList smoutputs, - ArrayList smgroups, - NodeTemplate smsubMappedNodeTemplate, - LinkedHashMap smcustomDefs) { - - subMappingDef = smsubMappingDef; - nodetemplates = smnodetemplates; - inputs = sminputs != null ? sminputs : new ArrayList(); - outputs = smoutputs != null ? smoutputs : new ArrayList(); - groups = smgroups != null ? smgroups : new ArrayList(); - subMappedNodeTemplate = smsubMappedNodeTemplate; - customDefs = smcustomDefs != null ? smcustomDefs : new LinkedHashMap(); - _validate(); - - _capabilities = null; - _requirements = null; - } - - public String getType() { - if(subMappingDef != null) { - return (String)subMappingDef.get(NODE_TYPE); - } - return null; - } - - public ArrayList getNodeTemplates() { - return nodetemplates; - } - - /* - @classmethod - def get_node_type(cls, sub_mapping_def): - if isinstance(sub_mapping_def, dict): - return sub_mapping_def.get(cls.NODE_TYPE) - */ - - public static String stGetNodeType(LinkedHashMap _subMappingDef) { - if(_subMappingDef instanceof LinkedHashMap) { - return (String)_subMappingDef.get(NODE_TYPE); - } - return null; - } - - public String getNodeType() { - return (String)subMappingDef.get(NODE_TYPE); - } - - public ArrayList getInputs() { - return inputs; - } - - public ArrayList getGroups() { - return groups; - } - - public LinkedHashMap getCapabilities() { - return (LinkedHashMap)subMappingDef.get(CAPABILITIES); - } - - public LinkedHashMap getRequirements() { - return (LinkedHashMap)subMappingDef.get(REQUIREMENTS); - } - - public NodeType getNodeDefinition() { - return new NodeType(getNodeType(), customDefs); - } - - private void _validate() { - // Basic validation - _validateKeys(); - _validateType(); - - // SubstitutionMapping class syntax validation - _validateInputs(); - _validateCapabilities(); - _validateRequirements(); - _validateOutputs(); - } - - private void _validateKeys() { - // validate the keys of substitution mappings - for(String key: subMappingDef.keySet()) { - boolean bFound = false; - for(String s: SECTIONS) { - if(s.equals(key)) { - bFound = true; - break; - } - } - if(!bFound) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "UnknownFieldError: SubstitutionMappings contain unknown field \"%s\"", - key)); - } - } - } - - private void _validateType() { - // validate the node_type of substitution mappings - String nodeType = (String)subMappingDef.get(NODE_TYPE); - if(nodeType == null) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "MissingRequiredFieldError: SubstitutionMappings used in topology_template is missing required field \"%s\"", - NODE_TYPE)); - } - Object nodeTypeDef = customDefs.get(nodeType); - if(nodeTypeDef == null) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "InvalidNodeTypeError: \"%s\" is invalid",nodeType)); - } - } - - private void _validateInputs() { - // validate the inputs of substitution mappings. - - // The inputs defined by the topology template have to match the - // properties of the node type or the substituted node. If there are - // more inputs than the substituted node has properties, default values - //must be defined for those inputs. - - HashSet allInputs = new HashSet<>(); - for(Input inp: inputs) { - allInputs.add(inp.getName()); - } - HashSet requiredProperties = new HashSet<>(); - for(PropertyDef pd: getNodeDefinition().getPropertiesDefObjects()) { - if(pd.isRequired() && pd.getDefault() == null) { - requiredProperties.add(pd.getName()); - } - } - // Must provide inputs for required properties of node type. - for(String property: requiredProperties) { - // Check property which is 'required' and has no 'default' value - if(!allInputs.contains(property)) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "MissingRequiredInputError: SubstitutionMappings with node_type \"%s\" is missing required input \"%s\"", - getNodeType(),property)); - } - } - // If the optional properties of node type need to be customized by - // substituted node, it also is necessary to define inputs for them, - // otherwise they are not mandatory to be defined. - HashSet customizedParameters = new HashSet<>(); - if(subMappedNodeTemplate != null) { - customizedParameters.addAll(subMappedNodeTemplate.getProperties().keySet()); - } - HashSet allProperties = new HashSet( - getNodeDefinition().getPropertiesDef().keySet()); - HashSet diffset = customizedParameters; - diffset.removeAll(allInputs); - for(String parameter: diffset) { - if(allProperties.contains(parameter)) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "MissingRequiredInputError: SubstitutionMappings with node_type \"%s\" is missing required input \"%s\"", - getNodeType(),parameter)); - } - } - // Additional inputs are not in the properties of node type must - // provide default values. Currently the scenario may not happen - // because of parameters validation in nodetemplate, here is a - // guarantee. - for(Input inp: inputs) { - diffset = allInputs; - diffset.removeAll(allProperties); - if(diffset.contains(inp.getName()) && inp.getDefault() == null) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "MissingRequiredInputError: SubstitutionMappings with node_type \"%s\" is missing rquired input \"%s\"", - getNodeType(),inp.getName())); - } - } - } - - private void _validateCapabilities() { - // validate the capabilities of substitution mappings - - // The capabilities must be in node template which be mapped. - LinkedHashMap tplsCapabilities = - (LinkedHashMap)subMappingDef.get(CAPABILITIES); - LinkedHashMap nodeCapabilities = null; - if(subMappedNodeTemplate != null) { - nodeCapabilities = subMappedNodeTemplate.getCapabilities(); - } - if(nodeCapabilities != null) { - for(String cap: nodeCapabilities.keySet()) { - if(tplsCapabilities != null && tplsCapabilities.get(cap) == null) { - ; //pass - // ExceptionCollector.appendException( - // UnknownFieldError(what='SubstitutionMappings', - // field=cap)) - } - } - } - } - - private void _validateRequirements() { - // validate the requirements of substitution mappings - //***************************************************** - //TO-DO - Different from Python code!! one is a bug... - //***************************************************** - // The requirements must be in node template which be mapped. - LinkedHashMap tplsRequirements = - (LinkedHashMap)subMappingDef.get(REQUIREMENTS); - ArrayList nodeRequirements = null; - if(subMappedNodeTemplate != null) { - nodeRequirements = subMappedNodeTemplate.getRequirements(); - } - if(nodeRequirements != null) { - for(Object ro: nodeRequirements) { - ArrayList al = new ArrayList( - ((LinkedHashMap)ro).keySet()); - String cap = al.get(0); - if(tplsRequirements != null && tplsRequirements.get(cap) == null) { - ; //pass - // ExceptionCollector.appendException( - // UnknownFieldError(what='SubstitutionMappings', - // field=cap)) - } - } - } - } - - private void _validateOutputs() { - // validate the outputs of substitution mappings. - - // The outputs defined by the topology template have to match the - // attributes of the node type or the substituted node template, - // and the observable attributes of the substituted node template - // have to be defined as attributes of the node type or outputs in - // the topology template. - - // The outputs defined by the topology template have to match the - // attributes of the node type according to the specification, but - // it's reasonable that there are more inputs than the node type - // has properties, the specification will be amended? - - for(Output output: outputs) { - Object ado = getNodeDefinition().getAttributesDef(); - if(ado != null && ((LinkedHashMap)ado).get(output.getName()) == null) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "UnknownOutputError: Unknown output \"%s\" in SubstitutionMappings with node_type \"%s\"", - output.getName(),getNodeType())); - } - } - } - - @Override - public String toString() { - return "SubstitutionMappings{" + -// "subMappingDef=" + subMappingDef + -// ", nodetemplates=" + nodetemplates + -// ", inputs=" + inputs + -// ", outputs=" + outputs + -// ", groups=" + groups + - ", subMappedNodeTemplate=" + (subMappedNodeTemplate==null?"":subMappedNodeTemplate.getName()) + -// ", customDefs=" + customDefs + -// ", _capabilities=" + _capabilities + -// ", _requirements=" + _requirements + - '}'; - } - - @Deprecated - public String toLimitedString() { - return "SubstitutionMappings{" + - "subMappingDef=" + subMappingDef + - ", nodetemplates=" + nodetemplates + - ", inputs=" + inputs + - ", outputs=" + outputs + - ", groups=" + groups + - ", subMappedNodeTemplate=" + (subMappedNodeTemplate==null?"":subMappedNodeTemplate.getName()) + - ", customDefs=" + customDefs + - ", _capabilities=" + _capabilities + - ", _requirements=" + _requirements + - '}'; - } -} - - -/*python - -from toscaparser.common.exception import ExceptionCollector -from toscaparser.common.exception import InvalidNodeTypeError -from toscaparser.common.exception import MissingDefaultValueError -from toscaparser.common.exception import MissingRequiredFieldError -from toscaparser.common.exception import MissingRequiredInputError -from toscaparser.common.exception import UnknownFieldError -from toscaparser.common.exception import UnknownOutputError -from toscaparser.elements.nodetype import NodeType -from toscaparser.utils.gettextutils import _ - -log = logging.getLogger('tosca') - - -class SubstitutionMappings(object): - '''SubstitutionMappings class declaration - - SubstitutionMappings exports the topology template as an - implementation of a Node type. - ''' - - SECTIONS = (NODE_TYPE, REQUIREMENTS, CAPABILITIES) = \ - ('node_type', 'requirements', 'capabilities') - - OPTIONAL_OUTPUTS = ['tosca_id', 'tosca_name', 'state'] - - def __init__(self, sub_mapping_def, nodetemplates, inputs, outputs, - sub_mapped_node_template, custom_defs): - self.nodetemplates = nodetemplates - self.sub_mapping_def = sub_mapping_def - self.inputs = inputs or [] - self.outputs = outputs or [] - self.sub_mapped_node_template = sub_mapped_node_template - self.custom_defs = custom_defs or {} - self._validate() - - self._capabilities = None - self._requirements = None - - @property - def type(self): - if self.sub_mapping_def: - return self.sub_mapping_def.get(self.NODE_TYPE) - - @classmethod - def get_node_type(cls, sub_mapping_def): - if isinstance(sub_mapping_def, dict): - return sub_mapping_def.get(cls.NODE_TYPE) - - @property - def node_type(self): - return self.sub_mapping_def.get(self.NODE_TYPE) - - @property - def capabilities(self): - return self.sub_mapping_def.get(self.CAPABILITIES) - - @property - def requirements(self): - return self.sub_mapping_def.get(self.REQUIREMENTS) - - @property - def node_definition(self): - return NodeType(self.node_type, self.custom_defs) - - def _validate(self): - # Basic validation - self._validate_keys() - self._validate_type() - - # SubstitutionMapping class syntax validation - self._validate_inputs() - self._validate_capabilities() - self._validate_requirements() - self._validate_outputs() - - def _validate_keys(self): - """validate the keys of substitution mappings.""" - for key in self.sub_mapping_def.keys(): - if key not in self.SECTIONS: - ExceptionCollector.appendException( - UnknownFieldError(what=_('SubstitutionMappings'), - field=key)) - - def _validate_type(self): - """validate the node_type of substitution mappings.""" - node_type = self.sub_mapping_def.get(self.NODE_TYPE) - if not node_type: - ExceptionCollector.appendException( - MissingRequiredFieldError( - what=_('SubstitutionMappings used in topology_template'), - required=self.NODE_TYPE)) - - node_type_def = self.custom_defs.get(node_type) - if not node_type_def: - ExceptionCollector.appendException( - InvalidNodeTypeError(what=node_type)) - - def _validate_inputs(self): - """validate the inputs of substitution mappings. - - The inputs defined by the topology template have to match the - properties of the node type or the substituted node. If there are - more inputs than the substituted node has properties, default values - must be defined for those inputs. - """ - - all_inputs = set([input.name for input in self.inputs]) - required_properties = set([p.name for p in - self.node_definition. - get_properties_def_objects() - if p.required and p.default is None]) - # Must provide inputs for required properties of node type. - for property in required_properties: - # Check property which is 'required' and has no 'default' value - if property not in all_inputs: - ExceptionCollector.appendException( - MissingRequiredInputError( - what=_('SubstitutionMappings with node_type ') - + self.node_type, - input_name=property)) - - # If the optional properties of node type need to be customized by - # substituted node, it also is necessary to define inputs for them, - # otherwise they are not mandatory to be defined. - customized_parameters = set(self.sub_mapped_node_template - .get_properties().keys() - if self.sub_mapped_node_template else []) - all_properties = set(self.node_definition.get_properties_def()) - for parameter in customized_parameters - all_inputs: - if parameter in all_properties: - ExceptionCollector.appendException( - MissingRequiredInputError( - what=_('SubstitutionMappings with node_type ') - + self.node_type, - input_name=parameter)) - - # Additional inputs are not in the properties of node type must - # provide default values. Currently the scenario may not happen - # because of parameters validation in nodetemplate, here is a - # guarantee. - for input in self.inputs: - if input.name in all_inputs - all_properties \ - and input.default is None: - ExceptionCollector.appendException( - MissingDefaultValueError( - what=_('SubstitutionMappings with node_type ') - + self.node_type, - input_name=input.name)) - - def _validate_capabilities(self): - """validate the capabilities of substitution mappings.""" - - # The capabilites must be in node template wchich be mapped. - tpls_capabilities = self.sub_mapping_def.get(self.CAPABILITIES) - node_capabiliteys = self.sub_mapped_node_template.get_capabilities() \ - if self.sub_mapped_node_template else None - for cap in node_capabiliteys.keys() if node_capabiliteys else []: - if (tpls_capabilities and - cap not in list(tpls_capabilities.keys())): - pass - # ExceptionCollector.appendException( - # UnknownFieldError(what='SubstitutionMappings', - # field=cap)) - - def _validate_requirements(self): - """validate the requirements of substitution mappings.""" - - # The requirements must be in node template wchich be mapped. - tpls_requirements = self.sub_mapping_def.get(self.REQUIREMENTS) - node_requirements = self.sub_mapped_node_template.requirements \ - if self.sub_mapped_node_template else None - for req in node_requirements if node_requirements else []: - if (tpls_requirements and - req not in list(tpls_requirements.keys())): - pass - # ExceptionCollector.appendException( - # UnknownFieldError(what='SubstitutionMappings', - # field=req)) - - def _validate_outputs(self): - """validate the outputs of substitution mappings. - - The outputs defined by the topology template have to match the - attributes of the node type or the substituted node template, - and the observable attributes of the substituted node template - have to be defined as attributes of the node type or outputs in - the topology template. - """ - - # The outputs defined by the topology template have to match the - # attributes of the node type according to the specification, but - # it's reasonable that there are more inputs than the node type - # has properties, the specification will be amended? - for output in self.outputs: - if output.name not in self.node_definition.get_attributes_def(): - ExceptionCollector.appendException( - UnknownOutputError( - where=_('SubstitutionMappings with node_type ') - + self.node_type, - output_name=output.name))*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/TopologyTemplate.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/TopologyTemplate.java deleted file mode 100644 index 25f118b..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/TopologyTemplate.java +++ /dev/null @@ -1,857 +0,0 @@ -package org.openecomp.sdc.toscaparser.api; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.LinkedHashMap; -import java.util.Map; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.elements.InterfacesDef; -import org.openecomp.sdc.toscaparser.api.elements.NodeType; -import org.openecomp.sdc.toscaparser.api.elements.RelationshipType; -import org.openecomp.sdc.toscaparser.api.functions.Function; -import org.openecomp.sdc.toscaparser.api.functions.GetAttribute; -import org.openecomp.sdc.toscaparser.api.functions.GetInput; -import org.openecomp.sdc.toscaparser.api.parameters.Input; -import org.openecomp.sdc.toscaparser.api.parameters.Output; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -public class TopologyTemplate { - - private static final String DESCRIPTION = "description"; - private static final String INPUTS = "inputs"; - private static final String NODE_TEMPLATES = "node_templates"; - private static final String RELATIONSHIP_TEMPLATES = "relationship_templates"; - private static final String OUTPUTS = "outputs"; - private static final String GROUPS = "groups"; - private static final String SUBSTITUTION_MAPPINGS = "substitution_mappings"; - private static final String POLICIES = "policies"; - private static final String METADATA = "metadata"; - - private static String SECTIONS[] = { - DESCRIPTION, INPUTS, NODE_TEMPLATES, RELATIONSHIP_TEMPLATES, - OUTPUTS, GROUPS, SUBSTITUTION_MAPPINGS, POLICIES, METADATA - }; - - private LinkedHashMap tpl; - LinkedHashMap metaData; - private ArrayList inputs; - private ArrayList outputs; - private ArrayList relationshipTemplates; - private ArrayList nodeTemplates; - private LinkedHashMap customDefs; - private LinkedHashMap relTypes;//TYPE - private NodeTemplate subMappedNodeTemplate; - private ArrayList groups; - private ArrayList policies; - private LinkedHashMap parsedParams = null;//TYPE - private String description; - private ToscaGraph graph; - private SubstitutionMappings substitutionMappings; - - public TopologyTemplate( - LinkedHashMap _template, - LinkedHashMap _customDefs, - LinkedHashMap _relTypes,//TYPE - LinkedHashMap _parsedParams, - NodeTemplate _subMappedNodeTemplate) { - - tpl = _template; - if(tpl != null) { - subMappedNodeTemplate = _subMappedNodeTemplate; - metaData = _metaData(); - customDefs = _customDefs; - relTypes = _relTypes; - parsedParams = _parsedParams; - _validateField(); - description = _tplDescription(); - inputs = _inputs(); - relationshipTemplates =_relationshipTemplates(); - nodeTemplates = _nodeTemplates(); - outputs = _outputs(); - if(nodeTemplates != null) { - graph = new ToscaGraph(nodeTemplates); - } - groups = _groups(); - policies = _policies(); - _processIntrinsicFunctions(); - substitutionMappings = _substitutionMappings(); - } - } - - @SuppressWarnings("unchecked") - private ArrayList _inputs() { - //DumpUtils.dumpYaml(customDefs,0); - ArrayList alInputs = new ArrayList<>(); - for(String name: _tplInputs().keySet()) { - Object attrs = _tplInputs().get(name); - Input input = new Input(name,(LinkedHashMap)attrs,customDefs); - if(parsedParams != null && parsedParams.get(name) != null) { - input.validate(parsedParams.get(name)); - } - else { - Object _default = input.getDefault(); - if(_default != null) { - input.validate(_default); - } - } - if((parsedParams != null && parsedParams.get(input.getName()) == null || parsedParams == null) - && input.isRequired() && input.getDefault() == null) { - System.out.format("Log warning: The required parameter \"%s\" is not provided\n",input.getName()); - } - alInputs.add(input); - } - return alInputs; - - } - - private LinkedHashMap _metaData() { - if(tpl.get(METADATA) != null) { - return (LinkedHashMap)tpl.get(METADATA); - } - else { - return new LinkedHashMap(); - } - - } - - private ArrayList _nodeTemplates() { - ArrayList alNodeTemplates = new ArrayList<>(); - LinkedHashMap tpls = _tplNodeTemplates(); - if(tpls != null) { - for(String name: tpls.keySet()) { - NodeTemplate tpl = new NodeTemplate(name, - tpls, - customDefs, - relationshipTemplates, - relTypes); - if(tpl.getTypeDefinition() != null) { - boolean b = NodeType.TOSCA_DEF.get(tpl.getType()) != null; - if(b || (tpl.getCustomDef() != null && !tpl.getCustomDef().isEmpty())) { - tpl.validate(); - alNodeTemplates.add(tpl); - } - } - } - } - return alNodeTemplates; - } - - @SuppressWarnings("unchecked") - private ArrayList _relationshipTemplates() { - ArrayList alRelationshipTemplates = new ArrayList<>(); - LinkedHashMap tpls = _tplRelationshipTemplates(); - if(tpls != null) { - for(String name: tpls.keySet()) { - RelationshipTemplate tpl = new RelationshipTemplate( - (LinkedHashMap)tpls.get(name),name,customDefs,null,null); - - alRelationshipTemplates.add(tpl); - } - } - return alRelationshipTemplates; - } - - private ArrayList _outputs() { - ArrayList alOutputs = new ArrayList<>(); - for(Map.Entry me: _tplOutputs().entrySet()) { - String oname = me.getKey(); - LinkedHashMap oattrs = (LinkedHashMap)me.getValue(); - Output o = new Output(oname,oattrs); - o.validate(); - alOutputs.add(o); - } - return alOutputs; - } - - private SubstitutionMappings _substitutionMappings() { - LinkedHashMap tplSubstitutionMapping = (LinkedHashMap) _tplSubstitutionMappings(); - - //*** the commenting-out below and the weaker condition are in the Python source - // #if tpl_substitution_mapping and self.sub_mapped_node_template: - if(tplSubstitutionMapping != null && tplSubstitutionMapping.size() > 0) { - return new SubstitutionMappings(tplSubstitutionMapping, - nodeTemplates, - inputs, - outputs, - groups, - subMappedNodeTemplate, - customDefs); - } - return null; - - } - - @SuppressWarnings("unchecked") - private ArrayList _policies() { - ArrayList alPolicies = new ArrayList<>(); - for(Object po: _tplPolicies()) { - LinkedHashMap policy = (LinkedHashMap)po; - for(Map.Entry me: policy.entrySet()) { - String policyName = me.getKey(); - LinkedHashMap policyTpl = (LinkedHashMap)me.getValue(); - ArrayList targetList = (ArrayList)policyTpl.get("targets"); - //ArrayList targetObjects = new ArrayList<>(); - ArrayList targetNodes = new ArrayList<>(); - ArrayList targetObjects = new ArrayList<>(); - ArrayList targetGroups = new ArrayList<>(); - String targetsType = "groups"; - if(targetList != null && targetList.size() >= 1) { - targetGroups = _getPolicyGroups(targetList); - if(targetGroups == null) { - targetsType = "node_templates"; - targetNodes = _getGroupMembers(targetList); - for(NodeTemplate nt: targetNodes) { - targetObjects.add(nt); - } - } - else { - for(Group gr: targetGroups) { - targetObjects.add(gr); - } - } - } - Policy policyObj = new Policy(policyName, - policyTpl, - targetObjects, - targetsType, - customDefs); - alPolicies.add(policyObj); - } - } - return alPolicies; - } - - private ArrayList _groups() { - ArrayList groups = new ArrayList<>(); - ArrayList memberNodes = null; - for(Map.Entry me: _tplGroups().entrySet()) { - String groupName = me.getKey(); - LinkedHashMap groupTpl = (LinkedHashMap)me.getValue(); - ArrayList memberNames = (ArrayList)groupTpl.get("members"); - if(memberNames != null) { - DataEntity.validateDatatype("list", memberNames,null,null,null); - if(memberNames.size() < 1 || - (new HashSet(memberNames)).size() != memberNames.size()) { - ThreadLocalsHolder.getCollector().appendWarning(String.format( - "InvalidGroupTargetException: Member nodes \"%s\" should be >= 1 and not repeated", - memberNames.toString())); - } - else { - memberNodes = _getGroupMembers(memberNames); - } - } - Group group = new Group(groupName, - groupTpl, - memberNodes, - customDefs); - groups.add(group); - } - return groups; - } - - private ArrayList _getGroupMembers(ArrayList memberNames) { - ArrayList memberNodes = new ArrayList<>(); - _validateGroupMembers(memberNames); - for(String member: memberNames) { - for(NodeTemplate node: nodeTemplates) { - if(member.equals(node.getName())) { - memberNodes.add(node); - } - } - } - return memberNodes; - } - - private ArrayList _getPolicyGroups(ArrayList memberNames) { - ArrayList memberGroups = new ArrayList<>(); - for(String member: memberNames) { - for(Group group: groups) { - if(member.equals(group.getName())) { - memberGroups.add(group); - } - } - } - return memberGroups; - } - - private void _validateGroupMembers(ArrayList members) { - ArrayList nodeNames = new ArrayList<>(); - for(NodeTemplate node: nodeTemplates) { - nodeNames.add(node.getName()); - } - for(String member: members) { - if(!nodeNames.contains(member)) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "InvalidGroupTargetException: Target member \"%s\" is not found in \"nodeTemplates\"",member)); - } - } - } - - // topology template can act like node template - // it is exposed by substitution_mappings. - - public String nodetype() { - return substitutionMappings.getNodeType(); - } - - public LinkedHashMap capabilities() { - return substitutionMappings.getCapabilities(); - } - - public LinkedHashMap requirements() { - return substitutionMappings.getRequirements(); - } - - private String _tplDescription() { - return (String)tpl.get(DESCRIPTION); - //if description: - // return description.rstrip() - } - - @SuppressWarnings("unchecked") - private LinkedHashMap _tplInputs() { - if(tpl.get(INPUTS) != null) { - return (LinkedHashMap)tpl.get(INPUTS); - } - else { - return new LinkedHashMap(); - } - } - - @SuppressWarnings("unchecked") - private LinkedHashMap _tplNodeTemplates() { - return (LinkedHashMap)tpl.get(NODE_TEMPLATES); - } - - @SuppressWarnings("unchecked") - private LinkedHashMap _tplRelationshipTemplates() { - if(tpl.get(RELATIONSHIP_TEMPLATES) != null) { - return (LinkedHashMap)tpl.get(RELATIONSHIP_TEMPLATES); - } - else { - return new LinkedHashMap(); - } - } - - @SuppressWarnings("unchecked") - private LinkedHashMap _tplOutputs() { - if(tpl.get(OUTPUTS) != null) { - return (LinkedHashMap)tpl.get(OUTPUTS); - } - else { - return new LinkedHashMap(); - } - } - - @SuppressWarnings("unchecked") - private LinkedHashMap _tplSubstitutionMappings() { - if(tpl.get(SUBSTITUTION_MAPPINGS) != null) { - return (LinkedHashMap)tpl.get(SUBSTITUTION_MAPPINGS); - } - else { - return new LinkedHashMap(); - } - } - - @SuppressWarnings("unchecked") - private LinkedHashMap _tplGroups() { - if(tpl.get(GROUPS) != null) { - return (LinkedHashMap)tpl.get(GROUPS); - } - else { - return new LinkedHashMap(); - } - } - - @SuppressWarnings("unchecked") - private ArrayList _tplPolicies() { - if(tpl.get(POLICIES) != null) { - return (ArrayList)tpl.get(POLICIES); - } - else { - return new ArrayList(); - } - } - - private void _validateField() { - for(String name: tpl.keySet()) { - boolean bFound = false; - for(String section: SECTIONS) { - if(name.equals(section)) { - bFound = true; - break; - } - } - if(!bFound) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "UnknownFieldError: TopologyTemplate contains unknown field \"%s\"",name)); - } - } - } - - @SuppressWarnings("unchecked") - private void _processIntrinsicFunctions() { - // Process intrinsic functions - - // Current implementation processes functions within node template - // properties, requirements, interfaces inputs and template outputs. - - if(nodeTemplates != null) { - for(NodeTemplate nt: nodeTemplates) { - for(Property prop: nt.getPropertiesObjects()) { - prop.setValue(Function.getFunction(this,nt,prop.getValue())); - } - for(InterfacesDef ifd: nt.getInterfaces()) { - LinkedHashMap ifin = ifd.getInputs(); - if(ifin != null) { - for(Map.Entry me: ifin.entrySet()) { - String name = me.getKey(); - Object value = Function.getFunction(this,nt,me.getValue()); - ifd.setInput(name,value); - } - } - } - if(nt.getRequirements() != null && - nt.getRequirements() instanceof ArrayList) { - for(Object oreq: nt.getRequirements()) { - LinkedHashMap req = (LinkedHashMap)oreq; - LinkedHashMap rel = req; - for(String reqName: req.keySet()) { - Object reqItem = req.get(reqName); - if(reqItem instanceof LinkedHashMap) { - Object t = ((LinkedHashMap)reqItem).get("relationship"); - // it can be a string or a LHM... - if(t instanceof LinkedHashMap) { - rel = (LinkedHashMap)t; - } - else { - // we set it to null to fail the next test - // and avoid the get("proprties") - rel = null; - } - break; - } - } - if(rel != null && rel.get("properties") != null) { - LinkedHashMap relprops = - (LinkedHashMap)rel.get("properties"); - for(String key: relprops.keySet()) { - Object value = relprops.get(key); - Object func = Function.getFunction(this,req,value); - relprops.put(key,func); - } - } - } - } - if(nt.getCapabilitiesObjects() != null) { - for(Capability cap: nt.getCapabilitiesObjects()) { - if(cap.getPropertiesObjects() != null) { - for(Property prop: cap.getPropertiesObjects()) { - Object propvalue = Function.getFunction(this,nt,prop.getValue()); - if(propvalue instanceof GetInput) { - propvalue = ((GetInput)propvalue).result(); - for(String p: cap.getProperties().keySet()) { - //Object v = cap.getProperties().get(p); - if(p.equals(prop.getName())) { - cap.setProperty(p,propvalue); - } - } - } - } - } - } - } - for(RelationshipType rel: nt.getRelationships().keySet()) { - NodeTemplate node = nt.getRelationships().get(rel); - ArrayList relTpls = node.getRelationshipTemplate(); - if(relTpls != null) { - for(RelationshipTemplate relTpl: relTpls) { - // TT 5 - for(InterfacesDef iface: relTpl.getInterfaces()) { - if(iface.getInputs() != null) { - for(String name: iface.getInputs().keySet()) { - Object value = iface.getInputs().get(name); - Object func = Function.getFunction( - this, - relTpl, - value); - iface.setInput(name,func); - } - } - } - } - } - } - } - } - for(Output output: outputs) { - Object func = Function.getFunction(this,outputs,output.getValue()); - if(func instanceof GetAttribute) { - output.setAttr(Output.VALUE,func); - } - } - } - - public static String getSubMappingNodeType(LinkedHashMap topologyTpl) { - if(topologyTpl != null && topologyTpl instanceof LinkedHashMap) { - Object submapTpl = topologyTpl.get(SUBSTITUTION_MAPPINGS); - return SubstitutionMappings.stGetNodeType((LinkedHashMap)submapTpl); - } - return null; - } - - // getters - - public LinkedHashMap getTpl() { - return tpl; - } - - public LinkedHashMap getMetadata() { - return metaData; - } - - public ArrayList getInputs() { - return inputs; - } - - public ArrayList getOutputs() { - return outputs; - } - - public ArrayList getPolicies() { - return policies; - } - - public ArrayList getRelationshipTemplates() { - return relationshipTemplates; - } - - public ArrayList getNodeTemplates() { - return nodeTemplates; - } - - public ArrayList getGroups() { - return groups; - } - - public SubstitutionMappings getSubstitutionMappings() { - return substitutionMappings; - } - - public LinkedHashMap getParsedParams() { - return parsedParams; - } -} - -/*python - -# 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. - - -import logging - -from toscaparser.common import exception -from toscaparser.dataentity import DataEntity -from toscaparser import functions -from toscaparser.groups import Group -from toscaparser.nodetemplate import NodeTemplate -from toscaparser.parameters import Input -from toscaparser.parameters import Output -from toscaparser.policy import Policy -from toscaparser.relationship_template import RelationshipTemplate -from toscaparser.substitution_mappings import SubstitutionMappings -from toscaparser.tpl_relationship_graph import ToscaGraph -from toscaparser.utils.gettextutils import _ - - -# Topology template key names -SECTIONS = (DESCRIPTION, INPUTS, NODE_TEMPLATES, - RELATIONSHIP_TEMPLATES, OUTPUTS, GROUPS, - SUBSTITUION_MAPPINGS, POLICIES) = \ - ('description', 'inputs', 'node_templates', - 'relationship_templates', 'outputs', 'groups', - 'substitution_mappings', 'policies') - -log = logging.getLogger("tosca.model") - - -class TopologyTemplate(object): - - '''Load the template data.''' - def __init__(self, template, custom_defs, - rel_types=None, parsed_params=None, - sub_mapped_node_template=None): - self.tpl = template - self.sub_mapped_node_template = sub_mapped_node_template - if self.tpl: - self.custom_defs = custom_defs - self.rel_types = rel_types - self.parsed_params = parsed_params - self._validate_field() - self.description = self._tpl_description() - self.inputs = self._inputs() - self.relationship_templates = self._relationship_templates() - self.nodetemplates = self._nodetemplates() - self.outputs = self._outputs() - if hasattr(self, 'nodetemplates'): - self.graph = ToscaGraph(self.nodetemplates) - self.groups = self._groups() - self.policies = self._policies() - self._process_intrinsic_functions() - self.substitution_mappings = self._substitution_mappings() - - def _inputs(self): - inputs = [] - for name, attrs in self._tpl_inputs().items(): - input = Input(name, attrs) - if self.parsed_params and name in self.parsed_params: - input.validate(self.parsed_params[name]) - else: - default = input.default - if default: - input.validate(default) - if (self.parsed_params and input.name not in self.parsed_params - or self.parsed_params is None) and input.required \ - and input.default is None: - log.warning(_('The required parameter %s ' - 'is not provided') % input.name) - - inputs.append(input) - return inputs - - def _nodetemplates(self): - nodetemplates = [] - tpls = self._tpl_nodetemplates() - if tpls: - for name in tpls: - tpl = NodeTemplate(name, tpls, self.custom_defs, - self.relationship_templates, - self.rel_types) - if (tpl.type_definition and - (tpl.type in tpl.type_definition.TOSCA_DEF or - (tpl.type not in tpl.type_definition.TOSCA_DEF and - bool(tpl.custom_def)))): - tpl.validate(self) - nodetemplates.append(tpl) - return nodetemplates - - def _relationship_templates(self): - rel_templates = [] - tpls = self._tpl_relationship_templates() - for name in tpls: - tpl = RelationshipTemplate(tpls[name], name, self.custom_defs) - rel_templates.append(tpl) - return rel_templates - - def _outputs(self): - outputs = [] - for name, attrs in self._tpl_outputs().items(): - output = Output(name, attrs) - output.validate() - outputs.append(output) - return outputs - - def _substitution_mappings(self): - tpl_substitution_mapping = self._tpl_substitution_mappings() - # if tpl_substitution_mapping and self.sub_mapped_node_template: - if tpl_substitution_mapping: - return SubstitutionMappings(tpl_substitution_mapping, - self.nodetemplates, - self.inputs, - self.outputs, - self.sub_mapped_node_template, - self.custom_defs) - - def _policies(self): - policies = [] - for policy in self._tpl_policies(): - for policy_name, policy_tpl in policy.items(): - target_list = policy_tpl.get('targets') - if target_list and len(target_list) >= 1: - target_objects = [] - targets_type = "groups" - target_objects = self._get_policy_groups(target_list) - if not target_objects: - targets_type = "node_templates" - target_objects = self._get_group_members(target_list) - policyObj = Policy(policy_name, policy_tpl, - target_objects, targets_type, - self.custom_defs) - policies.append(policyObj) - return policies - - def _groups(self): - groups = [] - member_nodes = None - for group_name, group_tpl in self._tpl_groups().items(): - member_names = group_tpl.get('members') - if member_names is not None: - DataEntity.validate_datatype('list', member_names) - if len(member_names) < 1 or \ - len(member_names) != len(set(member_names)): - exception.ExceptionCollector.appendException( - exception.InvalidGroupTargetException( - message=_('Member nodes "%s" should be >= 1 ' - 'and not repeated') % member_names)) - else: - member_nodes = self._get_group_members(member_names) - group = Group(group_name, group_tpl, - member_nodes, - self.custom_defs) - groups.append(group) - return groups - - def _get_group_members(self, member_names): - member_nodes = [] - self._validate_group_members(member_names) - for member in member_names: - for node in self.nodetemplates: - if node.name == member: - member_nodes.append(node) - return member_nodes - - def _get_policy_groups(self, member_names): - member_groups = [] - for member in member_names: - for group in self.groups: - if group.name == member: - member_groups.append(group) - return member_groups - - def _validate_group_members(self, members): - node_names = [] - for node in self.nodetemplates: - node_names.append(node.name) - for member in members: - if member not in node_names: - exception.ExceptionCollector.appendException( - exception.InvalidGroupTargetException( - message=_('Target member "%s" is not found in ' - 'node_templates') % member)) - - # topology template can act like node template - # it is exposed by substitution_mappings. - def nodetype(self): - return self.substitution_mappings.node_type \ - if self.substitution_mappings else None - - def capabilities(self): - return self.substitution_mappings.capabilities \ - if self.substitution_mappings else None - - def requirements(self): - return self.substitution_mappings.requirements \ - if self.substitution_mappings else None - - def _tpl_description(self): - description = self.tpl.get(DESCRIPTION) - if description: - return description.rstrip() - - def _tpl_inputs(self): - return self.tpl.get(INPUTS) or {} - - def _tpl_nodetemplates(self): - return self.tpl.get(NODE_TEMPLATES) - - def _tpl_relationship_templates(self): - return self.tpl.get(RELATIONSHIP_TEMPLATES) or {} - - def _tpl_outputs(self): - return self.tpl.get(OUTPUTS) or {} - - def _tpl_substitution_mappings(self): - return self.tpl.get(SUBSTITUION_MAPPINGS) or {} - - def _tpl_groups(self): - return self.tpl.get(GROUPS) or {} - - def _tpl_policies(self): - return self.tpl.get(POLICIES) or {} - - def _validate_field(self): - for name in self.tpl: - if name not in SECTIONS: - exception.ExceptionCollector.appendException( - exception.UnknownFieldError(what='Template', field=name)) - - def _process_intrinsic_functions(self): - """Process intrinsic functions - - Current implementation processes functions within node template - properties, requirements, interfaces inputs and template outputs. - """ - if hasattr(self, 'nodetemplates'): - for node_template in self.nodetemplates: - for prop in node_template.get_properties_objects(): - prop.value = functions.get_function(self, - node_template, - prop.value) - for interface in node_template.interfaces: - if interface.inputs: - for name, value in interface.inputs.items(): - interface.inputs[name] = functions.get_function( - self, - node_template, - value) - if node_template.requirements and \ - isinstance(node_template.requirements, list): - for req in node_template.requirements: - rel = req - for req_name, req_item in req.items(): - if isinstance(req_item, dict): - rel = req_item.get('relationship') - break - if rel and 'properties' in rel: - for key, value in rel['properties'].items(): - rel['properties'][key] = \ - functions.get_function(self, - req, - value) - if node_template.get_capabilities_objects(): - for cap in node_template.get_capabilities_objects(): - if cap.get_properties_objects(): - for prop in cap.get_properties_objects(): - propvalue = functions.get_function( - self, - node_template, - prop.value) - if isinstance(propvalue, functions.GetInput): - propvalue = propvalue.result() - for p, v in cap._properties.items(): - if p == prop.name: - cap._properties[p] = propvalue - for rel, node in node_template.relationships.items(): - rel_tpls = node.relationship_tpl - if rel_tpls: - for rel_tpl in rel_tpls: - for interface in rel_tpl.interfaces: - if interface.inputs: - for name, value in \ - interface.inputs.items(): - interface.inputs[name] = \ - functions.get_function(self, - rel_tpl, - value) - for output in self.outputs: - func = functions.get_function(self, self.outputs, output.value) - if isinstance(func, functions.GetAttribute): - output.attrs[output.VALUE] = func - - @classmethod - def get_sub_mapping_node_type(cls, topology_tpl): - if topology_tpl and isinstance(topology_tpl, dict): - submap_tpl = topology_tpl.get(SUBSTITUION_MAPPINGS) - return SubstitutionMappings.get_node_type(submap_tpl) -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/ToscaGraph.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/ToscaGraph.java deleted file mode 100644 index 2de3bb9..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/ToscaGraph.java +++ /dev/null @@ -1,109 +0,0 @@ -package org.openecomp.sdc.toscaparser.api; - -import java.util.ArrayList; -import java.util.LinkedHashMap; - -import org.openecomp.sdc.toscaparser.api.elements.RelationshipType; - -//import java.util.Iterator; - -public class ToscaGraph { - // Graph of Tosca Node Templates - - private ArrayList nodeTemplates; - private LinkedHashMap vertices; - - public ToscaGraph(ArrayList inodeTemplates) { - nodeTemplates = inodeTemplates; - vertices = new LinkedHashMap(); - _create(); - } - - private void _createVertex(NodeTemplate node) { - if(vertices.get(node.getName()) == null) { - vertices.put(node.getName(),node); - } - } - - private void _createEdge(NodeTemplate node1, - NodeTemplate node2, - RelationshipType relation) { - if(vertices.get(node1.getName()) == null) { - _createVertex(node1); - vertices.get(node1.name)._addNext(node2,relation); - } - } - - public NodeTemplate vertex(String name) { - if(vertices.get(name) != null) { - return vertices.get(name); - } - return null; - } - -// public Iterator getIter() { -// return vertices.values().iterator(); -// } - - private void _create() { - for(NodeTemplate node: nodeTemplates) { - LinkedHashMap relation = node.getRelationships(); - if(relation != null) { - for(RelationshipType rel: relation.keySet()) { - NodeTemplate nodeTpls = relation.get(rel); - for(NodeTemplate tpl: nodeTemplates) { - if(tpl.getName().equals(nodeTpls.getName())) { - _createEdge(node,tpl,rel); - } - } - } - } - _createVertex(node); - } - } - - @Override - public String toString() { - return "ToscaGraph{" + - "nodeTemplates=" + nodeTemplates + - ", vertices=" + vertices + - '}'; - } -} - -/*python - -class ToscaGraph(object): - '''Graph of Tosca Node Templates.''' - def __init__(self, nodetemplates): - self.nodetemplates = nodetemplates - self.vertices = {} - self._create() - - def _create_vertex(self, node): - if node not in self.vertices: - self.vertices[node.name] = node - - def _create_edge(self, node1, node2, relationship): - if node1 not in self.vertices: - self._create_vertex(node1) - self.vertices[node1.name]._add_next(node2, - relationship) - - def vertex(self, node): - if node in self.vertices: - return self.vertices[node] - - def __iter__(self): - return iter(self.vertices.values()) - - def _create(self): - for node in self.nodetemplates: - relation = node.relationships - if relation: - for rel, nodetpls in relation.items(): - for tpl in self.nodetemplates: - if tpl.name == nodetpls.name: - self._create_edge(node, tpl, rel) - self._create_vertex(node) -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/ToscaTemplate.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/ToscaTemplate.java deleted file mode 100644 index b13a2a5..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/ToscaTemplate.java +++ /dev/null @@ -1,1002 +0,0 @@ -package org.openecomp.sdc.toscaparser.api; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.util.*; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.common.JToscaException; -import org.openecomp.sdc.toscaparser.api.elements.EntityType; -import org.openecomp.sdc.toscaparser.api.elements.Metadata; -import org.openecomp.sdc.toscaparser.api.extensions.ExtTools; -import org.openecomp.sdc.toscaparser.api.parameters.Input; -import org.openecomp.sdc.toscaparser.api.parameters.Output; -import org.openecomp.sdc.toscaparser.api.prereq.CSAR; -import org.openecomp.sdc.toscaparser.api.utils.JToscaErrorCodes; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.yaml.snakeyaml.Yaml; - -public class ToscaTemplate extends Object { - - private static Logger log = LoggerFactory.getLogger(ToscaTemplate.class.getName()); - - // TOSCA template key names - private static final String DEFINITION_VERSION = "tosca_definitions_version"; - private static final String DEFAULT_NAMESPACE = "tosca_default_namespace"; - private static final String TEMPLATE_NAME = "template_name"; - private static final String TOPOLOGY_TEMPLATE = "topology_template"; - private static final String TEMPLATE_AUTHOR = "template_author"; - private static final String TEMPLATE_VERSION = "template_version"; - private static final String DESCRIPTION = "description"; - private static final String IMPORTS = "imports"; - private static final String DSL_DEFINITIONS = "dsl_definitions"; - private static final String NODE_TYPES = "node_types"; - private static final String RELATIONSHIP_TYPES = "relationship_types"; - private static final String RELATIONSHIP_TEMPLATES = "relationship_templates"; - private static final String CAPABILITY_TYPES = "capability_types"; - private static final String ARTIFACT_TYPES = "artifact_types"; - private static final String DATA_TYPES = "data_types"; - private static final String INTERFACE_TYPES = "interface_types"; - private static final String POLICY_TYPES = "policy_types"; - private static final String GROUP_TYPES = "group_types"; - private static final String REPOSITORIES = "repositories"; - - private static String SECTIONS[] = { - DEFINITION_VERSION, DEFAULT_NAMESPACE, TEMPLATE_NAME, - TOPOLOGY_TEMPLATE, TEMPLATE_AUTHOR, TEMPLATE_VERSION, - DESCRIPTION, IMPORTS, DSL_DEFINITIONS, NODE_TYPES, - RELATIONSHIP_TYPES, RELATIONSHIP_TEMPLATES, - CAPABILITY_TYPES, ARTIFACT_TYPES, DATA_TYPES, - INTERFACE_TYPES, POLICY_TYPES, GROUP_TYPES, REPOSITORIES - }; - - // Sections that are specific to individual template definitions - private static final String METADATA = "metadata"; - private static ArrayList SPECIAL_SECTIONS; - - private ExtTools exttools = new ExtTools(); - - private ArrayList VALID_TEMPLATE_VERSIONS; - private LinkedHashMap> ADDITIONAL_SECTIONS; - - private boolean isFile; - private String path; - private String inputPath; - private LinkedHashMap parsedParams; - private LinkedHashMap tpl; - private String version; - private ArrayList imports; - private LinkedHashMap relationshipTypes; - private Metadata metaData; - private String description; - private TopologyTemplate topologyTemplate; - private ArrayList repositories; - private ArrayList inputs; - private ArrayList relationshipTemplates; - private ArrayList nodeTemplates; - private ArrayList outputs; - private ArrayList policies; - private LinkedHashMap nestedToscaTplsWithTopology; - private ArrayList nestedToscaTemplatesWithTopology; - private ToscaGraph graph; - private String csarTempDir; - private int nestingLoopCounter; - private LinkedHashMap> metaProperties; - - @SuppressWarnings("unchecked") - public ToscaTemplate(String _path, - LinkedHashMap _parsedParams, - boolean aFile, - LinkedHashMap yamlDictTpl) throws JToscaException { - - ThreadLocalsHolder.setCollector(new ExceptionCollector(_path)); - - VALID_TEMPLATE_VERSIONS = new ArrayList<>(); - VALID_TEMPLATE_VERSIONS.add("tosca_simple_yaml_1_0"); - VALID_TEMPLATE_VERSIONS.addAll(exttools.getVersions()); - ADDITIONAL_SECTIONS = new LinkedHashMap<>(); - SPECIAL_SECTIONS = new ArrayList<>(); - SPECIAL_SECTIONS.add(METADATA); - ADDITIONAL_SECTIONS.put("tosca_simple_yaml_1_0",SPECIAL_SECTIONS); - ADDITIONAL_SECTIONS.putAll(exttools.getSections()); - - //long startTime = System.nanoTime(); - - - isFile = aFile; - inputPath = null; - path = null; - tpl = null; - csarTempDir = null; - nestedToscaTplsWithTopology = new LinkedHashMap(); - nestedToscaTemplatesWithTopology = new ArrayList(); - - if(_path != null && !_path.isEmpty()) { - // save the original input path - inputPath = _path; - // get the actual path (will change with CSAR) - path = _getPath(_path); - // load the YAML template - if (path != null && !path.isEmpty()) { - try { - //System.out.println("Loading YAML file " + path); - log.debug("ToscaTemplate Loading YAMEL file {}", path); - InputStream input = new FileInputStream(new File(path)); - Yaml yaml = new Yaml(); - Object data = yaml.load(input); - this.tpl = (LinkedHashMap) data; - } - catch (FileNotFoundException e) { - log.error("ToscaTemplate - Exception loading yaml: {}", e.getMessage()); - return; - } - catch(Exception e) { - log.error("ToscaTemplate - Error loading yaml, aborting"); - return; - } - - if(yamlDictTpl != null) { - //msg = (_('Both path and yaml_dict_tpl arguments were ' - // 'provided. Using path and ignoring yaml_dict_tpl.')) - //log.info(msg) - log.debug("ToscaTemplate - Both path and yaml_dict_tpl arguments were provided. Using path and ignoring yaml_dict_tpl"); - } - } - else { - // no input to process... - _abort(); - } - } - else { - if(yamlDictTpl != null) { - tpl = yamlDictTpl; - } - else { - ThreadLocalsHolder.getCollector().appendException( - "ValueError: No path or yaml_dict_tpl was provided. There is nothing to parse"); - log.debug("ToscaTemplate ValueError: No path or yaml_dict_tpl was provided. There is nothing to parse"); - - } - } - - if(tpl != null) { - parsedParams = _parsedParams; - _validateField(); - this.version = _tplVersion(); - this.metaData = _tplMetaData(); - this.relationshipTypes = _tplRelationshipTypes(); - this.description = _tplDescription(); - this.topologyTemplate = _topologyTemplate(); - this.repositories = _tplRepositories(); - if(topologyTemplate.getTpl() != null) { - this.inputs = _inputs(); - this.relationshipTemplates = _relationshipTemplates(); - this.nodeTemplates = _nodeTemplates(); - this.outputs = _outputs(); - this.policies = _policies(); - _handleNestedToscaTemplatesWithTopology(); - graph = new ToscaGraph(nodeTemplates); - } - } - - if(csarTempDir != null) { - CSAR.deleteDir(new File(csarTempDir)); - csarTempDir = null; - } - - verifyTemplate(); - - } - - private void _abort() throws JToscaException { - // print out all exceptions caught - verifyTemplate(); - throw new JToscaException("jtosca aborting", JToscaErrorCodes.PATH_NOT_VALID.getValue()); - } - private TopologyTemplate _topologyTemplate() { - return new TopologyTemplate( - _tplTopologyTemplate(), - _getAllCustomDefs(imports), - relationshipTypes, - parsedParams, - null); - } - - private ArrayList _inputs() { - return topologyTemplate.getInputs(); - } - - private ArrayList _nodeTemplates() { - return topologyTemplate.getNodeTemplates(); - } - - private ArrayList _relationshipTemplates() { - return topologyTemplate.getRelationshipTemplates(); - } - - private ArrayList _outputs() { - return topologyTemplate.getOutputs(); - } - - private String _tplVersion() { - return (String)tpl.get(DEFINITION_VERSION); - } - - @SuppressWarnings("unchecked") - private Metadata _tplMetaData() { - Object mdo = tpl.get(METADATA); - if(mdo instanceof LinkedHashMap) { - return new Metadata((Map)mdo); - } - else { - return null; - } - } - - private String _tplDescription() { - return (String)tpl.get(DESCRIPTION); - } - - private ArrayList _tplImports() { - return (ArrayList)tpl.get(IMPORTS); - } - - private ArrayList _tplRepositories() { - LinkedHashMap repositories = - (LinkedHashMap)tpl.get(REPOSITORIES); - ArrayList reposit = new ArrayList<>(); - if(repositories != null) { - for(Map.Entry me: repositories.entrySet()) { - Repository reposits = new Repository(me.getKey(),me.getValue()); - reposit.add(reposits); - } - } - return reposit; - } - - private LinkedHashMap _tplRelationshipTypes() { - return (LinkedHashMap)_getCustomTypes(RELATIONSHIP_TYPES,null); - } - - @SuppressWarnings("unchecked") - private LinkedHashMap _tplRelationshipTemplates() { - return (LinkedHashMap)_tplTopologyTemplate().get(RELATIONSHIP_TEMPLATES); - } - - @SuppressWarnings("unchecked") - private LinkedHashMap _tplTopologyTemplate() { - return (LinkedHashMap)tpl.get(TOPOLOGY_TEMPLATE); - } - - private ArrayList _policies() { - return topologyTemplate.getPolicies(); - } - - private LinkedHashMap _getAllCustomDefs(ArrayList alImports) { - - String types[] = { - IMPORTS, NODE_TYPES, CAPABILITY_TYPES, RELATIONSHIP_TYPES, - DATA_TYPES, INTERFACE_TYPES, POLICY_TYPES, GROUP_TYPES - }; - LinkedHashMap customDefsFinal = new LinkedHashMap(); - LinkedHashMap customDefs = _getCustomTypes(types,alImports); - if(customDefs != null) { - customDefsFinal.putAll(customDefs); - if(customDefs.get(IMPORTS) != null) { - @SuppressWarnings("unchecked") - LinkedHashMap importDefs = _getAllCustomDefs((ArrayList)customDefs.get(IMPORTS)); - customDefsFinal.putAll(importDefs); - } - } - - // As imports are not custom_types, remove from the dict - customDefsFinal.remove(IMPORTS); - - return customDefsFinal; - } - - @SuppressWarnings("unchecked") - private LinkedHashMap _getCustomTypes(Object typeDefinitions,ArrayList alImports) { - - // Handle custom types defined in imported template files - // This method loads the custom type definitions referenced in "imports" - // section of the TOSCA YAML template. - - LinkedHashMap customDefs = new LinkedHashMap(); - ArrayList typeDefs = new ArrayList(); - if(typeDefinitions instanceof String[]) { - for(String s: (String[])typeDefinitions) { - typeDefs.add(s); - } - } - else { - typeDefs.add((String)typeDefinitions); - } - - if(alImports == null) { - alImports = _tplImports(); - } - - if(alImports != null) { - ImportsLoader customService = new ImportsLoader(alImports,path,typeDefs,tpl); - ArrayList> nestedToscaTpls = customService.getNestedToscaTpls(); - _updateNestedToscaTplsWithTopology(nestedToscaTpls); - - customDefs = customService.getCustomDefs(); - if(customDefs == null) { - return null; - } - } - - //Handle custom types defined in current template file - for(String td: typeDefs) { - if(!td.equals(IMPORTS)) { - LinkedHashMap innerCustomTypes = (LinkedHashMap )tpl.get(td); - if(innerCustomTypes != null) { - customDefs.putAll(innerCustomTypes); - } - } - } - return customDefs; - } - - private void _updateNestedToscaTplsWithTopology(ArrayList> nestedToscaTpls) { - for(LinkedHashMap ntpl: nestedToscaTpls) { - // there is just one key:value pair in ntpl - for(Map.Entry me: ntpl.entrySet()) { - String fileName = me.getKey(); - @SuppressWarnings("unchecked") - LinkedHashMap toscaTpl = (LinkedHashMap)me.getValue(); - if(toscaTpl.get(TOPOLOGY_TEMPLATE) != null) { - if(nestedToscaTplsWithTopology.get(fileName) == null) { - nestedToscaTplsWithTopology.putAll(ntpl); - } - } - } - } - } - - // **experimental** (multi level nesting) RECURSIVE - BEWARE OF INIFINITE LOOPS... - private void _handleNestedToscaTemplatesWithTopology2(TopologyTemplate tt) { - if(++nestingLoopCounter > 10) { - log.error("ToscaTemplate - _handleNestedToscaTemplatesWithTopology2 - Nested Topologies Loop: too many levels, aborting"); - return; - } - for(Map.Entry me: nestedToscaTplsWithTopology.entrySet()) { - String fname = me.getKey(); - LinkedHashMap toscaTpl = - (LinkedHashMap)me.getValue(); - for(NodeTemplate nt: tt.getNodeTemplates()) { - if(_isSubMappedNode2(nt,toscaTpl)) { - parsedParams = _getParamsForNestedTemplate(nt); - LinkedHashMap topologyTpl = - (LinkedHashMap)toscaTpl.get(TOPOLOGY_TEMPLATE); - TopologyTemplate topologyWithSubMapping = - new TopologyTemplate(topologyTpl, - _getAllCustomDefs(null), - relationshipTypes, - parsedParams, - nt); - if(topologyWithSubMapping.getSubstitutionMappings() != null) { - // Record nested topology templates in top level template - //nestedToscaTemplatesWithTopology.add(topologyWithSubMapping); - // Set substitution mapping object for mapped node - nt.setSubMappingToscaTemplate2( - topologyWithSubMapping.getSubstitutionMappings()); - _handleNestedToscaTemplatesWithTopology2(topologyWithSubMapping); - } - } - } - } - } - - private void _handleNestedToscaTemplatesWithTopology() { - for(Map.Entry me: nestedToscaTplsWithTopology.entrySet()) { - String fname = me.getKey(); - LinkedHashMap toscaTpl = - (LinkedHashMap)me.getValue(); - for(NodeTemplate nt: nodeTemplates) { - if(_isSubMappedNode(nt,toscaTpl)) { - parsedParams = _getParamsForNestedTemplate(nt); - ArrayList alim = (ArrayList)toscaTpl.get(IMPORTS); - LinkedHashMap topologyTpl = - (LinkedHashMap)toscaTpl.get(TOPOLOGY_TEMPLATE); - TopologyTemplate topologyWithSubMapping = - new TopologyTemplate(topologyTpl, - //_getAllCustomDefs(null), - _getAllCustomDefs(alim), - relationshipTypes, - parsedParams, - nt); - if(topologyWithSubMapping.getSubstitutionMappings() != null) { - // Record nested topology templates in top level template - nestedToscaTemplatesWithTopology.add(topologyWithSubMapping); - // Set substitution mapping object for mapped node - nt.setSubMappingToscaTemplate( - topologyWithSubMapping.getSubstitutionMappings()); - } - } - } - } - } - - private void _validateField() { - String sVersion = _tplVersion(); - if(sVersion == null) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "MissingRequiredField: Template is missing required field \"%s\"",DEFINITION_VERSION)); - } - else { - _validateVersion(sVersion); - this.version = sVersion; - } - - for (String sKey : tpl.keySet()) { - boolean bFound = false; - for (String sSection: SECTIONS) { - if(sKey.equals(sSection)) { - bFound = true; - break; - } - } - // check ADDITIONAL_SECTIONS - if(!bFound) { - if(ADDITIONAL_SECTIONS.get(version) != null && - ADDITIONAL_SECTIONS.get(version).contains(sKey)) { - bFound = true; - } - } - if(!bFound) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "UnknownFieldError: Template contains unknown field \"%s\"", - sKey)); - } - } - } - - private void _validateVersion(String sVersion) { - boolean bFound = false; - for(String vtv: VALID_TEMPLATE_VERSIONS) { - if(sVersion.equals(vtv)) { - bFound = true; - break; - } - } - if(!bFound) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "InvalidTemplateVersion: \"%s\" is invalid. Valid versions are %s", - sVersion,VALID_TEMPLATE_VERSIONS.toString())); - } - else if(!sVersion.equals("tosca_simple_yaml_1_0")) { - EntityType.updateDefinitions(sVersion); - } - } - - private String _getPath(String _path) throws JToscaException { - if (_path.toLowerCase().endsWith(".yaml") || _path.toLowerCase().endsWith(".yml")) { - return _path; - } - else if (_path.toLowerCase().endsWith(".zip") || _path.toLowerCase().endsWith(".csar")) { - // a CSAR archive - CSAR csar = new CSAR(_path, isFile); - if (csar.validate()) { - try { - csar.decompress(); - metaProperties = csar.getMetaProperties(); - } - catch (IOException e) { - log.error("ToscaTemplate - _getPath - IOException trying to decompress {}", _path); - return null; - } - isFile = true; // the file has been decompressed locally - csar.cleanup(); - csarTempDir = csar.getTempDir(); - return csar.getTempDir() + File.separator + csar.getMainTemplate(); - } - } - else { - ThreadLocalsHolder.getCollector().appendException("ValueError: " + _path + " is not a valid file"); - return null; - } - return null; - } - - private void verifyTemplate() throws JToscaException { - ThreadLocalsHolder.getCollector().setWantTrace(false); - - //Warnings - int warningsCount = ThreadLocalsHolder.getCollector().warningsCaught(); - if (warningsCount > 0) { - List warningsStrings = ThreadLocalsHolder.getCollector().getWarningsReport(); - log.warn("####################################################################################################"); - log.warn("CSAR Warnings found! CSAR name - {}", inputPath); - log.warn("ToscaTemplate - verifyTemplate - {} Parsing Warning{} occurred...", warningsCount, (warningsCount > 1 ? "s" : "")); - for (String s : warningsStrings) { - log.warn("{}. CSAR name - {}", s, inputPath); - } - log.warn("####################################################################################################"); - } - - //Criticals - int criticalsCount = ThreadLocalsHolder.getCollector().criticalsCaught(); - if (criticalsCount > 0) { - List criticalStrings = ThreadLocalsHolder.getCollector().getCriticalsReport(); - log.error("####################################################################################################"); - log.error("ToscaTemplate - verifyTemplate - {} Parsing Critical{} occurred...", criticalsCount, (criticalsCount > 1 ? "s" : "")); - for (String s : criticalStrings) { - log.error("{}. CSAR name - {}", s, inputPath); - } - throw new JToscaException(String.format("CSAR Validation Failed. CSAR name - {}. Please check logs for details.", inputPath), JToscaErrorCodes.CSAR_TOSCA_VALIDATION_ERROR.getValue()); - } - } - - public String getPath() { - return path; - } - - public String getVersion() { - return version; - } - - public String getDescription() { - return description; - } - - public TopologyTemplate getTopologyTemplate() { - return topologyTemplate; - } - - public Metadata getMetaData() { - return metaData; - } - - public ArrayList getInputs() { - return inputs; - } - - public ArrayList getOutputs() { - return outputs; - } - - public ArrayList getPolicies() { - return policies; - } - - public ArrayList getNodeTemplates() { - return nodeTemplates; - } - - public LinkedHashMap getMetaProperties(String propertiesFile) { - return metaProperties.get(propertiesFile); - } - - private boolean _isSubMappedNode(NodeTemplate nt,LinkedHashMap toscaTpl) { - // Return True if the nodetemple is substituted - if(nt != null && nt.getSubMappingToscaTemplate() == null && - getSubMappingNodeType(toscaTpl).equals(nt.getType()) && - nt.getInterfaces().size() < 1) { - return true; - } - return false; - } - - private boolean _isSubMappedNode2(NodeTemplate nt,LinkedHashMap toscaTpl) { - // Return True if the nodetemple is substituted - if(nt != null && nt.getSubMappingToscaTemplate2() == null && - getSubMappingNodeType(toscaTpl).equals(nt.getType()) && - nt.getInterfaces().size() < 1) { - return true; - } - return false; - } - - private LinkedHashMap _getParamsForNestedTemplate(NodeTemplate nt) { - // Return total params for nested_template - LinkedHashMap pparams; - if(parsedParams != null) { - pparams = parsedParams; - } - else { - pparams = new LinkedHashMap(); - } - if(nt != null) { - for(String pname: nt.getProperties().keySet()) { - pparams.put(pname,nt.getPropertyValue(pname)); - } - } - return pparams; - } - - private String getSubMappingNodeType(LinkedHashMap toscaTpl) { - // Return substitution mappings node type - if(toscaTpl != null) { - return TopologyTemplate.getSubMappingNodeType( - (LinkedHashMap)toscaTpl.get(TOPOLOGY_TEMPLATE)); - } - return null; - } - - private boolean _hasSubstitutionMapping() { - // Return True if the template has valid substitution mappings - return topologyTemplate != null && - topologyTemplate.getSubstitutionMappings() != null; - } - - public boolean hasNestedTemplates() { - // Return True if the tosca template has nested templates - return nestedToscaTemplatesWithTopology != null && - nestedToscaTemplatesWithTopology.size() >= 1; - - } - - public ArrayList getNestedTemplates() { - return nestedToscaTemplatesWithTopology; - } - - @Override - public String toString() { - return "ToscaTemplate{" + - "exttools=" + exttools + - ", VALID_TEMPLATE_VERSIONS=" + VALID_TEMPLATE_VERSIONS + - ", ADDITIONAL_SECTIONS=" + ADDITIONAL_SECTIONS + - ", isFile=" + isFile + - ", path='" + path + '\'' + - ", inputPath='" + inputPath + '\'' + - ", parsedParams=" + parsedParams + - ", tpl=" + tpl + - ", version='" + version + '\'' + - ", imports=" + imports + - ", relationshipTypes=" + relationshipTypes + - ", metaData=" + metaData + - ", description='" + description + '\'' + - ", topologyTemplate=" + topologyTemplate + - ", repositories=" + repositories + - ", inputs=" + inputs + - ", relationshipTemplates=" + relationshipTemplates + - ", nodeTemplates=" + nodeTemplates + - ", outputs=" + outputs + - ", policies=" + policies + - ", nestedToscaTplsWithTopology=" + nestedToscaTplsWithTopology + - ", nestedToscaTemplatesWithTopology=" + nestedToscaTemplatesWithTopology + - ", graph=" + graph + - ", csarTempDir='" + csarTempDir + '\'' + - ", nestingLoopCounter=" + nestingLoopCounter + - '}'; - } -} - -/*python - -import logging -import os - -from copy import deepcopy -from toscaparser.common.exception import ExceptionCollector.collector -from toscaparser.common.exception import InvalidTemplateVersion -from toscaparser.common.exception import MissingRequiredFieldError -from toscaparser.common.exception import UnknownFieldError -from toscaparser.common.exception import ValidationError -from toscaparser.elements.entity_type import update_definitions -from toscaparser.extensions.exttools import ExtTools -import org.openecomp.sdc.toscaparser.api.imports -from toscaparser.prereq.csar import CSAR -from toscaparser.repositories import Repository -from toscaparser.topology_template import TopologyTemplate -from toscaparser.tpl_relationship_graph import ToscaGraph -from toscaparser.utils.gettextutils import _ -import org.openecomp.sdc.toscaparser.api.utils.yamlparser - - -# TOSCA template key names -SECTIONS = (DEFINITION_VERSION, DEFAULT_NAMESPACE, TEMPLATE_NAME, - TOPOLOGY_TEMPLATE, TEMPLATE_AUTHOR, TEMPLATE_VERSION, - DESCRIPTION, IMPORTS, DSL_DEFINITIONS, NODE_TYPES, - RELATIONSHIP_TYPES, RELATIONSHIP_TEMPLATES, - CAPABILITY_TYPES, ARTIFACT_TYPES, DATA_TYPES, INTERFACE_TYPES, - POLICY_TYPES, GROUP_TYPES, REPOSITORIES) = \ - ('tosca_definitions_version', 'tosca_default_namespace', - 'template_name', 'topology_template', 'template_author', - 'template_version', 'description', 'imports', 'dsl_definitions', - 'node_types', 'relationship_types', 'relationship_templates', - 'capability_types', 'artifact_types', 'data_types', - 'interface_types', 'policy_types', 'group_types', 'repositories') -# Sections that are specific to individual template definitions -SPECIAL_SECTIONS = (METADATA) = ('metadata') - -log = logging.getLogger("tosca.model") - -YAML_LOADER = toscaparser.utils.yamlparser.load_yaml - - -class ToscaTemplate(object): - exttools = ExtTools() - - VALID_TEMPLATE_VERSIONS = ['tosca_simple_yaml_1_0'] - - VALID_TEMPLATE_VERSIONS.extend(exttools.get_versions()) - - ADDITIONAL_SECTIONS = {'tosca_simple_yaml_1_0': SPECIAL_SECTIONS} - - ADDITIONAL_SECTIONS.update(exttools.get_sections()) - - '''Load the template data.''' - def __init__(self, path=None, parsed_params=None, a_file=True, - yaml_dict_tpl=None): - - ExceptionCollector.collector.start() - self.a_file = a_file - self.input_path = None - self.path = None - self.tpl = None - self.nested_tosca_tpls_with_topology = {} - self.nested_tosca_templates_with_topology = [] - if path: - self.input_path = path - self.path = self._get_path(path) - if self.path: - self.tpl = YAML_LOADER(self.path, self.a_file) - if yaml_dict_tpl: - msg = (_('Both path and yaml_dict_tpl arguments were ' - 'provided. Using path and ignoring yaml_dict_tpl.')) - log.info(msg) - print(msg) - else: - if yaml_dict_tpl: - self.tpl = yaml_dict_tpl - else: - ExceptionCollector.collector.appendException( - ValueError(_('No path or yaml_dict_tpl was provided. ' - 'There is nothing to parse.'))) - - if self.tpl: - self.parsed_params = parsed_params - self._validate_field() - self.version = self._tpl_version() - self.relationship_types = self._tpl_relationship_types() - self.description = self._tpl_description() - self.topology_template = self._topology_template() - self.repositories = self._tpl_repositories() - if self.topology_template.tpl: - self.inputs = self._inputs() - self.relationship_templates = self._relationship_templates() - self.nodetemplates = self._nodetemplates() - self.outputs = self._outputs() - self._handle_nested_tosca_templates_with_topology() - self.graph = ToscaGraph(self.nodetemplates) - - ExceptionCollector.collector.stop() - self.verify_template() - - def _topology_template(self): - return TopologyTemplate(self._tpl_topology_template(), - self._get_all_custom_defs(), - self.relationship_types, - self.parsed_params, - None) - - def _inputs(self): - return self.topology_template.inputs - - def _nodetemplates(self): - return self.topology_template.nodetemplates - - def _relationship_templates(self): - return self.topology_template.relationship_templates - - def _outputs(self): - return self.topology_template.outputs - - def _tpl_version(self): - return self.tpl.get(DEFINITION_VERSION) - - def _tpl_description(self): - desc = self.tpl.get(DESCRIPTION) - if desc: - return desc.rstrip() - - def _tpl_imports(self): - return self.tpl.get(IMPORTS) - - def _tpl_repositories(self): - repositories = self.tpl.get(REPOSITORIES) - reposit = [] - if repositories: - for name, val in repositories.items(): - reposits = Repository(name, val) - reposit.append(reposits) - return reposit - - def _tpl_relationship_types(self): - return self._get_custom_types(RELATIONSHIP_TYPES) - - def _tpl_relationship_templates(self): - topology_template = self._tpl_topology_template() - return topology_template.get(RELATIONSHIP_TEMPLATES) - - def _tpl_topology_template(self): - return self.tpl.get(TOPOLOGY_TEMPLATE) - - def _get_all_custom_defs(self, imports=None): - types = [IMPORTS, NODE_TYPES, CAPABILITY_TYPES, RELATIONSHIP_TYPES, - DATA_TYPES, INTERFACE_TYPES, POLICY_TYPES, GROUP_TYPES] - custom_defs_final = {} - custom_defs = self._get_custom_types(types, imports) - if custom_defs: - custom_defs_final.update(custom_defs) - if custom_defs.get(IMPORTS): - import_defs = self._get_all_custom_defs( - custom_defs.get(IMPORTS)) - custom_defs_final.update(import_defs) - - # As imports are not custom_types, removing from the dict - custom_defs_final.pop(IMPORTS, None) - return custom_defs_final - - def _get_custom_types(self, type_definitions, imports=None): - """Handle custom types defined in imported template files - - This method loads the custom type definitions referenced in "imports" - section of the TOSCA YAML template. - """ - custom_defs = {} - type_defs = [] - if not isinstance(type_definitions, list): - type_defs.append(type_definitions) - else: - type_defs = type_definitions - - if not imports: - imports = self._tpl_imports() - - if imports: - custom_service = toscaparser.imports.\ - ImportsLoader(imports, self.path, - type_defs, self.tpl) - - nested_tosca_tpls = custom_service.get_nested_tosca_tpls() - self._update_nested_tosca_tpls_with_topology(nested_tosca_tpls) - - custom_defs = custom_service.get_custom_defs() - if not custom_defs: - return - - # Handle custom types defined in current template file - for type_def in type_defs: - if type_def != IMPORTS: - inner_custom_types = self.tpl.get(type_def) or {} - if inner_custom_types: - custom_defs.update(inner_custom_types) - return custom_defs - - def _update_nested_tosca_tpls_with_topology(self, nested_tosca_tpls): - for tpl in nested_tosca_tpls: - filename, tosca_tpl = list(tpl.items())[0] - if (tosca_tpl.get(TOPOLOGY_TEMPLATE) and - filename not in list( - self.nested_tosca_tpls_with_topology.keys())): - self.nested_tosca_tpls_with_topology.update(tpl) - - def _handle_nested_tosca_templates_with_topology(self): - for fname, tosca_tpl in self.nested_tosca_tpls_with_topology.items(): - for nodetemplate in self.nodetemplates: - if self._is_sub_mapped_node(nodetemplate, tosca_tpl): - parsed_params = self._get_params_for_nested_template( - nodetemplate) - topology_tpl = tosca_tpl.get(TOPOLOGY_TEMPLATE) - topology_with_sub_mapping = TopologyTemplate( - topology_tpl, - self._get_all_custom_defs(), - self.relationship_types, - parsed_params, - nodetemplate) - if topology_with_sub_mapping.substitution_mappings: - # Record nested topo templates in top level template - self.nested_tosca_templates_with_topology.\ - append(topology_with_sub_mapping) - # Set substitution mapping object for mapped node - nodetemplate.sub_mapping_tosca_template = \ - topology_with_sub_mapping.substitution_mappings - - def _validate_field(self): - version = self._tpl_version() - if not version: - ExceptionCollector.collector.appendException( - MissingRequiredFieldError(what='Template', - required=DEFINITION_VERSION)) - else: - self._validate_version(version) - self.version = version - - for name in self.tpl: - if (name not in SECTIONS and - name not in self.ADDITIONAL_SECTIONS.get(version, ())): - ExceptionCollector.collector.appendException( - UnknownFieldError(what='Template', field=name)) - - def _validate_version(self, version): - if version not in self.VALID_TEMPLATE_VERSIONS: - ExceptionCollector.collector.appendException( - InvalidTemplateVersion( - what=version, - valid_versions=', '. join(self.VALID_TEMPLATE_VERSIONS))) - else: - if version != 'tosca_simple_yaml_1_0': - update_definitions(version) - - def _get_path(self, path): - if path.lower().endswith(('.yaml','.yml')): - return path - elif path.lower().endswith(('.zip', '.csar')): - # a CSAR archive - csar = CSAR(path, self.a_file) - if csar.validate(): - csar.decompress() - self.a_file = True # the file has been decompressed locally - return os.path.join(csar.temp_dir, csar.get_main_template()) - else: - ExceptionCollector.collector.appendException( - ValueError(_('"%(path)s" is not a valid file.') - % {'path': path})) - - def verify_template(self): - if ExceptionCollector.collector.exceptionsCaught(): - if self.input_path: - raise ValidationError( - message=(_('\nThe input "%(path)s" failed validation with ' - 'the following error(s): \n\n\t') - % {'path': self.input_path}) + - '\n\t'.join(ExceptionCollector.collector.getExceptionsReport())) - else: - raise ValidationError( - message=_('\nThe pre-parsed input failed validation with ' - 'the following error(s): \n\n\t') + - '\n\t'.join(ExceptionCollector.collector.getExceptionsReport())) - else: - if self.input_path: - msg = (_('The input "%(path)s" successfully passed ' - 'validation.') % {'path': self.input_path}) - else: - msg = _('The pre-parsed input successfully passed validation.') - - log.info(msg) - - def _is_sub_mapped_node(self, nodetemplate, tosca_tpl): - """Return True if the nodetemple is substituted.""" - if (nodetemplate and not nodetemplate.sub_mapping_tosca_template and - self.get_sub_mapping_node_type(tosca_tpl) == nodetemplate.type - and len(nodetemplate.interfaces) < 1): - return True - else: - return False - - def _get_params_for_nested_template(self, nodetemplate): - """Return total params for nested_template.""" - parsed_params = deepcopy(self.parsed_params) \ - if self.parsed_params else {} - if nodetemplate: - for pname in nodetemplate.get_properties(): - parsed_params.update({pname: - nodetemplate.get_property_value(pname)}) - return parsed_params - - def get_sub_mapping_node_type(self, tosca_tpl): - """Return substitution mappings node type.""" - if tosca_tpl: - return TopologyTemplate.get_sub_mapping_node_type( - tosca_tpl.get(TOPOLOGY_TEMPLATE)) - - def _has_substitution_mappings(self): - """Return True if the template has valid substitution mappings.""" - return self.topology_template is not None and \ - self.topology_template.substitution_mappings is not None - - def has_nested_templates(self): - """Return True if the tosca template has nested templates.""" - return self.nested_tosca_templates_with_topology is not None and \ - len(self.nested_tosca_templates_with_topology) >= 1 -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/Triggers.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/Triggers.java deleted file mode 100644 index 0ec0b5a..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/Triggers.java +++ /dev/null @@ -1,183 +0,0 @@ -package org.openecomp.sdc.toscaparser.api; - -import java.util.LinkedHashMap; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; -import org.openecomp.sdc.toscaparser.api.utils.ValidateUtils; - -public class Triggers extends EntityTemplate { - - private static final String DESCRIPTION = "description"; - private static final String EVENT = "event_type"; - private static final String SCHEDULE = "schedule"; - private static final String TARGET_FILTER = "target_filter"; - private static final String CONDITION = "condition"; - private static final String ACTION = "action"; - - private static final String SECTIONS[] = { - DESCRIPTION, EVENT, SCHEDULE, TARGET_FILTER, CONDITION, ACTION - }; - - private static final String METER_NAME = "meter_name"; - private static final String CONSTRAINT = "constraint"; - private static final String PERIOD = "period"; - private static final String EVALUATIONS = "evaluations"; - private static final String METHOD = "method"; - private static final String THRESHOLD = "threshold"; - private static final String COMPARISON_OPERATOR = "comparison_operator"; - - private static final String CONDITION_KEYNAMES[] = { - METER_NAME, CONSTRAINT, PERIOD, EVALUATIONS, METHOD, THRESHOLD, COMPARISON_OPERATOR - }; - - private String name; - private LinkedHashMap triggerTpl; - - public Triggers(String _name,LinkedHashMap _triggerTpl) { - super(); // dummy. don't want super - name = _name; - triggerTpl = _triggerTpl; - _validateKeys(); - _validateCondition(); - _validateInput(); - } - - public String getDescription() { - return (String)triggerTpl.get("description"); - } - - public String getEvent() { - return (String)triggerTpl.get("event_type"); - } - - public LinkedHashMap getSchedule() { - return (LinkedHashMap)triggerTpl.get("schedule"); - } - - public LinkedHashMap getTargetFilter() { - return (LinkedHashMap)triggerTpl.get("target_filter"); - } - - public LinkedHashMap getCondition() { - return (LinkedHashMap)triggerTpl.get("condition"); - } - - public LinkedHashMap getAction() { - return (LinkedHashMap)triggerTpl.get("action"); - } - - private void _validateKeys() { - for(String key: triggerTpl.keySet()) { - boolean bFound = false; - for(int i=0; i notAnalyzedExceptions = new HashMap<>(); - private Map criticalExceptions = new HashMap<>(); - private Map warningExceptions = new HashMap<>(); - - private boolean bWantTrace = true; - private String filePath; - - public enum ReportType {WARNING, CRITICAL, NOT_ANALYZED} - - public ExceptionCollector(String filePath) { - this.filePath = filePath; - } - - public void appendException(String exception) { - - addException(exception, ReportType.NOT_ANALYZED); - } - - public void appendCriticalException(String exception) { - - addException(exception, ReportType.CRITICAL); - } - - public void appendWarning(String exception) { - - addException(exception, ReportType.WARNING); - } - - private void addException(String exception, ReportType type) { - - Map exceptions = getExceptionCollection(type); - - if (!exceptions.containsKey(exception)) { - // get stack trace - StackTraceElement[] ste = Thread.currentThread().getStackTrace(); - StringBuilder sb = new StringBuilder(); - // skip the last 2 (getStackTrace and this) - for (int i = 2; i < ste.length; i++) { - sb.append(String.format(" %s(%s:%d)%s", ste[i].getClassName(), ste[i].getFileName(), - ste[i].getLineNumber(), i == ste.length - 1 ? " " : "\n")); - } - exceptions.put(exception, sb.toString()); - } - } - - public List getCriticalsReport() { - - return getReport(ReportType.CRITICAL); - } - - public List getNotAnalyzedExceptionsReport() { - - return getReport(ReportType.NOT_ANALYZED); - } - - public List getWarningsReport() { - - return getReport(ReportType.WARNING); - } - - private List getReport(ReportType type) { - Map collectedExceptions = getExceptionCollection(type); - - List report = new ArrayList<>(); - if (collectedExceptions.size() > 0) { - for (Map.Entry exception : collectedExceptions.entrySet()) { - report.add(exception.getKey()); - if (bWantTrace) { - report.add(exception.getValue()); - } - } - } - - return report; - } - - private Map getExceptionCollection(ReportType type) { - switch (type) { - case WARNING: - return warningExceptions; - case CRITICAL: - return criticalExceptions; - case NOT_ANALYZED: - return notAnalyzedExceptions; - default: - return notAnalyzedExceptions; - } - } - - public int errorsNotAnalyzedCaught() { - return notAnalyzedExceptions.size(); - } - - public int criticalsCaught() { - return criticalExceptions.size(); - } - - public int warningsCaught() { - return warningExceptions.size(); - } - - public void setWantTrace(boolean b) { - bWantTrace = b; - } - -} diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/common/JToscaException.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/common/JToscaException.java deleted file mode 100644 index 6cd5872..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/common/JToscaException.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.common; - -public class JToscaException extends Exception { - - private static final long serialVersionUID = 1L; - private String code; - - public JToscaException(String message, String code) { - super(message); - this.code = code; - } - - public String getCode() { - return code; - } - - public void setCode(String code) { - this.code = code; - } - - //JT1001 - Meta file missing - //JT1002 - Invalid yaml content - //JT1003 - Entry-Definition not defined in meta file - //JT1004 - Entry-Definition file missing - //JT1005 - General Error - //JT1006 - General Error/Path not valid -} diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/common/TOSCAException.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/common/TOSCAException.java deleted file mode 100644 index cfd7560..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/common/TOSCAException.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.common; - -import java.util.IllegalFormatException; - -public class TOSCAException extends Exception { - private String message = "An unkown exception has occurred"; - private static boolean FATAL_EXCEPTION_FORMAT_ERRORS = false; - private String msgFmt = null; - - public TOSCAException(String...strings) { - try { - message = String.format(msgFmt,(Object[])strings); - } - catch (IllegalFormatException e) { - // TODO log - - if(FATAL_EXCEPTION_FORMAT_ERRORS) { - throw e; - } - - } - - } - - public String __str__() { - return message; - } - - public static void generate_inv_schema_property_error(String name, String attr, String value, String valid_values) { - //TODO - - } - - public static void setFatalFormatException(boolean flag) { - FATAL_EXCEPTION_FORMAT_ERRORS = flag; - } - -} - diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/ArtifactTypeDef.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/ArtifactTypeDef.java deleted file mode 100644 index 8a13d99..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/ArtifactTypeDef.java +++ /dev/null @@ -1,105 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements; - -import java.util.LinkedHashMap; - -public class ArtifactTypeDef extends StatefulEntityType { - - private String type; - private LinkedHashMap customDef; - private LinkedHashMap properties; - private LinkedHashMap parentArtifacts; - - - - public ArtifactTypeDef(String atype,LinkedHashMap _customDef) { - super(atype,ARTIFACT_PREFIX,_customDef); - - type = atype; - customDef = _customDef; - properties = null; - if(defs != null) { - properties = (LinkedHashMap)defs.get(PROPERTIES); - } - parentArtifacts = _getParentArtifacts(); - } - - private LinkedHashMap _getParentArtifacts() { - LinkedHashMap artifacts = new LinkedHashMap<>(); - String parentArtif = null; - if(getParentType() != null) { - parentArtif = getParentType().getType(); - } - if(parentArtif != null && !parentArtif.isEmpty()) { - while(!parentArtif.equals("tosca.artifacts.Root")) { - Object ob = TOSCA_DEF.get(parentArtif); - artifacts.put(parentArtif,ob); - parentArtif = - (String)((LinkedHashMap)ob).get("derived_from"); - } - } - return artifacts; - } - - public ArtifactTypeDef getParentType() { - // Return a artifact entity from which this entity is derived - if(defs == null) { - return null; - } - String partifactEntity = derivedFrom(defs); - if(partifactEntity != null) { - return new ArtifactTypeDef(partifactEntity,customDef); - } - return null; - } - - public Object getArtifact(String name) { - // Return the definition of an artifact field by name - if(defs != null) { - return defs.get(name); - } - return null; - } - - public String getType() { - return type; - } - -} - -/*python -class ArtifactTypeDef(StatefulEntityType): - '''TOSCA built-in artifacts type.''' - - def __init__(self, atype, custom_def=None): - super(ArtifactTypeDef, self).__init__(atype, self.ARTIFACT_PREFIX, - custom_def) - self.type = atype - self.custom_def = custom_def - self.properties = None - if self.PROPERTIES in self.defs: - self.properties = self.defs[self.PROPERTIES] - self.parent_artifacts = self._get_parent_artifacts() - - def _get_parent_artifacts(self): - artifacts = {} - parent_artif = self.parent_type.type if self.parent_type else None - if parent_artif: - while parent_artif != 'tosca.artifacts.Root': - artifacts[parent_artif] = self.TOSCA_DEF[parent_artif] - parent_artif = artifacts[parent_artif]['derived_from'] - return artifacts - - @property - def parent_type(self): - '''Return a artifact entity from which this entity is derived.''' - if not hasattr(self, 'defs'): - return None - partifact_entity = self.derived_from(self.defs) - if partifact_entity: - return ArtifactTypeDef(partifact_entity, self.custom_def) - - def get_artifact(self, name): - '''Return the definition of an artifact field by name.''' - if name in self.defs: - return self.defs[name] -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/AttributeDef.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/AttributeDef.java deleted file mode 100644 index 5551908..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/AttributeDef.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements; - -import java.util.LinkedHashMap; - -public class AttributeDef { - // TOSCA built-in Attribute type - - private String name; - private Object value; - private LinkedHashMap schema; - - public AttributeDef(String adName, Object adValue, LinkedHashMap adSchema) { - name = adName; - value = adValue; - schema = adSchema; - } - - public String getName() { - return name; - } - - public Object getValue() { - return value; - } - - public LinkedHashMap getSchema() { - return schema; - } -} - -/*python - -class AttributeDef(object): - '''TOSCA built-in Attribute type.''' - - def __init__(self, name, value=None, schema=None): - self.name = name - self.value = value - self.schema = schema -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/CapabilityTypeDef.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/CapabilityTypeDef.java deleted file mode 100644 index 03e2c45..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/CapabilityTypeDef.java +++ /dev/null @@ -1,222 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.Map; - -import org.openecomp.sdc.toscaparser.api.elements.PropertyDef; - -public class CapabilityTypeDef extends StatefulEntityType { - // TOSCA built-in capabilities type - - private static final String TOSCA_TYPEURI_CAPABILITY_ROOT = "tosca.capabilities.Root"; - - private String name; - private String nodetype; - private LinkedHashMap customDef; - private LinkedHashMap properties; - private LinkedHashMap parentCapabilities; - - @SuppressWarnings("unchecked") - public CapabilityTypeDef(String cname,String ctype,String ntype,LinkedHashMap ccustomDef) { - super(ctype,CAPABILITY_PREFIX,ccustomDef); - - name = cname; - nodetype = ntype; - properties = null; - customDef = ccustomDef; - if(defs != null) { - properties = (LinkedHashMap)defs.get(PROPERTIES); - } - parentCapabilities = _getParentCapabilities(customDef); - } - - @SuppressWarnings("unchecked") - public ArrayList getPropertiesDefObjects () { - // Return a list of property definition objects - ArrayList propsdefs = new ArrayList<>(); - LinkedHashMap parentProperties = new LinkedHashMap<>(); - if(parentCapabilities != null) { - for(Map.Entry me: parentCapabilities.entrySet()) { - parentProperties.put(me.getKey(),((LinkedHashMap)me.getValue()).get("properties")); - } - } - if(properties != null) { - for(Map.Entry me: properties.entrySet()) { - propsdefs.add(new PropertyDef(me.getKey(),null,(LinkedHashMap)me.getValue())); - } - } - if(parentProperties != null) { - for(Map.Entry me: parentProperties.entrySet()) { - LinkedHashMap props = (LinkedHashMap)me.getValue(); - for(Map.Entry pe: props.entrySet()) { - String prop = pe.getKey(); - LinkedHashMap schema = (LinkedHashMap)pe.getValue(); - // add parent property if not overridden by children type - if(properties == null || properties.get(prop) == null) { - propsdefs.add(new PropertyDef(prop, null, schema)); - } - } - } - } - return propsdefs; - } - - public LinkedHashMap getPropertiesDef() { - LinkedHashMap pds = new LinkedHashMap<>(); - for(PropertyDef pd: getPropertiesDefObjects()) { - pds.put(pd.getName(),pd); - } - return pds; - } - - public PropertyDef getPropertyDefValue(String pdname) { - // Return the definition of a given property name - LinkedHashMap propsDef = getPropertiesDef(); - if(propsDef != null && propsDef.get(pdname) != null) { - return (PropertyDef)propsDef.get(pdname).getPDValue(); - } - return null; - } - - @SuppressWarnings("unchecked") - private LinkedHashMap _getParentCapabilities(LinkedHashMap customDef) { - LinkedHashMap capabilities = new LinkedHashMap<>(); - CapabilityTypeDef parentCap = getParentType(); - if(parentCap != null) { - String sParentCap = parentCap.getType(); - while(!sParentCap.equals(TOSCA_TYPEURI_CAPABILITY_ROOT)) { - if(TOSCA_DEF.get(sParentCap) != null) { - capabilities.put(sParentCap,TOSCA_DEF.get(sParentCap)); - } - else if(customDef != null && customDef.get(sParentCap) != null) { - capabilities.put(sParentCap,customDef.get(sParentCap)); - } - sParentCap = (String)((LinkedHashMap)capabilities.get(sParentCap)).get("derived_from"); - } - } - return capabilities; - } - - public CapabilityTypeDef getParentType() { - // Return a capability this capability is derived from - if(defs == null) { - return null; - } - String pnode = derivedFrom(defs); - if(pnode != null && !pnode.isEmpty()) { - return new CapabilityTypeDef(name, pnode, nodetype, customDef); - } - return null; - } - - public boolean inheritsFrom(ArrayList typeNames) { - // Check this capability is in type_names - - // Check if this capability or some of its parent types - // are in the list of types: type_names - if(typeNames.contains(getType())) { - return true; - } - else if(getParentType() != null) { - return getParentType().inheritsFrom(typeNames); - } - return false; - } - - // getters/setters - - public LinkedHashMap getProperties() { - return properties; - } - - public String getName() { - return name; - } -} - -/*python -from toscaparser.elements.property_definition import PropertyDef -from toscaparser.elements.statefulentitytype import StatefulEntityType - - -class CapabilityTypeDef(StatefulEntityType): - '''TOSCA built-in capabilities type.''' - TOSCA_TYPEURI_CAPABILITY_ROOT = 'tosca.capabilities.Root' - - def __init__(self, name, ctype, ntype, custom_def=None): - self.name = name - super(CapabilityTypeDef, self).__init__(ctype, self.CAPABILITY_PREFIX, - custom_def) - self.nodetype = ntype - self.properties = None - self.custom_def = custom_def - if self.PROPERTIES in self.defs: - self.properties = self.defs[self.PROPERTIES] - self.parent_capabilities = self._get_parent_capabilities(custom_def) - - def get_properties_def_objects(self): - '''Return a list of property definition objects.''' - properties = [] - parent_properties = {} - if self.parent_capabilities: - for type, value in self.parent_capabilities.items(): - parent_properties[type] = value.get('properties') - if self.properties: - for prop, schema in self.properties.items(): - properties.append(PropertyDef(prop, None, schema)) - if parent_properties: - for parent, props in parent_properties.items(): - for prop, schema in props.items(): - # add parent property if not overridden by children type - if not self.properties or \ - prop not in self.properties.keys(): - properties.append(PropertyDef(prop, None, schema)) - return properties - - def get_properties_def(self): - '''Return a dictionary of property definition name-object pairs.''' - return {prop.name: prop - for prop in self.get_properties_def_objects()} - - def get_property_def_value(self, name): - '''Return the definition of a given property name.''' - props_def = self.get_properties_def() - if props_def and name in props_def: - return props_def[name].value - - def _get_parent_capabilities(self, custom_def=None): - capabilities = {} - parent_cap = self.parent_type - if parent_cap: - parent_cap = parent_cap.type - while parent_cap != self.TOSCA_TYPEURI_CAPABILITY_ROOT: - if parent_cap in self.TOSCA_DEF.keys(): - capabilities[parent_cap] = self.TOSCA_DEF[parent_cap] - elif custom_def and parent_cap in custom_def.keys(): - capabilities[parent_cap] = custom_def[parent_cap] - parent_cap = capabilities[parent_cap]['derived_from'] - return capabilities - - @property - def parent_type(self): - '''Return a capability this capability is derived from.''' - if not hasattr(self, 'defs'): - return None - pnode = self.derived_from(self.defs) - if pnode: - return CapabilityTypeDef(self.name, pnode, - self.nodetype, self.custom_def) - - def inherits_from(self, type_names): - '''Check this capability is in type_names - - Check if this capability or some of its parent types - are in the list of types: type_names - ''' - if self.type in type_names: - return True - elif self.parent_type: - return self.parent_type.inherits_from(type_names) - else: - return False*/ diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/DataType.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/DataType.java deleted file mode 100644 index d5d770b..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/DataType.java +++ /dev/null @@ -1,116 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements; - -import java.util.ArrayList; -import java.util.LinkedHashMap; - -public class DataType extends StatefulEntityType { - - LinkedHashMap customDef; - - public DataType(String _dataTypeName,LinkedHashMap _customDef) { - super(_dataTypeName,DATATYPE_NETWORK_PREFIX,_customDef); - - customDef = _customDef; - } - - public DataType getParentType() { - // Return a datatype this datatype is derived from - if(defs != null) { - String ptype = derivedFrom(defs); - if(ptype != null) { - return new DataType(ptype,customDef); - } - } - return null; - } - - public String getValueType() { - // Return 'type' section in the datatype schema - if(defs != null) { - return (String)entityValue(defs,"type"); - } - return null; - } - - public ArrayList getAllPropertiesObjects() { - //Return all properties objects defined in type and parent type - ArrayList propsDef = getPropertiesDefObjects(); - DataType ptype = getParentType(); - while(ptype != null) { - propsDef.addAll(ptype.getPropertiesDefObjects()); - ptype = ptype.getParentType(); - } - return propsDef; - } - - public LinkedHashMap getAllProperties() { - // Return a dictionary of all property definition name-object pairs - LinkedHashMap pno = new LinkedHashMap<>(); - for(PropertyDef pd: getAllPropertiesObjects()) { - pno.put(pd.getName(),pd); - } - return pno; - } - - public Object getAllPropertyValue(String name) { - // Return the value of a given property name - LinkedHashMap propsDef = getAllProperties(); - if(propsDef != null && propsDef.get(name) != null) { - return propsDef.get(name).getPDValue(); - } - return null; - } - - public LinkedHashMap getDefs() { - return defs; - } - -} - -/*python - -from toscaparser.elements.statefulentitytype import StatefulEntityType - - -class DataType(StatefulEntityType): - '''TOSCA built-in and user defined complex data type.''' - - def __init__(self, datatypename, custom_def=None): - super(DataType, self).__init__(datatypename, - self.DATATYPE_NETWORK_PREFIX, - custom_def) - self.custom_def = custom_def - - @property - def parent_type(self): - '''Return a datatype this datatype is derived from.''' - ptype = self.derived_from(self.defs) - if ptype: - return DataType(ptype, self.custom_def) - return None - - @property - def value_type(self): - '''Return 'type' section in the datatype schema.''' - return self.entity_value(self.defs, 'type') - - def get_all_properties_objects(self): - '''Return all properties objects defined in type and parent type.''' - props_def = self.get_properties_def_objects() - ptype = self.parent_type - while ptype: - props_def.extend(ptype.get_properties_def_objects()) - ptype = ptype.parent_type - return props_def - - def get_all_properties(self): - '''Return a dictionary of all property definition name-object pairs.''' - return {prop.name: prop - for prop in self.get_all_properties_objects()} - - def get_all_property_value(self, name): - '''Return the value of a given property name.''' - props_def = self.get_all_properties() - if props_def and name in props_def.key(): - return props_def[name].value -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/EntityType.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/EntityType.java deleted file mode 100644 index 650166d..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/EntityType.java +++ /dev/null @@ -1,418 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.Map; - -import org.openecomp.sdc.toscaparser.api.extensions.ExtTools; -import org.openecomp.sdc.toscaparser.api.utils.CopyUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.yaml.snakeyaml.Yaml; - -public class EntityType { - - private static Logger log = LoggerFactory.getLogger(EntityType.class.getName()); - - private static final String TOSCA_DEFINITION_1_0_YAML = "TOSCA_definition_1_0.yaml"; - protected static final String DERIVED_FROM = "derived_from"; - protected static final String PROPERTIES = "properties"; - protected static final String ATTRIBUTES = "attributes"; - protected static final String REQUIREMENTS = "requirements"; - protected static final String INTERFACES = "interfaces"; - protected static final String CAPABILITIES = "capabilities"; - protected static final String TYPE = "type"; - protected static final String ARTIFACTS = "artifacts"; - - @SuppressWarnings("unused") - private static final String SECTIONS[] = { - DERIVED_FROM, PROPERTIES, ATTRIBUTES, REQUIREMENTS, - INTERFACES, CAPABILITIES, TYPE, ARTIFACTS - }; - - public static final String TOSCA_DEF_SECTIONS[] = { - "node_types", "data_types", "artifact_types", - "group_types", "relationship_types", - "capability_types", "interface_types", - "policy_types"}; - - - // TOSCA definition file - //private final static String path = EntityType.class.getProtectionDomain().getCodeSource().getLocation().getPath(); - - //private final static String path = EntityType.class.getClassLoader().getResource("TOSCA_definition_1_0.yaml").getFile(); - //private final static String TOSCA_DEF_FILE = EntityType.class.getClassLoader().getResourceAsStream("TOSCA_definition_1_0.yaml"); - - private static LinkedHashMap TOSCA_DEF_LOAD_AS_IS = loadTdf(); - - //EntityType.class.getClassLoader().getResourceAsStream("TOSCA_definition_1_0.yaml"); - - @SuppressWarnings("unchecked") - private static LinkedHashMap loadTdf() { - String toscaDefLocation = EntityType.class.getClassLoader().getResource(TOSCA_DEFINITION_1_0_YAML).getFile(); - InputStream input = EntityType.class.getClassLoader().getResourceAsStream(TOSCA_DEFINITION_1_0_YAML); - if (input == null){ - log.error("EntityType - loadTdf - Couldn't load TOSCA_DEF_FILE {}", toscaDefLocation); - } - Yaml yaml = new Yaml(); - Object loaded = yaml.load(input); - //@SuppressWarnings("unchecked") - return (LinkedHashMap) loaded; - } - - // Map of definition with pre-loaded values of TOSCA_DEF_FILE_SECTIONS - public static LinkedHashMap TOSCA_DEF; - static { - TOSCA_DEF = new LinkedHashMap(); - for(String section: TOSCA_DEF_SECTIONS) { - @SuppressWarnings("unchecked") - LinkedHashMap value = (LinkedHashMap)TOSCA_DEF_LOAD_AS_IS.get(section); - if(value != null) { - for(String key: value.keySet()) { - TOSCA_DEF.put(key, value.get(key)); - } - } - } - } - - public static final String DEPENDSON = "tosca.relationships.DependsOn"; - public static final String HOSTEDON = "tosca.relationships.HostedOn"; - public static final String CONNECTSTO = "tosca.relationships.ConnectsTo"; - public static final String ATTACHESTO = "tosca.relationships.AttachesTo"; - public static final String LINKSTO = "tosca.relationships.network.LinksTo"; - public static final String BINDSTO = "tosca.relationships.network.BindsTo"; - - public static final String RELATIONSHIP_TYPE[] = { - "tosca.relationships.DependsOn", - "tosca.relationships.HostedOn", - "tosca.relationships.ConnectsTo", - "tosca.relationships.AttachesTo", - "tosca.relationships.network.LinksTo", - "tosca.relationships.network.BindsTo"}; - - public static final String NODE_PREFIX = "tosca.nodes."; - public static final String RELATIONSHIP_PREFIX = "tosca.relationships."; - public static final String CAPABILITY_PREFIX = "tosca.capabilities."; - public static final String INTERFACE_PREFIX = "tosca.interfaces."; - public static final String ARTIFACT_PREFIX = "tosca.artifacts."; - public static final String POLICY_PREFIX = "tosca.policies."; - public static final String GROUP_PREFIX = "tosca.groups."; - //currently the data types are defined only for network - // but may have changes in the future. - public static final String DATATYPE_PREFIX = "tosca.datatypes."; - public static final String DATATYPE_NETWORK_PREFIX = DATATYPE_PREFIX + "network."; - public static final String TOSCA = "tosca"; - - protected String type; - protected LinkedHashMap defs = null; - public Object getParentType() { return null; } - - public String derivedFrom(LinkedHashMap defs) { - // Return a type this type is derived from - return (String)entityValue(defs, "derived_from"); - } - - public boolean isDerivedFrom(String type_str) { - // Check if object inherits from the given type - // Returns true if this object is derived from 'type_str' - // False otherwise. - if(type == null || this.type.isEmpty()) { - return false; - } - else if(type == type_str) { - return true; - } - else if(getParentType() != null) { - return ((EntityType)getParentType()).isDerivedFrom(type_str); - } - else { - return false; - } - } - - public Object entityValue(LinkedHashMap defs, String key) { - if(defs != null) { - return defs.get(key); - } - return null; - } - - @SuppressWarnings("unchecked") - public Object getValue(String ndtype, LinkedHashMap _defs, boolean parent) { - Object value = null; - if(_defs == null) { - if(defs == null) { - return null; - } - _defs = this.defs; - } - Object defndt = _defs.get(ndtype); - if(defndt != null) { - // copy the value to avoid that next operations add items in the - // item definitions - //value = copy.copy(defs[ndtype]) - value = CopyUtils.copyLhmOrAl(defndt); - } - - if(parent) { - EntityType p = this; - if(p != null) { - while(p != null) { - if(p.defs != null && p.defs.get(ndtype) != null) { - // get the parent value - Object parentValue = p.defs.get(ndtype); - if(value != null) { - if(value instanceof LinkedHashMap) { - for(Map.Entry me: ((LinkedHashMap)parentValue).entrySet()) { - String k = me.getKey(); - if(((LinkedHashMap)value).get(k) == null) { - ((LinkedHashMap)value).put(k,me.getValue()); - } - } - } - if(value instanceof ArrayList) { - for(Object pValue: (ArrayList)parentValue) { - if(!((ArrayList)value).contains(pValue)) { - ((ArrayList)value).add(pValue); - } - } - } - } - else { - // value = copy.copy(parent_value) - value = CopyUtils.copyLhmOrAl(parentValue); - } - } - p = (EntityType)p.getParentType(); - } - } - } - - return value; - } - - @SuppressWarnings("unchecked") - public Object getDefinition(String ndtype) { - Object value = null; - LinkedHashMap _defs; - // no point in hasattr, because we have it, and it - // doesn't do anything except emit an exception anyway - //if not hasattr(self, 'defs'): - // defs = None - // ExceptionCollector.appendException( - // ValidationError(message="defs is " + str(defs))) - //else: - // defs = self.defs - _defs = this.defs; - - - if(_defs != null && _defs.get(ndtype) != null) { - value = _defs.get(ndtype); - } - - Object p = getParentType(); - if(p != null) { - Object inherited = ((EntityType)p).getDefinition(ndtype); - if(inherited != null) { - // inherited = dict(inherited) WTF?!? - if(value == null) { - value = inherited; - } - else { - //????? - //inherited.update(value) - //value.update(inherited) - for(Map.Entry me: ((LinkedHashMap)inherited).entrySet()) { - ((LinkedHashMap)value).put(me.getKey(),me.getValue()); - } - } - } - } - return value; - } - - public static void updateDefinitions(String version) { - ExtTools exttools = new ExtTools(); - String extensionDefsFile = exttools.getDefsFile(version); - - InputStream input = null; - try { - input = new FileInputStream(new File(extensionDefsFile)); - } - catch (FileNotFoundException e) { - log.error("EntityType - updateDefinitions - Failed to open extension defs file ", extensionDefsFile); - return; - } - Yaml yaml = new Yaml(); - LinkedHashMap nfvDefFile = (LinkedHashMap)yaml.load(input); - LinkedHashMap nfvDef = new LinkedHashMap<>(); - for(String section: TOSCA_DEF_SECTIONS) { - if(nfvDefFile.get(section) != null) { - LinkedHashMap value = - (LinkedHashMap)nfvDefFile.get(section); - for(String key: value.keySet()) { - nfvDef.put(key, value.get(key)); - } - } - } - TOSCA_DEF.putAll(nfvDef); - } - -} - -/*python - -from toscaparser.common.exception import ExceptionCollector -from toscaparser.common.exception import ValidationError -from toscaparser.extensions.exttools import ExtTools -import org.openecomp.sdc.toscaparser.api.utils.yamlparser - -log = logging.getLogger('tosca') - - -class EntityType(object): - '''Base class for TOSCA elements.''' - - SECTIONS = (DERIVED_FROM, PROPERTIES, ATTRIBUTES, REQUIREMENTS, - INTERFACES, CAPABILITIES, TYPE, ARTIFACTS) = \ - ('derived_from', 'properties', 'attributes', 'requirements', - 'interfaces', 'capabilities', 'type', 'artifacts') - - TOSCA_DEF_SECTIONS = ['node_types', 'data_types', 'artifact_types', - 'group_types', 'relationship_types', - 'capability_types', 'interface_types', - 'policy_types'] - - '''TOSCA definition file.''' - TOSCA_DEF_FILE = os.path.join( - os.path.dirname(os.path.abspath(__file__)), - "TOSCA_definition_1_0.yaml") - - loader = toscaparser.utils.yamlparser.load_yaml - - TOSCA_DEF_LOAD_AS_IS = loader(TOSCA_DEF_FILE) - - # Map of definition with pre-loaded values of TOSCA_DEF_FILE_SECTIONS - TOSCA_DEF = {} - for section in TOSCA_DEF_SECTIONS: - if section in TOSCA_DEF_LOAD_AS_IS.keys(): - value = TOSCA_DEF_LOAD_AS_IS[section] - for key in value.keys(): - TOSCA_DEF[key] = value[key] - - RELATIONSHIP_TYPE = (DEPENDSON, HOSTEDON, CONNECTSTO, ATTACHESTO, - LINKSTO, BINDSTO) = \ - ('tosca.relationships.DependsOn', - 'tosca.relationships.HostedOn', - 'tosca.relationships.ConnectsTo', - 'tosca.relationships.AttachesTo', - 'tosca.relationships.network.LinksTo', - 'tosca.relationships.network.BindsTo') - - NODE_PREFIX = 'tosca.nodes.' - RELATIONSHIP_PREFIX = 'tosca.relationships.' - CAPABILITY_PREFIX = 'tosca.capabilities.' - INTERFACE_PREFIX = 'tosca.interfaces.' - ARTIFACT_PREFIX = 'tosca.artifacts.' - POLICY_PREFIX = 'tosca.policies.' - GROUP_PREFIX = 'tosca.groups.' - # currently the data types are defined only for network - # but may have changes in the future. - DATATYPE_PREFIX = 'tosca.datatypes.' - DATATYPE_NETWORK_PREFIX = DATATYPE_PREFIX + 'network.' - TOSCA = 'tosca' - - def derived_from(self, defs): - '''Return a type this type is derived from.''' - return self.entity_value(defs, 'derived_from') - - def is_derived_from(self, type_str): - '''Check if object inherits from the given type. - - Returns true if this object is derived from 'type_str'. - False otherwise. - ''' - if not self.type: - return False - elif self.type == type_str: - return True - elif self.parent_type: - return self.parent_type.is_derived_from(type_str) - else: - return False - - def entity_value(self, defs, key): - if key in defs: - return defs[key] - - def get_value(self, ndtype, defs=None, parent=None): - value = None - if defs is None: - if not hasattr(self, 'defs'): - return None - defs = self.defs - if ndtype in defs: - # copy the value to avoid that next operations add items in the - # item definitions - value = copy.copy(defs[ndtype]) - if parent: - p = self - if p: - while p: - if ndtype in p.defs: - # get the parent value - parent_value = p.defs[ndtype] - if value: - if isinstance(value, dict): - for k, v in parent_value.items(): - if k not in value.keys(): - value[k] = v - if isinstance(value, list): - for p_value in parent_value: - if p_value not in value: - value.append(p_value) - else: - value = copy.copy(parent_value) - p = p.parent_type - return value - - def get_definition(self, ndtype): - value = None - if not hasattr(self, 'defs'): - defs = None - ExceptionCollector.appendException( - ValidationError(message="defs is " + str(defs))) - else: - defs = self.defs - if defs is not None and ndtype in defs: - value = defs[ndtype] - p = self.parent_type - if p: - inherited = p.get_definition(ndtype) - if inherited: - inherited = dict(inherited) - if not value: - value = inherited - else: - inherited.update(value) - value.update(inherited) - return value - - -def update_definitions(version): - exttools = ExtTools() - extension_defs_file = exttools.get_defs_file(version) - loader = toscaparser.utils.yamlparser.load_yaml - nfv_def_file = loader(extension_defs_file) - nfv_def = {} - for section in EntityType.TOSCA_DEF_SECTIONS: - if section in nfv_def_file.keys(): - value = nfv_def_file[section] - for key in value.keys(): - nfv_def[key] = value[key] - EntityType.TOSCA_DEF.update(nfv_def) -*/ diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/GroupType.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/GroupType.java deleted file mode 100644 index d226b78..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/GroupType.java +++ /dev/null @@ -1,215 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements; - -import java.util.LinkedHashMap; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -public class GroupType extends StatefulEntityType { - - private static final String DERIVED_FROM = "derived_from"; - private static final String VERSION = "version"; - private static final String METADATA = "metadata"; - private static final String DESCRIPTION = "description"; - private static final String PROPERTIES = "properties"; - private static final String MEMBERS = "members"; - private static final String INTERFACES = "interfaces"; - - private static final String SECTIONS[] = { - DERIVED_FROM, VERSION, METADATA, DESCRIPTION, PROPERTIES, MEMBERS, INTERFACES}; - - private String groupType; - private LinkedHashMap customDef; - private String groupDescription; - private String groupVersion; - //private LinkedHashMap groupProperties; - //private ArrayList groupMembers; - private LinkedHashMap metaData; - - @SuppressWarnings("unchecked") - public GroupType(String _grouptype,LinkedHashMap _customDef) { - super(_grouptype,GROUP_PREFIX,_customDef); - - groupType = _grouptype; - customDef = _customDef; - _validateFields(); - if(defs != null) { - groupDescription = (String)defs.get(DESCRIPTION); - groupVersion = (String)defs.get(VERSION); - //groupProperties = (LinkedHashMap)defs.get(PROPERTIES); - //groupMembers = (ArrayList)defs.get(MEMBERS); - Object mdo = defs.get(METADATA); - if(mdo instanceof LinkedHashMap) { - metaData = (LinkedHashMap)mdo; - } - else { - metaData = null; - } - - if(metaData != null) { - _validateMetadata(metaData); - } - } - } - - public GroupType getParentType() { - // Return a group statefulentity of this entity is derived from. - if(defs == null) { - return null; - } - String pgroupEntity = derivedFrom(defs); - if(pgroupEntity != null) { - return new GroupType(pgroupEntity,customDef); - } - return null; - } - - public String getDescription() { - return groupDescription; - } - - public String getVersion() { - return groupVersion; - } - - @SuppressWarnings("unchecked") - public LinkedHashMap getInterfaces() { - Object ifo = getValue(INTERFACES,null,false); - if(ifo instanceof LinkedHashMap) { - return (LinkedHashMap)ifo; - } - return new LinkedHashMap(); - } - - private void _validateFields() { - if(defs != null) { - for(String name: defs.keySet()) { - boolean bFound = false; - for(String sect: SECTIONS) { - if(name.equals(sect)) { - bFound = true; - break; - } - } - if(!bFound) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "UnknownFieldError: Group Type \"%s\" contains unknown field \"%s\"", - groupType,name)); - } - } - } - } - - @SuppressWarnings("unchecked") - private void _validateMetadata(LinkedHashMap metadata) { - String mtt = (String) metadata.get("type"); - if(mtt != null && !mtt.equals("map") && !mtt.equals("tosca:map")) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "InvalidTypeError: \"%s\" defined in group for metadata is invalid", - mtt)); - } - for(String entrySchema: metadata.keySet()) { - Object estob = metadata.get(entrySchema); - if(estob instanceof LinkedHashMap) { - String est = (String)((LinkedHashMap)estob).get("type"); - if(!est.equals("string")) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "InvalidTypeError: \"%s\" defined in group for metadata \"%s\" is invalid", - est,entrySchema)); - } - } - } - } - - public String getType() { - return groupType; - } - - -} - -/*python - -from toscaparser.common.exception import ExceptionCollector -from toscaparser.common.exception import InvalidTypeError -from toscaparser.common.exception import UnknownFieldError -from toscaparser.elements.statefulentitytype import StatefulEntityType - - -class GroupType(StatefulEntityType): - '''TOSCA built-in group type.''' - - SECTIONS = (DERIVED_FROM, VERSION, METADATA, DESCRIPTION, PROPERTIES, - MEMBERS, INTERFACES) = \ - ("derived_from", "version", "metadata", "description", - "properties", "members", "interfaces") - - def __init__(self, grouptype, custom_def=None): - super(GroupType, self).__init__(grouptype, self.GROUP_PREFIX, - custom_def) - self.custom_def = custom_def - self.grouptype = grouptype - self._validate_fields() - self.group_description = None - if self.DESCRIPTION in self.defs: - self.group_description = self.defs[self.DESCRIPTION] - - self.group_version = None - if self.VERSION in self.defs: - self.group_version = self.defs[self.VERSION] - - self.group_properties = None - if self.PROPERTIES in self.defs: - self.group_properties = self.defs[self.PROPERTIES] - - self.group_members = None - if self.MEMBERS in self.defs: - self.group_members = self.defs[self.MEMBERS] - - if self.METADATA in self.defs: - self.meta_data = self.defs[self.METADATA] - self._validate_metadata(self.meta_data) - - @property - def parent_type(self): - '''Return a group statefulentity of this entity is derived from.''' - if not hasattr(self, 'defs'): - return None - pgroup_entity = self.derived_from(self.defs) - if pgroup_entity: - return GroupType(pgroup_entity, self.custom_def) - - @property - def description(self): - return self.group_description - - @property - def version(self): - return self.group_version - - @property - def interfaces(self): - return self.get_value(self.INTERFACES) - - def _validate_fields(self): - if self.defs: - for name in self.defs.keys(): - if name not in self.SECTIONS: - ExceptionCollector.appendException( - UnknownFieldError(what='Group Type %s' - % self.grouptype, field=name)) - - def _validate_metadata(self, meta_data): - if not meta_data.get('type') in ['map', 'tosca:map']: - ExceptionCollector.appendException( - InvalidTypeError(what='"%s" defined in group for ' - 'metadata' % (meta_data.get('type')))) - for entry_schema, entry_schema_type in meta_data.items(): - if isinstance(entry_schema_type, dict) and not \ - entry_schema_type.get('type') == 'string': - ExceptionCollector.appendException( - InvalidTypeError(what='"%s" defined in group for ' - 'metadata "%s"' - % (entry_schema_type.get('type'), - entry_schema))) -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/InterfacesDef.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/InterfacesDef.java deleted file mode 100644 index 8a2b4dd..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/InterfacesDef.java +++ /dev/null @@ -1,228 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.Map; - -import org.openecomp.sdc.toscaparser.api.EntityTemplate; -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -public class InterfacesDef extends StatefulEntityType { - - public static final String LIFECYCLE = "tosca.interfaces.node.lifecycle.Standard"; - public static final String CONFIGURE = "tosca.interfaces.relationship.Configure"; - public static final String LIFECYCLE_SHORTNAME = "Standard"; - public static final String CONFIGURE_SHORTNAME = "Configure"; - - public static final String SECTIONS[] = { - LIFECYCLE, CONFIGURE, LIFECYCLE_SHORTNAME,CONFIGURE_SHORTNAME - }; - - public static final String IMPLEMENTATION = "implementation"; - public static final String INPUTS = "inputs"; - - public static final String INTERFACEVALUE[] = {IMPLEMENTATION, INPUTS}; - - public static final String INTERFACE_DEF_RESERVED_WORDS[] = { - "type", "inputs", "derived_from", "version", "description"}; - - private EntityType ntype; - private EntityTemplate nodeTemplate; - private String name; - private Object value; - private String implementation; - private LinkedHashMap inputs; - - - @SuppressWarnings("unchecked") - public InterfacesDef(EntityType inodeType, - String interfaceType, - EntityTemplate inodeTemplate, - String iname, - Object ivalue) { - // void - super(); - - ntype = inodeType; - nodeTemplate = inodeTemplate; - type = interfaceType; - name = iname; - value = ivalue; - implementation = null; - inputs = null; - defs = new LinkedHashMap(); - - if(interfaceType.equals(LIFECYCLE_SHORTNAME)) { - interfaceType = LIFECYCLE; - } - if(interfaceType.equals(CONFIGURE_SHORTNAME)) { - interfaceType = CONFIGURE; - } - - // only NodeType has getInterfaces "hasattr(ntype,interfaces)" - // while RelationshipType does not - if(ntype instanceof NodeType) { - if(((NodeType)ntype).getInterfaces() != null && - ((NodeType)ntype).getInterfaces().values().contains(interfaceType)) { - LinkedHashMap nii = (LinkedHashMap) - ((NodeType)ntype).getInterfaces().get(interfaceType); - interfaceType = (String)nii.get("type"); - } - } - if(inodeType != null) { - if(nodeTemplate != null && nodeTemplate.getCustomDef() != null && - nodeTemplate.getCustomDef().values().contains(interfaceType)) { - defs = (LinkedHashMap) - nodeTemplate.getCustomDef().get(interfaceType); - } - else { - defs = (LinkedHashMap)TOSCA_DEF.get(interfaceType); - } - } - - if(ivalue != null) { - if(ivalue instanceof LinkedHashMap) { - for(Map.Entry me: ((LinkedHashMap)ivalue).entrySet()) { - if(me.getKey().equals("implementation")) { - implementation = (String)me.getValue(); - } - else if(me.getKey().equals("inputs")) { - inputs = (LinkedHashMap)me.getValue(); - } - else { - ThreadLocalsHolder.getCollector().appendException(String.format( - "UnknownFieldError: \"interfaces\" of template \"%s\" contain unknown field \"%s\"", - nodeTemplate.getName(),me.getKey())); - } - } - } - else { - implementation = (String)ivalue; - } - } - } - - public ArrayList getLifecycleOps() { - if(defs != null) { - if(type.equals(LIFECYCLE)) { - return _ops(); - } - } - return null; - } - - public ArrayList getConfigureOps() { - if(defs != null) { - if(type.equals(CONFIGURE)) { - return _ops(); - } - } - return null; - } - - private ArrayList _ops() { - return new ArrayList(defs.keySet()); - } - - // getters/setters - - public LinkedHashMap getInputs() { - return inputs; - } - - public void setInput(String name,Object value) { - inputs.put(name, value); - } -} - -/*python - -# 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 toscaparser.common.exception import ExceptionCollector -from toscaparser.common.exception import UnknownFieldError -from toscaparser.elements.statefulentitytype import StatefulEntityType - -SECTIONS = (LIFECYCLE, CONFIGURE, LIFECYCLE_SHORTNAME, - CONFIGURE_SHORTNAME) = \ - ('tosca.interfaces.node.lifecycle.Standard', - 'tosca.interfaces.relationship.Configure', - 'Standard', 'Configure') - -INTERFACEVALUE = (IMPLEMENTATION, INPUTS) = ('implementation', 'inputs') - -INTERFACE_DEF_RESERVED_WORDS = ['type', 'inputs', 'derived_from', 'version', - 'description'] - - -class InterfacesDef(StatefulEntityType): - '''TOSCA built-in interfaces type.''' - - def __init__(self, node_type, interfacetype, - node_template=None, name=None, value=None): - self.ntype = node_type - self.node_template = node_template - self.type = interfacetype - self.name = name - self.value = value - self.implementation = None - self.inputs = None - self.defs = {} - if interfacetype == LIFECYCLE_SHORTNAME: - interfacetype = LIFECYCLE - if interfacetype == CONFIGURE_SHORTNAME: - interfacetype = CONFIGURE - if hasattr(self.ntype, 'interfaces') \ - and self.ntype.interfaces \ - and interfacetype in self.ntype.interfaces: - interfacetype = self.ntype.interfaces[interfacetype]['type'] - if node_type: - if self.node_template and self.node_template.custom_def \ - and interfacetype in self.node_template.custom_def: - self.defs = self.node_template.custom_def[interfacetype] - else: - self.defs = self.TOSCA_DEF[interfacetype] - if value: - if isinstance(self.value, dict): - for i, j in self.value.items(): - if i == IMPLEMENTATION: - self.implementation = j - elif i == INPUTS: - self.inputs = j - else: - what = ('"interfaces" of template "%s"' % - self.node_template.name) - ExceptionCollector.appendException( - UnknownFieldError(what=what, field=i)) - else: - self.implementation = value - - @property - def lifecycle_ops(self): - if self.defs: - if self.type == LIFECYCLE: - return self._ops() - - @property - def configure_ops(self): - if self.defs: - if self.type == CONFIGURE: - return self._ops() - - def _ops(self): - ops = [] - for name in list(self.defs.keys()): - ops.append(name) - return ops -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/Metadata.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/Metadata.java deleted file mode 100644 index 4f7bdd0..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/Metadata.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements; - -import java.util.Map; - -public class Metadata { - - private final Map metadataMap; - - public Metadata(Map metadataMap) { - this.metadataMap = metadataMap; - } - - public String getValue(String key) { - return !isEmpty() ? String.valueOf(this.metadataMap.get(key)) : null; - } - - public void setValue(String key, Object value) { - if (!isEmpty()) { - this.metadataMap.put(key, value); - } - } - - - private boolean isEmpty() { - return this.metadataMap == null || this.metadataMap.size() == 0; - } - - @Override - public String toString() { - return "Metadata{" + - "metadataMap=" + metadataMap + - '}'; - } - -} diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/NodeType.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/NodeType.java deleted file mode 100644 index d5f1a18..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/NodeType.java +++ /dev/null @@ -1,523 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.Map; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.elements.InterfacesDef; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -public class NodeType extends StatefulEntityType { - // TOSCA built-in node type - - private static final String DERIVED_FROM = "derived_from"; - private static final String METADATA = "metadata"; - private static final String PROPERTIES = "properties"; - private static final String VERSION = "version"; - private static final String DESCRIPTION = "description"; - private static final String ATTRIBUTES = "attributes"; - private static final String REQUIREMENTS = "requirements"; - private static final String CAPABILITIES = "capabilities"; - private static final String INTERFACES = "interfaces"; - private static final String ARTIFACTS = "artifacts"; - - private static final String SECTIONS[] = { - DERIVED_FROM, METADATA, PROPERTIES, VERSION, DESCRIPTION, ATTRIBUTES, REQUIREMENTS, CAPABILITIES, INTERFACES, ARTIFACTS - }; - - private String ntype; - public LinkedHashMap customDef; - - public NodeType(String nttype,LinkedHashMap ntcustomDef) { - super(nttype,NODE_PREFIX, ntcustomDef); - ntype = nttype; - customDef = ntcustomDef; - _validateKeys(); - } - - public Object getParentType() { - // Return a node this node is derived from - if(defs == null) { - return null; - } - String pnode = derivedFrom(defs); - if(pnode != null && !pnode.isEmpty()) { - return new NodeType(pnode,customDef); - } - return null; - } - - @SuppressWarnings("unchecked") - public LinkedHashMap getRelationship() { - // Return a dictionary of relationships to other node types - - // This method returns a dictionary of named relationships that nodes - // of the current node type (self) can have to other nodes (of specific - // types) in a TOSCA template. - - LinkedHashMap relationship = new LinkedHashMap<>(); - ArrayList> requires; - Object treq = getAllRequirements(); - if(treq != null) { - // NOTE(sdmonov): Check if requires is a dict. - // If it is a dict convert it to a list of dicts. - // This is needed because currently the code below supports only - // lists as requirements definition. The following check will - // make sure if a map (dict) was provided it will be converted to - // a list before proceeding to the parsing. - if(treq instanceof LinkedHashMap) { - requires = new ArrayList<>(); - for(Map.Entry me: ((LinkedHashMap)treq).entrySet()) { - LinkedHashMap tl = new LinkedHashMap<>(); - tl.put(me.getKey(),me.getValue()); - requires.add(tl); - } - } - else { - requires = (ArrayList>)treq; - } - - String keyword = null; - String nodeType = null; - for(LinkedHashMap require: requires) { - String relation = null; - for(Map.Entry re: require.entrySet()) { - String key = re.getKey(); - LinkedHashMap req = (LinkedHashMap)re.getValue(); - if(req.get("relationship") != null) { - Object trelation = req.get("relationship"); - // trelation is a string or a dict with "type" mapped to the string we want - if(trelation instanceof String) { - relation = (String)trelation; - } - else { - if(((LinkedHashMap)trelation).get("type") != null) { - relation = (String)((LinkedHashMap)trelation).get("type"); - } - } - nodeType = (String)req.get("node"); - //BUG meaningless?? LinkedHashMap value = req; - if(nodeType != null) { - keyword = "node"; - } - else { - // If value is a dict and has a type key - // we need to lookup the node type using - // the capability type - String captype = (String)req.get("capability"); - String value = _getNodeTypeByCap(captype); - String getRelation = _getRelation(key,value); - if (getRelation != null) { - relation = getRelation; - } - keyword = key; - nodeType = value; - } - } - - } - RelationshipType rtype = new RelationshipType(relation, keyword, customDef); - NodeType relatednode = new NodeType(nodeType, customDef); - relationship.put(rtype, relatednode); - } - } - return relationship; - - } - - @SuppressWarnings("unchecked") - private String _getNodeTypeByCap(String cap) { - // Find the node type that has the provided capability - - // This method will lookup all node types if they have the - // provided capability. - - // Filter the node types - ArrayList nodeTypes = new ArrayList<>(); - for(String nt: TOSCA_DEF.keySet()) { - if(nt.startsWith(NODE_PREFIX) && !nt.equals("tosca.nodes.Root")) { - nodeTypes.add(nt); - } - } - for(String nt: nodeTypes) { - LinkedHashMap nodeDef = (LinkedHashMap)TOSCA_DEF.get(nt); - if(nodeDef instanceof LinkedHashMap && nodeDef.get("capabilities") != null) { - LinkedHashMap nodeCaps = (LinkedHashMap)nodeDef.get("capabilities"); - if(nodeCaps != null) { - for(Object val: nodeCaps.values()) { - if(val instanceof LinkedHashMap) { - String tp = (String)((LinkedHashMap)val).get("type"); - if(tp != null && tp.equals(cap)) { - return nt; - } - } - } - } - } - } - return null; - } - - @SuppressWarnings("unchecked") - private String _getRelation(String key,String ndtype) { - String relation = null; - NodeType ntype = new NodeType(ndtype,null); - LinkedHashMap caps = ntype.getCapabilities(); - if(caps != null && caps.get(key) != null) { - CapabilityTypeDef c = caps.get(key); - for(int i=0; i< RELATIONSHIP_TYPE.length; i++) { - String r = RELATIONSHIP_TYPE[i]; - LinkedHashMap rtypedef = (LinkedHashMap)TOSCA_DEF.get(r); - for(Object o: rtypedef.values()) { - LinkedHashMap properties = (LinkedHashMap)o; - if(properties.get(c.getType()) != null) { - relation = r; - break; - } - } - if(relation != null) { - break; - } - else { - for(Object o: rtypedef.values()) { - LinkedHashMap properties = (LinkedHashMap)o; - if(properties.get(c.getParentType()) != null) { - relation = r; - break; - } - } - } - } - } - return relation; - } - - @SuppressWarnings("unchecked") - public ArrayList getCapabilitiesObjects() { - // Return a list of capability objects - ArrayList typecapabilities = new ArrayList<>(); - LinkedHashMap caps = (LinkedHashMap)getValue(CAPABILITIES, null, true); - if(caps != null) { - // 'cname' is symbolic name of the capability - // 'cvalue' is a dict { 'type': } - for(Map.Entry me: caps.entrySet()) { - String cname = me.getKey(); - LinkedHashMap cvalue = (LinkedHashMap)me.getValue(); - String ctype = cvalue.get("type"); - CapabilityTypeDef cap = new CapabilityTypeDef(cname,ctype,type,customDef); - typecapabilities.add(cap); - } - } - return typecapabilities; - } - - public LinkedHashMap getCapabilities() { - // Return a dictionary of capability name-objects pairs - LinkedHashMap caps = new LinkedHashMap<>(); - for(CapabilityTypeDef ctd: getCapabilitiesObjects()) { - caps.put(ctd.getName(),ctd); - } - return caps; - } - - @SuppressWarnings("unchecked") - public ArrayList getRequirements() { - return (ArrayList)getValue(REQUIREMENTS,null,true); - } - - public ArrayList getAllRequirements() { - return getRequirements(); - } - - @SuppressWarnings("unchecked") - public LinkedHashMap getInterfaces() { - return (LinkedHashMap)getValue(INTERFACES,null,false); - } - - - @SuppressWarnings("unchecked") - public ArrayList getLifecycleInputs() - { - // Return inputs to life cycle operations if found - ArrayList inputs = new ArrayList<>(); - LinkedHashMap interfaces = getInterfaces(); - if(interfaces != null) { - for(Map.Entry me: interfaces.entrySet()) { - String iname = me.getKey(); - LinkedHashMap ivalue = (LinkedHashMap)me.getValue(); - if(iname.equals(InterfacesDef.LIFECYCLE)) { - for(Map.Entry ie: ivalue.entrySet()) { - if(ie.getKey().equals("input")) { - LinkedHashMap y = (LinkedHashMap)ie.getValue(); - for(String i: y.keySet()) { - inputs.add(i); - } - } - } - } - } - } - return inputs; - } - - public ArrayList getLifecycleOperations() { - // Return available life cycle operations if found - ArrayList ops = null; - LinkedHashMap interfaces = getInterfaces(); - if(interfaces != null) { - InterfacesDef i = new InterfacesDef(this,InterfacesDef.LIFECYCLE,null,null,null); - ops = i.getLifecycleOps(); - } - return ops; - } - - public CapabilityTypeDef getCapability(String name) { - //BUG?? the python code has to be wrong - // it refers to a bad attribute 'value'... - LinkedHashMap caps = getCapabilities(); - if(caps != null) { - return caps.get(name); - } - return null; - /* - def get_capability(self, name): - caps = self.get_capabilities() - if caps and name in caps.keys(): - return caps[name].value - */ - } - - public String getCapabilityType(String name) { - //BUG?? the python code has to be wrong - // it refers to a bad attribute 'value'... - CapabilityTypeDef captype = getCapability(name); - if(captype != null) { - return captype.getType(); - } - return null; - /* - def get_capability_type(self, name): - captype = self.get_capability(name) - if captype and name in captype.keys(): - return captype[name].value - */ - } - - private void _validateKeys() { - if(defs != null) { - for(String key: defs.keySet()) { - boolean bFound = false; - for(int i=0; i< SECTIONS.length; i++) { - if(key.equals(SECTIONS[i])) { - bFound = true; - break; - } - } - if(!bFound) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "UnknownFieldError: Nodetype \"%s\" has unknown field \"%s\"",ntype,key)); - } - } - } - } - -} - -/*python - -from toscaparser.common.exception import ExceptionCollector -from toscaparser.common.exception import UnknownFieldError -from toscaparser.elements.capabilitytype import CapabilityTypeDef -import org.openecomp.sdc.toscaparser.api.elements.interfaces as ifaces -from toscaparser.elements.interfaces import InterfacesDef -from toscaparser.elements.relationshiptype import RelationshipType -from toscaparser.elements.statefulentitytype import StatefulEntityType - - -class NodeType(StatefulEntityType): - '''TOSCA built-in node type.''' - SECTIONS = (DERIVED_FROM, METADATA, PROPERTIES, VERSION, DESCRIPTION, ATTRIBUTES, REQUIREMENTS, CAPABILITIES, INTERFACES, ARTIFACTS) = \ - ('derived_from', 'metadata', 'properties', 'version', - 'description', 'attributes', 'requirements', 'capabilities', - 'interfaces', 'artifacts') - - def __init__(self, ntype, custom_def=None): - super(NodeType, self).__init__(ntype, self.NODE_PREFIX, custom_def) - self.ntype = ntype - self.custom_def = custom_def - self._validate_keys() - - @property - def parent_type(self): - '''Return a node this node is derived from.''' - if not hasattr(self, 'defs'): - return None - pnode = self.derived_from(self.defs) - if pnode: - return NodeType(pnode, self.custom_def) - - @property - def relationship(self): - '''Return a dictionary of relationships to other node types. - - This method returns a dictionary of named relationships that nodes - of the current node type (self) can have to other nodes (of specific - types) in a TOSCA template. - - ''' - relationship = {} - requires = self.get_all_requirements() - if requires: - # NOTE(sdmonov): Check if requires is a dict. - # If it is a dict convert it to a list of dicts. - # This is needed because currently the code below supports only - # lists as requirements definition. The following check will - # make sure if a map (dict) was provided it will be converted to - # a list before proceeding to the parsing. - if isinstance(requires, dict): - requires = [{key: value} for key, value in requires.items()] - - keyword = None - node_type = None - for require in requires: - for key, req in require.items(): - if 'relationship' in req: - relation = req.get('relationship') - if 'type' in relation: - relation = relation.get('type') - node_type = req.get('node') - value = req - if node_type: - keyword = 'node' - else: - # If value is a dict and has a type key - # we need to lookup the node type using - # the capability type - value = req - if isinstance(value, dict): - captype = value['capability'] - value = (self. - _get_node_type_by_cap(key, captype)) - relation = self._get_relation(key, value) - keyword = key - node_type = value - rtype = RelationshipType(relation, keyword, self.custom_def) - relatednode = NodeType(node_type, self.custom_def) - relationship[rtype] = relatednode - return relationship - - def _get_node_type_by_cap(self, key, cap): - '''Find the node type that has the provided capability - - This method will lookup all node types if they have the - provided capability. - ''' - - # Filter the node types - node_types = [node_type for node_type in self.TOSCA_DEF.keys() - if node_type.startswith(self.NODE_PREFIX) and - node_type != 'tosca.nodes.Root'] - - for node_type in node_types: - node_def = self.TOSCA_DEF[node_type] - if isinstance(node_def, dict) and 'capabilities' in node_def: - node_caps = node_def['capabilities'] - for value in node_caps.values(): - if isinstance(value, dict) and \ - 'type' in value and value['type'] == cap: - return node_type - - def _get_relation(self, key, ndtype): - relation = None - ntype = NodeType(ndtype) - caps = ntype.get_capabilities() - if caps and key in caps.keys(): - c = caps[key] - for r in self.RELATIONSHIP_TYPE: - rtypedef = ntype.TOSCA_DEF[r] - for properties in rtypedef.values(): - if c.type in properties: - relation = r - break - if relation: - break - else: - for properties in rtypedef.values(): - if c.parent_type in properties: - relation = r - break - return relation - - def get_capabilities_objects(self): - '''Return a list of capability objects.''' - typecapabilities = [] - caps = self.get_value(self.CAPABILITIES, None, True) - if caps: - # 'name' is symbolic name of the capability - # 'value' is a dict { 'type': } - for name, value in caps.items(): - ctype = value.get('type') - cap = CapabilityTypeDef(name, ctype, self.type, - self.custom_def) - typecapabilities.append(cap) - return typecapabilities - - def get_capabilities(self): - '''Return a dictionary of capability name-objects pairs.''' - return {cap.name: cap - for cap in self.get_capabilities_objects()} - - @property - def requirements(self): - return self.get_value(self.REQUIREMENTS, None, True) - - def get_all_requirements(self): - return self.requirements - - @property - def interfaces(self): - return self.get_value(self.INTERFACES) - - @property - def lifecycle_inputs(self): - '''Return inputs to life cycle operations if found.''' - inputs = [] - interfaces = self.interfaces - if interfaces: - for name, value in interfaces.items(): - if name == ifaces.LIFECYCLE: - for x, y in value.items(): - if x == 'inputs': - for i in y.iterkeys(): - inputs.append(i) - return inputs - - @property - def lifecycle_operations(self): - '''Return available life cycle operations if found.''' - ops = None - interfaces = self.interfaces - if interfaces: - i = InterfacesDef(self.type, ifaces.LIFECYCLE) - ops = i.lifecycle_ops - return ops - - def get_capability(self, name): - caps = self.get_capabilities() - if caps and name in caps.keys(): - return caps[name].value - - def get_capability_type(self, name): - captype = self.get_capability(name) - if captype and name in captype.keys(): - return captype[name].value - - def _validate_keys(self): - if self.defs: - for key in self.defs.keys(): - if key not in self.SECTIONS: - ExceptionCollector.appendException( - UnknownFieldError(what='Nodetype"%s"' % self.ntype, - field=key)) -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/PolicyType.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/PolicyType.java deleted file mode 100644 index c60bed1..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/PolicyType.java +++ /dev/null @@ -1,290 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements; - -import java.util.ArrayList; -import java.util.LinkedHashMap; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.utils.TOSCAVersionProperty; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -public class PolicyType extends StatefulEntityType { - - private static final String DERIVED_FROM = "derived_from"; - private static final String METADATA = "metadata"; - private static final String PROPERTIES = "properties"; - private static final String VERSION = "version"; - private static final String DESCRIPTION = "description"; - private static final String TARGETS = "targets"; - private static final String TRIGGERS = "triggers"; - private static final String TYPE = "type"; - - private static final String SECTIONS[] = { - DERIVED_FROM, METADATA, PROPERTIES, VERSION, DESCRIPTION, TARGETS, TRIGGERS, TYPE - }; - - private LinkedHashMap customDef; - private String policyDescription; - private Object policyVersion; - private LinkedHashMap properties; - private LinkedHashMap parentPolicies; - private LinkedHashMap metaData; - private ArrayList targetsList; - - - public PolicyType(String _type, LinkedHashMap _customDef) { - super(_type,POLICY_PREFIX,_customDef); - - type = _type; - customDef = _customDef; - _validateKeys(); - - metaData = null; - if(defs != null && defs.get(METADATA) != null) { - metaData = (LinkedHashMap)defs.get(METADATA); - _validateMetadata(metaData); - } - - properties = null; - if(defs != null && defs.get(PROPERTIES) != null) { - properties = (LinkedHashMap)defs.get(PROPERTIES); - } - parentPolicies = _getParentPolicies(); - - policyVersion = null; - if(defs != null && defs.get(VERSION) != null) { - policyVersion = (new TOSCAVersionProperty( - defs.get(VERSION))).getVersion(); - } - - policyDescription = null; - if(defs != null && defs.get(DESCRIPTION) != null) { - policyDescription = (String)defs.get(DESCRIPTION); - } - - targetsList = null; - if(defs != null && defs.get(TARGETS) != null) { - targetsList = (ArrayList)defs.get(TARGETS); - _validateTargets(targetsList,customDef); - } - - } - - private LinkedHashMap _getParentPolicies() { - LinkedHashMap policies = new LinkedHashMap<>(); - String parentPolicy; - if(getParentType() != null) { - parentPolicy = getParentType().getType(); - } - else { - parentPolicy = null; - } - if(parentPolicy != null) { - while(parentPolicy != null && !parentPolicy.equals("tosca.policies.Root")) { - policies.put(parentPolicy, TOSCA_DEF.get(parentPolicy)); - parentPolicy = (String) - ((LinkedHashMap)policies.get(parentPolicy)).get("derived_from);"); - } - } - return policies; - } - - public String getType() { - return type; - } - - public PolicyType getParentType() { - // Return a policy statefulentity of this node is derived from - if(defs == null) { - return null; - } - String ppolicyEntity = derivedFrom(defs); - if(ppolicyEntity != null) { - return new PolicyType(ppolicyEntity,customDef); - } - return null; - } - - public Object getPolicy(String name) { - // Return the definition of a policy field by name - if(defs != null && defs.get(name) != null) { - return defs.get(name); - } - return null; - } - - public ArrayList getTargets() { - // Return targets - return targetsList; - } - - public String getDescription() { - return policyDescription; - } - - public Object getVersion() { - return policyVersion; - } - - private void _validateKeys() { - for(String key: defs.keySet()) { - boolean bFound = false; - for(String sect: SECTIONS) { - if(key.equals(sect)) { - bFound = true; - break; - } - } - if(!bFound) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "UnknownFieldError: Policy \"%s\" contains unknown field \"%s\"", - type,key)); - } - } - } - - private void _validateTargets(ArrayList _targetsList, - LinkedHashMap _customDef) { - for(String nodetype: _targetsList) { - if(_customDef.get(nodetype) == null) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "InvalidTypeError: \"%s\" defined in targets for policy \"%s\"", - nodetype,type)); - - } - } - } - - private void _validateMetadata(LinkedHashMap _metaData) { - String mtype = (String)_metaData.get("type"); - if(mtype != null && !mtype.equals("map") && !mtype.equals("tosca:map")) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "InvalidTypeError: \"%s\" defined in policy for metadata", - mtype)); - } - for(String entrySchema: metaData.keySet()) { - Object estob = metaData.get(entrySchema); - if(estob instanceof LinkedHashMap) { - String est = (String) - ((LinkedHashMap)estob).get("type"); - if(!est.equals("string")) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "InvalidTypeError: \"%s\" defined in policy for metadata \"%s\"", - est,entrySchema)); - } - } - } - } - -} - -/*python - -from toscaparser.common.exception import ExceptionCollector -from toscaparser.common.exception import InvalidTypeError -from toscaparser.common.exception import UnknownFieldError -from toscaparser.elements.statefulentitytype import StatefulEntityType -from toscaparser.utils.validateutils import TOSCAVersionProperty - - -class PolicyType(StatefulEntityType): - - '''TOSCA built-in policies type.''' - SECTIONS = (DERIVED_FROM, METADATA, PROPERTIES, VERSION, DESCRIPTION, TARGETS) = \ - ('derived_from', 'metadata', 'properties', 'version', - 'description', 'targets') - - def __init__(self, ptype, custom_def=None): - super(PolicyType, self).__init__(ptype, self.POLICY_PREFIX, - custom_def) - self.type = ptype - self.custom_def = custom_def - self._validate_keys() - - self.meta_data = None - if self.METADATA in self.defs: - self.meta_data = self.defs[self.METADATA] - self._validate_metadata(self.meta_data) - - self.properties = None - if self.PROPERTIES in self.defs: - self.properties = self.defs[self.PROPERTIES] - self.parent_policies = self._get_parent_policies() - - self.policy_version = None - if self.VERSION in self.defs: - self.policy_version = TOSCAVersionProperty( - self.defs[self.VERSION]).get_version() - - self.policy_description = self.defs[self.DESCRIPTION] \ - if self.DESCRIPTION in self.defs else None - - self.targets_list = None - if self.TARGETS in self.defs: - self.targets_list = self.defs[self.TARGETS] - self._validate_targets(self.targets_list, custom_def) - - def _get_parent_policies(self): - policies = {} - parent_policy = self.parent_type.type if self.parent_type else None - if parent_policy: - while parent_policy != 'tosca.policies.Root': - policies[parent_policy] = self.TOSCA_DEF[parent_policy] - parent_policy = policies[parent_policy]['derived_from'] - return policies - - @property - def parent_type(self): - '''Return a policy statefulentity of this node is derived from.''' - if not hasattr(self, 'defs'): - return None - ppolicy_entity = self.derived_from(self.defs) - if ppolicy_entity: - return PolicyType(ppolicy_entity, self.custom_def) - - def get_policy(self, name): - '''Return the definition of a policy field by name.''' - if name in self.defs: - return self.defs[name] - - @property - def targets(self): - '''Return targets.''' - return self.targets_list - - @property - def description(self): - return self.policy_description - - @property - def version(self): - return self.policy_version - - def _validate_keys(self): - for key in self.defs.keys(): - if key not in self.SECTIONS: - ExceptionCollector.appendException( - UnknownFieldError(what='Policy "%s"' % self.type, - field=key)) - - def _validate_targets(self, targets_list, custom_def): - for nodetype in targets_list: - if nodetype not in custom_def: - ExceptionCollector.appendException( - InvalidTypeError(what='"%s" defined in targets for ' - 'policy "%s"' % (nodetype, self.type))) - - def _validate_metadata(self, meta_data): - if not meta_data.get('type') in ['map', 'tosca:map']: - ExceptionCollector.appendException( - InvalidTypeError(what='"%s" defined in policy for ' - 'metadata' % (meta_data.get('type')))) - - for entry_schema, entry_schema_type in meta_data.items(): - if isinstance(entry_schema_type, dict) and not \ - entry_schema_type.get('type') == 'string': - ExceptionCollector.appendException( - InvalidTypeError(what='"%s" defined in policy for ' - 'metadata "%s"' - % (entry_schema_type.get('type'), - entry_schema))) -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/PortSpec.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/PortSpec.java deleted file mode 100644 index 8d490ee..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/PortSpec.java +++ /dev/null @@ -1,160 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements; - -import java.util.LinkedHashMap; - -import org.openecomp.sdc.toscaparser.api.DataEntity; -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; -import org.openecomp.sdc.toscaparser.api.utils.ValidateUtils; - -public class PortSpec { - // Parent class for tosca.datatypes.network.PortSpec type - - private static final String SHORTNAME = "PortSpec"; - private static final String TYPE_URI = "tosca.datatypes.network." + SHORTNAME; - - private static final String PROTOCOL = "protocol"; - private static final String SOURCE = "source"; - private static final String SOURCE_RANGE = "source_range"; - private static final String TARGET = "target"; - private static final String TARGET_RANGE = "target_range"; - - private static final String PROPERTY_NAMES[] = { - PROTOCOL, SOURCE, SOURCE_RANGE, - TARGET, TARGET_RANGE - }; - - // todo(TBD) May want to make this a subclass of DataType - // and change init method to set PortSpec's properties - public PortSpec() { - - } - - // The following additional requirements MUST be tested: - // 1) A valid PortSpec MUST have at least one of the following properties: - // target, target_range, source or source_range. - // 2) A valid PortSpec MUST have a value for the source property that - // is within the numeric range specified by the property source_range - // when source_range is specified. - // 3) A valid PortSpec MUST have a value for the target property that is - // within the numeric range specified by the property target_range - // when target_range is specified. - public static void validateAdditionalReq(Object _properties, - String propName, - LinkedHashMap custom_def) { - - try { - LinkedHashMap properties = (LinkedHashMap)_properties; - Object source = properties.get(PortSpec.SOURCE); - Object sourceRange = properties.get(PortSpec.SOURCE_RANGE); - Object target = properties.get(PortSpec.TARGET); - Object targetRange = properties.get(PortSpec.TARGET_RANGE); - - // verify one of the specified values is set - if(source == null && sourceRange == null && - target == null && targetRange == null) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "InvalidTypeAdditionalRequirementsError: Additional requirements for type \"%s\" not met", - TYPE_URI)); - } - // Validate source value is in specified range - if(source != null && sourceRange != null) { - ValidateUtils.validateValueInRange(source,sourceRange,SOURCE); - } - else { - DataEntity portdef = new DataEntity("PortDef", source, null, SOURCE); - portdef.validate(); - } - // Validate target value is in specified range - if(target != null && targetRange != null) { - ValidateUtils.validateValueInRange(target,targetRange,SOURCE); - } - else { - DataEntity portdef = new DataEntity("PortDef", source, null, TARGET); - portdef.validate(); - } - } - catch(Exception e) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError: \"%s\" do not meet requirements for type \"%s\"", - _properties.toString(),SHORTNAME)); - } - } - -} - -/*python - -from toscaparser.common.exception import ExceptionCollector -from toscaparser.common.exception import InvalidTypeAdditionalRequirementsError -from toscaparser.utils.gettextutils import _ -import org.openecomp.sdc.toscaparser.api.utils.validateutils as validateutils - -log = logging.getLogger('tosca') - - -class PortSpec(object): - '''Parent class for tosca.datatypes.network.PortSpec type.''' - - SHORTNAME = 'PortSpec' - TYPE_URI = 'tosca.datatypes.network.' + SHORTNAME - - PROPERTY_NAMES = ( - PROTOCOL, SOURCE, SOURCE_RANGE, - TARGET, TARGET_RANGE - ) = ( - 'protocol', 'source', 'source_range', - 'target', 'target_range' - ) - - # TODO(TBD) May want to make this a subclass of DataType - # and change init method to set PortSpec's properties - def __init__(self): - pass - - # The following additional requirements MUST be tested: - # 1) A valid PortSpec MUST have at least one of the following properties: - # target, target_range, source or source_range. - # 2) A valid PortSpec MUST have a value for the source property that - # is within the numeric range specified by the property source_range - # when source_range is specified. - # 3) A valid PortSpec MUST have a value for the target property that is - # within the numeric range specified by the property target_range - # when target_range is specified. - @staticmethod - def validate_additional_req(properties, prop_name, custom_def=None, ): - try: - source = properties.get(PortSpec.SOURCE) - source_range = properties.get(PortSpec.SOURCE_RANGE) - target = properties.get(PortSpec.TARGET) - target_range = properties.get(PortSpec.TARGET_RANGE) - - # verify one of the specified values is set - if source is None and source_range is None and \ - target is None and target_range is None: - ExceptionCollector.appendException( - InvalidTypeAdditionalRequirementsError( - type=PortSpec.TYPE_URI)) - # Validate source value is in specified range - if source and source_range: - validateutils.validate_value_in_range(source, source_range, - PortSpec.SOURCE) - else: - from toscaparser.dataentity import DataEntity - portdef = DataEntity('PortDef', source, None, PortSpec.SOURCE) - portdef.validate() - # Validate target value is in specified range - if target and target_range: - validateutils.validate_value_in_range(target, target_range, - PortSpec.TARGET) - else: - from toscaparser.dataentity import DataEntity - portdef = DataEntity('PortDef', source, None, PortSpec.TARGET) - portdef.validate() - except Exception: - msg = _('"%(value)s" do not meet requirements ' - 'for type "%(type)s".') \ - % {'value': properties, 'type': PortSpec.SHORTNAME} - ExceptionCollector.appendException( - ValueError(msg)) -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/PropertyDef.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/PropertyDef.java deleted file mode 100644 index c139eb6..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/PropertyDef.java +++ /dev/null @@ -1,231 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements; - -import java.util.LinkedHashMap; -import java.util.Map; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -public class PropertyDef { - - private static final String PROPERTY_KEYNAME_DEFAULT = "default"; - private static final String PROPERTY_KEYNAME_REQUIRED = "required"; - private static final String PROPERTY_KEYNAME_STATUS = "status"; - private static final String VALID_PROPERTY_KEYNAMES[] = { - PROPERTY_KEYNAME_DEFAULT, - PROPERTY_KEYNAME_REQUIRED, - PROPERTY_KEYNAME_STATUS}; - - private static final boolean PROPERTY_REQUIRED_DEFAULT = true; - - private static final String VALID_REQUIRED_VALUES[] = {"true", "false"}; - - private static final String PROPERTY_STATUS_SUPPORTED = "supported"; - private static final String PROPERTY_STATUS_EXPERIMENTAL = "experimental"; - private static final String VALID_STATUS_VALUES[] = { - PROPERTY_STATUS_SUPPORTED, PROPERTY_STATUS_EXPERIMENTAL}; - - private static final String PROPERTY_STATUS_DEFAULT = PROPERTY_STATUS_SUPPORTED; - - private String name; - private Object value; - private LinkedHashMap schema; - private String _status; - private boolean _required; - - public PropertyDef(String pdName, Object pdValue, - LinkedHashMap pdSchema) { - name = pdName; - value = pdValue; - schema = pdSchema; - _status = PROPERTY_STATUS_DEFAULT; - _required = PROPERTY_REQUIRED_DEFAULT; - - if(schema != null) { - // Validate required 'type' property exists - if(schema.get("type") == null) { - //msg = (_('Schema definition of "%(pname)s" must have a "type" ' - // 'attribute.') % dict(pname=self.name)) - ThreadLocalsHolder.getCollector().appendException(String.format( - "InvalidSchemaError: Schema definition of \"%s\" must have a \"type\" attribute",name)); - } - _loadRequiredAttrFromSchema(); - _loadStatusAttrFromSchema(); - } - } - - public Object getDefault() { - if(schema != null) { - for(Map.Entry me: schema.entrySet()) { - if(me.getKey().equals(PROPERTY_KEYNAME_DEFAULT)) { - return me.getValue(); - } - } - } - return null; - } - - public boolean isRequired() { - return _required; - } - - private void _loadRequiredAttrFromSchema() { - // IF 'required' keyname exists verify it's a boolean, - // if so override default - Object val = schema.get(PROPERTY_KEYNAME_REQUIRED); - if(val != null) { - if(val instanceof Boolean) { - _required = (boolean)val; - } - else { - //valid_values = ', '.join(self.VALID_REQUIRED_VALUES) - //attr = self.PROPERTY_KEYNAME_REQUIRED - //TOSCAException.generate_inv_schema_property_error(self, - // attr, - // value, - // valid_values) - ThreadLocalsHolder.getCollector().appendException(String.format( - "Schema definition of \"%s\" has \"required\" attribute with an invalid value", - name)); - } - } - } - - public String getStatus() { - return _status; - } - - private void _loadStatusAttrFromSchema() { - // IF 'status' keyname exists verify it's a boolean, - // if so override default - String sts = (String)schema.get(PROPERTY_KEYNAME_STATUS); - if(sts != null) { - boolean bFound = false; - for(String vsv: VALID_STATUS_VALUES) { - if(vsv.equals(sts)) { - bFound = true; - break; - } - } - if(bFound) { - _status = sts; - } - else { - //valid_values = ', '.join(self.VALID_STATUS_VALUES) - //attr = self.PROPERTY_KEYNAME_STATUS - //TOSCAException.generate_inv_schema_property_error(self, - // attr, - // value, - // valid_values) - ThreadLocalsHolder.getCollector().appendWarning(String.format( - "Schema definition of \"%s\" has \"status\" attribute with an invalid value", - name)); - } - } - } - - public String getName() { - return name; - } - - public LinkedHashMap getSchema() { - return schema; - } - - public Object getPDValue() { - // there's getValue in EntityType... - return value; - } - -} -/*python - -from toscaparser.common.exception import ExceptionCollector -from toscaparser.common.exception import InvalidSchemaError -from toscaparser.common.exception import TOSCAException -from toscaparser.utils.gettextutils import _ - - -class PropertyDef(object): - '''TOSCA built-in Property type.''' - - VALID_PROPERTY_KEYNAMES = (PROPERTY_KEYNAME_DEFAULT, - PROPERTY_KEYNAME_REQUIRED, - PROPERTY_KEYNAME_STATUS) = \ - ('default', 'required', 'status') - - PROPERTY_REQUIRED_DEFAULT = True - - VALID_REQUIRED_VALUES = ['true', 'false'] - VALID_STATUS_VALUES = (PROPERTY_STATUS_SUPPORTED, - PROPERTY_STATUS_EXPERIMENTAL) = \ - ('supported', 'experimental') - - PROPERTY_STATUS_DEFAULT = PROPERTY_STATUS_SUPPORTED - - def __init__(self, name, value=None, schema=None): - self.name = name - self.value = value - self.schema = schema - self._status = self.PROPERTY_STATUS_DEFAULT - self._required = self.PROPERTY_REQUIRED_DEFAULT - - # Validate required 'type' property exists - try: - self.schema['type'] - except KeyError: - msg = (_('Schema definition of "%(pname)s" must have a "type" ' - 'attribute.') % dict(pname=self.name)) - ExceptionCollector.appendException( - InvalidSchemaError(message=msg)) - - if self.schema: - self._load_required_attr_from_schema() - self._load_status_attr_from_schema() - - @property - def default(self): - if self.schema: - for prop_key, prop_value in self.schema.items(): - if prop_key == self.PROPERTY_KEYNAME_DEFAULT: - return prop_value - return None - - @property - def required(self): - return self._required - - def _load_required_attr_from_schema(self): - # IF 'required' keyname exists verify it's a boolean, - # if so override default - if self.PROPERTY_KEYNAME_REQUIRED in self.schema: - value = self.schema[self.PROPERTY_KEYNAME_REQUIRED] - if isinstance(value, bool): - self._required = value - else: - valid_values = ', '.join(self.VALID_REQUIRED_VALUES) - attr = self.PROPERTY_KEYNAME_REQUIRED - TOSCAException.generate_inv_schema_property_error(self, - attr, - value, - valid_values) - - @property - def status(self): - return self._status - - def _load_status_attr_from_schema(self): - # IF 'status' keyname exists verify it's a valid value, - # if so override default - if self.PROPERTY_KEYNAME_STATUS in self.schema: - value = self.schema[self.PROPERTY_KEYNAME_STATUS] - if value in self.VALID_STATUS_VALUES: - self._status = value - else: - valid_values = ', '.join(self.VALID_STATUS_VALUES) - attr = self.PROPERTY_KEYNAME_STATUS - TOSCAException.generate_inv_schema_property_error(self, - attr, - value, - valid_values) -*/ diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/RelationshipType.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/RelationshipType.java deleted file mode 100644 index 3903941..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/RelationshipType.java +++ /dev/null @@ -1,103 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements; - -import java.util.LinkedHashMap; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.elements.EntityType; -import org.openecomp.sdc.toscaparser.api.elements.StatefulEntityType; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -public class RelationshipType extends StatefulEntityType { - - private static final String DERIVED_FROM = "derived_from"; - private static final String VALID_TARGET_TYPES = "valid_target_types"; - private static final String INTERFACES = "interfaces"; - private static final String ATTRIBUTES = "attributes"; - private static final String PROPERTIES = "properties"; - private static final String DESCRIPTION = "description"; - private static final String VERSION = "version"; - private static final String CREDENTIAL = "credential"; - - private static final String SECTIONS[] = { - DERIVED_FROM, VALID_TARGET_TYPES, INTERFACES, - ATTRIBUTES, PROPERTIES, DESCRIPTION, VERSION, CREDENTIAL}; - - private String capabilityName; - private LinkedHashMap customDef; - - public RelationshipType(String _type, String _capabilityName, LinkedHashMap _customDef) { - super(_type,RELATIONSHIP_PREFIX,_customDef); - capabilityName = _capabilityName; - customDef = _customDef; - } - - public RelationshipType getParentType() { - // Return a relationship this reletionship is derived from.''' - String prel = derivedFrom(defs); - if(prel != null) { - return new RelationshipType(prel,null,customDef); - } - return null; - } - - public Object getValidTargetTypes() { - return entityValue(defs,"valid_target_types"); - } - - private void _validateKeys() { - for(String key: defs.keySet()) { - boolean bFound = false; - for(int i=0; i< SECTIONS.length; i++) { - if(key.equals(SECTIONS[i])) { - bFound = true; - break; - } - } - if(!bFound) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "UnknownFieldError: Relationshiptype \"%s\" has unknown field \"%s\"",type,key)); - } - } - } -} - -/*python - -from toscaparser.common.exception import ExceptionCollector -from toscaparser.common.exception import UnknownFieldError -from toscaparser.elements.statefulentitytype import StatefulEntityType - - -class RelationshipType(StatefulEntityType): - '''TOSCA built-in relationship type.''' - SECTIONS = (DERIVED_FROM, VALID_TARGET_TYPES, INTERFACES, - ATTRIBUTES, PROPERTIES, DESCRIPTION, VERSION, - CREDENTIAL) = ('derived_from', 'valid_target_types', - 'interfaces', 'attributes', 'properties', - 'description', 'version', 'credential') - - def __init__(self, type, capability_name=None, custom_def=None): - super(RelationshipType, self).__init__(type, self.RELATIONSHIP_PREFIX, - custom_def) - self.capability_name = capability_name - self.custom_def = custom_def - self._validate_keys() - - @property - def parent_type(self): - '''Return a relationship this reletionship is derived from.''' - prel = self.derived_from(self.defs) - if prel: - return RelationshipType(prel, self.custom_def) - - @property - def valid_target_types(self): - return self.entity_value(self.defs, 'valid_target_types') - - def _validate_keys(self): - for key in self.defs.keys(): - if key not in self.SECTIONS: - ExceptionCollector.appendException( - UnknownFieldError(what='Relationshiptype "%s"' % self.type, - field=key)) -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/ScalarUnit.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/ScalarUnit.java deleted file mode 100644 index de18cd6..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/ScalarUnit.java +++ /dev/null @@ -1,262 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements; - -import java.util.HashMap; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; -import org.openecomp.sdc.toscaparser.api.utils.ValidateUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public abstract class ScalarUnit { - - private static Logger log = LoggerFactory.getLogger(ScalarUnit.class.getName()); - - private static final String SCALAR_UNIT_SIZE = "scalar-unit.size"; - private static final String SCALAR_UNIT_FREQUENCY = "scalar-unit.frequency"; - private static final String SCALAR_UNIT_TIME = "scalar-unit.time"; - - public static final String SCALAR_UNIT_TYPES[] = { - SCALAR_UNIT_SIZE, SCALAR_UNIT_FREQUENCY, SCALAR_UNIT_TIME - }; - - private Object value; - protected HashMap SCALAR_UNIT_DICT; - protected String SCALAR_UNIT_DEFAULT; - - public ScalarUnit(Object _value) { - value = _value; - SCALAR_UNIT_DICT = new HashMap<>(); - SCALAR_UNIT_DEFAULT = ""; - } - - - private String _checkUnitInScalarStandardUnits(String inputUnit) { - // Check whether the input unit is following specified standard - - // If unit is not following specified standard, convert it to standard - // unit after displaying a warning message. - - if(SCALAR_UNIT_DICT.get(inputUnit) != null) { - return inputUnit; - } - else { - for(String key: SCALAR_UNIT_DICT.keySet()) { - if(key.toUpperCase().equals(inputUnit.toUpperCase())) { - log.debug("ScalarUnit - _checkUnitInScalarStandardUnits - \n" + - "The unit {} does not follow scalar unit standards\n" + - "using {} instead", - inputUnit, key); - return key; - } - } - ThreadLocalsHolder.getCollector().appendWarning(String.format( - "'The unit \"%s\" is not valid. Valid units are \n%s", - inputUnit,SCALAR_UNIT_DICT.keySet().toString())); - return inputUnit; - } - } - - public Object validateScalarUnit() { - Pattern pattern = Pattern.compile("([0-9.]+)\\s*(\\w+)"); - Matcher matcher = pattern.matcher(value.toString()); - if(matcher.find()) { - ValidateUtils.strToNum(matcher.group(1)); - String scalarUnit = _checkUnitInScalarStandardUnits(matcher.group(2)); - value = matcher.group(1) + " " + scalarUnit; - } - else { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError: \"%s\" is not a valid scalar-unit",value.toString())); - } - return value; - } - - public double getNumFromScalarUnit(String unit) { - if(unit != null) { - unit = _checkUnitInScalarStandardUnits(unit); - } - else { - unit = SCALAR_UNIT_DEFAULT; - } - Pattern pattern = Pattern.compile("([0-9.]+)\\s*(\\w+)"); - Matcher matcher = pattern.matcher(value.toString()); - if(matcher.find()) { - ValidateUtils.strToNum(matcher.group(1)); - String scalarUnit = _checkUnitInScalarStandardUnits(matcher.group(2)); - value = matcher.group(1) + " " + scalarUnit; - Object on1 = ValidateUtils.strToNum(matcher.group(1)) != null ? ValidateUtils.strToNum(matcher.group(1)) : 0; - Object on2 = SCALAR_UNIT_DICT.get(matcher.group(2)) != null ? SCALAR_UNIT_DICT.get(matcher.group(2)) : 0; - Object on3 = SCALAR_UNIT_DICT.get(unit) != null ? SCALAR_UNIT_DICT.get(unit) : 0; - - Double n1 = new Double(on1.toString()); - Double n2 = new Double(on2.toString()); - Double n3 = new Double(on3.toString()); - double converted = n1 * n2 / n3; - if(Math.abs(converted - Math.round(converted)) < 0.0000000000001 ) { - converted = Math.round(converted); - } - return converted; - } - return 0l; //??? - } - - protected static HashMap scalarunitMapping = _getScalarunitMappings(); - - private static HashMap _getScalarunitMappings() { - HashMap map = new HashMap<>(); - map.put(SCALAR_UNIT_FREQUENCY,"ScalarUnitFrequency"); - map.put(SCALAR_UNIT_SIZE, "ScalarUnitSize"); - map.put(SCALAR_UNIT_TIME, "ScalarUnit_Time"); - return map; - } - - public static ScalarUnit getScalarunitClass(String type,Object val) { - if(type.equals(SCALAR_UNIT_SIZE)) { - return new ScalarUnitSize(val); - } - else if(type.equals(SCALAR_UNIT_TIME)) { - return new ScalarUnitTime(val); - } - else if(type.equals(SCALAR_UNIT_FREQUENCY)) { - return new ScalarUnitFrequency(val); - } - return null; - } - - public static double getScalarunitValue(String type, Object value, String unit) { - if(type.equals(SCALAR_UNIT_SIZE)) { - return (new ScalarUnitSize(value)).getNumFromScalarUnit(unit); - } - if(type.equals(SCALAR_UNIT_TIME)) { - return (new ScalarUnitTime(value)).getNumFromScalarUnit(unit); - } - if(type.equals(SCALAR_UNIT_FREQUENCY)) { - return (new ScalarUnitFrequency(value)).getNumFromScalarUnit(unit); - } - ThreadLocalsHolder.getCollector().appendException(String.format( - "TypeError: \"%s\" is not a valid scalar-unit type",type)); - return 0.0; - } - -} - -/*python - -from toscaparser.common.exception import ExceptionCollector -from toscaparser.utils.gettextutils import _ -from toscaparser.utils import validateutils - -log = logging.getLogger('tosca') - - -class ScalarUnit(object): - '''Parent class for scalar-unit type.''' - - SCALAR_UNIT_TYPES = ( - SCALAR_UNIT_SIZE, SCALAR_UNIT_FREQUENCY, SCALAR_UNIT_TIME - ) = ( - 'scalar-unit.size', 'scalar-unit.frequency', 'scalar-unit.time' - ) - - def __init__(self, value): - self.value = value - - def _check_unit_in_scalar_standard_units(self, input_unit): - """Check whether the input unit is following specified standard - - If unit is not following specified standard, convert it to standard - unit after displaying a warning message. - """ - if input_unit in self.SCALAR_UNIT_DICT.keys(): - return input_unit - else: - for key in self.SCALAR_UNIT_DICT.keys(): - if key.upper() == input_unit.upper(): - log.warning(_('The unit "%(unit)s" does not follow ' - 'scalar unit standards; using "%(key)s" ' - 'instead.') % {'unit': input_unit, - 'key': key}) - return key - msg = (_('The unit "%(unit)s" is not valid. Valid units are ' - '"%(valid_units)s".') % - {'unit': input_unit, - 'valid_units': sorted(self.SCALAR_UNIT_DICT.keys())}) - ExceptionCollector.appendException(ValueError(msg)) - - def validate_scalar_unit(self): - regex = re.compile('([0-9.]+)\s*(\w+)') - try: - result = regex.match(str(self.value)).groups() - validateutils.str_to_num(result[0]) - scalar_unit = self._check_unit_in_scalar_standard_units(result[1]) - self.value = ' '.join([result[0], scalar_unit]) - return self.value - - except Exception: - ExceptionCollector.appendException( - ValueError(_('"%s" is not a valid scalar-unit.') - % self.value)) - - def get_num_from_scalar_unit(self, unit=None): - if unit: - unit = self._check_unit_in_scalar_standard_units(unit) - else: - unit = self.SCALAR_UNIT_DEFAULT - self.validate_scalar_unit() - - regex = re.compile('([0-9.]+)\s*(\w+)') - result = regex.match(str(self.value)).groups() - converted = (float(validateutils.str_to_num(result[0])) - * self.SCALAR_UNIT_DICT[result[1]] - / self.SCALAR_UNIT_DICT[unit]) - if converted - int(converted) < 0.0000000000001: - converted = int(converted) - return converted - - -class ScalarUnit_Size(ScalarUnit): - - SCALAR_UNIT_DEFAULT = 'B' - SCALAR_UNIT_DICT = {'B': 1, 'kB': 1000, 'KiB': 1024, 'MB': 1000000, - 'MiB': 1048576, 'GB': 1000000000, - 'GiB': 1073741824, 'TB': 1000000000000, - 'TiB': 1099511627776} - - -class ScalarUnit_Time(ScalarUnit): - - SCALAR_UNIT_DEFAULT = 'ms' - SCALAR_UNIT_DICT = {'d': 86400, 'h': 3600, 'm': 60, 's': 1, - 'ms': 0.001, 'us': 0.000001, 'ns': 0.000000001} - - -class ScalarUnit_Frequency(ScalarUnit): - - SCALAR_UNIT_DEFAULT = 'GHz' - SCALAR_UNIT_DICT = {'Hz': 1, 'kHz': 1000, - 'MHz': 1000000, 'GHz': 1000000000} - - -scalarunit_mapping = { - ScalarUnit.SCALAR_UNIT_FREQUENCY: ScalarUnit_Frequency, - ScalarUnit.SCALAR_UNIT_SIZE: ScalarUnit_Size, - ScalarUnit.SCALAR_UNIT_TIME: ScalarUnit_Time, - } - - -def get_scalarunit_class(type): - return scalarunit_mapping.get(type) - - -def get_scalarunit_value(type, value, unit=None): - if type in ScalarUnit.SCALAR_UNIT_TYPES: - ScalarUnit_Class = get_scalarunit_class(type) - return (ScalarUnit_Class(value). - get_num_from_scalar_unit(unit)) - else: - ExceptionCollector.appendException( - TypeError(_('"%s" is not a valid scalar-unit type.') % type)) -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/ScalarUnitFrequency.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/ScalarUnitFrequency.java deleted file mode 100644 index 57a111e..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/ScalarUnitFrequency.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements; - -public class ScalarUnitFrequency extends ScalarUnit { - - public ScalarUnitFrequency(Object value) { - super(value); - SCALAR_UNIT_DEFAULT = "GHz"; - SCALAR_UNIT_DICT.put("Hz",1L); - SCALAR_UNIT_DICT.put("kHz",1000L); - SCALAR_UNIT_DICT.put("MHz",1000000L); - SCALAR_UNIT_DICT.put("GHz",1000000000L); - } - -} diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/ScalarUnitSize.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/ScalarUnitSize.java deleted file mode 100644 index 72e7c33..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/ScalarUnitSize.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements; - -public class ScalarUnitSize extends ScalarUnit { - - public ScalarUnitSize(Object value) { - super(value); - - SCALAR_UNIT_DEFAULT = "B"; - SCALAR_UNIT_DICT.put("B",1L); - SCALAR_UNIT_DICT.put("kB",1000L); - SCALAR_UNIT_DICT.put("kiB",1024L); - SCALAR_UNIT_DICT.put("MB",1000000L); - SCALAR_UNIT_DICT.put("MiB",1048576L); - SCALAR_UNIT_DICT.put("GB",1000000000L); - SCALAR_UNIT_DICT.put("GiB",1073741824L); - SCALAR_UNIT_DICT.put("TB",1000000000000L); - SCALAR_UNIT_DICT.put("TiB",1099511627776L); - } -} diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/ScalarUnitTime.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/ScalarUnitTime.java deleted file mode 100644 index 5cde10a..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/ScalarUnitTime.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements; - -public class ScalarUnitTime extends ScalarUnit { - - public ScalarUnitTime(Object value) { - super(value); - SCALAR_UNIT_DEFAULT = "ms"; - SCALAR_UNIT_DICT.put("d",86400L); - SCALAR_UNIT_DICT.put("h",3600L); - SCALAR_UNIT_DICT.put("m",60L); - SCALAR_UNIT_DICT.put("s",1L); - SCALAR_UNIT_DICT.put("ms",0.001); - SCALAR_UNIT_DICT.put("us",0.000001); - SCALAR_UNIT_DICT.put("ns",0.000000001); - } - -} diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/StatefulEntityType.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/StatefulEntityType.java deleted file mode 100644 index 5ab816f..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/StatefulEntityType.java +++ /dev/null @@ -1,220 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.Map; - -import org.openecomp.sdc.toscaparser.api.UnsupportedType; -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.elements.AttributeDef; -import org.openecomp.sdc.toscaparser.api.elements.EntityType; -import org.openecomp.sdc.toscaparser.api.elements.PropertyDef; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - - -public class StatefulEntityType extends EntityType { - // Class representing TOSCA states - - public static final String interfacesNodeLifecycleOperations[] = { - "create", "configure", "start", "stop", "delete"}; - - public static final String interfacesRelationshipConfigureOperations[] = { - "post_configure_source", "post_configure_target", "add_target", "remove_target"}; - - public StatefulEntityType() { - // void constructor for subclasses that don't want super - } - - @SuppressWarnings("unchecked") - public StatefulEntityType(String entityType, String prefix, LinkedHashMap customDef) { - - String entireEntityType = entityType; - if(UnsupportedType.validateType(entireEntityType)) { - defs = null; - } - else { - if(entityType.startsWith(TOSCA + ":")) { - entityType = entityType.substring(TOSCA.length()+1); - entireEntityType = prefix + entityType; - } - if(!entityType.startsWith(TOSCA)) { - entireEntityType = prefix + entityType; - } - if(TOSCA_DEF.get(entireEntityType) != null) { - defs = (LinkedHashMap )TOSCA_DEF.get(entireEntityType); - entityType = entireEntityType; - } - else if(customDef != null && customDef.get(entityType) != null) { - defs = (LinkedHashMap )customDef.get(entityType); - } - else{ - defs = null; - ThreadLocalsHolder.getCollector().appendException(String.format( - "InvalidTypeError: \"%s\" is not a valid type",entityType)); - } - } - type = entityType; - } - - @SuppressWarnings("unchecked") - public ArrayList getPropertiesDefObjects() { - // Return a list of property definition objects - ArrayList properties = new ArrayList(); - LinkedHashMap props = (LinkedHashMap)getDefinition(PROPERTIES); - if(props != null) { - for(Map.Entry me: props.entrySet()) { - String pdname = me.getKey(); - Object to = me.getValue(); - if(to == null || !(to instanceof LinkedHashMap)) { - String s = to == null ? "null" : to.getClass().getSimpleName(); - ThreadLocalsHolder.getCollector().appendException(String.format( - "Unexpected type error: property \"%s\" has type \"%s\" (expected dict)",pdname,s)); - continue; - } - LinkedHashMap pdschema = (LinkedHashMap)to; - properties.add(new PropertyDef(pdname,null,pdschema)); - } - } - return properties; - } - - public LinkedHashMap getPropertiesDef() { - LinkedHashMap pds = new LinkedHashMap(); - for(PropertyDef pd: getPropertiesDefObjects()) { - pds.put(pd.getName(),pd); - } - return pds; - } - - public PropertyDef getPropertyDefValue(String name) { - // Return the property definition associated with a given name - PropertyDef pd = null; - LinkedHashMap propsDef = getPropertiesDef(); - if(propsDef != null) { - pd = propsDef.get(name); - } - return pd; - } - - public ArrayList getAttributesDefObjects() { - // Return a list of attribute definition objects - @SuppressWarnings("unchecked") - LinkedHashMap attrs = (LinkedHashMap)getValue(ATTRIBUTES,null,true); - ArrayList ads = new ArrayList<>(); - if(attrs != null) { - for(Map.Entry me: attrs.entrySet()) { - String attr = me.getKey(); - @SuppressWarnings("unchecked") - LinkedHashMap adschema = (LinkedHashMap)me.getValue(); - ads.add(new AttributeDef(attr,null,adschema)); - } - } - return ads; - } - - public LinkedHashMap getAttributesDef() { - // Return a dictionary of attribute definition name-object pairs - - LinkedHashMap ads = new LinkedHashMap<>(); - for(AttributeDef ado: getAttributesDefObjects()) { - ads.put(((AttributeDef)ado).getName(),ado); - } - return ads; - } - - public AttributeDef getAttributeDefValue(String name) { - // Return the attribute definition associated with a given name - AttributeDef ad = null; - LinkedHashMap attrsDef = getAttributesDef(); - if(attrsDef != null) { - ad = attrsDef.get(name); - } - return ad; - } - - public String getType() { - return type; - } - } - -/*python - -from toscaparser.common.exception import InvalidTypeError -from toscaparser.elements.attribute_definition import AttributeDef -from toscaparser.elements.entity_type import EntityType -from toscaparser.elements.property_definition import PropertyDef -from toscaparser.unsupportedtype import UnsupportedType - - -class StatefulEntityType(EntityType): - '''Class representing TOSCA states.''' - - interfaces_node_lifecycle_operations = ['create', - 'configure', 'start', - 'stop', 'delete'] - - interfaces_relationship_configure_operations = ['post_configure_source', - 'post_configure_target', - 'add_target', - 'remove_target'] - - def __init__(self, entitytype, prefix, custom_def=None): - entire_entitytype = entitytype - if UnsupportedType.validate_type(entire_entitytype): - self.defs = None - else: - if entitytype.startswith(self.TOSCA + ":"): - entitytype = entitytype[(len(self.TOSCA) + 1):] - entire_entitytype = prefix + entitytype - if not entitytype.startswith(self.TOSCA): - entire_entitytype = prefix + entitytype - if entire_entitytype in list(self.TOSCA_DEF.keys()): - self.defs = self.TOSCA_DEF[entire_entitytype] - entitytype = entire_entitytype - elif custom_def and entitytype in list(custom_def.keys()): - self.defs = custom_def[entitytype] - else: - self.defs = None - ExceptionCollector.appendException( - InvalidTypeError(what=entitytype)) - self.type = entitytype - - def get_properties_def_objects(self): - '''Return a list of property definition objects.''' - properties = [] - props = self.get_definition(self.PROPERTIES) - if props: - for prop, schema in props.items(): - properties.append(PropertyDef(prop, None, schema)) - return properties - - def get_properties_def(self): - '''Return a dictionary of property definition name-object pairs.''' - return {prop.name: prop - for prop in self.get_properties_def_objects()} - - def get_property_def_value(self, name): - '''Return the property definition associated with a given name.''' - props_def = self.get_properties_def() - if props_def and name in props_def.keys(): - return props_def[name].value - - def get_attributes_def_objects(self): - '''Return a list of attribute definition objects.''' - attrs = self.get_value(self.ATTRIBUTES, parent=True) - if attrs: - return [AttributeDef(attr, None, schema) - for attr, schema in attrs.items()] - return [] - - def get_attributes_def(self): - '''Return a dictionary of attribute definition name-object pairs.''' - return {attr.name: attr - for attr in self.get_attributes_def_objects()} - - def get_attribute_def_value(self, name): - '''Return the attribute definition associated with a given name.''' - attrs_def = self.get_attributes_def() - if attrs_def and name in attrs_def.keys(): - return attrs_def[name].value -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/TypeValidation.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/TypeValidation.java deleted file mode 100644 index 2caf5c4..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/TypeValidation.java +++ /dev/null @@ -1,151 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements; - -import java.util.ArrayList; -import java.util.LinkedHashMap; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.extensions.ExtTools; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -public class TypeValidation { - - private static final String DEFINITION_VERSION = "tosca_definitions_version"; - private static final String DESCRIPTION = "description"; - private static final String IMPORTS = "imports"; - private static final String DSL_DEFINITIONS = "dsl_definitions"; - private static final String NODE_TYPES = "node_types"; - private static final String REPOSITORIES = "repositories"; - private static final String DATA_TYPES = "data_types"; - private static final String ARTIFACT_TYPES = "artifact_types"; - private static final String GROUP_TYPES = "group_types"; - private static final String RELATIONSHIP_TYPES = "relationship_types"; - private static final String CAPABILITY_TYPES = "capability_types"; - private static final String INTERFACE_TYPES = "interface_types"; - private static final String POLICY_TYPES = "policy_types"; - private static final String TOPOLOGY_TEMPLATE = "topology_template"; - //Pavel - private static final String METADATA = "metadata"; - - private String ALLOWED_TYPE_SECTIONS[] = { - DEFINITION_VERSION, DESCRIPTION, IMPORTS, - DSL_DEFINITIONS, NODE_TYPES, REPOSITORIES, - DATA_TYPES, ARTIFACT_TYPES, GROUP_TYPES, - RELATIONSHIP_TYPES, CAPABILITY_TYPES, - INTERFACE_TYPES, POLICY_TYPES, - TOPOLOGY_TEMPLATE, METADATA - }; - - private static ArrayList VALID_TEMPLATE_VERSIONS = _getVTV(); - - private static ArrayList _getVTV() { - ArrayList vtv = new ArrayList<>(); - vtv.add("tosca_simple_yaml_1_0"); - ExtTools exttools = new ExtTools(); - vtv.addAll(exttools.getVersions()); - return vtv; - } - - //private LinkedHashMap customTypes; - private Object importDef; - //private String version; - - public TypeValidation(LinkedHashMap _customTypes, - Object _importDef) { - importDef = _importDef; - _validateTypeKeys(_customTypes); - } - - private void _validateTypeKeys(LinkedHashMap customTypes) { - - String sVersion = (String)customTypes.get(DEFINITION_VERSION); - if(sVersion != null) { - _validateTypeVersion(sVersion); - //version = sVersion; - } - for(String name: customTypes.keySet()) { - boolean bFound = false; - for(String ats: ALLOWED_TYPE_SECTIONS) { - if(name.equals(ats)) { - bFound = true; - break; - } - } - if(!bFound) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "UnknownFieldError: Template \"%s\" contains unknown field \"%s\"", - importDef.toString(),name)); - } - } - } - - private void _validateTypeVersion(String sVersion) { - boolean bFound = false; - String allowed = ""; - for(String atv: VALID_TEMPLATE_VERSIONS) { - allowed += "\"" + atv + "\" "; - if(sVersion.equals(atv)) { - bFound = true; - break; - } - } - if(!bFound) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "InvalidTemplateVersion: version \"%s\" in \"%s\" is not supported\n" + - "Allowed versions: [%s]", - sVersion,importDef.toString(),allowed)); - } - } -} - -/*python - -from toscaparser.common.exception import ExceptionCollector -from toscaparser.common.exception import InvalidTemplateVersion -from toscaparser.common.exception import UnknownFieldError -from toscaparser.extensions.exttools import ExtTools - - -class TypeValidation(object): - - ALLOWED_TYPE_SECTIONS = (DEFINITION_VERSION, DESCRIPTION, IMPORTS, - DSL_DEFINITIONS, NODE_TYPES, REPOSITORIES, - DATA_TYPES, ARTIFACT_TYPES, GROUP_TYPES, - RELATIONSHIP_TYPES, CAPABILITY_TYPES, - INTERFACE_TYPES, POLICY_TYPES, - TOPOLOGY_TEMPLATE) = \ - ('tosca_definitions_version', 'description', 'imports', - 'dsl_definitions', 'node_types', 'repositories', - 'data_types', 'artifact_types', 'group_types', - 'relationship_types', 'capability_types', - 'interface_types', 'policy_types', 'topology_template') - VALID_TEMPLATE_VERSIONS = ['tosca_simple_yaml_1_0'] - exttools = ExtTools() - VALID_TEMPLATE_VERSIONS.extend(exttools.get_versions()) - - def __init__(self, custom_types, import_def): - self.import_def = import_def - self._validate_type_keys(custom_types) - - def _validate_type_keys(self, custom_type): - version = custom_type[self.DEFINITION_VERSION] \ - if self.DEFINITION_VERSION in custom_type \ - else None - if version: - self._validate_type_version(version) - self.version = version - - for name in custom_type: - if name not in self.ALLOWED_TYPE_SECTIONS: - ExceptionCollector.appendException( -# UnknownFieldError(what='Template ' + (self.import_def), - UnknownFieldError(what= (self.import_def), - field=name)) - - def _validate_type_version(self, version): - if version not in self.VALID_TEMPLATE_VERSIONS: - ExceptionCollector.appendException( - InvalidTemplateVersion( -# what=version + ' in ' + self.import_def, - what=self.import_def, - valid_versions=', '. join(self.VALID_TEMPLATE_VERSIONS))) -*/ diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/Constraint.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/Constraint.java deleted file mode 100644 index 3c60a66..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/Constraint.java +++ /dev/null @@ -1,237 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements.constraints; - -import java.util.ArrayList; -import java.util.LinkedHashMap; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.elements.ScalarUnit; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -public abstract class Constraint { - - // Parent class for constraints for a Property or Input - - protected static final String EQUAL = "equal"; - protected static final String GREATER_THAN = "greater_than"; - protected static final String GREATER_OR_EQUAL = "greater_or_equal"; - protected static final String LESS_THAN = "less_than"; - protected static final String LESS_OR_EQUAL = "less_or_equal"; - protected static final String IN_RANGE = "in_range"; - protected static final String VALID_VALUES = "valid_values"; - protected static final String LENGTH = "length"; - protected static final String MIN_LENGTH = "min_length"; - protected static final String MAX_LENGTH = "max_length"; - protected static final String PATTERN = "pattern"; - - protected static final String CONSTRAINTS[] = { - EQUAL, GREATER_THAN,GREATER_OR_EQUAL, LESS_THAN, LESS_OR_EQUAL, - IN_RANGE, VALID_VALUES, LENGTH, MIN_LENGTH, MAX_LENGTH, PATTERN}; - - @SuppressWarnings("unchecked") - public static Constraint factory(String constraintClass,String propname,String proptype,Object constraint) { - - // a factory for the different Constraint classes - // replaces Python's __new__() usage - - if(!(constraint instanceof LinkedHashMap) || - ((LinkedHashMap)constraint).size() != 1) { - ThreadLocalsHolder.getCollector().appendException( - "InvalidSchemaError: Invalid constraint schema " + constraint.toString()); - } - - if(constraintClass.equals(EQUAL)) { - return new Equal(propname,proptype,constraint); - } - else if(constraintClass.equals(GREATER_THAN)) { - return new GreaterThan(propname,proptype,constraint); - } - else if(constraintClass.equals(GREATER_OR_EQUAL)) { - return new GreaterOrEqual(propname,proptype,constraint); - } - else if(constraintClass.equals(LESS_THAN)) { - return new LessThan(propname,proptype,constraint); - } - else if(constraintClass.equals(LESS_OR_EQUAL)) { - return new LessOrEqual(propname,proptype,constraint); - } - else if(constraintClass.equals(IN_RANGE)) { - return new InRange(propname,proptype,constraint); - } - else if(constraintClass.equals(VALID_VALUES)) { - return new ValidValues(propname,proptype,constraint); - } - else if(constraintClass.equals(LENGTH)) { - return new Length(propname,proptype,constraint); - } - else if(constraintClass.equals(MIN_LENGTH)) { - return new MinLength(propname,proptype,constraint); - } - else if(constraintClass.equals(MAX_LENGTH)) { - return new MaxLength(propname,proptype,constraint); - } - else if(constraintClass.equals(PATTERN)) { - return new Pattern(propname,proptype,constraint); - } - else { - ThreadLocalsHolder.getCollector().appendException(String.format( - "InvalidSchemaError: Invalid property \"%s\"",constraintClass)); - return null; - } - } - - protected String constraintKey = "TBD"; - protected ArrayList validTypes = new ArrayList<>(); - protected ArrayList validPropTypes = new ArrayList<>(); - - protected String propertyName; - protected String propertyType; - protected Object constraintValue; - protected Object constraintValueMsg; - protected Object valueMsg; - - @SuppressWarnings("unchecked") - public Constraint(String propname,String proptype,Object constraint) { - - _setValues(); - - propertyName = propname; - propertyType = proptype; - constraintValue = ((LinkedHashMap)constraint).get(constraintKey); - constraintValueMsg = constraintValue; - boolean bFound = false; - for(String s: ScalarUnit.SCALAR_UNIT_TYPES) { - if(s.equals(propertyType)) { - bFound = true; - break; - } - } - if(bFound) { - constraintValue = _getScalarUnitConstraintValue(); - } - // check if constraint is valid for property type - bFound = false; - for(String s: validPropTypes) { - if(s.equals(propertyType)) { - bFound = true; - break; - } - } - if(!bFound) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "InvalidSchemaError: Property \"%s\" is not valid for data type \"%s\"", - constraintKey,propertyType)); - } - } - - @SuppressWarnings("unchecked") - private Object _getScalarUnitConstraintValue() { - // code differs from Python because of class creation - if(constraintValue instanceof ArrayList) { - ArrayList ret = new ArrayList<>(); - for(Object v: (ArrayList)constraintValue) { - ScalarUnit su = ScalarUnit.getScalarunitClass(propertyType,v); - ret.add(su.getNumFromScalarUnit(null)); - } - return ret; - } - else { - ScalarUnit su = ScalarUnit.getScalarunitClass(propertyType,constraintValue); - return su.getNumFromScalarUnit(null); - } - } - - public void validate(Object value) { - valueMsg = value; - boolean bFound = false; - for(String s: ScalarUnit.SCALAR_UNIT_TYPES) { - if(s.equals(propertyType)) { - bFound = true; - break; - } - } - if(bFound) { - value = ScalarUnit.getScalarunitValue(propertyType,value,null); - } - if(!_isValid(value)) { - ThreadLocalsHolder.getCollector().appendWarning("ValidationError: " + _errMsg(value)); - } - } - - protected abstract boolean _isValid(Object value); - - protected abstract void _setValues(); - - protected abstract String _errMsg(Object value); - -} - -/*python - -class Constraint(object): - '''Parent class for constraints for a Property or Input.''' - - CONSTRAINTS = (EQUAL, GREATER_THAN, - GREATER_OR_EQUAL, LESS_THAN, LESS_OR_EQUAL, IN_RANGE, - VALID_VALUES, LENGTH, MIN_LENGTH, MAX_LENGTH, PATTERN) = \ - ('equal', 'greater_than', 'greater_or_equal', 'less_than', - 'less_or_equal', 'in_range', 'valid_values', 'length', - 'min_length', 'max_length', 'pattern') - - def __new__(cls, property_name, property_type, constraint): - if cls is not Constraint: - return super(Constraint, cls).__new__(cls) - - if(not isinstance(constraint, collections.Mapping) or - len(constraint) != 1): - ExceptionCollector.appendException( - InvalidSchemaError(message=_('Invalid constraint schema.'))) - - for type in constraint.keys(): - ConstraintClass = get_constraint_class(type) - if not ConstraintClass: - msg = _('Invalid property "%s".') % type - ExceptionCollector.appendException( - InvalidSchemaError(message=msg)) - - return ConstraintClass(property_name, property_type, constraint) - - def __init__(self, property_name, property_type, constraint): - self.property_name = property_name - self.property_type = property_type - self.constraint_value = constraint[self.constraint_key] - self.constraint_value_msg = self.constraint_value - if self.property_type in scalarunit.ScalarUnit.SCALAR_UNIT_TYPES: - self.constraint_value = self._get_scalarunit_constraint_value() - # check if constraint is valid for property type - if property_type not in self.valid_prop_types: - msg = _('Property "%(ctype)s" is not valid for data type ' - '"%(dtype)s".') % dict( - ctype=self.constraint_key, - dtype=property_type) - ExceptionCollector.appendException(InvalidSchemaError(message=msg)) - - def _get_scalarunit_constraint_value(self): - if self.property_type in scalarunit.ScalarUnit.SCALAR_UNIT_TYPES: - ScalarUnit_Class = (scalarunit. - get_scalarunit_class(self.property_type)) - if isinstance(self.constraint_value, list): - return [ScalarUnit_Class(v).get_num_from_scalar_unit() - for v in self.constraint_value] - else: - return (ScalarUnit_Class(self.constraint_value). - get_num_from_scalar_unit()) - - def _err_msg(self, value): - return _('Property "%s" could not be validated.') % self.property_name - - def validate(self, value): - self.value_msg = value - if self.property_type in scalarunit.ScalarUnit.SCALAR_UNIT_TYPES: - value = scalarunit.get_scalarunit_value(self.property_type, value) - if not self._is_valid(value): - err_msg = self._err_msg(value) - ExceptionCollector.appendException( - ValidationError(message=err_msg)) - - -*/ diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/Equal.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/Equal.java deleted file mode 100644 index e16cac3..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/Equal.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements.constraints; - -public class Equal extends Constraint { - - protected void _setValues() { - - constraintKey = EQUAL; - - for(String s: Schema.PROPERTY_TYPES) { - validPropTypes.add(s); - } - - } - - public Equal(String name,String type,Object c) { - super(name,type,c); - - } - - protected boolean _isValid(Object val) { - // equality of objects is tricky so we're comparing - // the toString() representation - if(val.toString().equals(constraintValue.toString())) { - return true; - } - return false; - } - - protected String _errMsg(Object value) { - return String.format("The value \"%s\" of property \"%s\" is not equal to \"%s\"", - valueMsg,propertyName,constraintValueMsg); - } - -} - -/*python - -class Equal(Constraint): -"""Constraint class for "equal" - -Constrains a property or parameter to a value equal to ('=') -the value declared. -""" - -constraint_key = Constraint.EQUAL - -valid_prop_types = Schema.PROPERTY_TYPES - -def _is_valid(self, value): - if value == self.constraint_value: - return True - - return False - -def _err_msg(self, value): - return (_('The value "%(pvalue)s" of property "%(pname)s" is not ' - 'equal to "%(cvalue)s".') % - dict(pname=self.property_name, - pvalue=self.value_msg, - cvalue=self.constraint_value_msg)) -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/GreaterOrEqual.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/GreaterOrEqual.java deleted file mode 100644 index 021bed3..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/GreaterOrEqual.java +++ /dev/null @@ -1,113 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements.constraints; - -import java.util.Date; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.functions.Function; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -public class GreaterOrEqual extends Constraint { - // Constraint class for "greater_or_equal" - - // Constrains a property or parameter to a value greater than or equal - // to ('>=') the value declared. - - protected void _setValues() { - - constraintKey = GREATER_OR_EQUAL; - - validTypes.add("Integer"); - validTypes.add("Double"); - validTypes.add("Float"); - // timestamps are loaded as Date objects - validTypes.add("Date"); - //validTypes.add("datetime.date"); - //validTypes.add("datetime.time"); - //validTypes.add("datetime.datetime"); - - validPropTypes.add(Schema.INTEGER); - validPropTypes.add(Schema.FLOAT); - validPropTypes.add(Schema.TIMESTAMP); - validPropTypes.add(Schema.SCALAR_UNIT_SIZE); - validPropTypes.add(Schema.SCALAR_UNIT_FREQUENCY); - validPropTypes.add(Schema.SCALAR_UNIT_TIME); - - } - - public GreaterOrEqual(String name,String type,Object c) { - super(name,type,c); - - if(!validTypes.contains(constraintValue.getClass().getSimpleName())) { - ThreadLocalsHolder.getCollector().appendException("InvalidSchemaError: The property \"greater_or_equal\" expects comparable values"); - } - } - - - - @Override - protected boolean _isValid(Object value) { - if(Function.isFunction(value)) { - return true; - } - - // timestamps - if(value instanceof Date) { - if(constraintValue instanceof Date) { - return !((Date)value).before((Date)constraintValue); - } - return false; - } - // all others - Double n1 = new Double(value.toString()); - Double n2 = new Double(constraintValue.toString()); - return n1 >= n2; - } - - protected String _errMsg(Object value) { - return String.format("The value \"%s\" of property \"%s\" must be greater or equal to \"%s\"", - valueMsg,propertyName,constraintValueMsg); - } -} - -/*python - -class GreaterOrEqual(Constraint): -"""Constraint class for "greater_or_equal" - -Constrains a property or parameter to a value greater than or equal -to ('>=') the value declared. -""" - -constraint_key = Constraint.GREATER_OR_EQUAL - -valid_types = (int, float, datetime.date, - datetime.time, datetime.datetime) - -valid_prop_types = (Schema.INTEGER, Schema.FLOAT, Schema.TIMESTAMP, - Schema.SCALAR_UNIT_SIZE, Schema.SCALAR_UNIT_FREQUENCY, - Schema.SCALAR_UNIT_TIME) - -def __init__(self, property_name, property_type, constraint): - super(GreaterOrEqual, self).__init__(property_name, property_type, - constraint) - if not isinstance(self.constraint_value, self.valid_types): - ThreadLocalsHolder.getCollector().appendException( - InvalidSchemaError(message=_('The property ' - '"greater_or_equal" expects ' - 'comparable values.'))) - -def _is_valid(self, value): - if toscaparser.functions.is_function(value) or \ - value >= self.constraint_value: - return True - return False - -def _err_msg(self, value): - return (_('The value "%(pvalue)s" of property "%(pname)s" must be ' - 'greater than or equal to "%(cvalue)s".') % - dict(pname=self.property_name, - pvalue=self.value_msg, - cvalue=self.constraint_value_msg)) - - -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/GreaterThan.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/GreaterThan.java deleted file mode 100644 index d23d7ce..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/GreaterThan.java +++ /dev/null @@ -1,102 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements.constraints; - -import java.util.Date; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -public class GreaterThan extends Constraint { - - @Override - protected void _setValues() { - - constraintKey = GREATER_THAN; - - validTypes.add("Integer"); - validTypes.add("Double"); - validTypes.add("Float"); - // timestamps are loaded as Date objects - validTypes.add("Date"); - //validTypes.add("datetime.date"); - //validTypes.add("datetime.time"); - //validTypes.add("datetime.datetime"); - - - validPropTypes.add(Schema.INTEGER); - validPropTypes.add(Schema.FLOAT); - validPropTypes.add(Schema.TIMESTAMP); - validPropTypes.add(Schema.SCALAR_UNIT_SIZE); - validPropTypes.add(Schema.SCALAR_UNIT_FREQUENCY); - validPropTypes.add(Schema.SCALAR_UNIT_TIME); - - } - - public GreaterThan(String name,String type,Object c) { - super(name,type,c); - - if(!validTypes.contains(constraintValue.getClass().getSimpleName())) { - ThreadLocalsHolder.getCollector().appendException("InvalidSchemaError: The property \"greater_than\" expects comparable values"); - } - } - - @Override - protected boolean _isValid(Object value) { - - // timestamps - if(value instanceof Date) { - if(constraintValue instanceof Date) { - return ((Date)value).after((Date)constraintValue); - } - return false; - } - - Double n1 = new Double(value.toString()); - Double n2 = new Double(constraintValue.toString()); - return n1 > n2; - } - - protected String _errMsg(Object value) { - return String.format("The value \"%s\" of property \"%s\" must be greater than \"%s\"", - valueMsg,propertyName,constraintValueMsg); - } - -} - -/* -class GreaterThan(Constraint): - """Constraint class for "greater_than" - - Constrains a property or parameter to a value greater than ('>') - the value declared. - """ - - constraint_key = Constraint.GREATER_THAN - - valid_types = (int, float, datetime.date, - datetime.time, datetime.datetime) - - valid_prop_types = (Schema.INTEGER, Schema.FLOAT, Schema.TIMESTAMP, - Schema.SCALAR_UNIT_SIZE, Schema.SCALAR_UNIT_FREQUENCY, - Schema.SCALAR_UNIT_TIME) - - def __init__(self, property_name, property_type, constraint): - super(GreaterThan, self).__init__(property_name, property_type, - constraint) - if not isinstance(constraint[self.GREATER_THAN], self.valid_types): - ExceptionCollector.appendException( - InvalidSchemaError(message=_('The property "greater_than" ' - 'expects comparable values.'))) - - def _is_valid(self, value): - if value > self.constraint_value: - return True - - return False - - def _err_msg(self, value): - return (_('The value "%(pvalue)s" of property "%(pname)s" must be ' - 'greater than "%(cvalue)s".') % - dict(pname=self.property_name, - pvalue=self.value_msg, - cvalue=self.constraint_value_msg)) -*/ diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/InRange.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/InRange.java deleted file mode 100644 index 282267d..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/InRange.java +++ /dev/null @@ -1,171 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements.constraints; - -import java.util.Date; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -import java.util.ArrayList; - -public class InRange extends Constraint { - // Constraint class for "in_range" - - //Constrains a property or parameter to a value in range of (inclusive) - //the two values declared. - - private static final String UNBOUNDED = "UNBOUNDED"; - - private Object min,max; - - protected void _setValues() { - - constraintKey = IN_RANGE; - - validTypes.add("Integer"); - validTypes.add("Double"); - validTypes.add("Float"); - validTypes.add("String"); - // timestamps are loaded as Date objects - validTypes.add("Date"); - //validTypes.add("datetime.date"); - //validTypes.add("datetime.time"); - //validTypes.add("datetime.datetime"); - - validPropTypes.add(Schema.INTEGER); - validPropTypes.add(Schema.FLOAT); - validPropTypes.add(Schema.TIMESTAMP); - validPropTypes.add(Schema.SCALAR_UNIT_SIZE); - validPropTypes.add(Schema.SCALAR_UNIT_FREQUENCY); - validPropTypes.add(Schema.SCALAR_UNIT_TIME); - validPropTypes.add(Schema.RANGE); - - } - - @SuppressWarnings("unchecked") - public InRange(String name,String type,Object c) { - super(name,type,c); - - if(!(constraintValue instanceof ArrayList) || ((ArrayList)constraintValue).size() != 2) { - ThreadLocalsHolder.getCollector().appendException("InvalidSchemaError: The property \"in_range\" expects a list"); - - } - - ArrayList alcv = (ArrayList)constraintValue; - String msg = "The property \"in_range\" expects comparable values"; - for(Object vo: alcv) { - if(!validTypes.contains(vo.getClass().getSimpleName())) { - ThreadLocalsHolder.getCollector().appendException("InvalidSchemaError: " + msg); - } - // The only string we allow for range is the special value 'UNBOUNDED' - if((vo instanceof String) && !((String)vo).equals(UNBOUNDED)) { - ThreadLocalsHolder.getCollector().appendException("InvalidSchemaError: " + msg); - } - } - min = alcv.get(0); - max = alcv.get(1); - - } - - @Override - protected boolean _isValid(Object value) { - - // timestamps - if(value instanceof Date) { - if(min instanceof Date && max instanceof Date) { - return !((Date)value).before((Date)min) && - !((Date)value).after((Date)max); - } - return false; - } - - Double dvalue = new Double(value.toString()); - if(!(min instanceof String)) { - if(dvalue < new Double(min.toString())) { - return false; - } - } - else if(!((String)min).equals(UNBOUNDED)) { - return false; - } - if(!(max instanceof String)) { - if(dvalue > new Double(max.toString())) { - return false; - } - } - else if(!((String)max).equals(UNBOUNDED)) { - return false; - } - return true; - } - - @Override - protected String _errMsg(Object value) { - return String.format("The value \"%s\" of property \"%s\" is out of range \"(min:%s, max:%s)\"", - valueMsg,propertyName,min.toString(),max.toString()); - } - -} - -/*python - -class InRange(Constraint): - """Constraint class for "in_range" - - Constrains a property or parameter to a value in range of (inclusive) - the two values declared. - """ - UNBOUNDED = 'UNBOUNDED' - - constraint_key = Constraint.IN_RANGE - - valid_types = (int, float, datetime.date, - datetime.time, datetime.datetime, str) - - valid_prop_types = (Schema.INTEGER, Schema.FLOAT, Schema.TIMESTAMP, - Schema.SCALAR_UNIT_SIZE, Schema.SCALAR_UNIT_FREQUENCY, - Schema.SCALAR_UNIT_TIME, Schema.RANGE) - - def __init__(self, property_name, property_type, constraint): - super(InRange, self).__init__(property_name, property_type, constraint) - if(not isinstance(self.constraint_value, collections.Sequence) or - (len(constraint[self.IN_RANGE]) != 2)): - ExceptionCollector.appendException( - InvalidSchemaError(message=_('The property "in_range" ' - 'expects a list.'))) - - msg = _('The property "in_range" expects comparable values.') - for value in self.constraint_value: - if not isinstance(value, self.valid_types): - ExceptionCollector.appendException( - InvalidSchemaError(message=msg)) - # The only string we allow for range is the special value - # 'UNBOUNDED' - if(isinstance(value, str) and value != self.UNBOUNDED): - ExceptionCollector.appendException( - InvalidSchemaError(message=msg)) - - self.min = self.constraint_value[0] - self.max = self.constraint_value[1] - - def _is_valid(self, value): - if not isinstance(self.min, str): - if value < self.min: - return False - elif self.min != self.UNBOUNDED: - return False - if not isinstance(self.max, str): - if value > self.max: - return False - elif self.max != self.UNBOUNDED: - return False - return True - - def _err_msg(self, value): - return (_('The value "%(pvalue)s" of property "%(pname)s" is out of ' - 'range "(min:%(vmin)s, max:%(vmax)s)".') % - dict(pname=self.property_name, - pvalue=self.value_msg, - vmin=self.constraint_value_msg[0], - vmax=self.constraint_value_msg[1])) - -*/ diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/Length.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/Length.java deleted file mode 100644 index 4cfd1c0..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/Length.java +++ /dev/null @@ -1,79 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements.constraints; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -public class Length extends Constraint { - // Constraint class for "length" - - // Constrains the property or parameter to a value of a given length. - - @Override - protected void _setValues() { - - constraintKey = LENGTH; - - validTypes.add("Integer"); - - validPropTypes.add(Schema.STRING); - - } - - public Length(String name,String type,Object c) { - super(name,type,c); - - if(!validTypes.contains(constraintValue.getClass().getSimpleName())) { - ThreadLocalsHolder.getCollector().appendException("InvalidSchemaError: The property \"length\" expects an integer"); - } - } - - @Override - protected boolean _isValid(Object value) { - if(value instanceof String && constraintValue instanceof Integer && - ((String)value).length() == (Integer)constraintValue) { - return true; - } - return false; - } - - @Override - protected String _errMsg(Object value) { - return String.format("Length of value \"%s\" of property \"%s\" must be equal to \"%s\"", - value.toString(),propertyName,constraintValue.toString()); - } - -} - -/*python - class Length(Constraint): - """Constraint class for "length" - - Constrains the property or parameter to a value of a given length. - """ - - constraint_key = Constraint.LENGTH - - valid_types = (int, ) - - valid_prop_types = (Schema.STRING, ) - - def __init__(self, property_name, property_type, constraint): - super(Length, self).__init__(property_name, property_type, constraint) - if not isinstance(self.constraint_value, self.valid_types): - ExceptionCollector.appendException( - InvalidSchemaError(message=_('The property "length" expects ' - 'an integer.'))) - - def _is_valid(self, value): - if isinstance(value, str) and len(value) == self.constraint_value: - return True - - return False - - def _err_msg(self, value): - return (_('Length of value "%(pvalue)s" of property "%(pname)s" ' - 'must be equal to "%(cvalue)s".') % - dict(pname=self.property_name, - pvalue=value, - cvalue=self.constraint_value)) -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/LessOrEqual.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/LessOrEqual.java deleted file mode 100644 index 00cba36..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/LessOrEqual.java +++ /dev/null @@ -1,106 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements.constraints; - -import java.util.Date; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -public class LessOrEqual extends Constraint { - // Constraint class for "less_or_equal" - - // Constrains a property or parameter to a value less than or equal - // to ('<=') the value declared. - - protected void _setValues() { - - constraintKey = LESS_OR_EQUAL; - - validTypes.add("Integer"); - validTypes.add("Double"); - validTypes.add("Float"); - // timestamps are loaded as Date objects - validTypes.add("Date"); - //validTypes.add("datetime.date"); - //validTypes.add("datetime.time"); - //validTypes.add("datetime.datetime"); - - validPropTypes.add(Schema.INTEGER); - validPropTypes.add(Schema.FLOAT); - validPropTypes.add(Schema.TIMESTAMP); - validPropTypes.add(Schema.SCALAR_UNIT_SIZE); - validPropTypes.add(Schema.SCALAR_UNIT_FREQUENCY); - validPropTypes.add(Schema.SCALAR_UNIT_TIME); - - } - - public LessOrEqual(String name,String type,Object c) { - super(name,type,c); - - if(!validTypes.contains(constraintValue.getClass().getSimpleName())) { - ThreadLocalsHolder.getCollector().appendException("InvalidSchemaError: The property \"less_or_equal\" expects comparable values"); - } - } - - @Override - protected boolean _isValid(Object value) { - - // timestamps - if(value instanceof Date) { - if(constraintValue instanceof Date) { - return !((Date)value).after((Date)constraintValue); - } - return false; - } - - Double n1 = new Double(value.toString()); - Double n2 = new Double(constraintValue.toString()); - return n1 <= n2; - } - - @Override - protected String _errMsg(Object value) { - return String.format("The value \"%s\" of property \"%s\" must be less or equal to \"%s\"", - valueMsg,propertyName,constraintValueMsg); - } - -} - -/*python - -class LessOrEqual(Constraint): - """Constraint class for "less_or_equal" - - Constrains a property or parameter to a value less than or equal - to ('<=') the value declared. - """ - - constraint_key = Constraint.LESS_OR_EQUAL - - valid_types = (int, float, datetime.date, - datetime.time, datetime.datetime) - - valid_prop_types = (Schema.INTEGER, Schema.FLOAT, Schema.TIMESTAMP, - Schema.SCALAR_UNIT_SIZE, Schema.SCALAR_UNIT_FREQUENCY, - Schema.SCALAR_UNIT_TIME) - - def __init__(self, property_name, property_type, constraint): - super(LessOrEqual, self).__init__(property_name, property_type, - constraint) - if not isinstance(self.constraint_value, self.valid_types): - ExceptionCollector.appendException( - InvalidSchemaError(message=_('The property "less_or_equal" ' - 'expects comparable values.'))) - - def _is_valid(self, value): - if value <= self.constraint_value: - return True - - return False - - def _err_msg(self, value): - return (_('The value "%(pvalue)s" of property "%(pname)s" must be ' - 'less than or equal to "%(cvalue)s".') % - dict(pname=self.property_name, - pvalue=self.value_msg, - cvalue=self.constraint_value_msg)) -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/LessThan.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/LessThan.java deleted file mode 100644 index eb5a41d..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/LessThan.java +++ /dev/null @@ -1,104 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements.constraints; - -import java.util.Date; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -public class LessThan extends Constraint { - - @Override - protected void _setValues() { - - constraintKey = LESS_THAN; - - validTypes.add("Integer"); - validTypes.add("Double"); - validTypes.add("Float"); - // timestamps are loaded as Date objects - validTypes.add("Date"); - //validTypes.add("datetime.date"); - //validTypes.add("datetime.time"); - //validTypes.add("datetime.datetime"); - - - validPropTypes.add(Schema.INTEGER); - validPropTypes.add(Schema.FLOAT); - validPropTypes.add(Schema.TIMESTAMP); - validPropTypes.add(Schema.SCALAR_UNIT_SIZE); - validPropTypes.add(Schema.SCALAR_UNIT_FREQUENCY); - validPropTypes.add(Schema.SCALAR_UNIT_TIME); - - } - - public LessThan(String name,String type,Object c) { - super(name,type,c); - - if(!validTypes.contains(constraintValue.getClass().getSimpleName())) { - ThreadLocalsHolder.getCollector().appendException("InvalidSchemaError: The property \"less_than\" expects comparable values"); - } - } - - @Override - protected boolean _isValid(Object value) { - - // timestamps - if(value instanceof Date) { - if(constraintValue instanceof Date) { - return ((Date)value).before((Date)constraintValue); - } - return false; - } - - Double n1 = new Double(value.toString()); - Double n2 = new Double(constraintValue.toString()); - return n1 < n2; - } - - @Override - protected String _errMsg(Object value) { - return String.format("The value \"%s\" of property \"%s\" must be less than \"%s\"", - valueMsg,propertyName,constraintValueMsg); - } - -} - -/*python - -class LessThan(Constraint): -"""Constraint class for "less_than" - -Constrains a property or parameter to a value less than ('<') -the value declared. -""" - -constraint_key = Constraint.LESS_THAN - -valid_types = (int, float, datetime.date, - datetime.time, datetime.datetime) - -valid_prop_types = (Schema.INTEGER, Schema.FLOAT, Schema.TIMESTAMP, - Schema.SCALAR_UNIT_SIZE, Schema.SCALAR_UNIT_FREQUENCY, - Schema.SCALAR_UNIT_TIME) - -def __init__(self, property_name, property_type, constraint): - super(LessThan, self).__init__(property_name, property_type, - constraint) - if not isinstance(self.constraint_value, self.valid_types): - ExceptionCollector.appendException( - InvalidSchemaError(message=_('The property "less_than" ' - 'expects comparable values.'))) - -def _is_valid(self, value): - if value < self.constraint_value: - return True - - return False - -def _err_msg(self, value): - return (_('The value "%(pvalue)s" of property "%(pname)s" must be ' - 'less than "%(cvalue)s".') % - dict(pname=self.property_name, - pvalue=self.value_msg, - cvalue=self.constraint_value_msg)) -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/MaxLength.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/MaxLength.java deleted file mode 100644 index 278ae85..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/MaxLength.java +++ /dev/null @@ -1,90 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements.constraints; - -import java.util.LinkedHashMap; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -public class MaxLength extends Constraint { - // Constraint class for "min_length" - - // Constrains the property or parameter to a value of a maximum length. - - @Override - protected void _setValues() { - - constraintKey = MAX_LENGTH; - - validTypes.add("Integer"); - - validPropTypes.add(Schema.STRING); - validPropTypes.add(Schema.MAP); - - } - - public MaxLength(String name,String type,Object c) { - super(name,type,c); - - if(!validTypes.contains(constraintValue.getClass().getSimpleName())) { - ThreadLocalsHolder.getCollector().appendException("InvalidSchemaError: The property \"max_length\" expects an integer"); - } - } - - @SuppressWarnings("unchecked") - @Override - protected boolean _isValid(Object value) { - if(value instanceof String && constraintValue instanceof Integer && - ((String)value).length() <= (Integer)constraintValue) { - return true; - } - else if(value instanceof LinkedHashMap && constraintValue instanceof Integer && - ((LinkedHashMap)value).size() <= (Integer)constraintValue) { - return true; - } - return false; - } - - @Override - protected String _errMsg(Object value) { - return String.format("Length of value \"%s\" of property \"%s\" must be no greater than \"%s\"", - value.toString(),propertyName,constraintValue.toString()); - } - -} - -/*python - -class MaxLength(Constraint): - """Constraint class for "max_length" - - Constrains the property or parameter to a value to a maximum length. - """ - - constraint_key = Constraint.MAX_LENGTH - - valid_types = (int, ) - - valid_prop_types = (Schema.STRING, Schema.MAP) - - def __init__(self, property_name, property_type, constraint): - super(MaxLength, self).__init__(property_name, property_type, - constraint) - if not isinstance(self.constraint_value, self.valid_types): - ExceptionCollector.appendException( - InvalidSchemaError(message=_('The property "max_length" ' - 'expects an integer.'))) - - def _is_valid(self, value): - if ((isinstance(value, str) or isinstance(value, dict)) and - len(value) <= self.constraint_value): - return True - - return False - - def _err_msg(self, value): - return (_('Length of value "%(pvalue)s" of property "%(pname)s" ' - 'must be no greater than "%(cvalue)s".') % - dict(pname=self.property_name, - pvalue=value, - cvalue=self.constraint_value)) -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/MinLength.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/MinLength.java deleted file mode 100644 index 480c878..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/MinLength.java +++ /dev/null @@ -1,90 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements.constraints; - -import java.util.LinkedHashMap; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -public class MinLength extends Constraint { - // Constraint class for "min_length" - - // Constrains the property or parameter to a value of a minimum length. - - @Override - protected void _setValues() { - - constraintKey = MIN_LENGTH; - - validTypes.add("Integer"); - - validPropTypes.add(Schema.STRING); - validPropTypes.add(Schema.MAP); - - } - - public MinLength(String name,String type,Object c) { - super(name,type,c); - - if(!validTypes.contains(constraintValue.getClass().getSimpleName())) { - ThreadLocalsHolder.getCollector().appendException("InvalidSchemaError: The property \"min_length\" expects an integer"); - } - } - - @SuppressWarnings("unchecked") - @Override - protected boolean _isValid(Object value) { - if(value instanceof String && constraintValue instanceof Integer && - ((String)value).length() >= (Integer)constraintValue) { - return true; - } - else if(value instanceof LinkedHashMap && constraintValue instanceof Integer && - ((LinkedHashMap)value).size() >= (Integer)constraintValue) { - return true; - } - return false; - } - - @Override - protected String _errMsg(Object value) { - return String.format("Length of value \"%s\" of property \"%s\" must be at least \"%s\"", - value.toString(),propertyName,constraintValue.toString()); - } - -} - -/*python - -class MinLength(Constraint): - """Constraint class for "min_length" - - Constrains the property or parameter to a value to a minimum length. - """ - - constraint_key = Constraint.MIN_LENGTH - - valid_types = (int, ) - - valid_prop_types = (Schema.STRING, Schema.MAP) - - def __init__(self, property_name, property_type, constraint): - super(MinLength, self).__init__(property_name, property_type, - constraint) - if not isinstance(self.constraint_value, self.valid_types): - ExceptionCollector.appendException( - InvalidSchemaError(message=_('The property "min_length" ' - 'expects an integer.'))) - - def _is_valid(self, value): - if ((isinstance(value, str) or isinstance(value, dict)) and - len(value) >= self.constraint_value): - return True - - return False - - def _err_msg(self, value): - return (_('Length of value "%(pvalue)s" of property "%(pname)s" ' - 'must be at least "%(cvalue)s".') % - dict(pname=self.property_name, - pvalue=value, - cvalue=self.constraint_value)) -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/Pattern.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/Pattern.java deleted file mode 100644 index 444a73c..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/Pattern.java +++ /dev/null @@ -1,96 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements.constraints; - -import java.util.regex.Matcher; -import java.util.regex.PatternSyntaxException; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -public class Pattern extends Constraint { - - @Override - protected void _setValues() { - - constraintKey = PATTERN; - - validTypes.add("String"); - - validPropTypes.add(Schema.STRING); - - } - - - public Pattern(String name,String type,Object c) { - super(name,type,c); - - if(!validTypes.contains(constraintValue.getClass().getSimpleName())) { - ThreadLocalsHolder.getCollector().appendException("InvalidSchemaError: The property \"pattern\" expects a string"); - } - } - - @Override - protected boolean _isValid(Object value) { - try { - if(!(value instanceof String)) { - ThreadLocalsHolder.getCollector().appendException(String.format("ValueError: Input value \"%s\" to \"pattern\" property \"%s\" must be a string", - value.toString(),propertyName)); - return false; - } - String strp = constraintValue.toString(); - String strm = value.toString(); - java.util.regex.Pattern pattern = java.util.regex.Pattern.compile(strp); - Matcher matcher = pattern.matcher(strm); - if(matcher.find() && matcher.end() == strm.length()) { - return true; - } - return false; - } - catch(PatternSyntaxException pse) { - ThreadLocalsHolder.getCollector().appendException(String.format("ValueError: Invalid regex \"%s\" in \"pattern\" property \"%s\"", - constraintValue.toString(),propertyName)); - return false; - } - } - - @Override - protected String _errMsg(Object value) { - return String.format("The value \"%s\" of property \"%s\" does not match the pattern \"%s\"", - value.toString(),propertyName,constraintValue.toString()); - } - -} - -/*python - -class Pattern(Constraint): - """Constraint class for "pattern" - - Constrains the property or parameter to a value that is allowed by - the provided regular expression. - """ - - constraint_key = Constraint.PATTERN - - valid_types = (str, ) - - valid_prop_types = (Schema.STRING, ) - - def __init__(self, property_name, property_type, constraint): - super(Pattern, self).__init__(property_name, property_type, constraint) - if not isinstance(self.constraint_value, self.valid_types): - ExceptionCollector.appendException( - InvalidSchemaError(message=_('The property "pattern" ' - 'expects a string.'))) - self.match = re.compile(self.constraint_value).match - - def _is_valid(self, value): - match = self.match(value) - return match is not None and match.end() == len(value) - - def _err_msg(self, value): - return (_('The value "%(pvalue)s" of property "%(pname)s" does not ' - 'match pattern "%(cvalue)s".') % - dict(pname=self.property_name, - pvalue=value, - cvalue=self.constraint_value)) -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/Schema.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/Schema.java deleted file mode 100644 index ca721e6..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/Schema.java +++ /dev/null @@ -1,278 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements.constraints; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - - -public class Schema { - - private static final String TYPE = "type"; - private static final String REQUIRED = "required"; - private static final String DESCRIPTION = "description"; - private static final String DEFAULT = "default"; - private static final String CONSTRAINTS = "constraints"; - private static final String STATUS = "status"; - private static final String ENTRYSCHEMA = "entry_schema"; - private static final String KEYS[] = { - TYPE, REQUIRED, DESCRIPTION,DEFAULT, CONSTRAINTS, ENTRYSCHEMA, STATUS}; - - public static final String INTEGER = "integer"; - public static final String STRING = "string"; - public static final String BOOLEAN = "boolean"; - public static final String FLOAT = "float"; - public static final String RANGE = "range"; - public static final String NUMBER = "number"; - public static final String TIMESTAMP = "timestamp"; - public static final String LIST = "list"; - public static final String MAP = "map"; - public static final String SCALAR_UNIT_SIZE = "scalar-unit.size"; - public static final String SCALAR_UNIT_FREQUENCY = "scalar-unit.frequency"; - public static final String SCALAR_UNIT_TIME = "scalar-unit.time"; - public static final String VERSION = "version"; - public static final String PORTDEF = "PortDef"; - public static final String PORTSPEC = "PortSpec"; //??? PortSpec.SHORTNAME - public static final String JSON = "json"; - - public static final String PROPERTY_TYPES[] = { - INTEGER, STRING, BOOLEAN, FLOAT, RANGE,NUMBER, TIMESTAMP, LIST, MAP, - SCALAR_UNIT_SIZE, SCALAR_UNIT_FREQUENCY, SCALAR_UNIT_TIME, - VERSION, PORTDEF, PORTSPEC, JSON}; - - @SuppressWarnings("unused") - private static final String SCALAR_UNIT_SIZE_DEFAULT = "B"; - - private static Map SCALAR_UNIT_SIZE_DICT = new HashMap<>(); - static { - SCALAR_UNIT_SIZE_DICT.put("B", 1L); - SCALAR_UNIT_SIZE_DICT.put("KB", 1000L); - SCALAR_UNIT_SIZE_DICT.put("KIB", 1024L); - SCALAR_UNIT_SIZE_DICT.put("MB", 1000000L); - SCALAR_UNIT_SIZE_DICT.put("MIB", 1048576L); - SCALAR_UNIT_SIZE_DICT.put("GB", 1000000000L); - SCALAR_UNIT_SIZE_DICT.put("GIB", 1073741824L); - SCALAR_UNIT_SIZE_DICT.put("TB", 1000000000000L); - SCALAR_UNIT_SIZE_DICT.put("TIB", 1099511627776L); - } - - private String name; - private LinkedHashMap schema; - private int _len; - private ArrayList constraintsList; - - - public Schema(String _name,LinkedHashMap _schemaDict) { - name = _name; - - if(!(_schemaDict instanceof LinkedHashMap)) { - //msg = (_('Schema definition of "%(pname)s" must be a dict.') - // % dict(pname=name)) - ThreadLocalsHolder.getCollector().appendException(String.format( - "InvalidSchemaError: Schema definition of \"%s\" must be a dict",name)); - } - - if(_schemaDict.get("type") == null) { - //msg = (_('Schema definition of "%(pname)s" must have a "type" ' - // 'attribute.') % dict(pname=name)) - ThreadLocalsHolder.getCollector().appendException(String.format( - "InvalidSchemaError: Schema definition of \"%s\" must have a \"type\" attribute",name)); - } - - schema = _schemaDict; - _len = 0; //??? None - constraintsList = new ArrayList<>(); - } - - public String getType() { - return (String)schema.get(TYPE); - } - - public boolean isRequired() { - return (boolean)schema.getOrDefault(REQUIRED, true); - } - - public String getDescription() { - return (String)schema.getOrDefault(DESCRIPTION,""); - } - - public Object getDefault() { - return schema.get(DEFAULT); - } - - public String getStatus() { - return (String)schema.getOrDefault(STATUS,""); - } - - @SuppressWarnings("unchecked") - public ArrayList getConstraints() { - if(constraintsList.size() == 0) { - Object cob = schema.get(CONSTRAINTS); - if(cob instanceof ArrayList) { - ArrayList constraintSchemata = (ArrayList)cob; - for(Object ob: constraintSchemata) { - if(ob instanceof LinkedHashMap) { - for(String cClass: ((LinkedHashMap)ob).keySet()) { - Constraint c = Constraint.factory(cClass,name,getType(),ob); - if(c != null) { - constraintsList.add(c); - } - else { - // error - ThreadLocalsHolder.getCollector().appendException(String.format( - "UnknownFieldError: Constraint type \"%s\" for property \"%s\" is not supported", - cClass,name)); - } - break; - } - } - } - } - } - return constraintsList; - } - - @SuppressWarnings("unchecked") - public LinkedHashMap getEntrySchema() { - return (LinkedHashMap)schema.get(ENTRYSCHEMA); - } - - // Python intrinsic methods... - - // substitute for __getitem__ (aka self[key]) - public Object getItem(String key) { - return schema.get(key); - } - - /* - def __iter__(self): - for k in self.KEYS: - try: - self.schema[k] - except KeyError: - pass - else: - yield k - */ - - // substitute for __len__ (aka self.len()) - public int getLen() { - int len = 0; - for(String k: KEYS) { - if(schema.get(k) != null) { - len++; - } - _len = len; - } - return _len; - } - // getter - public LinkedHashMap getSchema() { - return schema; - } - -} - -/*python - -class Schema(collections.Mapping): - -KEYS = ( - TYPE, REQUIRED, DESCRIPTION, - DEFAULT, CONSTRAINTS, ENTRYSCHEMA, STATUS -) = ( - 'type', 'required', 'description', - 'default', 'constraints', 'entry_schema', 'status' -) - -PROPERTY_TYPES = ( - INTEGER, STRING, BOOLEAN, FLOAT, RANGE, - NUMBER, TIMESTAMP, LIST, MAP, - SCALAR_UNIT_SIZE, SCALAR_UNIT_FREQUENCY, SCALAR_UNIT_TIME, - VERSION, PORTDEF, PORTSPEC -) = ( - 'integer', 'string', 'boolean', 'float', 'range', - 'number', 'timestamp', 'list', 'map', - 'scalar-unit.size', 'scalar-unit.frequency', 'scalar-unit.time', - 'version', 'PortDef', PortSpec.SHORTNAME -) - -SCALAR_UNIT_SIZE_DEFAULT = 'B' -SCALAR_UNIT_SIZE_DICT = {'B': 1, 'KB': 1000, 'KIB': 1024, 'MB': 1000000, - 'MIB': 1048576, 'GB': 1000000000, - 'GIB': 1073741824, 'TB': 1000000000000, - 'TIB': 1099511627776} - -def __init__(self, name, schema_dict): - self.name = name - if not isinstance(schema_dict, collections.Mapping): - msg = (_('Schema definition of "%(pname)s" must be a dict.') - % dict(pname=name)) - ExceptionCollector.appendException(InvalidSchemaError(message=msg)) - - try: - schema_dict['type'] - except KeyError: - msg = (_('Schema definition of "%(pname)s" must have a "type" ' - 'attribute.') % dict(pname=name)) - ExceptionCollector.appendException(InvalidSchemaError(message=msg)) - - self.schema = schema_dict - self._len = None - self.constraints_list = [] - -@property -def type(self): - return self.schema[self.TYPE] - -@property -def required(self): - return self.schema.get(self.REQUIRED, True) - -@property -def description(self): - return self.schema.get(self.DESCRIPTION, '') - -@property -def default(self): - return self.schema.get(self.DEFAULT) - -@property -def status(self): - return self.schema.get(self.STATUS, '') - -@property -def constraints(self): - if not self.constraints_list: - constraint_schemata = self.schema.get(self.CONSTRAINTS) - if constraint_schemata: - self.constraints_list = [Constraint(self.name, - self.type, - cschema) - for cschema in constraint_schemata] - return self.constraints_list - -@property -def entry_schema(self): - return self.schema.get(self.ENTRYSCHEMA) - -def __getitem__(self, key): - return self.schema[key] - -def __iter__(self): - for k in self.KEYS: - try: - self.schema[k] - except KeyError: - pass - else: - yield k - -def __len__(self): - if self._len is None: - self._len = len(list(iter(self))) - return self._len -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/ValidValues.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/ValidValues.java deleted file mode 100644 index 06622e4..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/elements/constraints/ValidValues.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements.constraints; - -import java.util.ArrayList; - -public class ValidValues extends Constraint { - - - protected void _setValues() { - - constraintKey = VALID_VALUES; - - for(String s: Schema.PROPERTY_TYPES) { - validPropTypes.add(s); - } - - } - - - public ValidValues(String name,String type,Object c) { - super(name,type,c); - - } - - @SuppressWarnings("unchecked") - protected boolean _isValid(Object val) { - if(!(constraintValue instanceof ArrayList)) { - return false; - } - if(val instanceof ArrayList) { - boolean bAll = true; - for(Object v: (ArrayList)val) { - if(!((ArrayList)constraintValue).contains(v)) { - bAll = false; - break; - }; - } - return bAll; - } - return ((ArrayList)constraintValue).contains(val); - } - - protected String _errMsg(Object value) { - return String.format("The value \"%s\" of property \"%s\" is not valid. Expected a value from \"%s\"", - value.toString(),propertyName,constraintValue.toString()); - } - -} - -/*python - -class ValidValues(Constraint): -"""Constraint class for "valid_values" - -Constrains a property or parameter to a value that is in the list of -declared values. -""" -constraint_key = Constraint.VALID_VALUES - -valid_prop_types = Schema.PROPERTY_TYPES - -def __init__(self, property_name, property_type, constraint): - super(ValidValues, self).__init__(property_name, property_type, - constraint) - if not isinstance(self.constraint_value, collections.Sequence): - ExceptionCollector.appendException( - InvalidSchemaError(message=_('The property "valid_values" ' - 'expects a list.'))) - -def _is_valid(self, value): - print '*** payton parser validating ',value,' in ',self.constraint_value#GGG - if isinstance(value, list): - return all(v in self.constraint_value for v in value) - return value in self.constraint_value - -def _err_msg(self, value): - allowed = '[%s]' % ', '.join(str(a) for a in self.constraint_value) - return (_('The value "%(pvalue)s" of property "%(pname)s" is not ' - 'valid. Expected a value from "%(cvalue)s".') % - dict(pname=self.property_name, - pvalue=value, - cvalue=allowed)) - - -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/extensions/ExtTools.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/extensions/ExtTools.java deleted file mode 100644 index 6403d6e..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/extensions/ExtTools.java +++ /dev/null @@ -1,210 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.extensions; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.nio.charset.Charset; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -public class ExtTools { - - private static Logger log = LoggerFactory.getLogger(ExtTools.class.getName()); - - private static LinkedHashMap EXTENSION_INFO = new LinkedHashMap<>(); - - public ExtTools() { - - EXTENSION_INFO = _loadExtensions(); - } - - private LinkedHashMap _loadExtensions() { - - LinkedHashMap extensions = new LinkedHashMap<>(); - - String path = ExtTools.class.getProtectionDomain().getCodeSource().getLocation().getPath(); - //String extdir = path + File.separator + "resources/extensions"; - - String extdir = ExtTools.class.getClassLoader().getResource("extensions").getFile(); - - // for all folders in extdir - File extDir = new File(extdir); - File extDirList[] = extDir.listFiles(); - if (extDirList == null) { - String a = "aaaa"; - - } - if (extDirList != null) { - for(File f: extDirList) { - if(f.isDirectory()) { - // for all .py files in folder - File extFileList[] = f.listFiles(); - for(File pyf: extFileList) { - String pyfName = pyf.getName(); - String pyfPath = pyf.getAbsolutePath(); - if(pyfName.endsWith(".py")) { - // get VERSION,SECTIONS,DEF_FILE - try { - String version = null; - ArrayList sections = null; - String defsFile = null; - String line; - InputStream fis = new FileInputStream(pyfPath); - InputStreamReader isr = new InputStreamReader(fis, Charset.forName("UTF-8")); - BufferedReader br = new BufferedReader(isr); - Pattern pattern = Pattern.compile("^([^#]\\S+)\\s*=\\s*(\\S.*)$"); - while((line = br.readLine()) != null) { - line = line.replace("'","\""); - Matcher matcher = pattern.matcher(line.toString()); - if(matcher.find()) { - if(matcher.group(1).equals("VERSION")) { - version = matcher.group(2); - if(version.startsWith("'") || version.startsWith("\"")) { - version = version.substring(1,version.length()-1); - } - } - else if(matcher.group(1).equals("DEFS_FILE")) { - String fn = matcher.group(2); - if(fn.startsWith("'") || fn.startsWith("\"")) { - fn = fn.substring(1,fn.length()-1); - } - defsFile = pyf.getParent() + File.separator + fn;//matcher.group(2); - } - else if(matcher.group(1).equals("SECTIONS")) { - sections = new ArrayList<>(); - Pattern secpat = Pattern.compile("\"([^\"]+)\""); - Matcher secmat = secpat.matcher(matcher.group(2)); - while(secmat.find()) { - sections.add(secmat.group(1)); - } - } - } - } - br.close(); - - if(version != null && defsFile != null) { - LinkedHashMap ext = new LinkedHashMap<>(); - ext.put("defs_file", defsFile); - if(sections != null) { - ext.put("sections", sections); - } - extensions.put(version, ext); - } - else { - // error - } - } - catch(Exception e) { - log.error("ExtTools - _loadExtensions - {}", e.getMessage()); - // ... - } - } - } - } - } - } - return extensions; - } - - public ArrayList getVersions() { - return new ArrayList(EXTENSION_INFO.keySet()); - } - - public LinkedHashMap> getSections() { - LinkedHashMap> sections = new LinkedHashMap<>(); - for(String version: EXTENSION_INFO.keySet()) { - LinkedHashMap eiv = (LinkedHashMap)EXTENSION_INFO.get(version); - sections.put(version,(ArrayList)eiv.get("sections")); - } - return sections; - } - - public String getDefsFile(String version) { - LinkedHashMap eiv = (LinkedHashMap)EXTENSION_INFO.get(version); - return (String)eiv.get("defs_file"); - } - -} - -/*python - -from toscaparser.common.exception import ToscaExtAttributeError -from toscaparser.common.exception import ToscaExtImportError - -log = logging.getLogger("tosca.model") - -REQUIRED_ATTRIBUTES = ['VERSION', 'DEFS_FILE'] - - -class ExtTools(object): - def __init__(self): - self.EXTENSION_INFO = self._load_extensions() - - def _load_extensions(self): - '''Dynamically load all the extensions .''' - extensions = {} - - # Use the absolute path of the class path - abs_path = os.path.dirname(os.path.abspath(__file__)) - - extdirs = [e for e in os.listdir(abs_path) if - not e.startswith('tests') and - os.path.isdir(os.path.join(abs_path, e))] - - for e in extdirs: - log.info(e) - extpath = abs_path + '/' + e - # Grab all the extension files in the given path - ext_files = [f for f in os.listdir(extpath) if f.endswith('.py') - and not f.startswith('__init__')] - - # For each module, pick out the target translation class - for f in ext_files: - log.info(f) - ext_name = 'toscaparser/extensions/' + e + '/' + f.strip('.py') - ext_name = ext_name.replace('/', '.') - try: - extinfo = importlib.import_module(ext_name) - version = getattr(extinfo, 'VERSION') - defs_file = extpath + '/' + getattr(extinfo, 'DEFS_FILE') - - # Sections is an optional attribute - sections = getattr(extinfo, 'SECTIONS', ()) - - extensions[version] = {'sections': sections, - 'defs_file': defs_file} - except ImportError: - raise ToscaExtImportError(ext_name=ext_name) - except AttributeError: - attrs = ', '.join(REQUIRED_ATTRIBUTES) - raise ToscaExtAttributeError(ext_name=ext_name, - attrs=attrs) - - print 'Extensions ',extensions#GGG - return extensions - - def get_versions(self): - return self.EXTENSION_INFO.keys() - - def get_sections(self): - sections = {} - for version in self.EXTENSION_INFO.keys(): - sections[version] = self.EXTENSION_INFO[version]['sections'] - - return sections - - def get_defs_file(self, version): - versiondata = self.EXTENSION_INFO.get(version) - - if versiondata: - return versiondata.get('defs_file') - else: - return None -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/Concat.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/Concat.java deleted file mode 100644 index 6dc7deb..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/Concat.java +++ /dev/null @@ -1,77 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.functions; - -import java.util.ArrayList; - -import org.openecomp.sdc.toscaparser.api.TopologyTemplate; -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -public class Concat extends Function { - // Validate the function and provide an instance of the function - - // Concatenation of values are supposed to be produced at runtime and - // therefore its the responsibility of the TOSCA engine to implement the - // evaluation of Concat functions. - - // Arguments: - - // * List of strings that needs to be concatenated - - // Example: - - // [ 'http://', - // get_attribute: [ server, public_address ], - // ':' , - // get_attribute: [ server, port ] ] - - - public Concat(TopologyTemplate ttpl,Object context,String name,ArrayList args) { - super(ttpl,context,name,args); - } - - @Override - public Object result() { - return this; - } - - @Override - void validate() { - if(args.size() < 1) { - ThreadLocalsHolder.getCollector().appendException( - "ValueError: Invalid arguments for function \"concat\". " + - "Expected at least one argument"); - } - } - -} - -/*python - -class Concat(Function): -"""Validate the function and provide an instance of the function - -Concatenation of values are supposed to be produced at runtime and -therefore its the responsibility of the TOSCA engine to implement the -evaluation of Concat functions. - -Arguments: - -* List of strings that needs to be concatenated - -Example: - - [ 'http://', - get_attribute: [ server, public_address ], - ':' , - get_attribute: [ server, port ] ] -""" - -def validate(self): - if len(self.args) < 1: - ExceptionCollector.appendException( - ValueError(_('Invalid arguments for function "{0}". Expected ' - 'at least one arguments.').format(CONCAT))) - -def result(self): - return self -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/Function.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/Function.java deleted file mode 100644 index 102fbc0..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/Function.java +++ /dev/null @@ -1,191 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.functions; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.LinkedHashMap; - -import org.openecomp.sdc.toscaparser.api.TopologyTemplate; - -public abstract class Function { - - protected static final String GET_PROPERTY = "get_property"; - protected static final String GET_ATTRIBUTE = "get_attribute"; - protected static final String GET_INPUT = "get_input"; - protected static final String GET_OPERATION_OUTPUT = "get_operation_output"; - protected static final String CONCAT = "concat"; - protected static final String TOKEN = "token"; - - protected static final String SELF = "SELF"; - protected static final String HOST = "HOST"; - protected static final String TARGET = "TARGET"; - protected static final String SOURCE = "SOURCE"; - - protected static final String HOSTED_ON = "tosca.relationships.HostedOn"; - - protected static HashMap functionMappings = _getFunctionMappings(); - - private static HashMap _getFunctionMappings() { - HashMap map = new HashMap<>(); - map.put(GET_PROPERTY,"GetProperty"); - map.put(GET_INPUT, "GetInput"); - map.put(GET_ATTRIBUTE, "GetAttribute"); - map.put(GET_OPERATION_OUTPUT, "GetOperationOutput"); - map.put(CONCAT, "Concat"); - map.put(TOKEN, "Token"); - return map; - } - - protected TopologyTemplate toscaTpl; - protected Object context; - protected String name; - protected ArrayList args; - - - public Function(TopologyTemplate _toscaTpl,Object _context,String _name,ArrayList _args) { - toscaTpl = _toscaTpl; - context = _context; - name = _name; - args = _args; - validate(); - - } - - abstract Object result(); - - abstract void validate(); - - @SuppressWarnings("unchecked") - public static boolean isFunction(Object funcObj) { - // Returns True if the provided function is a Tosca intrinsic function. - // - //Examples: - // - //* "{ get_property: { SELF, port } }" - //* "{ get_input: db_name }" - //* Function instance - - //:param function: Function as string or a Function instance. - //:return: True if function is a Tosca intrinsic function, otherwise False. - // - - if(funcObj instanceof LinkedHashMap) { - LinkedHashMap function = (LinkedHashMap)funcObj; - if(function.size() == 1) { - String funcName = (new ArrayList(function.keySet())).get(0); - return functionMappings.keySet().contains(funcName); - } - } - return (funcObj instanceof Function); - } - - @SuppressWarnings("unchecked") - public static Object getFunction(TopologyTemplate ttpl,Object context,Object rawFunctionObj) { - // Gets a Function instance representing the provided template function. - - // If the format provided raw_function format is not relevant for template - // functions or if the function name doesn't exist in function mapping the - // method returns the provided raw_function. - // - // :param tosca_tpl: The tosca template. - // :param node_template: The node template the function is specified for. - // :param raw_function: The raw function as dict. - // :return: Template function as Function instance or the raw_function if - // parsing was unsuccessful. - - if(isFunction(rawFunctionObj)) { - if(rawFunctionObj instanceof LinkedHashMap) { - LinkedHashMap rawFunction = (LinkedHashMap)rawFunctionObj; - String funcName = (new ArrayList(rawFunction.keySet())).get(0); - if(functionMappings.keySet().contains(funcName)) { - String funcType = functionMappings.get(funcName); - Object oargs = (new ArrayList(rawFunction.values())).get(0); - ArrayList funcArgs; - if(oargs instanceof ArrayList) { - funcArgs = (ArrayList)oargs; - } - else { - funcArgs = new ArrayList<>(); - funcArgs.add(oargs); - } - - if(funcType.equals("GetInput")) { - return new GetInput(ttpl,context,funcName,funcArgs); - } - else if(funcType.equals("GetAttribute")) { - return new GetAttribute(ttpl,context,funcName,funcArgs); - } - else if(funcType.equals("GetProperty")) { - return new GetProperty(ttpl,context,funcName,funcArgs); - } - else if(funcType.equals("GetOperationOutput")) { - return new GetOperationOutput(ttpl,context,funcName,funcArgs); - } - else if(funcType.equals("Concat")) { - return new Concat(ttpl,context,funcName,funcArgs); - } - else if(funcType.equals("Token")) { - return new Token(ttpl,context,funcName,funcArgs); - } - } - } - } - return rawFunctionObj; - } -} - -/*python - -from toscaparser.common.exception import ExceptionCollector -from toscaparser.common.exception import UnknownInputError -from toscaparser.dataentity import DataEntity -from toscaparser.elements.constraints import Schema -from toscaparser.elements.datatype import DataType -from toscaparser.elements.entity_type import EntityType -from toscaparser.elements.relationshiptype import RelationshipType -from toscaparser.elements.statefulentitytype import StatefulEntityType -from toscaparser.utils.gettextutils import _ - - -GET_PROPERTY = 'get_property' -GET_ATTRIBUTE = 'get_attribute' -GET_INPUT = 'get_input' -GET_OPERATION_OUTPUT = 'get_operation_output' -CONCAT = 'concat' -TOKEN = 'token' - -SELF = 'SELF' -HOST = 'HOST' -TARGET = 'TARGET' -SOURCE = 'SOURCE' - -HOSTED_ON = 'tosca.relationships.HostedOn' - - -@six.add_metaclass(abc.ABCMeta) -class Function(object): - """An abstract type for representing a Tosca template function.""" - - def __init__(self, tosca_tpl, context, name, args): - self.tosca_tpl = tosca_tpl - self.context = context - self.name = name - self.args = args - self.validate() - - @abc.abstractmethod - def result(self): - """Invokes the function and returns its result - - Some methods invocation may only be relevant on runtime (for example, - getting runtime properties) and therefore its the responsibility of - the orchestrator/translator to take care of such functions invocation. - - :return: Function invocation result. - """ - return {self.name: self.args} - - @abc.abstractmethod - def validate(self): - """Validates function arguments.""" - pass -*/ diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/GetAttribute.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/GetAttribute.java deleted file mode 100644 index 549073b..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/GetAttribute.java +++ /dev/null @@ -1,535 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.functions; - -import java.util.ArrayList; -import java.util.LinkedHashMap; - -import org.openecomp.sdc.toscaparser.api.*; -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.elements.AttributeDef; -import org.openecomp.sdc.toscaparser.api.elements.CapabilityTypeDef; -import org.openecomp.sdc.toscaparser.api.elements.DataType; -import org.openecomp.sdc.toscaparser.api.elements.EntityType; -import org.openecomp.sdc.toscaparser.api.elements.NodeType; -import org.openecomp.sdc.toscaparser.api.elements.PropertyDef; -import org.openecomp.sdc.toscaparser.api.elements.RelationshipType; -import org.openecomp.sdc.toscaparser.api.elements.StatefulEntityType; -import org.openecomp.sdc.toscaparser.api.elements.constraints.Schema; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -public class GetAttribute extends Function { - // Get an attribute value of an entity defined in the service template - - // Node template attributes values are set in runtime and therefore its the - // responsibility of the Tosca engine to implement the evaluation of - // get_attribute functions. - - // Arguments: - - // * Node template name | HOST. - // * Attribute name. - - // If the HOST keyword is passed as the node template name argument the - // function will search each node template along the HostedOn relationship - // chain until a node which contains the attribute is found. - - // Examples: - - // * { get_attribute: [ server, private_address ] } - // * { get_attribute: [ HOST, private_address ] } - // * { get_attribute: [ HOST, private_address, 0 ] } - // * { get_attribute: [ HOST, private_address, 0, some_prop] } - - public GetAttribute(TopologyTemplate ttpl,Object context,String name,ArrayList args) { - super(ttpl,context,name,args); - } - - @Override - void validate() { - if(args.size() < 2) { - ThreadLocalsHolder.getCollector().appendException( - "ValueError: Illegal arguments for function \"get_attribute\". Expected arguments: \"node-template-name\", \"req-or-cap\" (optional), \"property name.\""); - return; - } - else if(args.size() == 2) { - _findNodeTemplateContainingAttribute(); - } - else { - NodeTemplate nodeTpl = _findNodeTemplate((String)args.get(0)); - if(nodeTpl == null) { - return; - } - int index = 2; - AttributeDef attr = nodeTpl.getTypeDefinition().getAttributeDefValue((String)args.get(1)); - if(attr != null) { - // found - } - else { - index = 3; - // then check the req or caps - attr = _findReqOrCapAttribute((String)args.get(1),(String)args.get(2)); - if(attr == null) { - return; - } - } - - String valueType = (String)attr.getSchema().get("type"); - if(args.size() > index) { - for(Object elem: args.subList(index,args.size())) { - if(valueType.equals("list")) { - if(!(elem instanceof Integer)) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError: Illegal arguments for function \"get_attribute\" \"%s\". Expected positive integer argument", - elem.toString())); - } - Object ob = attr.getSchema().get("entry_schema"); - valueType = (String) - ((LinkedHashMap)ob).get("type"); - } - else if(valueType.equals("map")) { - Object ob = attr.getSchema().get("entry_schema"); - valueType = (String) - ((LinkedHashMap)ob).get("type"); - } - else { - boolean bFound = false; - for(String p: Schema.PROPERTY_TYPES) { - if(p.equals(valueType)) { - bFound = true; - break; - } - } - if(bFound) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError: 'Illegal arguments for function \"get_attribute\". Unexpected attribute/index value \"%d\"", - elem)); - return; - } - else { // It is a complex type - DataType dataType = new DataType(valueType,null); - LinkedHashMap props = - dataType.getAllProperties(); - PropertyDef prop = props.get((String)elem); - if(prop != null) { - valueType = (String)prop.getSchema().get("type"); - } - else { - ThreadLocalsHolder.getCollector().appendException(String.format( - "KeyError: Illegal arguments for function \"get_attribute\". Attribute name \"%s\" not found in \"%\"", - elem,valueType)); - } - } - } - } - } - } - } - - @Override - public Object result() { - return this; - } - - private NodeTemplate getReferencedNodeTemplate() { - // Gets the NodeTemplate instance the get_attribute function refers to - - // If HOST keyword was used as the node template argument, the node - // template which contains the attribute along the HostedOn relationship - // chain will be returned. - - return _findNodeTemplateContainingAttribute(); - - } - - // Attributes can be explicitly created as part of the type definition - // or a property name can be implicitly used as an attribute name - private NodeTemplate _findNodeTemplateContainingAttribute() { - NodeTemplate nodeTpl = _findNodeTemplate((String)args.get(0)); - if(nodeTpl != null && - !_attributeExistsInType(nodeTpl.getTypeDefinition()) && - !nodeTpl.getProperties().keySet().contains(getAttributeName())) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "KeyError: Attribute \"%s\" was not found in node template \"%s\"", - getAttributeName(),nodeTpl.getName())); - } - return nodeTpl; - } - - private boolean _attributeExistsInType(StatefulEntityType typeDefinition) { - LinkedHashMap attrsDef = typeDefinition.getAttributesDef(); - return attrsDef.get(getAttributeName()) != null; - } - - private NodeTemplate _findHostContainingAttribute(String nodeTemplateName) { - NodeTemplate nodeTemplate = _findNodeTemplate(nodeTemplateName); - if(nodeTemplate != null) { - LinkedHashMap hostedOnRel = - (LinkedHashMap)EntityType.TOSCA_DEF.get(HOSTED_ON); - for(Object ro: nodeTemplate.getRequirements()) { - if(ro != null && ro instanceof LinkedHashMap) { - LinkedHashMap r = (LinkedHashMap)ro; - for(String requirement: r.keySet()) { - String targetName = (String)r.get(requirement); - NodeTemplate targetNode = _findNodeTemplate(targetName); - NodeType targetType = (NodeType)targetNode.getTypeDefinition(); - for(CapabilityTypeDef capability: targetType.getCapabilitiesObjects()) { -// if(((ArrayList)hostedOnRel.get("valid_target_types")).contains(capability.getType())) { - if(capability.inheritsFrom((ArrayList)hostedOnRel.get("valid_target_types"))) { - if(_attributeExistsInType(targetType)) { - return targetNode; - } - return _findHostContainingAttribute(targetName); - } - } - } - } - } - } - return null; - } - - - private NodeTemplate _findNodeTemplate(String nodeTemplateName) { - if(nodeTemplateName.equals(HOST)) { - // Currently this is the only way to tell whether the function - // is used within the outputs section of the TOSCA template. - if(context instanceof ArrayList) { - ThreadLocalsHolder.getCollector().appendException( - "ValueError: \"get_attribute: [ HOST, ... ]\" is not allowed in \"outputs\" section of the TOSCA template"); - return null; - } - NodeTemplate nodeTpl = _findHostContainingAttribute(SELF); - if(nodeTpl == null) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError: \"get_attribute: [ HOST, ... ]\" was used in " + - "node template \"%s\" but \"%s\" was not found in " + - "the relationship chain",((NodeTemplate)context).getName(),HOSTED_ON)); - return null; - } - return nodeTpl; - } - if(nodeTemplateName.equals(TARGET)) { - if(!(((EntityTemplate)context).getTypeDefinition() instanceof RelationshipType)) { - ThreadLocalsHolder.getCollector().appendException( - "KeyError: \"TARGET\" keyword can only be used in context " + - " to \"Relationships\" target node"); - return null; - } - return ((RelationshipTemplate)context).getTarget(); - } - if(nodeTemplateName.equals(SOURCE)) { - if(!(((EntityTemplate)context).getTypeDefinition() instanceof RelationshipType)) { - ThreadLocalsHolder.getCollector().appendException( - "KeyError: \"SOURCE\" keyword can only be used in context " + - " to \"Relationships\" source node"); - return null; - } - return ((RelationshipTemplate)context).getTarget(); - } - String name; - if(nodeTemplateName.equals(SELF) && !(context instanceof ArrayList)) { - name = ((NodeTemplate)context).getName(); - } - else { - name = nodeTemplateName; - } - for(NodeTemplate nt: toscaTpl.getNodeTemplates()) { - if(nt.getName().equals(name)) { - return nt; - } - } - ThreadLocalsHolder.getCollector().appendException(String.format( - "KeyError: Node template \"%s\" was not found",nodeTemplateName)); - return null; - } - - public AttributeDef _findReqOrCapAttribute(String reqOrCap,String attrName) { - - NodeTemplate nodeTpl = _findNodeTemplate((String)args.get(0)); - // Find attribute in node template's requirements - for(Object ro: nodeTpl.getRequirements()) { - if(ro != null && ro instanceof LinkedHashMap) { - LinkedHashMap r = (LinkedHashMap)ro; - for(String req: r.keySet()) { - String nodeName = (String)r.get(req); - if(req.equals(reqOrCap)) { - NodeTemplate nodeTemplate = _findNodeTemplate(nodeName); - return _getCapabilityAttribute(nodeTemplate,req,attrName); - } - } - } - } - // If requirement was not found, look in node template's capabilities - return _getCapabilityAttribute(nodeTpl,reqOrCap,attrName); - } - - private AttributeDef _getCapabilityAttribute(NodeTemplate nodeTemplate, - String capabilityName, - String attrName) { - // Gets a node template capability attribute - LinkedHashMap caps = nodeTemplate.getCapabilities(); - if(caps != null && caps.keySet().contains(capabilityName)) { - Capability cap = caps.get(capabilityName); - AttributeDef attribute = null; - LinkedHashMap attrs = - cap.getDefinition().getAttributesDef(); - if(attrs != null && attrs.keySet().contains(attrName)) { - attribute = attrs.get(attrName); - } - if(attribute == null) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "KeyError: Attribute \"%s\" was not found in capability \"%s\" of node template \"%s\" referenced from node template \"%s\"", - attrName,capabilityName,nodeTemplate.getName(),((NodeTemplate)context).getName())); - } - return attribute; - } - String msg = String.format( - "Requirement/Capability \"%s\" referenced from node template \"%s\" was not found in node template \"%s\"", - capabilityName,((NodeTemplate)context).getName(),nodeTemplate.getName()); - ThreadLocalsHolder.getCollector().appendException("KeyError: " + msg); - return null; - } - - String getNodeTemplateName() { - return (String)args.get(0); - } - - String getAttributeName() { - return (String)args.get(1); - } - -} - -/*python - -class GetAttribute(Function): -"""Get an attribute value of an entity defined in the service template - -Node template attributes values are set in runtime and therefore its the -responsibility of the Tosca engine to implement the evaluation of -get_attribute functions. - -Arguments: - -* Node template name | HOST. -* Attribute name. - -If the HOST keyword is passed as the node template name argument the -function will search each node template along the HostedOn relationship -chain until a node which contains the attribute is found. - -Examples: - -* { get_attribute: [ server, private_address ] } -* { get_attribute: [ HOST, private_address ] } -* { get_attribute: [ HOST, private_address, 0 ] } -* { get_attribute: [ HOST, private_address, 0, some_prop] } -""" - -def validate(self): - if len(self.args) < 2: - ExceptionCollector.appendException( - ValueError(_('Illegal arguments for function "{0}". Expected ' - 'arguments: "node-template-name", "req-or-cap"' - '(optional), "property name"' - ).format(GET_ATTRIBUTE))) - return - elif len(self.args) == 2: - self._find_node_template_containing_attribute() - else: - node_tpl = self._find_node_template(self.args[0]) - if node_tpl is None: - return - index = 2 - attrs = node_tpl.type_definition.get_attributes_def() - found = [attrs[self.args[1]]] if self.args[1] in attrs else [] - if found: - attr = found[0] - else: - index = 3 - # then check the req or caps - attr = self._find_req_or_cap_attribute(self.args[1], - self.args[2]) - - value_type = attr.schema['type'] - if len(self.args) > index: - for elem in self.args[index:]: - if value_type == "list": - if not isinstance(elem, int): - ExceptionCollector.appendException( - ValueError(_('Illegal arguments for function' - ' "{0}". "{1}" Expected positive' - ' integer argument' - ).format(GET_ATTRIBUTE, elem))) - value_type = attr.schema['entry_schema']['type'] - elif value_type == "map": - value_type = attr.schema['entry_schema']['type'] - elif value_type in Schema.PROPERTY_TYPES: - ExceptionCollector.appendException( - ValueError(_('Illegal arguments for function' - ' "{0}". Unexpected attribute/' - 'index value "{1}"' - ).format(GET_ATTRIBUTE, elem))) - return - else: # It is a complex type - data_type = DataType(value_type) - props = data_type.get_all_properties() - found = [props[elem]] if elem in props else [] - if found: - prop = found[0] - value_type = prop.schema['type'] - else: - ExceptionCollector.appendException( - KeyError(_('Illegal arguments for function' - ' "{0}". Attribute name "{1}" not' - ' found in "{2}"' - ).format(GET_ATTRIBUTE, - elem, - value_type))) - -def result(self): - return self - -def get_referenced_node_template(self): - """Gets the NodeTemplate instance the get_attribute function refers to. - - If HOST keyword was used as the node template argument, the node - template which contains the attribute along the HostedOn relationship - chain will be returned. - """ - return self._find_node_template_containing_attribute() - -# Attributes can be explicitly created as part of the type definition -# or a property name can be implicitly used as an attribute name -def _find_node_template_containing_attribute(self): - node_tpl = self._find_node_template(self.args[0]) - if node_tpl and \ - not self._attribute_exists_in_type(node_tpl.type_definition) \ - and self.attribute_name not in node_tpl.get_properties(): - ExceptionCollector.appendException( - KeyError(_('Attribute "%(att)s" was not found in node ' - 'template "%(ntpl)s".') % - {'att': self.attribute_name, - 'ntpl': node_tpl.name})) - return node_tpl - -def _attribute_exists_in_type(self, type_definition): - attrs_def = type_definition.get_attributes_def() - found = [attrs_def[self.attribute_name]] \ - if self.attribute_name in attrs_def else [] - return len(found) == 1 - -def _find_host_containing_attribute(self, node_template_name=SELF): - node_template = self._find_node_template(node_template_name) - if node_template: - hosted_on_rel = EntityType.TOSCA_DEF[HOSTED_ON] - for r in node_template.requirements: - for requirement, target_name in r.items(): - target_node = self._find_node_template(target_name) - target_type = target_node.type_definition - for capability in target_type.get_capabilities_objects(): - if capability.type in \ - hosted_on_rel['valid_target_types']: - if self._attribute_exists_in_type(target_type): - return target_node - return self._find_host_containing_attribute( - target_name) - -def _find_node_template(self, node_template_name): - if node_template_name == HOST: - # Currently this is the only way to tell whether the function - # is used within the outputs section of the TOSCA template. - if isinstance(self.context, list): - ExceptionCollector.appendException( - ValueError(_( - '"get_attribute: [ HOST, ... ]" is not allowed in ' - '"outputs" section of the TOSCA template.'))) - return - node_tpl = self._find_host_containing_attribute() - if not node_tpl: - ExceptionCollector.appendException( - ValueError(_( - '"get_attribute: [ HOST, ... ]" was used in node ' - 'template "{0}" but "{1}" was not found in ' - 'the relationship chain.').format(self.context.name, - HOSTED_ON))) - return - return node_tpl - if node_template_name == TARGET: - if not isinstance(self.context.type_definition, RelationshipType): - ExceptionCollector.appendException( - KeyError(_('"TARGET" keyword can only be used in context' - ' to "Relationships" target node'))) - return - return self.context.target - if node_template_name == SOURCE: - if not isinstance(self.context.type_definition, RelationshipType): - ExceptionCollector.appendException( - KeyError(_('"SOURCE" keyword can only be used in context' - ' to "Relationships" source node'))) - return - return self.context.source - name = self.context.name \ - if node_template_name == SELF and \ - not isinstance(self.context, list) \ - else node_template_name - for node_template in self.tosca_tpl.nodetemplates: - if node_template.name == name: - return node_template - ExceptionCollector.appendException( - KeyError(_( - 'Node template "{0}" was not found.' - ).format(node_template_name))) - -def _find_req_or_cap_attribute(self, req_or_cap, attr_name): - node_tpl = self._find_node_template(self.args[0]) - # Find attribute in node template's requirements - for r in node_tpl.requirements: - for req, node_name in r.items(): - if req == req_or_cap: - node_template = self._find_node_template(node_name) - return self._get_capability_attribute( - node_template, - req, - attr_name) - # If requirement was not found, look in node template's capabilities - return self._get_capability_attribute(node_tpl, - req_or_cap, - attr_name) - -def _get_capability_attribute(self, - node_template, - capability_name, - attr_name): - """Gets a node template capability attribute.""" - caps = node_template.get_capabilities() - if caps and capability_name in caps.keys(): - cap = caps[capability_name] - attribute = None - attrs = cap.definition.get_attributes_def() - if attrs and attr_name in attrs.keys(): - attribute = attrs[attr_name] - if not attribute: - ExceptionCollector.appendException( - KeyError(_('Attribute "%(attr)s" was not found in ' - 'capability "%(cap)s" of node template ' - '"%(ntpl1)s" referenced from node template ' - '"%(ntpl2)s".') % {'attr': attr_name, - 'cap': capability_name, - 'ntpl1': node_template.name, - 'ntpl2': self.context.name})) - return attribute - msg = _('Requirement/Capability "{0}" referenced from node template ' - '"{1}" was not found in node template "{2}".').format( - capability_name, - self.context.name, - node_template.name) - ExceptionCollector.appendException(KeyError(msg)) - -@property -def node_template_name(self): - return self.args[0] - -@property -def attribute_name(self): - return self.args[1] -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/GetInput.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/GetInput.java deleted file mode 100644 index 4332f70..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/GetInput.java +++ /dev/null @@ -1,110 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.functions; - -import java.util.ArrayList; -import java.util.LinkedHashMap; - -import org.openecomp.sdc.toscaparser.api.DataEntity; -import org.openecomp.sdc.toscaparser.api.TopologyTemplate; -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.parameters.Input; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -public class GetInput extends Function { - - public GetInput(TopologyTemplate toscaTpl,Object context,String name,ArrayList _args) { - super(toscaTpl,context,name,_args); - - } - - @Override - void validate() { - if(args.size() != 1) { - //PA - changed to WARNING from CRITICAL after talking to Renana, 22/05/2017 - ThreadLocalsHolder.getCollector().appendWarning(String.format( - "ValueError: Expected one argument for function \"get_input\" but received \"%s\"", - args.toString())); - } - boolean bFound = false; - for(Input inp: toscaTpl.getInputs()) { - if(inp.getName().equals(args.get(0))) { - bFound = true; - break; - } - } - if(!bFound) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "UnknownInputError: Unknown input \"%s\"",args.get(0))); - } - } - - public Object result() { - if(toscaTpl.getParsedParams() != null && - toscaTpl.getParsedParams().get(getInputName()) != null) { - LinkedHashMap ttinp = (LinkedHashMap)toscaTpl.getTpl().get("inputs"); - LinkedHashMap ttinpinp = (LinkedHashMap)ttinp.get(getInputName()); - String type = (String)ttinpinp.get("type"); - - return DataEntity.validateDatatype( - type, toscaTpl.getParsedParams().get(getInputName()),null,null,null); - } - - Input inputDef = null; - for(Input inpDef: toscaTpl.getInputs()) { - if(getInputName().equals(inpDef.getName())) { - inputDef = inpDef; - break; - } - } - if(inputDef != null) { - return inputDef.getDefault(); - } - return null; - } - - public String getInputName() { - return (String)args.get(0); - } - -} - -/*python - -class GetInput(Function): -"""Get a property value declared within the input of the service template. - -Arguments: - -* Input name. - -Example: - -* get_input: port -""" - -def validate(self): - if len(self.args) != 1: - ExceptionCollector.appendException( - ValueError(_( - 'Expected one argument for function "get_input" but ' - 'received "%s".') % self.args)) - inputs = [input.name for input in self.tosca_tpl.inputs] - if self.args[0] not in inputs: - ExceptionCollector.appendException( - UnknownInputError(input_name=self.args[0])) - -def result(self): - if self.tosca_tpl.parsed_params and \ - self.input_name in self.tosca_tpl.parsed_params: - return DataEntity.validate_datatype( - self.tosca_tpl.tpl['inputs'][self.input_name]['type'], - self.tosca_tpl.parsed_params[self.input_name]) - - input = [input_def for input_def in self.tosca_tpl.inputs - if self.input_name == input_def.name][0] - return input.default - -@property -def input_name(self): - return self.args[0] - -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/GetOperationOutput.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/GetOperationOutput.java deleted file mode 100644 index 22f2cd7..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/GetOperationOutput.java +++ /dev/null @@ -1,225 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.functions; - -import java.util.ArrayList; - -import org.openecomp.sdc.toscaparser.api.*; -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.elements.InterfacesDef; -import org.openecomp.sdc.toscaparser.api.elements.RelationshipType; -import org.openecomp.sdc.toscaparser.api.elements.StatefulEntityType; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -public class GetOperationOutput extends Function { - - public GetOperationOutput(TopologyTemplate ttpl,Object context,String name,ArrayList args) { - super(ttpl,context,name,args); - } - - @Override - public void validate() { - if(args.size() == 4) { - _findNodeTemplate((String)args.get(0)); - String interfaceName = _findInterfaceName((String)args.get(1)); - _findOperationName(interfaceName,(String)args.get(2)); - } - else { - ThreadLocalsHolder.getCollector().appendException( - "ValueError: Illegal arguments for function \"get_operation_output\". " + - "Expected arguments: \"template_name\",\"interface_name\"," + - "\"operation_name\",\"output_variable_name\""); - } - } - - private String _findInterfaceName(String _interfaceName) { - boolean bFound = false; - for(String sect: InterfacesDef.SECTIONS) { - if(sect.equals(_interfaceName)) { - bFound = true; - break; - } - } - if(bFound) { - return _interfaceName; - } - else { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError: invalid interface name \"%s\" in \"get_operation_output\"", - _interfaceName)); - return null; - } - } - - private String _findOperationName(String interfaceName,String operationName) { - - if(interfaceName.equals("Configure") || - interfaceName.equals("tosca.interfaces.node.relationship.Configure")) { - boolean bFound = false; - for(String sect: StatefulEntityType.interfacesRelationshipConfigureOperations) { - if(sect.equals(operationName)) { - bFound = true; - break; - } - } - if(bFound) { - return operationName; - } - else { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError: Invalid operation of Configure interface \"%s\" in \"get_operation_output\"", - operationName)); - return null; - } - } - if(interfaceName.equals("Standard") || - interfaceName.equals("tosca.interfaces.node.lifecycle.Standard")) { - boolean bFound = false; - for(String sect: StatefulEntityType.interfacesNodeLifecycleOperations) { - if(sect.equals(operationName)) { - bFound = true; - break; - } - } - if(bFound) { - return operationName; - } - else { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError: Invalid operation of Configure interface \"%s\" in \"get_operation_output\"", - operationName)); - return null; - } - } - else { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError: Invalid interface name \"%s\" in \"get_operation_output\"", - interfaceName)); - return null; - } - } - - private NodeTemplate _findNodeTemplate(String nodeTemplateName) { - if(nodeTemplateName.equals(TARGET)) { - if(!(((EntityTemplate)context).getTypeDefinition() instanceof RelationshipType)) { - ThreadLocalsHolder.getCollector().appendException( - "KeyError: \"TARGET\" keyword can only be used in context " + - " to \"Relationships\" target node"); - return null; - } - return ((RelationshipTemplate)context).getTarget(); - } - if(nodeTemplateName.equals(SOURCE)) { - if(!(((EntityTemplate)context).getTypeDefinition() instanceof RelationshipType)) { - ThreadLocalsHolder.getCollector().appendException( - "KeyError: \"SOURCE\" keyword can only be used in context " + - " to \"Relationships\" source node"); - return null; - } - return ((RelationshipTemplate)context).getTarget(); - } - String name; - if(nodeTemplateName.equals(SELF) && !(context instanceof ArrayList)) { - name = ((NodeTemplate)context).getName(); - } - else { - name = nodeTemplateName; - } - for(NodeTemplate nt: toscaTpl.getNodeTemplates()) { - if(nodeTemplateName.equals(name)) { - return nt; - } - } - ThreadLocalsHolder.getCollector().appendException(String.format( - "KeyError: Node template \"%s\" was not found",nodeTemplateName)); - return null; - } - - @Override - public Object result() { - return this; - } - -} - -/*python - -class GetOperationOutput(Function): -def validate(self): - if len(self.args) == 4: - self._find_node_template(self.args[0]) - interface_name = self._find_interface_name(self.args[1]) - self._find_operation_name(interface_name, self.args[2]) - else: - ExceptionCollector.appendException( - ValueError(_('Illegal arguments for function "{0}". Expected ' - 'arguments: "template_name","interface_name",' - '"operation_name","output_variable_name"' - ).format(GET_OPERATION_OUTPUT))) - return - -def _find_interface_name(self, interface_name): - if interface_name in toscaparser.elements.interfaces.SECTIONS: - return interface_name - else: - ExceptionCollector.appendException( - ValueError(_('Enter a valid interface name' - ).format(GET_OPERATION_OUTPUT))) - return - -def _find_operation_name(self, interface_name, operation_name): - if(interface_name == 'Configure' or - interface_name == 'tosca.interfaces.node.relationship.Configure'): - if(operation_name in - StatefulEntityType. - interfaces_relationship_configure_operations): - return operation_name - else: - ExceptionCollector.appendException( - ValueError(_('Enter an operation of Configure interface' - ).format(GET_OPERATION_OUTPUT))) - return - elif(interface_name == 'Standard' or - interface_name == 'tosca.interfaces.node.lifecycle.Standard'): - if(operation_name in - StatefulEntityType.interfaces_node_lifecycle_operations): - return operation_name - else: - ExceptionCollector.appendException( - ValueError(_('Enter an operation of Standard interface' - ).format(GET_OPERATION_OUTPUT))) - return - else: - ExceptionCollector.appendException( - ValueError(_('Enter a valid operation name' - ).format(GET_OPERATION_OUTPUT))) - return - -def _find_node_template(self, node_template_name): - if node_template_name == TARGET: - if not isinstance(self.context.type_definition, RelationshipType): - ExceptionCollector.appendException( - KeyError(_('"TARGET" keyword can only be used in context' - ' to "Relationships" target node'))) - return - return self.context.target - if node_template_name == SOURCE: - if not isinstance(self.context.type_definition, RelationshipType): - ExceptionCollector.appendException( - KeyError(_('"SOURCE" keyword can only be used in context' - ' to "Relationships" source node'))) - return - return self.context.source - name = self.context.name \ - if node_template_name == SELF and \ - not isinstance(self.context, list) \ - else node_template_name - for node_template in self.tosca_tpl.nodetemplates: - if node_template.name == name: - return node_template - ExceptionCollector.appendException( - KeyError(_( - 'Node template "{0}" was not found.' - ).format(node_template_name))) - -def result(self): - return self -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/GetProperty.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/GetProperty.java deleted file mode 100644 index 3550542..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/GetProperty.java +++ /dev/null @@ -1,636 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.functions; - -import java.util.ArrayList; -import java.util.LinkedHashMap; - -import org.openecomp.sdc.toscaparser.api.*; -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.elements.CapabilityTypeDef; -import org.openecomp.sdc.toscaparser.api.elements.EntityType; -import org.openecomp.sdc.toscaparser.api.elements.NodeType; -import org.openecomp.sdc.toscaparser.api.elements.PropertyDef; -import org.openecomp.sdc.toscaparser.api.elements.RelationshipType; -import org.openecomp.sdc.toscaparser.api.elements.StatefulEntityType; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -public class GetProperty extends Function { - // Get a property value of an entity defined in the same service template - - // Arguments: - - // * Node template name | SELF | HOST | SOURCE | TARGET. - // * Requirement or capability name (optional). - // * Property name. - - // If requirement or capability name is specified, the behavior is as follows: - // The req or cap name is first looked up in the specified node template's - // requirements. - // If found, it would search for a matching capability - // of an other node template and get its property as specified in function - // arguments. - // Otherwise, the req or cap name would be looked up in the specified - // node template's capabilities and if found, it would return the property of - // the capability as specified in function arguments. - - // Examples: - - // * { get_property: [ mysql_server, port ] } - // * { get_property: [ SELF, db_port ] } - // * { get_property: [ SELF, database_endpoint, port ] } - // * { get_property: [ SELF, database_endpoint, port, 1 ] } - - - public GetProperty(TopologyTemplate ttpl,Object context,String name,ArrayList args) { - super(ttpl,context,name,args); - } - - @Override - void validate() { - if(args.size() < 2) { - ThreadLocalsHolder.getCollector().appendException( - "ValueError: Illegal arguments for function \"get_property\". Expected arguments: \"node-template-name\", \"req-or-cap\" (optional), \"property name.\""); - return; - } - if(args.size() == 2) { - Property foundProp = _findProperty((String)args.get(1)); - if(foundProp == null) { - return; - } - Object prop = foundProp.getValue(); - if(prop instanceof Function) { - Function.getFunction(toscaTpl,context, prop); - } - } - else if(args.size() >= 3) { - // do not use _find_property to avoid raise KeyError - // if the prop is not found - // First check if there is property with this name - NodeTemplate nodeTpl = _findNodeTemplate((String)args.get(0)); - LinkedHashMap props; - if(nodeTpl != null) { - props = nodeTpl.getProperties(); - } - else { - props = new LinkedHashMap<>(); - } - int index = 2; - Object propertyValue; - if(props.get(args.get(1)) != null) { - propertyValue = ((Property)props.get(args.get(1))).getValue(); - } - else { - index = 3; - // then check the req or caps - propertyValue = _findReqOrCapProperty((String)args.get(1),(String)args.get(2)); - } - - if(args.size() > index) { - for(Object elem: args.subList(index,args.size()-1)) { - if(propertyValue instanceof ArrayList) { - int intElem = (int)elem; - propertyValue = _getIndexValue(propertyValue,intElem); - } - else { - propertyValue = _getAttributeValue(propertyValue,(String)elem); - } - } - } - } - } - - @SuppressWarnings("unchecked") - private Object _findReqOrCapProperty(String reqOrCap,String propertyName) { - NodeTemplate nodeTpl = _findNodeTemplate((String)args.get(0)); - if(nodeTpl == null) { - return null; - } - // look for property in node template's requirements - for(Object r: nodeTpl.getRequirements()) { - if(r instanceof LinkedHashMap) { - LinkedHashMap rlist = (LinkedHashMap)r; - for(String req: rlist.keySet()) { - String nodeName = (String)rlist.get(req); - if(req.equals(reqOrCap)) { - NodeTemplate nodeTemplate = _findNodeTemplate(nodeName); - return _getCapabilityProperty(nodeTemplate,req,propertyName,true); - } - } - } - } - // If requirement was not found, look in node template's capabilities - return _getCapabilityProperty(nodeTpl,reqOrCap,propertyName,true); - } - - private Object _getCapabilityProperty(NodeTemplate nodeTemplate, - String capabilityName, - String propertyName, - boolean throwErrors) { - - // Gets a node template capability property - Object property = null; - LinkedHashMap caps = nodeTemplate.getCapabilities(); - if(caps != null && caps.get(capabilityName) != null) { - Capability cap = caps.get(capabilityName); - LinkedHashMap props = cap.getProperties(); - if(props != null && props.get(propertyName) != null) { - property = ((Property)props.get(propertyName)).getValue(); - } - if(property == null && throwErrors) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "KeyError: Property \"%s\" was not found in capability \"%s\" of node template \"%s\" referenced from node template \"%s\"", - propertyName,capabilityName,nodeTemplate.getName(),((NodeTemplate)context).getName())); - } - return property; - } - if(throwErrors) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "KeyError: Requirement/Capability \"%s\" referenced from node template \"%s\" was not found in node template \"%s\"", - capabilityName,((NodeTemplate)context).getName(),nodeTemplate.getName())); - } - - return null; - } - - private Property _findProperty(String propertyName) { - NodeTemplate nodeTpl = _findNodeTemplate((String)args.get(0)); - if(nodeTpl == null) { - return null; - } - LinkedHashMap props = nodeTpl.getProperties(); - Property found = props.get(propertyName); - if(found == null) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "KeyError: Property \"%s\" was not found in node template \"%s\"", - propertyName,nodeTpl.getName())); - } - return found; - } - - private NodeTemplate _findNodeTemplate(String nodeTemplateName) { - if(nodeTemplateName.equals(SELF)) { - return (NodeTemplate)context; - } - // enable the HOST value in the function - if(nodeTemplateName.equals(HOST)) { - NodeTemplate node = _findHostContainingProperty(null); - if(node == null) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "KeyError: Property \"%s\" was not found in capability \"%s\" of node template \"%s\" referenced from node template \"%s\"", - (String)args.get(2),(String)args.get(1),((NodeTemplate)context).getName())); - return null; - } - return node; - } - if(nodeTemplateName.equals(TARGET)) { - if(!(((RelationshipTemplate)context).getTypeDefinition() instanceof RelationshipType)) { - ThreadLocalsHolder.getCollector().appendException( - "KeyError: \"TARGET\" keyword can only be used in context to \"Relationships\" target node"); - return null; - } - return ((RelationshipTemplate)context).getTarget(); - } - if(nodeTemplateName.equals(SOURCE)) { - if(!(((RelationshipTemplate)context).getTypeDefinition() instanceof RelationshipType)) { - ThreadLocalsHolder.getCollector().appendException( - "KeyError: \"SOURCE\" keyword can only be used in context to \"Relationships\" target node"); - return null; - } - return ((RelationshipTemplate)context).getSource(); - } - if(toscaTpl.getNodeTemplates() == null) { - return null; - } - for(NodeTemplate nodeTemplate: toscaTpl.getNodeTemplates()) { - if(nodeTemplate.getName().equals(nodeTemplateName)) { - return nodeTemplate; - } - } - ThreadLocalsHolder.getCollector().appendException(String.format( - "KeyError: Node template \"%s\" was not found. Referenced from Node Template \"%s\"", - nodeTemplateName,((NodeTemplate)context).getName())); - - return null; - } - - @SuppressWarnings("rawtypes") - private Object _getIndexValue(Object value,int index) { - if(value instanceof ArrayList) { - if(index < ((ArrayList)value).size()) { - return ((ArrayList)value).get(index); - } - else { - ThreadLocalsHolder.getCollector().appendException(String.format( - "KeyError: Property \"%s\" found in capability \"%s\" referenced from node template \"%s\" must have an element with index %d", - args.get(2),args.get(1),((NodeTemplate)context).getName(),index)); - - } - } - else { - ThreadLocalsHolder.getCollector().appendException(String.format( - "KeyError: Property \"%s\" found in capability \"%s\" referenced from node template \"%s\" must be a list", - args.get(2),args.get(1),((NodeTemplate)context).getName())); - } - return null; - } - - @SuppressWarnings("unchecked") - private Object _getAttributeValue(Object value,String attribute) { - if(value instanceof LinkedHashMap) { - Object ov = ((LinkedHashMap)value).get(attribute); - if(ov != null) { - return ov; - } - else { - ThreadLocalsHolder.getCollector().appendException(String.format( - "KeyError: Property \"%s\" found in capability \"%s\" referenced from node template \"%s\" must have an attribute named \"%s\"", - args.get(2),args.get(1),((NodeTemplate)context).getName(),attribute)); - } - } - else { - ThreadLocalsHolder.getCollector().appendException(String.format( - "KeyError: Property \"%s\" found in capability \"%s\" referenced from node template \"%s\" must be a dict", - args.get(2),args.get(1),((NodeTemplate)context).getName())); - } - return null; - } - - // Add this functions similar to get_attribute case - private NodeTemplate _findHostContainingProperty(String nodeTemplateName) { - if(nodeTemplateName == null) { - nodeTemplateName = SELF; - } - NodeTemplate nodeTemplate = _findNodeTemplate(nodeTemplateName); - LinkedHashMap hostedOnRel = (LinkedHashMap) - EntityType.TOSCA_DEF.get(HOSTED_ON); - for(Object r: nodeTemplate.getRequirements()) { - if(r instanceof LinkedHashMap) { - LinkedHashMap rlist = (LinkedHashMap)r; - for(String requirement: rlist.keySet()) { - String targetName = (String)rlist.get(requirement); - NodeTemplate targetNode = _findNodeTemplate(targetName); - NodeType targetType = (NodeType)targetNode.getTypeDefinition(); - for(CapabilityTypeDef capDef: targetType.getCapabilitiesObjects()) { - if(capDef.inheritsFrom((ArrayList)hostedOnRel.get("valid_target_types"))) { - if(_propertyExistsInType(targetType)) { - return targetNode; - } - // If requirement was not found, look in node - // template's capabilities - if(args.size() > 2 && - _getCapabilityProperty(targetNode,(String)args.get(1),(String)args.get(2),false) != null) { - return targetNode; - } - - return _findHostContainingProperty(targetName); - } - } - } - } - } - return null; - } - - private boolean _propertyExistsInType(StatefulEntityType typeDefinition) { - LinkedHashMap propsDef = typeDefinition.getPropertiesDef(); - return propsDef.keySet().contains((String)args.get(1)); - } - - @Override - public Object result() { - Object propertyValue; - if(args.size() >= 3) { - // First check if there is property with this name - NodeTemplate nodeTpl = _findNodeTemplate((String)args.get(0)); - LinkedHashMap props; - if(nodeTpl != null) { - props = nodeTpl.getProperties(); - } - else { - props = new LinkedHashMap<>(); - } - int index = 2; - if(props.get(args.get(1)) != null) { - propertyValue = ((Property)props.get(args.get(1))).getValue(); - } - else { - index = 3; - // then check the req or caps - propertyValue = _findReqOrCapProperty((String)args.get(1),(String)args.get(2)); - } - - if(args.size() > index) { - for(Object elem: args.subList(index,args.size()-1)) { - if(propertyValue instanceof ArrayList) { - int intElem = (int)elem; - propertyValue = _getIndexValue(propertyValue,intElem); - } - else { - propertyValue = _getAttributeValue(propertyValue,(String)elem); - } - } - } - } - else { - propertyValue = _findProperty((String)args.get(1)).getValue(); - } - if(propertyValue instanceof Function) { - return ((Function)propertyValue).result(); - } - return Function.getFunction(toscaTpl,context,propertyValue); - } - - public String getNodeTemplateName() { - return (String)args.get(0); - } - - public String getPropertyName() { - if(args.size() > 2) { - return (String)args.get(2); - } - return (String)args.get(1); - } - - public String getReqorCap() { - if(args.size() > 2) { - return (String)args.get(1); - } - return null; - } - -} - -/*python - -class GetProperty(Function): -"""Get a property value of an entity defined in the same service template. - -Arguments: - -* Node template name | SELF | HOST | SOURCE | TARGET. -* Requirement or capability name (optional). -* Property name. - -If requirement or capability name is specified, the behavior is as follows: -The req or cap name is first looked up in the specified node template's -requirements. -If found, it would search for a matching capability -of an other node template and get its property as specified in function -arguments. -Otherwise, the req or cap name would be looked up in the specified -node template's capabilities and if found, it would return the property of -the capability as specified in function arguments. - -Examples: - -* { get_property: [ mysql_server, port ] } -* { get_property: [ SELF, db_port ] } -* { get_property: [ SELF, database_endpoint, port ] } -* { get_property: [ SELF, database_endpoint, port, 1 ] } -""" - -def validate(self): - if len(self.args) < 2: - ExceptionCollector.appendException( - ValueError(_( - 'Expected arguments: "node-template-name", "req-or-cap" ' - '(optional), "property name".'))) - return - if len(self.args) == 2: - found_prop = self._find_property(self.args[1]) - if not found_prop: - return - prop = found_prop.value - if not isinstance(prop, Function): - get_function(self.tosca_tpl, self.context, prop) - elif len(self.args) >= 3: - # do not use _find_property to avoid raise KeyError - # if the prop is not found - # First check if there is property with this name - node_tpl = self._find_node_template(self.args[0]) - props = node_tpl.get_properties() if node_tpl else [] - index = 2 - found = [props[self.args[1]]] if self.args[1] in props else [] - if found: - property_value = found[0].value - else: - index = 3 - # then check the req or caps - property_value = self._find_req_or_cap_property(self.args[1], - self.args[2]) - if len(self.args) > index: - for elem in self.args[index:]: - if isinstance(property_value, list): - int_elem = int(elem) - property_value = self._get_index_value(property_value, - int_elem) - else: - property_value = self._get_attribute_value( - property_value, - elem) - -def _find_req_or_cap_property(self, req_or_cap, property_name): - node_tpl = self._find_node_template(self.args[0]) - # Find property in node template's requirements - for r in node_tpl.requirements: - for req, node_name in r.items(): - if req == req_or_cap: - node_template = self._find_node_template(node_name) - return self._get_capability_property( - node_template, - req, - property_name) - # If requirement was not found, look in node template's capabilities - return self._get_capability_property(node_tpl, - req_or_cap, - property_name) - -def _get_capability_property(self, - node_template, - capability_name, - property_name): - """Gets a node template capability property.""" - caps = node_template.get_capabilities() - if caps and capability_name in caps.keys(): - cap = caps[capability_name] - property = None - props = cap.get_properties() - if props and property_name in props.keys(): - property = props[property_name].value - if not property: - ExceptionCollector.appendException( - KeyError(_('Property "%(prop)s" was not found in ' - 'capability "%(cap)s" of node template ' - '"%(ntpl1)s" referenced from node template ' - '"%(ntpl2)s".') % {'prop': property_name, - 'cap': capability_name, - 'ntpl1': node_template.name, - 'ntpl2': self.context.name})) - return property - msg = _('Requirement/Capability "{0}" referenced from node template ' - '"{1}" was not found in node template "{2}".').format( - capability_name, - self.context.name, - node_template.name) - ExceptionCollector.appendException(KeyError(msg)) - -def _find_property(self, property_name): - node_tpl = self._find_node_template(self.args[0]) - if not node_tpl: - return - props = node_tpl.get_properties() - found = [props[property_name]] if property_name in props else [] - if len(found) == 0: - ExceptionCollector.appendException( - KeyError(_('Property "%(prop)s" was not found in node ' - 'template "%(ntpl)s".') % - {'prop': property_name, - 'ntpl': node_tpl.name})) - return None - return found[0] - -def _find_node_template(self, node_template_name): - if node_template_name == SELF: - return self.context - # enable the HOST value in the function - if node_template_name == HOST: - return self._find_host_containing_property() - if node_template_name == TARGET: - if not isinstance(self.context.type_definition, RelationshipType): - ExceptionCollector.appendException( - KeyError(_('"TARGET" keyword can only be used in context' - ' to "Relationships" target node'))) - return - return self.context.target - if node_template_name == SOURCE: - if not isinstance(self.context.type_definition, RelationshipType): - ExceptionCollector.appendException( - KeyError(_('"SOURCE" keyword can only be used in context' - ' to "Relationships" source node'))) - return - return self.context.source - if not hasattr(self.tosca_tpl, 'nodetemplates'): - return - for node_template in self.tosca_tpl.nodetemplates: - if node_template.name == node_template_name: - return node_template - ExceptionCollector.appendException( - KeyError(_( - 'Node template "{0}" was not found.' - ).format(node_template_name))) - -def _get_index_value(self, value, index): - if isinstance(value, list): - if index < len(value): - return value[index] - else: - ExceptionCollector.appendException( - KeyError(_( - "Property '{0}' found in capability '{1}'" - " referenced from node template {2}" - " must have an element with index {3}."). - format(self.args[2], - self.args[1], - self.context.name, - index))) - else: - ExceptionCollector.appendException( - KeyError(_( - "Property '{0}' found in capability '{1}'" - " referenced from node template {2}" - " must be a list.").format(self.args[2], - self.args[1], - self.context.name))) - -def _get_attribute_value(self, value, attibute): - if isinstance(value, dict): - if attibute in value: - return value[attibute] - else: - ExceptionCollector.appendException( - KeyError(_( - "Property '{0}' found in capability '{1}'" - " referenced from node template {2}" - " must have an attribute named {3}."). - format(self.args[2], - self.args[1], - self.context.name, - attibute))) - else: - ExceptionCollector.appendException( - KeyError(_( - "Property '{0}' found in capability '{1}'" - " referenced from node template {2}" - " must be a dict.").format(self.args[2], - self.args[1], - self.context.name))) - -# Add this functions similar to get_attribute case -def _find_host_containing_property(self, node_template_name=SELF): - node_template = self._find_node_template(node_template_name) - hosted_on_rel = EntityType.TOSCA_DEF[HOSTED_ON] - for r in node_template.requirements: - for requirement, target_name in r.items(): - target_node = self._find_node_template(target_name) - target_type = target_node.type_definition - for capability in target_type.get_capabilities_objects(): - if capability.type in hosted_on_rel['valid_target_types']: - if self._property_exists_in_type(target_type): - return target_node - return self._find_host_containing_property( - target_name) - return None - -def _property_exists_in_type(self, type_definition): - props_def = type_definition.get_properties_def() - found = [props_def[self.args[1]]] \ - if self.args[1] in props_def else [] - return len(found) == 1 - -def result(self): - if len(self.args) >= 3: - # First check if there is property with this name - node_tpl = self._find_node_template(self.args[0]) - props = node_tpl.get_properties() if node_tpl else [] - index = 2 - found = [props[self.args[1]]] if self.args[1] in props else [] - if found: - property_value = found[0].value - else: - index = 3 - # then check the req or caps - property_value = self._find_req_or_cap_property(self.args[1], - self.args[2]) - if len(self.args) > index: - for elem in self.args[index:]: - if isinstance(property_value, list): - int_elem = int(elem) - property_value = self._get_index_value(property_value, - int_elem) - else: - property_value = self._get_attribute_value( - property_value, - elem) - else: - property_value = self._find_property(self.args[1]).value - if isinstance(property_value, Function): - return property_value.result() - return get_function(self.tosca_tpl, - self.context, - property_value) - -@property -def node_template_name(self): - return self.args[0] - -@property -def property_name(self): - if len(self.args) > 2: - return self.args[2] - return self.args[1] - -@property -def req_or_cap(self): - if len(self.args) > 2: - return self.args[1] - return None -*/ diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/Token.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/Token.java deleted file mode 100644 index 4438908..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/functions/Token.java +++ /dev/null @@ -1,112 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.functions; - -import java.util.ArrayList; -import java.util.LinkedHashMap; - -import org.openecomp.sdc.toscaparser.api.NodeTemplate; -import org.openecomp.sdc.toscaparser.api.TopologyTemplate; -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -public class Token extends Function { - // Validate the function and provide an instance of the function - - //The token function is used within a TOSCA service template on a string to - //parse out (tokenize) substrings separated by one or more token characters - //within a larger string. - - //Arguments: - - //* The composite string that contains one or more substrings separated by - // token characters. - //* The string that contains one or more token characters that separate - // substrings within the composite string. - //* The integer indicates the index of the substring to return from the - // composite string. Note that the first substring is denoted by using - // the '0' (zero) integer value. - - //Example: - - // [ get_attribute: [ my_server, data_endpoint, ip_address ], ':', 1 ] - - - public Token(TopologyTemplate ttpl,Object context,String name,ArrayList args) { - super(ttpl,context,name,args); - } - - @Override - public Object result() { - return this; - } - - @Override - void validate() { - if(args.size() < 3) { - ThreadLocalsHolder.getCollector().appendException( - "ValueError: Invalid arguments for function \"token\". " + - "Expected at least three arguments"); - } - else { - if(!(args.get(1) instanceof String) || - ((String)args.get(1)).length() != 1) { - ThreadLocalsHolder.getCollector().appendException( - "ValueError: Invalid arguments for function \"token\". " + - "Expected single char value as second argument"); - } - if(!(args.get(2) instanceof Integer)) { - ThreadLocalsHolder.getCollector().appendException( - "ValueError: Invalid arguments for function \"token\"" + - "Expected integer value as third argument"); - } - } - } - -} - -/*python - -class Token(Function): -"""Validate the function and provide an instance of the function - -The token function is used within a TOSCA service template on a string to -parse out (tokenize) substrings separated by one or more token characters -within a larger string. - - -Arguments: - -* The composite string that contains one or more substrings separated by - token characters. -* The string that contains one or more token characters that separate - substrings within the composite string. -* The integer indicates the index of the substring to return from the - composite string. Note that the first substring is denoted by using - the '0' (zero) integer value. - -Example: - - [ get_attribute: [ my_server, data_endpoint, ip_address ], ':', 1 ] - -""" - -def validate(self): - if len(self.args) < 3: - ExceptionCollector.appendException( - ValueError(_('Invalid arguments for function "{0}". Expected ' - 'at least three arguments.').format(TOKEN))) - else: - if not isinstance(self.args[1], str) or len(self.args[1]) != 1: - ExceptionCollector.appendException( - ValueError(_('Invalid arguments for function "{0}". ' - 'Expected single char value as second ' - 'argument.').format(TOKEN))) - - if not isinstance(self.args[2], int): - ExceptionCollector.appendException( - ValueError(_('Invalid arguments for function "{0}". ' - 'Expected integer value as third ' - 'argument.').format(TOKEN))) - -def result(self): - return self -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/parameters/Input.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/parameters/Input.java deleted file mode 100644 index 7b3e64f..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/parameters/Input.java +++ /dev/null @@ -1,226 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.parameters; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.LinkedHashMap; - -import org.openecomp.sdc.toscaparser.api.DataEntity; -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.elements.EntityType; -import org.openecomp.sdc.toscaparser.api.elements.constraints.Constraint; -import org.openecomp.sdc.toscaparser.api.elements.constraints.Schema; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -public class Input { - - private static final String TYPE = "type"; - private static final String DESCRIPTION = "description"; - private static final String DEFAULT = "default"; - private static final String CONSTRAINTS = "constraints"; - private static final String REQUIRED = "required"; - private static final String STATUS = "status"; - private static final String ENTRY_SCHEMA = "entry_schema"; - - public static final String INTEGER = "integer"; - public static final String STRING = "string"; - public static final String BOOLEAN = "boolean"; - public static final String FLOAT = "float"; - public static final String LIST = "list"; - public static final String MAP = "map"; - public static final String JSON = "json"; - - private static String INPUTFIELD[] = { - TYPE, DESCRIPTION, DEFAULT, CONSTRAINTS, REQUIRED,STATUS, ENTRY_SCHEMA - }; - - private static String PRIMITIVE_TYPES[] = { - INTEGER, STRING, BOOLEAN, FLOAT, LIST, MAP, JSON - }; - - private String name; - private Schema schema; - private LinkedHashMap customDefs; - - public Input(String _name,LinkedHashMap _schemaDict,LinkedHashMap _customDefs) { - name = _name; - schema = new Schema(_name,_schemaDict); - customDefs = _customDefs; - } - - public String getName() { - return name; - } - - public String getType() { - return schema.getType(); - } - - public String getDescription() { - return schema.getDescription(); - } - - public boolean isRequired() { - return schema.isRequired(); - } - - public Object getDefault() { - return schema.getDefault(); - } - - public ArrayList getConstraints() { - return schema.getConstraints(); - } - - public void validate(Object value) { - _validateField(); - _validateType(getType()); - if(value != null) { - _validateValue(value); - } - } - - private void _validateField() { - for(String key: schema.getSchema().keySet()) { - boolean bFound = false; - for(String ifld: INPUTFIELD) { - if(key.equals(ifld)) { - bFound = true; - break; - } - } - if(!bFound) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "UnknownFieldError: Input \"%s\" contains unknown field \"%s\"", - name,key)); - } - } - } - - private void _validateType(String inputType) { - boolean bFound = false; - for(String pt: Schema.PROPERTY_TYPES) { - if(pt.equals(inputType)) { - bFound = true; - break; - } - } - - if(!bFound) { - if(customDefs.get(inputType) != null) { - bFound = true; - } - } - - if(!bFound) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError: Invalid type \"%s\"",inputType)); - } - } - - private void _validateValue(Object value) { - Object datatype = null; - if(EntityType.TOSCA_DEF.get(getType()) != null) { - datatype = EntityType.TOSCA_DEF.get(getType()); - } - else if(EntityType.TOSCA_DEF.get(EntityType.DATATYPE_NETWORK_PREFIX + getType()) != null) { - datatype = EntityType.TOSCA_DEF.get(EntityType.DATATYPE_NETWORK_PREFIX + getType()); - } - - String type = getType(); - // if it's one of the basic types DON'T look in customDefs - if(Arrays.asList(PRIMITIVE_TYPES).contains(type)) { - DataEntity.validateDatatype(getType(), value, null, (LinkedHashMap)datatype, null); - return; - } - else if(customDefs.get(getType()) != null) { - datatype = customDefs.get(getType()); - DataEntity.validateDatatype(getType(), value, (LinkedHashMap)datatype, customDefs, null); - return; - } - - DataEntity.validateDatatype(getType(), value, null, (LinkedHashMap)datatype, null); - } -} - -/*python - -from toscaparser.common.exception import ExceptionCollector -from toscaparser.common.exception import MissingRequiredFieldError -from toscaparser.common.exception import UnknownFieldError -from toscaparser.dataentity import DataEntity -from toscaparser.elements.constraints import Schema -from toscaparser.elements.entity_type import EntityType -from toscaparser.utils.gettextutils import _ - - -log = logging.getLogger('tosca') - - -class Input(object): - - INPUTFIELD = (TYPE, DESCRIPTION, DEFAULT, CONSTRAINTS, REQUIRED, STATUS, - ENTRY_SCHEMA) = ('type', 'description', 'default', - 'constraints', 'required', 'status', - 'entry_schema') - - def __init__(self, name, schema_dict): - self.name = name - self.schema = Schema(name, schema_dict) - - self._validate_field() - self.validate_type(self.type) - - @property - def type(self): - return self.schema.type - - @property - def required(self): - return self.schema.required - - @property - def description(self): - return self.schema.description - - @property - def default(self): - return self.schema.default - - @property - def constraints(self): - return self.schema.constraints - - @property - def status(self): - return self.schema.status - - def validate(self, value=None): - if value is not None: - self._validate_value(value) - - def _validate_field(self): - for name in self.schema.schema: - if name not in self.INPUTFIELD: - ExceptionCollector.appendException( - UnknownFieldError(what='Input "%s"' % self.name, - field=name)) - - def validate_type(self, input_type): - if input_type not in Schema.PROPERTY_TYPES: - ExceptionCollector.appendException( - ValueError(_('Invalid type "%s".') % type)) - - # tODO(anyone) Need to test for any built-in datatype not just network - # that is, tosca.datatypes.* and not assume tosca.datatypes.network.* - # tODO(anyone) Add support for tosca.datatypes.Credential - def _validate_value(self, value): - tosca = EntityType.TOSCA_DEF - datatype = None - if self.type in tosca: - datatype = tosca[self.type] - elif EntityType.DATATYPE_NETWORK_PREFIX + self.type in tosca: - datatype = tosca[EntityType.DATATYPE_NETWORK_PREFIX + self.type] - - DataEntity.validate_datatype(self.type, value, None, datatype) - -*/ diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/parameters/Output.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/parameters/Output.java deleted file mode 100644 index 34ecf12..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/parameters/Output.java +++ /dev/null @@ -1,109 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.parameters; - -import java.util.LinkedHashMap; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; - -public class Output { - - private static final String DESCRIPTION = "description"; - public static final String VALUE = "value"; - private static final String OUTPUTFIELD[] = {DESCRIPTION, VALUE}; - - private String name; - private LinkedHashMap attrs;//TYPE??? - - public Output(String oname,LinkedHashMap oattrs) { - name = oname; - attrs = oattrs; - } - - public String getDescription() { - return (String)attrs.get(DESCRIPTION); - } - - public Object getValue() { - return attrs.get(VALUE); - } - - public void validate() { - _validateField(); - } - - private void _validateField() { - if(!(attrs instanceof LinkedHashMap)) { - //TODO wrong error message... - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValidationError: Output \"%s\" has wrong type. Expecting a dict", - name)); - } - - if(getValue() == null) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "MissingRequiredFieldError: Output \"%s\" is missing required \"%s\"", - name,VALUE)); - } - for(String key: attrs.keySet()) { - boolean bFound = false; - for(String of: OUTPUTFIELD) { - if(key.equals(of)) { - bFound = true; - break; - } - } - if(!bFound) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "UnknownFieldError: Output \"%s\" contains unknown field \"%s\"", - name,key)); - } - } - } - - // getter/setter - - public String getName() { - return name; - } - - public void setAttr(String name,Object value) { - attrs.put(name, value); - } -} - -/*python - -class Output(object): - - OUTPUTFIELD = (DESCRIPTION, VALUE) = ('description', 'value') - - def __init__(self, name, attrs): - self.name = name - self.attrs = attrs - - @property - def description(self): - return self.attrs.get(self.DESCRIPTION) - - @property - def value(self): - return self.attrs.get(self.VALUE) - - def validate(self): - self._validate_field() - - def _validate_field(self): - if not isinstance(self.attrs, dict): - ExceptionCollector.appendException( - MissingRequiredFieldError(what='Output "%s"' % self.name, - required=self.VALUE)) - if self.value is None: - ExceptionCollector.appendException( - MissingRequiredFieldError(what='Output "%s"' % self.name, - required=self.VALUE)) - for name in self.attrs: - if name not in self.OUTPUTFIELD: - ExceptionCollector.appendException( - UnknownFieldError(what='Output "%s"' % self.name, - field=name)) -*/ diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/prereq/CSAR.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/prereq/CSAR.java deleted file mode 100644 index 85b54ee..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/prereq/CSAR.java +++ /dev/null @@ -1,782 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.prereq; - -import java.io.BufferedOutputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.RandomAccessFile; -import java.net.URL; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.nio.file.StandardCopyOption; -import java.util.*; -import java.util.zip.ZipEntry; -import java.util.zip.ZipFile; -import java.util.zip.ZipInputStream; - -import org.openecomp.sdc.toscaparser.api.ImportsLoader; -import org.openecomp.sdc.toscaparser.api.common.JToscaException; -import org.openecomp.sdc.toscaparser.api.utils.JToscaErrorCodes; -import org.openecomp.sdc.toscaparser.api.utils.ThreadLocalsHolder; -import org.openecomp.sdc.toscaparser.api.utils.UrlUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.yaml.snakeyaml.Yaml; - -public class CSAR { - - private static Logger log = LoggerFactory.getLogger(CSAR.class.getName()); - private static final ArrayList META_PROPERTIES_FILES = new ArrayList<>(Arrays.asList("TOSCA-Metadata/TOSCA.meta", "csar.meta")); - - private String path; - private boolean isFile; - private boolean isValidated; - private boolean errorCaught; - private String csar; - private String tempDir; -// private Metadata metaData; - private File tempFile; - private LinkedHashMap> metaProperties; - - public CSAR(String csarPath, boolean aFile) { - path = csarPath; - isFile = aFile; - isValidated = false; - errorCaught = false; - csar = null; - tempDir = null; - tempFile = null; - metaProperties = new LinkedHashMap<>(); - } - - @SuppressWarnings("unchecked") - public boolean validate() throws JToscaException { - isValidated = true; - - //validate that the file or URL exists - - if(isFile) { - File f = new File(path); - if (!f.isFile()) { - ThreadLocalsHolder.getCollector().appendException(String.format("\"%s\" is not a file", path)); - return false; - } - else { - this.csar = path; - } - } - else { - if(!UrlUtils.validateUrl(path)) { - ThreadLocalsHolder.getCollector().appendException(String.format("ImportError: \"%s\" does not exist",path)); - return false; - } - // get it to a local file - try { - File tempFile = File.createTempFile("csartmp",".csar"); - Path ptf = Paths.get(tempFile.getPath()); - URL webfile = new URL(path); - InputStream in = webfile.openStream(); - Files.copy(in,ptf,StandardCopyOption.REPLACE_EXISTING); - } - catch(Exception e) { - ThreadLocalsHolder.getCollector().appendException("ImportError: failed to load CSAR from " + path); - return false; - } - - log.debug("CSAR - validate - currently only files are supported"); - return false; - } - - _parseAndValidateMetaProperties(); - - if(errorCaught) { - return false; - } - - // validate that external references in the main template actually exist and are accessible - _validateExternalReferences(); - - return !errorCaught; - - } - - private void _parseAndValidateMetaProperties() throws JToscaException { - - ZipFile zf = null; - - try { - - // validate that it is a valid zip file - RandomAccessFile raf = new RandomAccessFile(csar, "r"); - long n = raf.readInt(); - raf.close(); - // check if Zip's magic number - if (n != 0x504B0304) { - String errorString = String.format("\"%s\" is not a valid zip file", csar); - log.error(errorString); - throw new JToscaException(errorString , JToscaErrorCodes.INVALID_CSAR_FORMAT.getValue()); - } - - // validate that it contains the metadata file in the correct location - zf = new ZipFile(csar); - ZipEntry ze = zf.getEntry("TOSCA-Metadata/TOSCA.meta"); - if (ze == null) { - - String errorString = String.format( - "\"%s\" is not a valid CSAR as it does not contain the " + - "required file \"TOSCA.meta\" in the folder \"TOSCA-Metadata\"", csar); - log.error(errorString); - throw new JToscaException(errorString, JToscaErrorCodes.MISSING_META_FILE.getValue()); - } - - //Going over expected metadata files and parsing them - for (String metaFile: META_PROPERTIES_FILES) { - - byte ba[] = new byte[4096]; - ze = zf.getEntry(metaFile); - if (ze != null) { - InputStream inputStream = zf.getInputStream(ze); - n = inputStream.read(ba, 0, 4096); - String md = new String(ba); - md = md.substring(0, (int) n); - - String errorString = String.format( - "The file \"%s\" in the" + - " CSAR \"%s\" does not contain valid YAML content", ze.getName(), csar); - - try { - Yaml yaml = new Yaml(); - Object mdo = yaml.load(md); - if (!(mdo instanceof LinkedHashMap)) { - log.error(errorString); - throw new JToscaException(errorString, JToscaErrorCodes.INVALID_META_YAML_CONTENT.getValue()); - } - - String[] split = ze.getName().split("/"); - String fileName = split[split.length - 1]; - - if (!metaProperties.containsKey(fileName)) { - metaProperties.put(fileName, (LinkedHashMap) mdo); - } - } - catch(Exception e) { - log.error(errorString); - throw new JToscaException(errorString, JToscaErrorCodes.INVALID_META_YAML_CONTENT.getValue()); - } - } - } - - // verify it has "Entry-Definition" - String edf = _getMetadata("Entry-Definitions"); - if (edf == null) { - String errorString = String.format( - "The CSAR \"%s\" is missing the required metadata " + - "\"Entry-Definitions\" in \"TOSCA-Metadata/TOSCA.meta\"", csar); - log.error(errorString); - throw new JToscaException(errorString, JToscaErrorCodes.ENTRY_DEFINITION_NOT_DEFINED.getValue()); - } - - //validate that "Entry-Definitions' metadata value points to an existing file in the CSAR - boolean foundEDF = false; - Enumeration entries = zf.entries(); - while (entries.hasMoreElements()) { - ze = entries.nextElement(); - if (ze.getName().equals(edf)) { - foundEDF = true; - break; - } - } - if (!foundEDF) { - String errorString = String.format( - "The \"Entry-Definitions\" file defined in the CSAR \"%s\" does not exist", csar); - log.error(errorString); - throw new JToscaException(errorString, JToscaErrorCodes.MISSING_ENTRY_DEFINITION_FILE.getValue()); - } - } catch (JToscaException e) { - //ThreadLocalsHolder.getCollector().appendCriticalException(e.getMessage()); - throw e; - } catch (Exception e) { - ThreadLocalsHolder.getCollector().appendException("ValidationError: " + e.getMessage()); - errorCaught = true; - } - - try { - if (zf != null) { - zf.close(); - } - } catch (IOException e) { - } - } - - public void cleanup() { - try { - if(tempFile != null) { - tempFile.delete(); - } - } - catch(Exception e) { - } - } - - private String _getMetadata(String key) throws JToscaException { - if(!isValidated) { - validate(); - } - Object value = _getMetaProperty("TOSCA.meta").get(key); - return value != null ? value.toString() : null; - } - - public String getAuthor() throws JToscaException { - return _getMetadata("Created-By"); - } - - public String getVersion() throws JToscaException { - return _getMetadata("CSAR-Version"); - } - - public LinkedHashMap> getMetaProperties() { - return metaProperties; - } - - private LinkedHashMap _getMetaProperty(String propertiesFile) { - return metaProperties.get(propertiesFile); - } - - public String getMainTemplate() throws JToscaException { - String entryDef = _getMetadata("Entry-Definitions"); - ZipFile zf; - boolean ok = false; - try { - zf = new ZipFile(path); - ok = (zf.getEntry(entryDef) != null); - zf.close(); - } - catch(IOException e) { - if(!ok) { - log.error("CSAR - getMainTemplate - failed to open {}", path); - } - } - if(ok) { - return entryDef; - } - else { - return null; - } - } - - @SuppressWarnings("unchecked") - public LinkedHashMap getMainTemplateYaml() throws JToscaException { - String mainTemplate = tempDir + File.separator + getMainTemplate(); - if(mainTemplate != null) { - try { - InputStream input = new FileInputStream(new File(mainTemplate)); - Yaml yaml = new Yaml(); - Object data = yaml.load(input); - if(!(data instanceof LinkedHashMap)) { - throw new IOException(); - } - return (LinkedHashMap)data; - } - catch(Exception e) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "The file \"%s\" in the CSAR \"%s\" does not " + - "contain valid TOSCA YAML content", - mainTemplate,csar)); - } - } - return null; - } - - public String getDescription() throws JToscaException { - String desc = _getMetadata("Description"); - if(desc != null) { - return desc; - } - - Map metaData = metaProperties.get("TOSCA.meta"); - metaData.put("Description", getMainTemplateYaml().get("description")); - return _getMetadata("Description"); - } - - public String getTempDir() { - return tempDir; - } - - public void decompress() throws IOException, JToscaException { - if(!isValidated) { - validate(); - } - tempDir = Files.createTempDirectory("JTP").toString(); - unzip(path,tempDir); - - } - - private void _validateExternalReferences() throws JToscaException { - // Extracts files referenced in the main template - // These references are currently supported: - // * imports - // * interface implementations - // * artifacts - try { - decompress(); - String mainTplFile = getMainTemplate(); - if(mainTplFile == null) { - return; - } - - LinkedHashMap mainTpl = getMainTemplateYaml(); - if(mainTpl.get("imports") != null) { - // this loads the imports - ImportsLoader il = new ImportsLoader((ArrayList)mainTpl.get("imports"), - tempDir + File.separator + mainTplFile, - (Object)null, - (LinkedHashMap)null); - } - - if(mainTpl.get("topology_template") != null) { - LinkedHashMap topologyTemplate = - (LinkedHashMap)mainTpl.get("topology_template"); - - if(topologyTemplate.get("node_templates") != null) { - LinkedHashMap nodeTemplates = - (LinkedHashMap)topologyTemplate.get("node_templates"); - for(String nodeTemplateKey: nodeTemplates.keySet()) { - LinkedHashMap nodeTemplate = - (LinkedHashMap)nodeTemplates.get(nodeTemplateKey); - if(nodeTemplate.get("artifacts") != null) { - LinkedHashMap artifacts = - (LinkedHashMap)nodeTemplate.get("artifacts"); - for(String artifactKey: artifacts.keySet()) { - Object artifact = artifacts.get(artifactKey); - if(artifact instanceof String) { - _validateExternalReference(mainTplFile,(String)artifact,true); - } - else if(artifact instanceof LinkedHashMap) { - String file = (String)((LinkedHashMap)artifact).get("file"); - if(file != null) { - _validateExternalReference(mainTplFile,file,true); - } - } - else { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError: Unexpected artifact definition for \"%s\"", - artifactKey)); - errorCaught = true; - } - } - } - if(nodeTemplate.get("interfaces") != null) { - LinkedHashMap interfaces = - (LinkedHashMap)nodeTemplate.get("interfaces"); - for(String interfaceKey: interfaces.keySet()) { - LinkedHashMap _interface = - (LinkedHashMap)interfaces.get(interfaceKey); - for(String operationKey: _interface.keySet()) { - Object operation = _interface.get(operationKey); - if(operation instanceof String) { - _validateExternalReference(mainTplFile,(String)operation,false); - } - else if(operation instanceof LinkedHashMap) { - String imp = (String)((LinkedHashMap)operation).get("implementation"); - if(imp != null) { - _validateExternalReference(mainTplFile,imp,true); - } - } - } - } - } - } - } - } - } - catch(IOException e) { - errorCaught = true; - } - finally { - // delete tempDir (only here?!?) - File fdir = new File(tempDir); - deleteDir(fdir); - tempDir = null; - } - } - - public static void deleteDir(File fdir) { - try { - if (fdir.isDirectory()) { - for (File c : fdir.listFiles()) - deleteDir(c); - } - fdir.delete(); - } - catch(Exception e) { - } - } - - private void _validateExternalReference(String tplFile,String resourceFile,boolean raiseExc) { - // Verify that the external resource exists - - // If resource_file is a URL verify that the URL is valid. - // If resource_file is a relative path verify that the path is valid - // considering base folder (self.temp_dir) and tpl_file. - // Note that in a CSAR resource_file cannot be an absolute path. - if(UrlUtils.validateUrl(resourceFile)) { - String msg = String.format("URLException: The resource at \"%s\" cannot be accessed",resourceFile); - try { - if(UrlUtils.isUrlAccessible(resourceFile)) { - return; - } - else { - ThreadLocalsHolder.getCollector().appendException(msg); - errorCaught = true; - } - } - catch (Exception e) { - ThreadLocalsHolder.getCollector().appendException(msg); - } - } - - String dirPath = Paths.get(tplFile).getParent().toString(); - String filePath = tempDir + File.separator + dirPath + File.separator + resourceFile; - File f = new File(filePath); - if(f.isFile()) { - return; - } - - if(raiseExc) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError: The resource \"%s\" does not exist",resourceFile)); - } - errorCaught = true; - } - - private void unzip(String zipFilePath, String destDirectory) throws IOException { - File destDir = new File(destDirectory); - if (!destDir.exists()) { - destDir.mkdir(); - } - ZipInputStream zipIn = new ZipInputStream(new FileInputStream(zipFilePath)); - ZipEntry entry = zipIn.getNextEntry(); - // iterates over entries in the zip file - while (entry != null) { - // create all directories needed for nested items - String[] parts = entry.getName().split("/"); - String s = destDirectory + File.separator ; - for(int i=0; i< parts.length-1; i++) { - s += parts[i]; - File idir = new File(s); - if(!idir.exists()) { - idir.mkdir(); - } - s += File.separator; - } - String filePath = destDirectory + File.separator + entry.getName(); - if (!entry.isDirectory()) { - // if the entry is a file, extracts it - extractFile(zipIn, filePath); - } else { - // if the entry is a directory, make the directory - File dir = new File(filePath); - dir.mkdir(); - } - zipIn.closeEntry(); - entry = zipIn.getNextEntry(); - } - zipIn.close(); - } - - /** - * Extracts a zip entry (file entry) - * @param zipIn - * @param filePath - * @throws IOException - */ - private static final int BUFFER_SIZE = 4096; - - private void extractFile(ZipInputStream zipIn, String filePath) throws IOException { - //BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath)); - FileOutputStream fos = new FileOutputStream(filePath); - BufferedOutputStream bos = new BufferedOutputStream(fos); - byte[] bytesIn = new byte[BUFFER_SIZE]; - int read = 0; - while ((read = zipIn.read(bytesIn)) != -1) { - bos.write(bytesIn, 0, read); - } - bos.close(); - } - -} - -/*python - -from toscaparser.common.exception import ExceptionCollector -from toscaparser.common.exception import URLException -from toscaparser.common.exception import ValidationError -from toscaparser.imports import ImportsLoader -from toscaparser.utils.gettextutils import _ -from toscaparser.utils.urlutils import UrlUtils - -try: # Python 2.x - from BytesIO import BytesIO -except ImportError: # Python 3.x - from io import BytesIO - - -class CSAR(object): - - def __init__(self, csar_file, a_file=True): - self.path = csar_file - self.a_file = a_file - self.is_validated = False - self.error_caught = False - self.csar = None - self.temp_dir = None - - def validate(self): - """Validate the provided CSAR file.""" - - self.is_validated = True - - # validate that the file or URL exists - missing_err_msg = (_('"%s" does not exist.') % self.path) - if self.a_file: - if not os.path.isfile(self.path): - ExceptionCollector.appendException( - ValidationError(message=missing_err_msg)) - return False - else: - self.csar = self.path - else: # a URL - if not UrlUtils.validate_url(self.path): - ExceptionCollector.appendException( - ValidationError(message=missing_err_msg)) - return False - else: - response = requests.get(self.path) - self.csar = BytesIO(response.content) - - # validate that it is a valid zip file - if not zipfile.is_zipfile(self.csar): - err_msg = (_('"%s" is not a valid zip file.') % self.path) - ExceptionCollector.appendException( - ValidationError(message=err_msg)) - return False - - # validate that it contains the metadata file in the correct location - self.zfile = zipfile.ZipFile(self.csar, 'r') - filelist = self.zfile.namelist() - if 'TOSCA-Metadata/TOSCA.meta' not in filelist: - err_msg = (_('"%s" is not a valid CSAR as it does not contain the ' - 'required file "TOSCA.meta" in the folder ' - '"TOSCA-Metadata".') % self.path) - ExceptionCollector.appendException( - ValidationError(message=err_msg)) - return False - - # validate that 'Entry-Definitions' property exists in TOSCA.meta - data = self.zfile.read('TOSCA-Metadata/TOSCA.meta') - invalid_yaml_err_msg = (_('The file "TOSCA-Metadata/TOSCA.meta" in ' - 'the CSAR "%s" does not contain valid YAML ' - 'content.') % self.path) - try: - meta = yaml.load(data) - if type(meta) is dict: - self.metadata = meta - else: - ExceptionCollector.appendException( - ValidationError(message=invalid_yaml_err_msg)) - return False - except yaml.YAMLError: - ExceptionCollector.appendException( - ValidationError(message=invalid_yaml_err_msg)) - return False - - if 'Entry-Definitions' not in self.metadata: - err_msg = (_('The CSAR "%s" is missing the required metadata ' - '"Entry-Definitions" in ' - '"TOSCA-Metadata/TOSCA.meta".') - % self.path) - ExceptionCollector.appendException( - ValidationError(message=err_msg)) - return False - - # validate that 'Entry-Definitions' metadata value points to an - # existing file in the CSAR - entry = self.metadata.get('Entry-Definitions') - if entry and entry not in filelist: - err_msg = (_('The "Entry-Definitions" file defined in the ' - 'CSAR "%s" does not exist.') % self.path) - ExceptionCollector.appendException( - ValidationError(message=err_msg)) - return False - - # validate that external references in the main template actually - # exist and are accessible - self._validate_external_references() - return not self.error_caught - - def get_metadata(self): - """Return the metadata dictionary.""" - - # validate the csar if not already validated - if not self.is_validated: - self.validate() - - # return a copy to avoid changes overwrite the original - return dict(self.metadata) if self.metadata else None - - def _get_metadata(self, key): - if not self.is_validated: - self.validate() - return self.metadata.get(key) - - def get_author(self): - return self._get_metadata('Created-By') - - def get_version(self): - return self._get_metadata('CSAR-Version') - - def get_main_template(self): - entry_def = self._get_metadata('Entry-Definitions') - if entry_def in self.zfile.namelist(): - return entry_def - - def get_main_template_yaml(self): - main_template = self.get_main_template() - if main_template: - data = self.zfile.read(main_template) - invalid_tosca_yaml_err_msg = ( - _('The file "%(template)s" in the CSAR "%(csar)s" does not ' - 'contain valid TOSCA YAML content.') % - {'template': main_template, 'csar': self.path}) - try: - tosca_yaml = yaml.load(data) - if type(tosca_yaml) is not dict: - ExceptionCollector.appendException( - ValidationError(message=invalid_tosca_yaml_err_msg)) - return tosca_yaml - except Exception: - ExceptionCollector.appendException( - ValidationError(message=invalid_tosca_yaml_err_msg)) - - def get_description(self): - desc = self._get_metadata('Description') - if desc is not None: - return desc - - self.metadata['Description'] = \ - self.get_main_template_yaml().get('description') - return self.metadata['Description'] - - def decompress(self): - if not self.is_validated: - self.validate() - self.temp_dir = tempfile.NamedTemporaryFile().name - with zipfile.ZipFile(self.csar, "r") as zf: - zf.extractall(self.temp_dir) - - def _validate_external_references(self): - """Extracts files referenced in the main template - - These references are currently supported: - * imports - * interface implementations - * artifacts - """ - try: - self.decompress() - main_tpl_file = self.get_main_template() - if not main_tpl_file: - return - main_tpl = self.get_main_template_yaml() - - if 'imports' in main_tpl: - ImportsLoader(main_tpl['imports'], - os.path.join(self.temp_dir, main_tpl_file)) - - if 'topology_template' in main_tpl: - topology_template = main_tpl['topology_template'] - - if 'node_templates' in topology_template: - node_templates = topology_template['node_templates'] - - for node_template_key in node_templates: - node_template = node_templates[node_template_key] - if 'artifacts' in node_template: - artifacts = node_template['artifacts'] - for artifact_key in artifacts: - artifact = artifacts[artifact_key] - if isinstance(artifact, six.string_types): - self._validate_external_reference( - main_tpl_file, - artifact) - elif isinstance(artifact, dict): - if 'file' in artifact: - self._validate_external_reference( - main_tpl_file, - artifact['file']) - else: - ExceptionCollector.appendException( - ValueError(_('Unexpected artifact ' - 'definition for "%s".') - % artifact_key)) - self.error_caught = True - if 'interfaces' in node_template: - interfaces = node_template['interfaces'] - for interface_key in interfaces: - interface = interfaces[interface_key] - for opertation_key in interface: - operation = interface[opertation_key] - if isinstance(operation, six.string_types): - self._validate_external_reference( - main_tpl_file, - operation, - False) - elif isinstance(operation, dict): - if 'implementation' in operation: - self._validate_external_reference( - main_tpl_file, - operation['implementation']) - finally: - if self.temp_dir: - shutil.rmtree(self.temp_dir) - - def _validate_external_reference(self, tpl_file, resource_file, - raise_exc=True): - """Verify that the external resource exists - - If resource_file is a URL verify that the URL is valid. - If resource_file is a relative path verify that the path is valid - considering base folder (self.temp_dir) and tpl_file. - Note that in a CSAR resource_file cannot be an absolute path. - """ - if UrlUtils.validate_url(resource_file): - msg = (_('The resource at "%s" cannot be accessed.') % - resource_file) - try: - if UrlUtils.url_accessible(resource_file): - return - else: - ExceptionCollector.appendException( - URLException(what=msg)) - self.error_caught = True - except Exception: - ExceptionCollector.appendException( - URLException(what=msg)) - self.error_caught = True - - if os.path.isfile(os.path.join(self.temp_dir, - os.path.dirname(tpl_file), - resource_file)): - return - - if raise_exc: - ExceptionCollector.appendException( - ValueError(_('The resource "%s" does not exist.') - % resource_file)) - self.error_caught = True -*/ - - diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/CopyUtils.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/CopyUtils.java deleted file mode 100644 index db236e1..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/CopyUtils.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.utils; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.Map; - -public class CopyUtils { - - @SuppressWarnings("unchecked") - public static Object copyLhmOrAl(Object src) { - if(src instanceof LinkedHashMap) { - LinkedHashMap dst = new LinkedHashMap(); - for(Map.Entry me: ((LinkedHashMap)src).entrySet()) { - dst.put(me.getKey(),me.getValue()); - } - return dst; - } - else if(src instanceof ArrayList) { - ArrayList dst = new ArrayList(); - for(Object o: (ArrayList)src) { - dst.add(o); - } - return dst; - } - else { - return null; - } - } -} diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/DumpUtils.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/DumpUtils.java deleted file mode 100644 index 32c69cd..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/DumpUtils.java +++ /dev/null @@ -1,55 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.utils; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.Map; - -public class DumpUtils { - - @SuppressWarnings("unchecked") - public static void dumpYaml(Object yo,int level) { - final String indent = " "; - try { - if(yo == null) { - System.out.println(""); - return; - } - String cname = yo.getClass().getSimpleName(); - System.out.print(cname); - if(cname.equals("LinkedHashMap")) { - LinkedHashMap lhm = (LinkedHashMap)yo; - System.out.println(); - for(Map.Entry me: lhm.entrySet()) { - System.out.print(indent.substring(0,level) + me.getKey() + ": "); - dumpYaml(me.getValue(),level+2); - } - } - else if(cname.equals("ArrayList")) { - ArrayList al = (ArrayList)yo; - System.out.println(); - for (int i=0; i \"" + (String)yo + "\""); - } - else if(cname.equals("Integer")) { - System.out.println(" ==> " + (int)yo); - } - else if(cname.equals("Boolean")) { - System.out.println(" ==> " + (boolean)yo); - } - else if(cname.equals("Double")) { - System.out.println(" ==> " + (double)yo); - } - else { - System.out.println(" !! unexpected type"); - } - } - catch(Exception e) { - System.out.println("Exception!! " + e.getMessage()); - } - } -} \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/JToscaErrorCodes.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/JToscaErrorCodes.java deleted file mode 100644 index 354fef0..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/JToscaErrorCodes.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.utils; - - -public enum JToscaErrorCodes { - MISSING_META_FILE("JT1001"), - INVALID_META_YAML_CONTENT("JT1002"), - ENTRY_DEFINITION_NOT_DEFINED("JT1003"), - MISSING_ENTRY_DEFINITION_FILE ("JT1004"), - GENERAL_ERROR("JT1005"), - PATH_NOT_VALID("JT1006"), - CSAR_TOSCA_VALIDATION_ERROR("JT1007"), - INVALID_CSAR_FORMAT("JT1008"); - - private String value; - - private JToscaErrorCodes(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - public static JToscaErrorCodes getByCode(String code) { - for(JToscaErrorCodes v : values()){ - if( v.getValue().equals(code)){ - return v; - } - } - return null; - } -} \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/TOSCAVersionProperty.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/TOSCAVersionProperty.java deleted file mode 100644 index 6b3c1ce..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/TOSCAVersionProperty.java +++ /dev/null @@ -1,182 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.utils; - -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; - -public class TOSCAVersionProperty {// test with functions/test_concat.yaml - - private String version; - - private static final String versionRe = - "^(?([0-9][0-9]*))" + - "(\\.(?([0-9][0-9]*)))?" + - "(\\.(?([0-9][0-9]*)))?" + - "(\\.(?([0-9A-Za-z]+)))?" + - "(\\-(?[0-9])*)?$"; - - private String minorVersion = null; - private String majorVersion = null; - private String fixVersion = null; - private String qualifier = null; - private String buildVersion = null; - - - public TOSCAVersionProperty(Object _version) { - version = _version.toString(); - - if(version.equals("0") || version.equals("0.0") || version.equals("0.0.0")) { - //log.warning(_('Version assumed as not provided')) - version = ""; - return; - } - - Pattern pattern = Pattern.compile(versionRe); - Matcher matcher = pattern.matcher(version); - if(!matcher.find()) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "InvalidTOSCAVersionPropertyException: " + - "Value of TOSCA version property \"%s\" is invalid", - version)); - return; - } - minorVersion = matcher.group("gMinorVersion"); - majorVersion = matcher.group("gMajorVersion"); - fixVersion = matcher.group("gFixVersion"); - qualifier = _validateQualifier(matcher.group("gQualifier")); - buildVersion = _validateBuild(matcher.group("gBuildVersion")); - _validateMajorVersion(majorVersion); - - } - - private String _validateMajorVersion(String value) { - // Validate major version - - // Checks if only major version is provided and assumes - // minor version as 0. - // Eg: If version = 18, then it returns version = '18.0' - - if(minorVersion == null && buildVersion == null && !value.equals("0")) { - //log.warning(_('Minor version assumed "0".')) - version = version + "0"; - } - return value; - } - - private String _validateQualifier(String value) { - // Validate qualifier - - // TOSCA version is invalid if a qualifier is present without the - // fix version or with all of major, minor and fix version 0s. - - // For example, the following versions are invalid - // 18.0.abc - // 0.0.0.abc - - if((fixVersion == null && value != null) || - (minorVersion.equals("0") && majorVersion.equals("0") && - fixVersion.equals("0") && value != null)) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "InvalidTOSCAVersionPropertyException: " + - "Value of TOSCA version property \"%s\" is invalid", - version)); - } - return value; - } - - private String _validateBuild(String value) { - // Validate build version - - // TOSCA version is invalid if build version is present without the qualifier. - // Eg: version = 18.0.0-1 is invalid. - - if(qualifier == null && value != null) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "InvalidTOSCAVersionPropertyException: " + - "Value of TOSCA version property \"%s\" is invalid", - version)); - } - return value; - } - - public Object getVersion() { - return version; - } - -} - -/*python - -class TOSCAVersionProperty(object): - - VERSION_RE = re.compile('^(?P([0-9][0-9]*))' - '(\.(?P([0-9][0-9]*)))?' - '(\.(?P([0-9][0-9]*)))?' - '(\.(?P([0-9A-Za-z]+)))?' - '(\-(?P[0-9])*)?$') - - def __init__(self, version): - self.version = str(version) - match = self.VERSION_RE.match(self.version) - if not match: - ExceptionCollector.appendException( - InvalidTOSCAVersionPropertyException(what=(self.version))) - return - ver = match.groupdict() - if self.version in ['0', '0.0', '0.0.0']: - log.warning(_('Version assumed as not provided')) - self.version = None - self.minor_version = ver['minor_version'] - self.major_version = ver['major_version'] - self.fix_version = ver['fix_version'] - self.qualifier = self._validate_qualifier(ver['qualifier']) - self.build_version = self._validate_build(ver['build_version']) - self._validate_major_version(self.major_version) - - def _validate_major_version(self, value): - """Validate major version - - Checks if only major version is provided and assumes - minor version as 0. - Eg: If version = 18, then it returns version = '18.0' - """ - - if self.minor_version is None and self.build_version is None and \ - value != '0': - log.warning(_('Minor version assumed "0".')) - self.version = '.'.join([value, '0']) - return value - - def _validate_qualifier(self, value): - """Validate qualifier - - TOSCA version is invalid if a qualifier is present without the - fix version or with all of major, minor and fix version 0s. - - For example, the following versions are invalid - 18.0.abc - 0.0.0.abc - """ - if (self.fix_version is None and value) or \ - (self.minor_version == self.major_version == - self.fix_version == '0' and value): - ExceptionCollector.appendException( - InvalidTOSCAVersionPropertyException(what=(self.version))) - return value - - def _validate_build(self, value): - """Validate build version - - TOSCA version is invalid if build version is present without the - qualifier. - Eg: version = 18.0.0-1 is invalid. - """ - if not self.qualifier and value: - ExceptionCollector.appendException( - InvalidTOSCAVersionPropertyException(what=(self.version))) - return value - - def get_version(self): - return self.version -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/ThreadLocalsHolder.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/ThreadLocalsHolder.java deleted file mode 100644 index 47ba972..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/ThreadLocalsHolder.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.utils; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; - -public class ThreadLocalsHolder { - - private static final ThreadLocal exceptionCollectorThreadLocal = new ThreadLocal<>(); - - private ThreadLocalsHolder(){} - - public static ExceptionCollector getCollector() { - return exceptionCollectorThreadLocal.get(); - } - - public static void setCollector(ExceptionCollector exceptionCollector) { - cleanup(); - exceptionCollectorThreadLocal.set(exceptionCollector); - } - - public static void cleanup(){ - exceptionCollectorThreadLocal.remove(); - } - -} diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/UrlUtils.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/UrlUtils.java deleted file mode 100644 index 092f827..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/UrlUtils.java +++ /dev/null @@ -1,123 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.utils; - -import java.io.IOException; -import java.net.HttpURLConnection; -import java.net.MalformedURLException; -import java.net.URL; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; - -public class UrlUtils { - - public static boolean validateUrl(String sUrl) { - // Validates whether the given path is a URL or not - - // If the given path includes a scheme (http, https, ftp, ...) and a net - // location (a domain name such as www.github.com) it is validated as a URL - try { - URL url = new URL(sUrl); - if(url.getProtocol().equals("file")) { - return true; - } - return url.getAuthority() != null; - } - catch(MalformedURLException e) { - return false; - } - } - - public static String joinUrl(String sUrl,String relativePath) { - // Builds a new URL from the given URL and the relative path - - // Example: - // url: http://www.githib.com/openstack/heat - // relative_path: heat-translator - // - joined: http://www.githib.com/openstack/heat-translator - if(!validateUrl(sUrl)) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError: The URL \"%s\" is malformed",sUrl)); - } - try { - URL base = new URL(sUrl); - return (new URL(base,relativePath)).toString(); - } - catch(MalformedURLException e) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError: Joining URL \"%s\" and relative path \"%s\" caused an exception",sUrl,relativePath)); - return sUrl; - } - } - - public static boolean isUrlAccessible(String sUrl) { - // Validates whether the given URL is accessible - - // Returns true if the get call returns a 200 response code. - // Otherwise, returns false. - try { - HttpURLConnection connection = (HttpURLConnection) new URL(sUrl).openConnection(); - connection.setRequestMethod("HEAD"); - int responseCode = connection.getResponseCode(); - return responseCode == 200; - } - catch(IOException e) { - return false; - } - } - -} - -/*python - -from six.moves.urllib.parse import urljoin -from six.moves.urllib.parse import urlparse -from toscaparser.common.exception import ExceptionCollector -from toscaparser.utils.gettextutils import _ - -try: - # Python 3.x - import urllib.request as urllib2 -except ImportError: - # Python 2.x - import urllib2 - - -class UrlUtils(object): - - @staticmethod - def validate_url(path): - """Validates whether the given path is a URL or not. - - If the given path includes a scheme (http, https, ftp, ...) and a net - location (a domain name such as www.github.com) it is validated as a - URL. - """ - parsed = urlparse(path) - if parsed.scheme == 'file': - # If the url uses the file scheme netloc will be "" - return True - else: - return bool(parsed.scheme) and bool(parsed.netloc) - - @staticmethod - def join_url(url, relative_path): - """Builds a new URL from the given URL and the relative path. - - Example: - url: http://www.githib.com/openstack/heat - relative_path: heat-translator - - joined: http://www.githib.com/openstack/heat-translator - """ - if not UrlUtils.validate_url(url): - ExceptionCollector.appendException( - ValueError(_('"%s" is not a valid URL.') % url)) - return urljoin(url, relative_path) - - @staticmethod - def url_accessible(url): - """Validates whether the given URL is accessible. - - Returns true if the get call returns a 200 response code. - Otherwise, returns false. - """ - return urllib2.urlopen(url).getcode() == 200 -*/ \ No newline at end of file diff --git a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/ValidateUtils.java b/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/ValidateUtils.java deleted file mode 100644 index 291316f..0000000 --- a/jtosca/src/main/java/org/openecomp/sdc/toscaparser/api/utils/ValidateUtils.java +++ /dev/null @@ -1,409 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.utils; - -import java.util.ArrayList; -import java.util.Date; -import java.util.LinkedHashMap; - -import org.openecomp.sdc.toscaparser.api.common.ExceptionCollector; - -public class ValidateUtils { - - private static final String RANGE_UNBOUNDED = "UNBOUNDED"; - - public static Object strToNum(Object value) { - // Convert a string representation of a number into a numeric type - // tODO(TBD) we should not allow numeric values in, input should be str - if(value instanceof Number) { - return value; - } - if(!(value instanceof String)) { - - } - try { - return Integer.parseInt((String)value); - } - catch(NumberFormatException e) { - } - try { - return Float.parseFloat((String)value); - } - catch(Exception e) { - } - return null; - } - - public static Object validateNumeric(Object value) { - if(!(value instanceof Number)) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError: \"%s\" is not a numeric",value.toString())); - } - return value; - } - - public static Object validateInteger(Object value) { - if(!(value instanceof Integer)) { - // allow "true" and "false" - if(value instanceof Boolean) { - return (Boolean)value ? 1 : 0; - } - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError: \"%s\" is not an integer",value.toString())); - } - return value; - } - - public static Object validateFloat(Object value) { - if(!(value instanceof Float || value instanceof Double)) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError: \"%s\" is not a float",value.toString())); - } - return value; - } - - public static Object validateString(Object value) { - if(!(value instanceof String)) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError: \'%s\' is not a string",value.toString())); - } - return value; - } - - public static Object validateList(Object value) { - if(!(value instanceof ArrayList)) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError: \"%s\" is not a list",value.toString())); - } - return value; - } - - - @SuppressWarnings("unchecked") - public static Object validateRange(Object range) { - // list class check - validateList(range); - // validate range list has a min and max - if(range instanceof ArrayList && ((ArrayList)range).size() != 2) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError: \"%s\" is not a valid range",range.toString())); - // too dangerous to continue... - return range; - } - // validate min and max are numerics or the keyword UNBOUNDED - boolean minTest = false; - boolean maxTest = false; - Object r0 = ((ArrayList)range).get(0); - Object r1 = ((ArrayList)range).get(1); - - if(!(r0 instanceof Integer) && !(r0 instanceof Float) || - !(r1 instanceof Integer) && !(r1 instanceof Float)) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError: \"%s\" is not a valid range",range.toString())); - // too dangerous to continue... - return range; - } - - Float min = 0.0F; - Float max = 0.0F; - if(r0 instanceof String && ((String)r0).equals(RANGE_UNBOUNDED)) { - minTest = true; - } - else { - min = r0 instanceof Integer ? ((Integer)r0).floatValue() : (Float)r0; - } - if(r1 instanceof String && ((String)r1).equals(RANGE_UNBOUNDED)) { - maxTest = true; - } - else { - max = r1 instanceof Integer ? ((Integer)r1).floatValue() : (Float)r1; - } - - // validate the max > min (account for UNBOUNDED) - if(!minTest && !maxTest) { - // Note: min == max is allowed - if(min > max) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError:\"%s\" is not a valid range",range.toString())); - } - } - return range; - } - - @SuppressWarnings("unchecked") - public static Object validateValueInRange(Object value,Object range,String propName) { - // verify all 3 are numeric and convert to Floats - if(!(value instanceof Integer || value instanceof Float)) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError: validateInRange: \"%s\" is not a number",range.toString())); - return value; - } - Float fval = value instanceof Integer ? ((Integer)value).floatValue() : (Float)value; - - ////////////////////////// - //"validateRange(range);" - ////////////////////////// - // better safe than sorry... - // validate that range list has a min and max - if(range instanceof ArrayList && ((ArrayList)range).size() != 2) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError: \"%s\" is not a valid range",range.toString())); - // too dangerous to continue... - return value; - } - // validate min and max are numerics or the keyword UNBOUNDED - boolean minTest = false; - boolean maxTest = false; - Object r0 = ((ArrayList)range).get(0); - Object r1 = ((ArrayList)range).get(1); - - if(!(r0 instanceof Integer) && !(r0 instanceof Float) || - !(r1 instanceof Integer) && !(r1 instanceof Float)) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError: \"%s\" is not a valid range",range.toString())); - // too dangerous to continue... - return value; - } - - Float min = 0.0F; - Float max = 0.0F; - if(r0 instanceof String && ((String)r0).equals(RANGE_UNBOUNDED)) { - minTest = true; - } - else { - min = r0 instanceof Integer ? ((Integer)r0).floatValue() : (Float)r0; - } - if(r1 instanceof String && ((String)r1).equals(RANGE_UNBOUNDED)) { - maxTest = true; - } - else { - max = r1 instanceof Integer ? ((Integer)r1).floatValue() : (Float)r1; - } - - // validate the max > min (account for UNBOUNDED) - if(!minTest && !maxTest) { - // Note: min == max is allowed - if(min > max) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError:\"%s\" is not a valid range",range.toString())); - } - } - // finally... - boolean bError = false; - //Note: value is valid if equal to min - if(!minTest) { - if(fval < min) { - bError = true; - } - } - // Note: value is valid if equal to max - if(!maxTest) { - if(fval > max) { - bError = true; - } - } - if(bError) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "RangeValueError: Property \"%s\", \"%s\" not in range [\"%s\" - \"%s\"", - propName,value.toString(),r0.toString(),r1.toString())); - } - return value; - } - - public static Object validateMap(Object ob) { - if(!(ob instanceof LinkedHashMap)) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError\"%s\" is not a map.",ob.toString())); - } - return ob; - } - - public static Object validateBoolean(Object value) { - if(value instanceof Boolean) { - return value; - } - if(value instanceof String) { - String normalized = ((String)value).toLowerCase(); - if(normalized.equals("true") || normalized.equals("false")) { - return normalized.equals("true"); - } - } - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError: \"%s\" is not a boolean",value.toString())); - return value; - } - - public static Object validateTimestamp(Object value) { - /* - try: - # Note: we must return our own exception message - # as dateutil's parser returns different types / values on - # different systems. OSX, for example, returns a tuple - # containing a different error message than Linux - dateutil.parser.parse(value) - except Exception as e: - original_err_msg = str(e) - log.error(original_err_msg) - ExceptionCollector.appendException( - ValueError(_('"%(val)s" is not a valid timestamp. "%(msg)s"') % - {'val': value, 'msg': original_err_msg})) - */ - - // timestamps are loaded as Date objects by the YAML parser - if(!(value instanceof Date)) { - ThreadLocalsHolder.getCollector().appendException(String.format( - "ValueError: \"%s\" is not a valid timestamp", - value.toString())); - - } - return value; - } - -} - -/*python - -from toscaparser.elements import constraints -from toscaparser.common.exception import ExceptionCollector -from toscaparser.common.exception import InvalidTOSCAVersionPropertyException -from toscaparser.common.exception import RangeValueError -from toscaparser.utils.gettextutils import _ - -log = logging.getLogger('tosca') - -RANGE_UNBOUNDED = 'UNBOUNDED' - - -def str_to_num(value): - '''Convert a string representation of a number into a numeric type.''' - # tODO(TBD) we should not allow numeric values in, input should be str - if isinstance(value, numbers.Number): - return value - try: - return int(value) - except ValueError: - return float(value) - - -def validate_numeric(value): - if not isinstance(value, numbers.Number): - ExceptionCollector.appendException( - ValueError(_('"%s" is not a numeric.') % value)) - return value - - -def validate_integer(value): - if not isinstance(value, int): - try: - value = int(value) - except Exception: - ExceptionCollector.appendException( - ValueError(_('"%s" is not an integer.') % value)) - return value - - -def validate_float(value): - if not isinstance(value, float): - ExceptionCollector.appendException( - ValueError(_('"%s" is not a float.') % value)) - return value - - -def validate_string(value): - if not isinstance(value, six.string_types): - ExceptionCollector.appendException( - ValueError(_('"%s" is not a string.') % value)) - return value - - -def validate_list(value): - if not isinstance(value, list): - ExceptionCollector.appendException( - ValueError(_('"%s" is not a list.') % value)) - return value - - -def validate_range(range): - # list class check - validate_list(range) - # validate range list has a min and max - if len(range) != 2: - ExceptionCollector.appendException( - ValueError(_('"%s" is not a valid range.') % range)) - # validate min and max are numerics or the keyword UNBOUNDED - min_test = max_test = False - if not range[0] == RANGE_UNBOUNDED: - min = validate_numeric(range[0]) - else: - min_test = True - if not range[1] == RANGE_UNBOUNDED: - max = validate_numeric(range[1]) - else: - max_test = True - # validate the max > min (account for UNBOUNDED) - if not min_test and not max_test: - # Note: min == max is allowed - if min > max: - ExceptionCollector.appendException( - ValueError(_('"%s" is not a valid range.') % range)) - - return range - - -def validate_value_in_range(value, range, prop_name): - validate_numeric(value) - validate_range(range) - - # Note: value is valid if equal to min - if range[0] != RANGE_UNBOUNDED: - if value < range[0]: - ExceptionCollector.appendException( - RangeValueError(pname=prop_name, - pvalue=value, - vmin=range[0], - vmax=range[1])) - # Note: value is valid if equal to max - if range[1] != RANGE_UNBOUNDED: - if value > range[1]: - ExceptionCollector.appendException( - RangeValueError(pname=prop_name, - pvalue=value, - vmin=range[0], - vmax=range[1])) - return value - - -def validate_map(value): - if not isinstance(value, collections.Mapping): - ExceptionCollector.appendException( - ValueError(_('"%s" is not a map.') % value)) - return value - - -def validate_boolean(value): - if isinstance(value, bool): - return value - - if isinstance(value, str): - normalised = value.lower() - if normalised in ['true', 'false']: - return normalised == 'true' - - ExceptionCollector.appendException( - ValueError(_('"%s" is not a boolean.') % value)) - - -def validate_timestamp(value): - try: - # Note: we must return our own exception message - # as dateutil's parser returns different types / values on - # different systems. OSX, for example, returns a tuple - # containing a different error message than Linux - dateutil.parser.parse(value) - except Exception as e: - original_err_msg = str(e) - log.error(original_err_msg) - ExceptionCollector.appendException( - ValueError(_('"%(val)s" is not a valid timestamp. "%(msg)s"') % - {'val': value, 'msg': original_err_msg})) - return - -*/ \ No newline at end of file diff --git a/jtosca/src/main/resources/TOSCA_definition_1_0.yaml b/jtosca/src/main/resources/TOSCA_definition_1_0.yaml deleted file mode 100644 index 554b7b6..0000000 --- a/jtosca/src/main/resources/TOSCA_definition_1_0.yaml +++ /dev/null @@ -1,967 +0,0 @@ -# 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. - -########################################################################## -# The content of this file reflects TOSCA Simple Profile in YAML version -# 1.0.0. It describes the definition for TOSCA types including Node Type, -# Relationship Type, Capability Type and Interfaces. -########################################################################## -tosca_definitions_version: tosca_simple_yaml_1_0 - -########################################################################## -# Node Type. -# A Node Type is a reusable entity that defines the type of one or more -# Node Templates. -########################################################################## -node_types: - tosca.nodes.Root: - description: > - The TOSCA root node all other TOSCA base node types derive from. - attributes: - tosca_id: - type: string - tosca_name: - type: string - state: - type: string - capabilities: - feature: - type: tosca.capabilities.Node - requirements: - - dependency: - capability: tosca.capabilities.Node - node: tosca.nodes.Root - relationship: tosca.relationships.DependsOn - occurrences: [ 0, UNBOUNDED ] - interfaces: - Standard: - type: tosca.interfaces.node.lifecycle.Standard - - tosca.nodes.Compute: - derived_from: tosca.nodes.Root - attributes: - private_address: - type: string - public_address: - type: string - networks: - type: map - entry_schema: - type: tosca.datatypes.network.NetworkInfo - ports: - type: map - entry_schema: - type: tosca.datatypes.network.PortInfo - capabilities: - host: - type: tosca.capabilities.Container - binding: - type: tosca.capabilities.network.Bindable - os: - type: tosca.capabilities.OperatingSystem - scalable: - type: tosca.capabilities.Scalable - endpoint: - type: tosca.capabilities.Endpoint.Admin - requirements: - - local_storage: - capability: tosca.capabilities.Attachment - node: tosca.nodes.BlockStorage - relationship: tosca.relationships.AttachesTo - occurrences: [0, UNBOUNDED] - - tosca.nodes.SoftwareComponent: - derived_from: tosca.nodes.Root - properties: - # domain-specific software component version - component_version: - type: version - required: false - description: > - Software component version. - admin_credential: - type: tosca.datatypes.Credential - required: false - requirements: - - host: - capability: tosca.capabilities.Container - node: tosca.nodes.Compute - relationship: tosca.relationships.HostedOn - - tosca.nodes.DBMS: - derived_from: tosca.nodes.SoftwareComponent - properties: - port: - required: false - type: integer - description: > - The port the DBMS service will listen to for data and requests. - root_password: - required: false - type: string - description: > - The root password for the DBMS service. - capabilities: - host: - type: tosca.capabilities.Container - valid_source_types: [tosca.nodes.Database] - - tosca.nodes.Database: - derived_from: tosca.nodes.Root - properties: - user: - required: false - type: string - description: > - User account name for DB administration - port: - required: false - type: integer - description: > - The port the database service will use to listen for incoming data and - requests. - name: - required: false - type: string - description: > - The name of the database. - password: - required: false - type: string - description: > - The password for the DB user account - requirements: - - host: - capability: tosca.capabilities.Container - node: tosca.nodes.DBMS - relationship: tosca.relationships.HostedOn - capabilities: - database_endpoint: - type: tosca.capabilities.Endpoint.Database - - tosca.nodes.WebServer: - derived_from: tosca.nodes.SoftwareComponent - capabilities: - data_endpoint: - type: tosca.capabilities.Endpoint - admin_endpoint: - type: tosca.capabilities.Endpoint.Admin - host: - type: tosca.capabilities.Container - valid_source_types: [tosca.nodes.WebApplication] - - tosca.nodes.WebApplication: - derived_from: tosca.nodes.Root - properties: - context_root: - type: string - required: false - requirements: - - host: - capability: tosca.capabilities.Container - node: tosca.nodes.WebServer - relationship: tosca.relationships.HostedOn - capabilities: - app_endpoint: - type: tosca.capabilities.Endpoint - - tosca.nodes.BlockStorage: - derived_from: tosca.nodes.Root - properties: - size: - type: scalar-unit.size - constraints: - - greater_or_equal: 1 MB - volume_id: - type: string - required: false - snapshot_id: - type: string - required: false - attributes: - volume_id: - type: string - capabilities: - attachment: - type: tosca.capabilities.Attachment - - tosca.nodes.network.Network: - derived_from: tosca.nodes.Root - description: > - The TOSCA Network node represents a simple, logical network service. - properties: - ip_version: - type: integer - required: false - default: 4 - constraints: - - valid_values: [ 4, 6 ] - description: > - The IP version of the requested network. Valid values are 4 for ipv4 - or 6 for ipv6. - cidr: - type: string - required: false - description: > - The cidr block of the requested network. - start_ip: - type: string - required: false - description: > - The IP address to be used as the start of a pool of addresses within - the full IP range derived from the cidr block. - end_ip: - type: string - required: false - description: > - The IP address to be used as the end of a pool of addresses within - the full IP range derived from the cidr block. - gateway_ip: - type: string - required: false - description: > - The gateway IP address. - network_name: - type: string - required: false - description: > - An identifier that represents an existing Network instance in the - underlying cloud infrastructure or can be used as the name of the - newly created network. If network_name is provided and no other - properties are provided (with exception of network_id), then an - existing network instance will be used. If network_name is provided - alongside with more properties then a new network with this name will - be created. - network_id: - type: string - required: false - description: > - An identifier that represents an existing Network instance in the - underlying cloud infrastructure. This property is mutually exclusive - with all other properties except network_name. This can be used alone - or together with network_name to identify an existing network. - segmentation_id: - type: string - required: false - description: > - A segmentation identifier in the underlying cloud infrastructure. - E.g. VLAN ID, GRE tunnel ID, etc.. - network_type: - type: string - required: false - description: > - It specifies the nature of the physical network in the underlying - cloud infrastructure. Examples are flat, vlan, gre or vxlan. - For flat and vlan types, physical_network should be provided too. - physical_network: - type: string - required: false - description: > - It identifies the physical network on top of which the network is - implemented, e.g. physnet1. This property is required if network_type - is flat or vlan. - dhcp_enabled: - type: boolean - required: false - default: true - description: > - Indicates should DHCP service be enabled on the network or not. - capabilities: - link: - type: tosca.capabilities.network.Linkable - - tosca.nodes.network.Port: - derived_from: tosca.nodes.Root - description: > - The TOSCA Port node represents a logical entity that associates between - Compute and Network normative types. The Port node type effectively - represents a single virtual NIC on the Compute node instance. - properties: - ip_address: - type: string - required: false - description: > - Allow the user to set a static IP. - order: - type: integer - required: false - default: 0 - constraints: - - greater_or_equal: 0 - description: > - The order of the NIC on the compute instance (e.g. eth2). - is_default: - type: boolean - required: false - default: false - description: > - If is_default=true this port will be used for the default gateway - route. Only one port that is associated to single compute node can - set as is_default=true. - ip_range_start: - type: string - required: false - description: > - Defines the starting IP of a range to be allocated for the compute - instances that are associated with this Port. - ip_range_end: - type: string - required: false - description: > - Defines the ending IP of a range to be allocated for the compute - instances that are associated with this Port. - attributes: - ip_address: - type: string - requirements: - - binding: - description: > - Binding requirement expresses the relationship between Port and - Compute nodes. Effectively it indicates that the Port will be - attached to specific Compute node instance - capability: tosca.capabilities.network.Bindable - relationship: tosca.relationships.network.BindsTo - node: tosca.nodes.Compute - - link: - description: > - Link requirement expresses the relationship between Port and Network - nodes. It indicates which network this port will connect to. - capability: tosca.capabilities.network.Linkable - relationship: tosca.relationships.network.LinksTo - node: tosca.nodes.network.Network - - tosca.nodes.network.FloatingIP: - derived_from: tosca.nodes.Root - description: > - The TOSCA FloatingIP node represents a floating IP that can associate to a Port. - properties: - floating_network: - type: string - required: true - floating_ip_address: - type: string - required: false - port_id: - type: string - required: false - requirements: - - link: - capability: tosca.capabilities.network.Linkable - relationship: tosca.relationships.network.LinksTo - node: tosca.nodes.network.Port - - tosca.nodes.ObjectStorage: - derived_from: tosca.nodes.Root - description: > - The TOSCA ObjectStorage node represents storage that provides the ability - to store data as objects (or BLOBs of data) without consideration for the - underlying filesystem or devices - properties: - name: - type: string - required: true - description: > - The logical name of the object store (or container). - size: - type: scalar-unit.size - required: false - constraints: - - greater_or_equal: 0 GB - description: > - The requested initial storage size. - maxsize: - type: scalar-unit.size - required: false - constraints: - - greater_or_equal: 0 GB - description: > - The requested maximum storage size. - capabilities: - storage_endpoint: - type: tosca.capabilities.Endpoint - - tosca.nodes.LoadBalancer: - derived_from: tosca.nodes.Root - properties: - algorithm: - type: string - required: false - status: experimental - capabilities: - client: - type: tosca.capabilities.Endpoint.Public - occurrences: [0, UNBOUNDED] - description: the Floating (IP) client’s on the public network can connect to - requirements: - - application: - capability: tosca.capabilities.Endpoint - relationship: tosca.relationships.RoutesTo - occurrences: [0, UNBOUNDED] - description: Connection to one or more load balanced applications - - tosca.nodes.Container.Application: - derived_from: tosca.nodes.Root - requirements: - - host: - capability: tosca.capabilities.Container - node: tosca.nodes.Container.Runtime - relationship: tosca.relationships.HostedOn - - tosca.nodes.Container.Runtime: - derived_from: tosca.nodes.SoftwareComponent - capabilities: - host: - type: tosca.capabilities.Container - scalable: - type: tosca.capabilities.Scalable - - tosca.nodes.Container.Application.Docker: - derived_from: tosca.nodes.Container.Application - requirements: - - host: - capability: tosca.capabilities.Container.Docker - -########################################################################## -# Relationship Type. -# A Relationship Type is a reusable entity that defines the type of one -# or more relationships between Node Types or Node Templates. -########################################################################## -relationship_types: - tosca.relationships.Root: - description: > - The TOSCA root Relationship Type all other TOSCA base Relationship Types - derive from. - attributes: - tosca_id: - type: string - tosca_name: - type: string - interfaces: - Configure: - type: tosca.interfaces.relationship.Configure - - tosca.relationships.DependsOn: - derived_from: tosca.relationships.Root - - tosca.relationships.HostedOn: - derived_from: tosca.relationships.Root - valid_target_types: [ tosca.capabilities.Container ] - - tosca.relationships.ConnectsTo: - derived_from: tosca.relationships.Root - valid_target_types: [ tosca.capabilities.Endpoint ] - credential: - type: tosca.datatypes.Credential - required: false - - tosca.relationships.AttachesTo: - derived_from: tosca.relationships.Root - valid_target_types: [ tosca.capabilities.Attachment ] - properties: - location: - required: true - type: string - constraints: - - min_length: 1 - device: - required: false - type: string - - tosca.relationships.RoutesTo: - derived_from: tosca.relationships.ConnectsTo - valid_target_types: [ tosca.capabilities.Endpoint ] - - tosca.relationships.network.LinksTo: - derived_from: tosca.relationships.DependsOn - valid_target_types: [ tosca.capabilities.network.Linkable ] - - tosca.relationships.network.BindsTo: - derived_from: tosca.relationships.DependsOn - valid_target_types: [ tosca.capabilities.network.Bindable ] - -########################################################################## -# Capability Type. -# A Capability Type is a reusable entity that describes a kind of -# capability that a Node Type can declare to expose. -########################################################################## -capability_types: - tosca.capabilities.Root: - description: > - The TOSCA root Capability Type all other TOSCA base Capability Types - derive from. - - tosca.capabilities.Node: - derived_from: tosca.capabilities.Root - - tosca.capabilities.Container: - derived_from: tosca.capabilities.Root - properties: - num_cpus: - required: false - type: integer - constraints: - - greater_or_equal: 1 - cpu_frequency: - required: false - type: scalar-unit.frequency - constraints: - - greater_or_equal: 0.1 GHz - disk_size: - required: false - type: scalar-unit.size - constraints: - - greater_or_equal: 0 MB - mem_size: - required: false - type: scalar-unit.size - constraints: - - greater_or_equal: 0 MB - - tosca.capabilities.Endpoint: - derived_from: tosca.capabilities.Root - properties: - protocol: - type: string - required: true - default: tcp - port: - type: tosca.datatypes.network.PortDef - required: false - secure: - type: boolean - required: false - default: false - url_path: - type: string - required: false - port_name: - type: string - required: false - network_name: - type: string - required: false - default: PRIVATE - initiator: - type: string - required: false - default: source - constraints: - - valid_values: [source, target, peer] - ports: - type: map - required: false - constraints: - - min_length: 1 - entry_schema: - type: tosca.datatypes.network.PortSpec - attributes: - ip_address: - type: string - - tosca.capabilities.Endpoint.Admin: - derived_from: tosca.capabilities.Endpoint - properties: - secure: - type: boolean - default: true - constraints: - - equal: true - - tosca.capabilities.Endpoint.Public: - derived_from: tosca.capabilities.Endpoint - properties: - # Change the default network_name to use the first public network found - network_name: - type: string - default: PUBLIC - constraints: - - equal: PUBLIC - floating: - description: > - Indicates that the public address should be allocated from a pool of - floating IPs that are associated with the network. - type: boolean - default: false - status: experimental - dns_name: - description: The optional name to register with DNS - type: string - required: false - status: experimental - - tosca.capabilities.Scalable: - derived_from: tosca.capabilities.Root - properties: - min_instances: - type: integer - required: true - default: 1 - description: > - This property is used to indicate the minimum number of instances - that should be created for the associated TOSCA Node Template by - a TOSCA orchestrator. - max_instances: - type: integer - required: true - default: 1 - description: > - This property is used to indicate the maximum number of instances - that should be created for the associated TOSCA Node Template by - a TOSCA orchestrator. - default_instances: - type: integer - required: false - description: > - An optional property that indicates the requested default number - of instances that should be the starting number of instances a - TOSCA orchestrator should attempt to allocate. - The value for this property MUST be in the range between the values - set for min_instances and max_instances properties. - - tosca.capabilities.Endpoint.Database: - derived_from: tosca.capabilities.Endpoint - - tosca.capabilities.Attachment: - derived_from: tosca.capabilities.Root - - tosca.capabilities.network.Linkable: - derived_from: tosca.capabilities.Root - description: > - A node type that includes the Linkable capability indicates that it can - be pointed by tosca.relationships.network.LinksTo relationship type, which - represents an association relationship between Port and Network node types. - - tosca.capabilities.network.Bindable: - derived_from: tosca.capabilities.Root - description: > - A node type that includes the Bindable capability indicates that it can - be pointed by tosca.relationships.network.BindsTo relationship type, which - represents a network association relationship between Port and Compute node - types. - - tosca.capabilities.OperatingSystem: - derived_from: tosca.capabilities.Root - properties: - architecture: - required: false - type: string - description: > - The host Operating System (OS) architecture. - type: - required: false - type: string - description: > - The host Operating System (OS) type. - distribution: - required: false - type: string - description: > - The host Operating System (OS) distribution. Examples of valid values - for an “type” of “Linux” would include: - debian, fedora, rhel and ubuntu. - version: - required: false - type: version - description: > - The host Operating System version. - - tosca.capabilities.Container.Docker: - derived_from: tosca.capabilities.Container - properties: - version: - type: list - required: false - entry_schema: - type: version - description: > - The Docker version capability. - publish_all: - type: boolean - default: false - required: false - description: > - Indicates that all ports (ranges) listed in the dockerfile - using the EXPOSE keyword be published. - publish_ports: - type: list - entry_schema: - type: tosca.datatypes.network.PortSpec - required: false - description: > - List of ports mappings from source (Docker container) - to target (host) ports to publish. - expose_ports: - type: list - entry_schema: - type: tosca.datatypes.network.PortSpec - required: false - description: > - List of ports mappings from source (Docker container) to expose - to other Docker containers (not accessible outside host). - volumes: - type: list - entry_schema: - type: string - required: false - description: > - The dockerfile VOLUME command which is used to enable access - from the Docker container to a directory on the host machine. - host_id: - type: string - required: false - description: > - The optional identifier of an existing host resource - that should be used to run this container on. - volume_id: - type: string - required: false - description: > - The optional identifier of an existing storage volume (resource) - that should be used to create the container's mount point(s) on. - -########################################################################## - # Interfaces Type. - # The Interfaces element describes a list of one or more interface - # definitions for a modelable entity (e.g., a Node or Relationship Type) - # as defined within the TOSCA Simple Profile specification. -########################################################################## -interface_types: - tosca.interfaces.node.lifecycle.Standard: - create: - description: Standard lifecycle create operation. - configure: - description: Standard lifecycle configure operation. - start: - description: Standard lifecycle start operation. - stop: - description: Standard lifecycle stop operation. - delete: - description: Standard lifecycle delete operation. - - tosca.interfaces.relationship.Configure: - pre_configure_source: - description: Operation to pre-configure the source endpoint. - pre_configure_target: - description: Operation to pre-configure the target endpoint. - post_configure_source: - description: Operation to post-configure the source endpoint. - post_configure_target: - description: Operation to post-configure the target endpoint. - add_target: - description: Operation to add a target node. - remove_target: - description: Operation to remove a target node. - add_source: > - description: Operation to notify the target node of a source node which - is now available via a relationship. - description: - target_changed: > - description: Operation to notify source some property or attribute of the - target changed - -########################################################################## - # Data Type. - # A Datatype is a complex data type declaration which contains other - # complex or simple data types. -########################################################################## -data_types: - tosca.datatypes.Root: - description: > - The TOSCA root Data Type all other TOSCA base Data Types derive from - - tosca.datatypes.network.NetworkInfo: - derived_from: tosca.datatypes.Root - properties: - network_name: - type: string - network_id: - type: string - addresses: - type: list - entry_schema: - type: string - - tosca.datatypes.network.PortInfo: - derived_from: tosca.datatypes.Root - properties: - port_name: - type: string - port_id: - type: string - network_id: - type: string - mac_address: - type: string - addresses: - type: list - entry_schema: - type: string - - tosca.datatypes.network.PortDef: - derived_from: tosca.datatypes.Root - type: integer - constraints: - - in_range: [ 1, 65535 ] - - tosca.datatypes.network.PortSpec: - derived_from: tosca.datatypes.Root - properties: - protocol: - type: string - required: true - default: tcp - constraints: - - valid_values: [ udp, tcp, igmp ] - target: - type: tosca.datatypes.network.PortDef - required: false - target_range: - type: range - required: false - constraints: - - in_range: [ 1, 65535 ] - source: - type: tosca.datatypes.network.PortDef - required: false - source_range: - type: range - required: false - constraints: - - in_range: [ 1, 65535 ] - - tosca.datatypes.Credential: - derived_from: tosca.datatypes.Root - properties: - protocol: - type: string - required: false - token_type: - type: string - default: password - required: true - token: - type: string - required: true - keys: - type: map - entry_schema: - type: string - required: false - user: - type: string - required: false - -########################################################################## - # Artifact Type. - # An Artifact Type is a reusable entity that defines the type of one or more - # files which Node Types or Node Templates can have dependent relationships - # and used during operations such as during installation or deployment. -########################################################################## -artifact_types: - tosca.artifacts.Root: - description: > - The TOSCA Artifact Type all other TOSCA Artifact Types derive from - properties: - version: version - - tosca.artifacts.File: - derived_from: tosca.artifacts.Root - - tosca.artifacts.Deployment: - derived_from: tosca.artifacts.Root - description: TOSCA base type for deployment artifacts - - tosca.artifacts.Deployment.Image: - derived_from: tosca.artifacts.Deployment - - tosca.artifacts.Deployment.Image.VM: - derived_from: tosca.artifacts.Deployment.Image - - tosca.artifacts.Implementation: - derived_from: tosca.artifacts.Root - description: TOSCA base type for implementation artifacts - - tosca.artifacts.Implementation.Bash: - derived_from: tosca.artifacts.Implementation - description: Script artifact for the Unix Bash shell - mime_type: application/x-sh - file_ext: [ sh ] - - tosca.artifacts.Implementation.Python: - derived_from: tosca.artifacts.Implementation - description: Artifact for the interpreted Python language - mime_type: application/x-python - file_ext: [ py ] - - tosca.artifacts.Deployment.Image.Container.Docker: - derived_from: tosca.artifacts.Deployment.Image - description: Docker container image - - tosca.artifacts.Deployment.Image.VM.ISO: - derived_from: tosca.artifacts.Deployment.Image - description: Virtual Machine (VM) image in ISO disk format - mime_type: application/octet-stream - file_ext: [ iso ] - - tosca.artifacts.Deployment.Image.VM.QCOW2: - derived_from: tosca.artifacts.Deployment.Image - description: Virtual Machine (VM) image in QCOW v2 standard disk format - mime_type: application/octet-stream - file_ext: [ qcow2 ] - -########################################################################## - # Policy Type. - # TOSCA Policy Types represent logical grouping of TOSCA nodes that have - # an implied relationship and need to be orchestrated or managed together - # to achieve some result. -########################################################################## -policy_types: - tosca.policies.Root: - description: The TOSCA Policy Type all other TOSCA Policy Types derive from. - - tosca.policies.Placement: - derived_from: tosca.policies.Root - description: The TOSCA Policy Type definition that is used to govern - placement of TOSCA nodes or groups of nodes. - - tosca.policies.Scaling: - derived_from: tosca.policies.Root - description: The TOSCA Policy Type definition that is used to govern - scaling of TOSCA nodes or groups of nodes. - - tosca.policies.Monitoring: - derived_from: tosca.policies.Root - description: The TOSCA Policy Type definition that is used to govern - monitoring of TOSCA nodes or groups of nodes. - - tosca.policies.Update: - derived_from: tosca.policies.Root - description: The TOSCA Policy Type definition that is used to govern - update of TOSCA nodes or groups of nodes. - - tosca.policies.Performance: - derived_from: tosca.policies.Root - description: The TOSCA Policy Type definition that is used to declare - performance requirements for TOSCA nodes or groups of nodes. - -########################################################################## - # Group Type. - # Group Type represents logical grouping of TOSCA nodes that have an - # implied membership relationship and may need to be orchestrated or - # managed together to achieve some result. -########################################################################## -group_types: - tosca.groups.Root: - description: The TOSCA Group Type all other TOSCA Group Types derive from - interfaces: - Standard: - type: tosca.interfaces.node.lifecycle.Standard diff --git a/jtosca/src/main/resources/extensions/nfv/TOSCA_nfv_definition_1_0.yaml b/jtosca/src/main/resources/extensions/nfv/TOSCA_nfv_definition_1_0.yaml deleted file mode 100644 index 365d70e..0000000 --- a/jtosca/src/main/resources/extensions/nfv/TOSCA_nfv_definition_1_0.yaml +++ /dev/null @@ -1,240 +0,0 @@ -# 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. - -########################################################################## -# The content of this file reflects TOSCA NFV Profile in YAML version -# 1.0.0. It describes the definition for TOSCA NFV types including Node Type, -# Relationship Type, Capability Type and Interfaces. -########################################################################## -tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0 - -########################################################################## -# Node Type. -# A Node Type is a reusable entity that defines the type of one or more -# Node Templates. -########################################################################## -node_types: - tosca.nodes.nfv.VNF: - derived_from: tosca.nodes.Root # Or should this be its own top - level type? - properties: - id: - type: string - description: ID of this VNF - vendor: - type: string - description: name of the vendor who generate this VNF - version: - type: version - description: version of the software for this VNF - requirements: - - virtualLink: - capability: tosca.capabilities.nfv.VirtualLinkable - relationship: tosca.relationships.nfv.VirtualLinksTo - node: tosca.nodes.nfv.VL - - tosca.nodes.nfv.VDU: - derived_from: tosca.nodes.Compute - capabilities: - high_availability: - type: tosca.capabilities.nfv.HA - virtualbinding: - type: tosca.capabilities.nfv.VirtualBindable - monitoring_parameter: - type: tosca.capabilities.nfv.Metric - requirements: - - high_availability: - capability: tosca.capabilities.nfv.HA - relationship: tosca.relationships.nfv.HA - node: tosca.nodes.nfv.VDU - occurrences: [ 0, 1 ] - - tosca.nodes.nfv.CP: - derived_from: tosca.nodes.network.Port - properties: - type: - type: string - required: false - requirements: - - virtualLink: - capability: tosca.capabilities.nfv.VirtualLinkable - relationship: tosca.relationships.nfv.VirtualLinksTo - node: tosca.nodes.nfv.VL - - virtualBinding: - capability: tosca.capabilities.nfv.VirtualBindable - relationship: tosca.relationships.nfv.VirtualBindsTo - node: tosca.nodes.nfv.VDU - attributes: - address: - type: string - - tosca.nodes.nfv.VL: - derived_from: tosca.nodes.network.Network - properties: - vendor: - type: string - required: true - description: name of the vendor who generate this VL - capabilities: - virtual_linkable: - type: tosca.capabilities.nfv.VirtualLinkable - - tosca.nodes.nfv.VL.ELine: - derived_from: tosca.nodes.nfv.VL - capabilities: - virtual_linkable: - occurrences: 2 - - tosca.nodes.nfv.VL.ELAN: - derived_from: tosca.nodes.nfv.VL - - tosca.nodes.nfv.VL.ETree: - derived_from: tosca.nodes.nfv.VL - - tosca.nodes.nfv.FP: - derived_from: tosca.nodes.Root - properties: - policy: - type: string - required: false - description: name of the vendor who generate this VL - requirements: - - forwarder: - capability: tosca.capabilities.nfv.Forwarder - relationship: tosca.relationships.nfv.ForwardsTo - -########################################################################## -# Relationship Type. -# A Relationship Type is a reusable entity that defines the type of one -# or more relationships between Node Types or Node Templates. -########################################################################## - -relationship_types: - tosca.relationships.nfv.VirtualLinksTo: - derived_from: tosca.relationships.network.LinksTo - valid_target_types: [ tosca.capabilities.nfv.VirtualLinkable ] - - tosca.relationships.nfv.VirtualBindsTo: - derived_from: tosca.relationships.network.BindsTo - valid_target_types: [ tosca.capabilities.nfv.VirtualBindable ] - - tosca.relationships.nfv.HA: - derived_from: tosca.relationships.Root - valid_target_types: [ tosca.capabilities.nfv.HA ] - - tosca.relationships.nfv.Monitor: - derived_from: tosca.relationships.ConnectsTo - valid_target_types: [ tosca.capabilities.nfv.Metric ] - - tosca.relationships.nfv.ForwardsTo: - derived_from: tosca.relationships.root - valid_target_types: [ tosca.capabilities.nfv.Forwarder] - -########################################################################## -# Capability Type. -# A Capability Type is a reusable entity that describes a kind of -# capability that a Node Type can declare to expose. -########################################################################## - -capability_types: - tosca.capabilities.nfv.VirtualLinkable: - derived_from: tosca.capabilities.network.Linkable - - tosca.capabilities.nfv.VirtualBindable: - derived_from: tosca.capabilities.network.Bindable - - tosca.capabilities.nfv.HA: - derived_from: tosca.capabilities.Root - valid_source_types: [ tosca.nodes.nfv.VDU ] - - tosca.capabilities.nfv.HA.ActiveActive: - derived_from: tosca.capabilities.nfv.HA - - tosca.capabilities.nfv.HA.ActivePassive: - derived_from: tosca.capabilities.nfv.HA - - tosca.capabilities.nfv.Metric: - derived_from: tosca.capabilities.Root - - tosca.capabilities.nfv.Forwarder: - derived_from: tosca.capabilities.Root - -########################################################################## - # Interfaces Type. - # The Interfaces element describes a list of one or more interface - # definitions for a modelable entity (e.g., a Node or Relationship Type) - # as defined within the TOSCA Simple Profile specification. -########################################################################## - -########################################################################## - # Data Type. - # A Datatype is a complex data type declaration which contains other - # complex or simple data types. -########################################################################## - -########################################################################## - # Artifact Type. - # An Artifact Type is a reusable entity that defines the type of one or more - # files which Node Types or Node Templates can have dependent relationships - # and used during operations such as during installation or deployment. -########################################################################## - -########################################################################## - # Policy Type. - # TOSCA Policy Types represent logical grouping of TOSCA nodes that have - # an implied relationship and need to be orchestrated or managed together - # to achieve some result. -########################################################################## - -########################################################################## - # Group Type - # -########################################################################## -group_types: - tosca.groups.nfv.VNFFG: - derived_from: tosca.groups.Root - - properties: - vendor: - type: string - required: true - description: name of the vendor who generate this VNFFG - - version: - type: string - required: true - description: version of this VNFFG - - number_of_endpoints: - type: integer - required: true - description: count of the external endpoints included in this VNFFG - - dependent_virtual_link: - type: list - entry_schema: - type: string - required: true - description: Reference to a VLD used in this Forwarding Graph - - connection_point: - type: list - entry_schema: - type: string - required: true - description: Reference to Connection Points forming the VNFFG - - constituent_vnfs: - type: list - entry_schema: - type: string - required: true - description: Reference to a list of VNFD used in this VNF Forwarding Graph diff --git a/jtosca/src/main/resources/extensions/nfv/nfv.py b/jtosca/src/main/resources/extensions/nfv/nfv.py deleted file mode 100644 index 0c7c2b9..0000000 --- a/jtosca/src/main/resources/extensions/nfv/nfv.py +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -# VERSION and DEFS_FILE are required for all extensions - -VERSION = 'tosca_simple_profile_for_nfv_1_0_0' - -DEFS_FILE = "TOSCA_nfv_definition_1_0.yaml" - -SECTIONS = ('metadata') diff --git a/jtosca/src/test/java/org.openecomp.sdc.toscaparser/JToscaMetadataParse.java b/jtosca/src/test/java/org.openecomp.sdc.toscaparser/JToscaMetadataParse.java deleted file mode 100644 index 584a0fd..0000000 --- a/jtosca/src/test/java/org.openecomp.sdc.toscaparser/JToscaMetadataParse.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.openecomp.sdc.toscaparser; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; - -import java.io.File; -import java.util.LinkedHashMap; - -import org.junit.Test; -import org.openecomp.sdc.toscaparser.api.ToscaTemplate; -import org.openecomp.sdc.toscaparser.api.common.JToscaException; - -public class JToscaMetadataParse { - - @Test - public void testMetadataParsedCorrectly() throws JToscaException { - String fileStr = JToscaMetadataParse.class.getClassLoader().getResource("csars/csar_hello_world.csar").getFile(); - File file = new File(fileStr); - ToscaTemplate toscaTemplate = new ToscaTemplate(file.getAbsolutePath(), null, true, null); - LinkedHashMap metadataProperties = toscaTemplate.getMetaProperties("TOSCA.meta"); - assertNotNull(metadataProperties); - Object entryDefinition = metadataProperties.get("Entry-Definitions"); - assertNotNull(entryDefinition); - assertEquals("tosca_helloworld.yaml", entryDefinition); - } -} diff --git a/jtosca/src/test/resources/csars/csar_hello_world.csar b/jtosca/src/test/resources/csars/csar_hello_world.csar deleted file mode 100644 index 43ffbbc..0000000 Binary files a/jtosca/src/test/resources/csars/csar_hello_world.csar and /dev/null differ diff --git a/jtosca/src/test/resources/csars/service-ServiceFdnt-csar.csar b/jtosca/src/test/resources/csars/service-ServiceFdnt-csar.csar deleted file mode 100644 index 983dc9b..0000000 Binary files a/jtosca/src/test/resources/csars/service-ServiceFdnt-csar.csar and /dev/null differ diff --git a/jython-tosca-parser/.gitignore b/jython-tosca-parser/.gitignore deleted file mode 100644 index 1546a5e..0000000 --- a/jython-tosca-parser/.gitignore +++ /dev/null @@ -1,96 +0,0 @@ -# Files and directories to ignore by Git for this project -# - -# Java (compiled source and packages) & JVM -#------------------------------------------------------------ -*.class -*.jar -*.war -*.ear -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* - - -# Generated source files and resources -#------------------------------------------------------------ -# ... add as necessary ... - - -# Configuration files and other resources for "private" use -#------------------------------------------------------------ -**/jp-*.yml - - -# Maven -#------------------------------------------------------------ -target/ -**/target/ -pom.xml.tag -pom.xml.releaseBackup -pom.xml.versionsBackup -pom.xml.next -release.properties -nextVersion.properties -dependency-reduced-pom.xml -buildNumber.properties -.mvn/timing.properties - -# Eclipse IDE -#------------------------------------------------------------ -**/.classpath -**/.project -**/.pydevproject -**/.tern-project -**/.settings/** -bin/ -**/bin/ - - -# Backup and intermediate files (incl. created by editors) -#------------------------------------------------------------ -*.orig -*.bak -# VIM: -*.swp -*.swo -# Emacs: -**/*~ -**/*# - -# Logs, databases, etc -#------------------------------------------------------------ -*.log -*.log.* -##*.sqlite -# H2: -**/h2db/ -**/*.mv.db - - -# Archive files -#------------------------------------------------------------ -*.7z -*.dmg -*.gz -*.iso -*.rar -*.tar -*.zip - - -# Windows executables and dynamic libraries -#------------------------------------------------------------ -*.com -*.exe -*.dll - - -# OS generated files -#------------------------------------------------------------ -.DS_Store -.DS_Store? -._* -.Spotlight-V100 -.Trashes -ehthumbs.db -Thumbs.db diff --git a/jython-tosca-parser/pom.xml b/jython-tosca-parser/pom.xml deleted file mode 100644 index b7641a5..0000000 --- a/jython-tosca-parser/pom.xml +++ /dev/null @@ -1,82 +0,0 @@ - - 4.0.0 - - - org.openecomp.sdc.sdc-distribution-client - sdc-main-distribution-client - 1.1.8-SNAPSHOT - - - jython-tosca-parser - 0.4.1-SNAPSHOT - - - - org.python - jython-standalone - 2.7.1b3 - - - - com.google.guava - guava - 21.0 - - - - org.slf4j - slf4j-api - 1.7.25 - - - - - - - - org.apache.maven.plugins - maven-shade-plugin - 3.0.0 - - true - - - *:* - - META-INF/*.SF - META-INF/*.DSA - META-INF/*.RSA - - - - - - - package - - shade - - - - - - - org.apache.maven.plugins - maven-source-plugin - 3.0.1 - - true - - - - attach-sources - - jar-no-fork - - - - - - - \ No newline at end of file diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/JythonRuntime.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/JythonRuntime.java deleted file mode 100644 index c5810a9..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/JythonRuntime.java +++ /dev/null @@ -1,53 +0,0 @@ -package org.openecomp.sdc.toscaparser; - -import java.io.IOException; -import java.nio.file.Path; -import java.util.Properties; - -import org.openecomp.sdc.toscaparser.utils.JarExtractor; -import org.python.util.PythonInterpreter; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class JythonRuntime { - - private static final Logger LOGGER = LoggerFactory.getLogger(JythonRuntime.class); - private final JarExtractor jarExtractor; - private Path homePath; - - public JythonRuntime(JarExtractor jarExtractor) { - this.jarExtractor = jarExtractor; - } - - public void initialize() throws IOException { - tryExtractPyhtonPackages(); - initRuntime(); - } - - private void initRuntime() { - Properties systemProperties = System.getProperties(); - Properties properties = getPythonProperties(); - PythonInterpreter.initialize(systemProperties, properties, new String[0]); - } - - private void tryExtractPyhtonPackages() throws IOException { - homePath = jarExtractor.extractPyhtonPackages(); - } - - private Properties getPythonProperties() { - Properties properties = new Properties(); - if (homePath != null) { - LOGGER.debug("getPythonProperties - Setting python.home to {}", homePath); - properties.put("python.home", homePath.toString()); - } - // Used to prevent: console: Failed to install '': java.nio.charset.UnsupportedCharsetException: cp0. - properties.put("python.console.encoding", "UTF-8"); - return properties; - } - - public void terminate() throws IOException { - if (homePath != null) { - jarExtractor.deleteDirectory(homePath); - } - } -} \ No newline at end of file diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/ToscaParser.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/ToscaParser.java deleted file mode 100644 index ae595f1..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/ToscaParser.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.openecomp.sdc.toscaparser; - -import java.util.Objects; - -import org.openecomp.sdc.toscaparser.api.ToscaTemplate; -import org.openecomp.sdc.toscaparser.api.ToscaTemplateFactory; -import org.openecomp.sdc.toscaparser.jython.JyToscaTemplate; -import org.python.core.PyObject; -import org.python.core.PyString; -import org.python.util.PythonInterpreter; - -public class ToscaParser { - - private final ToscaTemplateFactory toscaTemplateFactory; - private final PyObject jythonToscaTemplate; - private final PythonInterpreter pythonInterpreter; - - public ToscaParser(ToscaTemplateFactory toscaTemplateFactory, PythonInterpreter pythonInterpreter) { - this.toscaTemplateFactory = Objects.requireNonNull(toscaTemplateFactory); - this.pythonInterpreter = Objects.requireNonNull(pythonInterpreter); - jythonToscaTemplate = getJythonToscaTemplate(); - } - - private PyObject getJythonToscaTemplate() { - try (PythonInterpreter interpreter = pythonInterpreter) { - interpreter.exec("from toscaparser.tosca_template import ToscaTemplate"); - return interpreter.get("ToscaTemplate"); - } - } - - public ToscaTemplate parse(String path) { - PyObject toscaTemplateInstance = jythonToscaTemplate.__call__(new PyString(path)); - JyToscaTemplate jyToscaTemplate = (JyToscaTemplate) toscaTemplateInstance.__tojava__(JyToscaTemplate.class); - return toscaTemplateFactory.create(jyToscaTemplate); - } -} diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/ToscaParserFactory.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/ToscaParserFactory.java deleted file mode 100644 index 8bb1e17..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/ToscaParserFactory.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.openecomp.sdc.toscaparser; - -import java.io.IOException; - -import org.openecomp.sdc.toscaparser.api.ToscaTemplateFactory; -import org.openecomp.sdc.toscaparser.utils.JarExtractor; -import org.python.util.PythonInterpreter; - -/** - * This is the entry point of the tosca-parser: a factory for creating {@code ToscaParser}s. - * This class is not thread-safe. Once you are done with all {@code ToscaParser}s - * created by this factory, the {@code ToscaParserFactory} itself must be closed either by - * calling its close() method explicitly or preferrably by creating it in a try-with-resources block: - *
-    try (ToscaParserFactory toscaParserFactory = new ToscaParserFactory()){
-        ToscaParser parser = toscaParserFactory.create()
-        ToscaTemplate toscaTemplate = parser.parse(toscaFilePath);
-        ...
-    }
- * 
- * @author Yaniv Nahoum - * - */ -public class ToscaParserFactory implements AutoCloseable { - - private JythonRuntime jythonRuntime; - - public ToscaParser create() throws IOException { - initRuntime(); - ToscaTemplateFactory toscaTemplateFactory = new ToscaTemplateFactory(); - PythonInterpreter pythonInterpreter = new PythonInterpreter(); - return new ToscaParser(toscaTemplateFactory, pythonInterpreter); - } - - private void initRuntime() throws IOException { - if (jythonRuntime == null) { - jythonRuntime = new JythonRuntime(new JarExtractor()); - jythonRuntime.initialize(); - } - } - - @Override - public void close() throws IOException { - if (jythonRuntime != null) { - jythonRuntime.terminate(); - } - } -} diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/Capability.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/Capability.java deleted file mode 100644 index 1359c36..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/Capability.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.openecomp.sdc.toscaparser.api; - -import static com.google.common.collect.ImmutableList.toImmutableList; - -import java.util.List; -import java.util.Objects; - -import org.openecomp.sdc.toscaparser.jython.JyCapability; - -import com.google.common.base.MoreObjects; - -public class Capability { - - private final JyCapability jyCapability; - - public Capability(JyCapability jyCapability) { - this.jyCapability = Objects.requireNonNull(jyCapability); - } - - public String getName() { - return jyCapability.getJyName(); - } - - public List getProperties() { - return jyCapability.getJyProperties() - .stream() - .map(Property::new) - .collect(toImmutableList()); - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("name", getName()) - .add("properties", getProperties()) - .toString(); - } -} diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/EntityTemplate.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/EntityTemplate.java deleted file mode 100644 index 5a928e0..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/EntityTemplate.java +++ /dev/null @@ -1,75 +0,0 @@ -package org.openecomp.sdc.toscaparser.api; - -import static com.google.common.collect.ImmutableList.toImmutableList; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -import org.openecomp.sdc.toscaparser.api.elements.StatefulEntityType; -import org.openecomp.sdc.toscaparser.jython.JyCapability; -import org.openecomp.sdc.toscaparser.jython.JyEntityTemplate; -import org.openecomp.sdc.toscaparser.jython.JyProperty; - -import com.google.common.base.MoreObjects; -import com.google.common.base.MoreObjects.ToStringHelper; - -public abstract class EntityTemplate { - - private final JyEntityTemplate jyEntityTemplate; - private final StatefulEntityType statefulEntityType; - - public EntityTemplate(JyEntityTemplate jyEntityTemplate) { - this.jyEntityTemplate = Objects.requireNonNull(jyEntityTemplate); - StatefulEntityTypeFactory statefulEntityTypeFactory = new StatefulEntityTypeFactory(); - statefulEntityType = statefulEntityTypeFactory.create(jyEntityTemplate.getJyTypeDefinition()); - } - - public String getName() { - return jyEntityTemplate.getJyName(); - } - - public String getDescription() { - return jyEntityTemplate.getJyDescription(); - } - - public StatefulEntityType getTypeDefinition() { - return statefulEntityType; - } - - public List getProperties() { - List jyProperties = jyEntityTemplate.getJyProperties(); - return jyProperties != null ? jyProperties - .stream() - .map(Property::new) - .collect(toImmutableList()) : new ArrayList<>(); - } - - public List getCapabilities() { - List jyCapabilities = jyEntityTemplate.getJyCapabilities(); - return jyCapabilities != null ? jyCapabilities - .stream() - .map(Capability::new) - .collect(toImmutableList()) : new ArrayList<>(); - } - - public List>> getRequirements() { - return jyEntityTemplate.getJyRequirements(); - } - - protected ToStringHelper toStringHelper() { - return MoreObjects.toStringHelper(this) - .add("name", getName()) - .add("description", getDescription()) - .add("typeDefinition", getTypeDefinition()) - .add("properties", getProperties()) - .add("capabilities", getCapabilities()) - .add("requirements", getRequirements()); - } - - @Override - public String toString() { - return toStringHelper().toString(); - } -} diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/Group.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/Group.java deleted file mode 100644 index 0fa0d9c..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/Group.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.openecomp.sdc.toscaparser.api; - -import java.util.List; - -import org.openecomp.sdc.toscaparser.jython.JyGroup; - -import com.google.common.base.MoreObjects.ToStringHelper; - -public class Group extends EntityTemplate { - - private final JyGroup jyGroup; - - public Group(JyGroup jyGroup) { - super(jyGroup); - this.jyGroup = jyGroup; - } - - public List getMembers(){ - return jyGroup.getJyMembers(); - } - - public Metadata getMetadata(){ - return jyGroup.getJyMetadata() != null ? new Metadata(jyGroup.getJyMetadata()) : null; - } - - @Override - protected ToStringHelper toStringHelper() { - return super.toStringHelper() - .add("members", getMembers()) - .add("metadata", getMetadata()); - } -} diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/Metadata.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/Metadata.java deleted file mode 100644 index 4fa3646..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/Metadata.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.openecomp.sdc.toscaparser.api; - -import java.util.Map; - -import com.google.common.base.MoreObjects; - -public class Metadata { - - private final Map metadataMap; - - public Metadata(Map metadataMap) { - this.metadataMap = metadataMap; - } - - public String getValue(String key) { - return !isEmpty() ? String.valueOf(this.metadataMap.get(key)) : null; - } - - private boolean isEmpty() { - return this.metadataMap == null || this.metadataMap.size() == 0; - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("metadataMap", metadataMap).toString(); - } -} diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/NodeTemplate.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/NodeTemplate.java deleted file mode 100644 index 3592a69..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/NodeTemplate.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.openecomp.sdc.toscaparser.api; - -import org.openecomp.sdc.toscaparser.jython.JyNodeTemplate; -import org.openecomp.sdc.toscaparser.jython.JySubstitutionMappings; - -import com.google.common.base.MoreObjects.ToStringHelper; - -public class NodeTemplate extends EntityTemplate { - - private final JyNodeTemplate jyNodeTemplate; - - public NodeTemplate(JyNodeTemplate jyNodeTemplate) { - super(jyNodeTemplate); - this.jyNodeTemplate = jyNodeTemplate; - } - - public Metadata getMetadata() { - return jyNodeTemplate.getJyMetadata() != null ? new Metadata(jyNodeTemplate.getJyMetadata()) : null; - } - - public SubstitutionMappings getSubstitutionMappings(){ - JySubstitutionMappings jySubstitutionMappings = jyNodeTemplate.getJySubstitutionMappings(); - return jySubstitutionMappings != null ? new SubstitutionMappings(jySubstitutionMappings) : null; - } - - @Override - protected ToStringHelper toStringHelper() { - return super.toStringHelper() - .add("metadata", getMetadata()) - .add("substitutionMappings", getSubstitutionMappings()); - } -} diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/Property.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/Property.java deleted file mode 100644 index c52efb6..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/Property.java +++ /dev/null @@ -1,48 +0,0 @@ -package org.openecomp.sdc.toscaparser.api; - -import java.util.Objects; - -import org.openecomp.sdc.toscaparser.jython.JyProperty; -import org.openecomp.sdc.toscaparser.utils.PythonUtils; - -import com.google.common.base.MoreObjects; - -public class Property { - - private final JyProperty jyProperty; - - public Property(JyProperty jyProperty) { - this.jyProperty = Objects.requireNonNull(jyProperty); - } - - public String getName() { - return jyProperty.getJyName(); - } - - public Object getValue() { - return PythonUtils.cast(jyProperty.getJyValue(), jyProperty.getJyValueClassName()); - } - - public String getType() { - return jyProperty.getJyType(); - } - - public boolean isRequired() { - return jyProperty.isJyRequired(); - } - - public String getDescription() { - return jyProperty.getJyDescription(); - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("name", getName()) - .add("type", getType()) - .add("required", isRequired()) - .add("description", getDescription()) - .add("value", getValue()) - .toString(); - } -} diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/StatefulEntityTypeFactory.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/StatefulEntityTypeFactory.java deleted file mode 100644 index 554450a..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/StatefulEntityTypeFactory.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.openecomp.sdc.toscaparser.api; - -import org.openecomp.sdc.toscaparser.api.elements.GroupType; -import org.openecomp.sdc.toscaparser.api.elements.NodeType; -import org.openecomp.sdc.toscaparser.api.elements.StatefulEntityType; -import org.openecomp.sdc.toscaparser.jython.elements.JyGroupType; -import org.openecomp.sdc.toscaparser.jython.elements.JyNodeType; -import org.openecomp.sdc.toscaparser.jython.elements.JyStatefulEntityType; - -public class StatefulEntityTypeFactory { - - public StatefulEntityType create(JyStatefulEntityType jyStatefulEntityType) { - String jyClassName = jyStatefulEntityType.getJyClassName(); - StatefulEntityType statefulEntityType; - switch (jyClassName) { - case "NodeType": - statefulEntityType = new NodeType((JyNodeType) jyStatefulEntityType); - break; - case "GroupType": - statefulEntityType = new GroupType((JyGroupType) jyStatefulEntityType); - break; - default: - throw new UnsupportedOperationException(jyClassName + " is not supported!"); - } - - return statefulEntityType; - } -} \ No newline at end of file diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/SubstitutionMappings.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/SubstitutionMappings.java deleted file mode 100644 index e962a4a..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/SubstitutionMappings.java +++ /dev/null @@ -1,67 +0,0 @@ -package org.openecomp.sdc.toscaparser.api; - -import static com.google.common.collect.ImmutableList.toImmutableList; - -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -import org.openecomp.sdc.toscaparser.api.elements.NodeType; -import org.openecomp.sdc.toscaparser.api.parameters.Input; -import org.openecomp.sdc.toscaparser.jython.JyGroup; -import org.openecomp.sdc.toscaparser.jython.JyNodeTemplate; -import org.openecomp.sdc.toscaparser.jython.JySubstitutionMappings; -import org.openecomp.sdc.toscaparser.jython.parameters.JyInput; - -import com.google.common.base.MoreObjects; - -public class SubstitutionMappings { - - private final JySubstitutionMappings jySubstitutionMappings; - - public SubstitutionMappings(JySubstitutionMappings jySubstitutionMappings) { - this.jySubstitutionMappings = Objects.requireNonNull(jySubstitutionMappings); - } - - public List getNodeTemplates() { - List jyNodeTemplates = jySubstitutionMappings.getJyNodeTemplates(); - return jyNodeTemplates != null ? jyNodeTemplates - .stream() - .map(NodeTemplate::new) - .collect(toImmutableList()) : new ArrayList<>(); - } - - public List getGroups() { - List jyGroups = jySubstitutionMappings.getJyGroups(); - return jyGroups != null ? jyGroups - .stream() - .map(Group::new) - .collect(toImmutableList()) : new ArrayList<>(); - } - - public List getInputs() { - List jyInputs = jySubstitutionMappings.getJyInputs(); - return jyInputs != null ? jyInputs - .stream() - .map(Input::new) - .collect(toImmutableList()) : new ArrayList<>(); - } - - public NodeType getNodeDefinition() { - return new NodeType(jySubstitutionMappings.getJyNodeDefinition()); - } - - public Metadata getMetadata(){ - return jySubstitutionMappings.getJyMetadata() != null ? new Metadata(jySubstitutionMappings.getJyMetadata()) : null; - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("nodeTemplates", getNodeTemplates()) - .add("inputs", getInputs()) - .add("nodeDefinition", getNodeDefinition()) - .add("metadata", getMetadata()) - .toString(); - } -} diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/TopologyTemplate.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/TopologyTemplate.java deleted file mode 100644 index 0d0dd10..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/TopologyTemplate.java +++ /dev/null @@ -1,75 +0,0 @@ -package org.openecomp.sdc.toscaparser.api; - -import static com.google.common.collect.ImmutableList.toImmutableList; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; - -import org.openecomp.sdc.toscaparser.api.parameters.Input; -import org.openecomp.sdc.toscaparser.jython.JyGroup; -import org.openecomp.sdc.toscaparser.jython.JyNodeTemplate; -import org.openecomp.sdc.toscaparser.jython.JySubstitutionMappings; -import org.openecomp.sdc.toscaparser.jython.JyTopologyTemplate; -import org.openecomp.sdc.toscaparser.jython.parameters.JyInput; - -import com.google.common.base.MoreObjects; - -public class TopologyTemplate { - - private final JyTopologyTemplate jyTopologyTemplate; - - public TopologyTemplate(JyTopologyTemplate jyTopologyTemplate) { - this.jyTopologyTemplate = Objects.requireNonNull(jyTopologyTemplate); - } - - public String getDescription() { - return jyTopologyTemplate.getJyDescription(); - } - - public List getNodeTemplates() { - List jyNodeTemplates = jyTopologyTemplate.getJyNodeTemplates(); - return jyNodeTemplates != null ? jyNodeTemplates - .stream() - .map(NodeTemplate::new) - .collect(toImmutableList()) : new ArrayList<>(); - } - - public List getInputs() { - List jyInputs = jyTopologyTemplate.getJyInputs(); - return jyInputs != null ? jyInputs - .stream() - .map(Input::new) - .collect(toImmutableList()) : new ArrayList<>(); - } - - public List getGroups() { - List jyGroups = jyTopologyTemplate.getJyGroups(); - return jyGroups != null ? jyGroups - .stream() - .map(Group::new) - .collect(toImmutableList()) : new ArrayList<>(); - } - - public SubstitutionMappings getSubstitutionMappings() { - JySubstitutionMappings jySubstitutionMappings = jyTopologyTemplate.getJySubstitutionMappings(); - return jySubstitutionMappings != null ? new SubstitutionMappings(jySubstitutionMappings) : null; - } - - public Metadata getMetadata() { - return jyTopologyTemplate.getJyMetadata(); - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("description", getDescription()) - .add("inputs", getInputs()) - .add("nodeTemplates", getNodeTemplates()) - .add("groups", getGroups()) - .add("substitutionMappings", getSubstitutionMappings()) - .add("metadata", getMetadata()) - .toString(); - } -} diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/ToscaTemplate.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/ToscaTemplate.java deleted file mode 100644 index 0aaafff..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/ToscaTemplate.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.openecomp.sdc.toscaparser.api; - -import static com.google.common.collect.ImmutableList.toImmutableList; - -import java.util.List; -import java.util.Objects; - -import org.openecomp.sdc.toscaparser.api.parameters.Input; -import org.openecomp.sdc.toscaparser.jython.JyToscaTemplate; - -import com.google.common.base.MoreObjects; - -public class ToscaTemplate { - - private final JyToscaTemplate jyToscaTemplate; - private final TopologyTemplate topologyTemplate; - - public ToscaTemplate(JyToscaTemplate jyToscaTemplate, TopologyTemplate topologyTemplate) { - this.jyToscaTemplate = Objects.requireNonNull(jyToscaTemplate); - this.topologyTemplate = Objects.requireNonNull(topologyTemplate); - } - - public String getVersion() { - return jyToscaTemplate.getJyVersion(); - } - - public Metadata getMetadata() { - return jyToscaTemplate.getJyMetadata() != null ? new Metadata(jyToscaTemplate.getJyMetadata()) : null; - } - - public String getDescription() { - return jyToscaTemplate.getJyDescription(); - } - - public TopologyTemplate getTopologyTemplate() { - return topologyTemplate; - } - - public List getNodeTemplates() { - return topologyTemplate.getNodeTemplates(); - } - - public List getNestedTopologyTemplates() { - return jyToscaTemplate.getJyNestedTopologyTemplates() - .stream() - .map(TopologyTemplate::new) - .collect(toImmutableList()); - } - - public List getInputs() { - return topologyTemplate.getInputs(); - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("version", getVersion()) - .add("description", getDescription()) - .add("topologyTemplate", topologyTemplate) - .add("nestedTopologyTemplates", getNestedTopologyTemplates()) - .toString(); - } -} \ No newline at end of file diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/ToscaTemplateFactory.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/ToscaTemplateFactory.java deleted file mode 100644 index 553c56b..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/ToscaTemplateFactory.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.openecomp.sdc.toscaparser.api; - -import java.util.Objects; - -import org.openecomp.sdc.toscaparser.jython.JyToscaTemplate; - -public class ToscaTemplateFactory { - - public ToscaTemplate create(JyToscaTemplate jyToscaTemplate) { - Objects.requireNonNull(jyToscaTemplate); - TopologyTemplate topologyTemplate = new TopologyTemplate(jyToscaTemplate.getJyTopologyTemplate()); - return new ToscaTemplate(jyToscaTemplate, topologyTemplate); - } -} \ No newline at end of file diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/elements/GroupType.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/elements/GroupType.java deleted file mode 100644 index 8e0bedf..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/elements/GroupType.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements; - -import org.openecomp.sdc.toscaparser.jython.elements.JyGroupType; - -import com.google.common.base.MoreObjects.ToStringHelper; - -public class GroupType extends StatefulEntityType { - - private final JyGroupType jyGroupType; - - public GroupType(JyGroupType jyGroupType) { - super(jyGroupType); - this.jyGroupType = jyGroupType; - } - - public String getVersion() { - return jyGroupType.getJyVersion(); - } - - public String getDescription() { - return jyGroupType.getJyDescription(); - } - - @Override - protected ToStringHelper toStringHelper() { - return super.toStringHelper() - .add("version", getVersion()) - .add("description", getDescription()); - } -} diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/elements/NodeType.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/elements/NodeType.java deleted file mode 100644 index 69bd9ba..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/elements/NodeType.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements; - -import java.util.List; - -import org.openecomp.sdc.toscaparser.jython.elements.JyNodeType; - -import com.google.common.base.MoreObjects.ToStringHelper; - -public class NodeType extends StatefulEntityType { - - private final JyNodeType jyNodeType; - - public NodeType(JyNodeType jyNodeType) { - super(jyNodeType); - this.jyNodeType = jyNodeType; - } - - public List getRequirements() { - return jyNodeType.getJyRequirements(); - } - - @Override - protected ToStringHelper toStringHelper() { - return super.toStringHelper() - .add("requirements", getRequirements()); - } -} diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/elements/StatefulEntityType.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/elements/StatefulEntityType.java deleted file mode 100644 index 32661b5..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/elements/StatefulEntityType.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.elements; - -import java.util.Objects; - -import org.openecomp.sdc.toscaparser.jython.elements.JyStatefulEntityType; - -import com.google.common.base.MoreObjects; -import com.google.common.base.MoreObjects.ToStringHelper; - -public abstract class StatefulEntityType { - - private final JyStatefulEntityType jyStatefulEntityType; - - public StatefulEntityType(JyStatefulEntityType jyStatefulEntityType) { - this.jyStatefulEntityType = Objects.requireNonNull(jyStatefulEntityType); - } - - public String getType() { - return jyStatefulEntityType.getJyType(); - } - - protected ToStringHelper toStringHelper() { - return MoreObjects.toStringHelper(this) - .add("type", getType()); - } - - @Override - public String toString() { - return toStringHelper().toString(); - } -} diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/parameters/Input.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/parameters/Input.java deleted file mode 100644 index 2339bb4..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/api/parameters/Input.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.openecomp.sdc.toscaparser.api.parameters; - -import java.util.Objects; - -import org.openecomp.sdc.toscaparser.jython.parameters.JyInput; - -import com.google.common.base.MoreObjects; - -public class Input { - - private final JyInput jyInput; - - public Input(JyInput jyInput) { - this.jyInput = Objects.requireNonNull(jyInput); - } - - public String getName() { - return jyInput.getJyName(); - } - - public String getType() { - return jyInput.getJyType(); - } - - public boolean isRequired() { - return jyInput.isJyRequired(); - } - - public String getDescription() { - return jyInput.getJyDescription(); - } - - public Object getDefault() { - return jyInput.getJyDefault(); - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("name", getName()) - .add("type", getType()) - .add("required", isRequired()) - .add("description", getDescription()) - .add("default", getDefault()) - .toString(); - } -} diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyCapability.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyCapability.java deleted file mode 100644 index 1956932..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyCapability.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.openecomp.sdc.toscaparser.jython; - -import java.util.List; - -public interface JyCapability { - - String getJyName(); - List getJyProperties(); -} diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyEntityTemplate.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyEntityTemplate.java deleted file mode 100644 index cdcb8a0..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyEntityTemplate.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.openecomp.sdc.toscaparser.jython; - -import java.util.List; -import java.util.Map; - -import org.openecomp.sdc.toscaparser.jython.elements.JyStatefulEntityType; - -public interface JyEntityTemplate { - - String getJyName(); - String getJyDescription(); - JyStatefulEntityType getJyTypeDefinition(); - List getJyProperties(); - List getJyCapabilities(); - List>> getJyRequirements(); -} diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyGroup.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyGroup.java deleted file mode 100644 index e12a31e..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyGroup.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.openecomp.sdc.toscaparser.jython; - -import java.util.List; -import java.util.Map; - -public interface JyGroup extends JyEntityTemplate { - - List getJyMembers(); - Map getJyMetadata(); -} diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyNodeTemplate.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyNodeTemplate.java deleted file mode 100644 index 620cc1c..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyNodeTemplate.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.openecomp.sdc.toscaparser.jython; - -import java.util.Map; - -public interface JyNodeTemplate extends JyEntityTemplate { - - Map getJyMetadata(); - JySubstitutionMappings getJySubstitutionMappings(); -} diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyProperty.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyProperty.java deleted file mode 100644 index 4c33b92..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyProperty.java +++ /dev/null @@ -1,11 +0,0 @@ -package org.openecomp.sdc.toscaparser.jython; - -public interface JyProperty { - - String getJyName(); - Object getJyValue(); - String getJyValueClassName(); - String getJyType(); - boolean isJyRequired(); - String getJyDescription(); -} diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JySubstitutionMappings.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JySubstitutionMappings.java deleted file mode 100644 index 537aa89..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JySubstitutionMappings.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.openecomp.sdc.toscaparser.jython; - -import java.util.List; -import java.util.Map; - -import org.openecomp.sdc.toscaparser.jython.elements.JyNodeType; -import org.openecomp.sdc.toscaparser.jython.parameters.JyInput; - -public interface JySubstitutionMappings { - - List getJyNodeTemplates(); - List getJyInputs(); - List getJyGroups(); - JyNodeType getJyNodeDefinition(); - Map getJyMetadata(); -} diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyTopologyTemplate.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyTopologyTemplate.java deleted file mode 100644 index d16ef5c..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyTopologyTemplate.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.openecomp.sdc.toscaparser.jython; - -import java.util.List; - -import org.openecomp.sdc.toscaparser.api.Metadata; -import org.openecomp.sdc.toscaparser.jython.parameters.JyInput; - -public interface JyTopologyTemplate { - - String getJyDescription(); - List getJyNodeTemplates(); - List getJyInputs(); - List getJyGroups(); - JySubstitutionMappings getJySubstitutionMappings(); - Metadata getJyMetadata(); -} diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyToscaTemplate.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyToscaTemplate.java deleted file mode 100644 index a2180c7..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/JyToscaTemplate.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.openecomp.sdc.toscaparser.jython; - -import java.util.List; -import java.util.Map; - -public interface JyToscaTemplate { - - String getJyVersion(); - String getJyDescription(); - List getJyNodeTemplates(); - List getJyNestedTopologyTemplates(); - JyTopologyTemplate getJyTopologyTemplate(); - Map getJyMetadata(); -} diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/elements/JyGroupType.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/elements/JyGroupType.java deleted file mode 100644 index 1ad2492..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/elements/JyGroupType.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.openecomp.sdc.toscaparser.jython.elements; - -public interface JyGroupType extends JyStatefulEntityType { - - String getJyVersion(); - String getJyDescription(); -} diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/elements/JyNodeType.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/elements/JyNodeType.java deleted file mode 100644 index 885dcda..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/elements/JyNodeType.java +++ /dev/null @@ -1,8 +0,0 @@ -package org.openecomp.sdc.toscaparser.jython.elements; - -import java.util.List; - -public interface JyNodeType extends JyStatefulEntityType { - - List getJyRequirements(); -} diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/elements/JyStatefulEntityType.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/elements/JyStatefulEntityType.java deleted file mode 100644 index 890bc6c..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/elements/JyStatefulEntityType.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.openecomp.sdc.toscaparser.jython.elements; - -public interface JyStatefulEntityType { - - String getJyType(); - String getJyClassName(); -} diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/parameters/JyInput.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/parameters/JyInput.java deleted file mode 100644 index c1614ce..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/jython/parameters/JyInput.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.openecomp.sdc.toscaparser.jython.parameters; - -public interface JyInput { - - String getJyName(); - String getJyType(); - Object getJyDefault(); - boolean isJyRequired(); - String getJyDescription(); -} diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/utils/JarExtractor.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/utils/JarExtractor.java deleted file mode 100644 index 44feaa3..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/utils/JarExtractor.java +++ /dev/null @@ -1,87 +0,0 @@ -package org.openecomp.sdc.toscaparser.utils; - -import java.io.IOException; -import java.io.InputStream; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.Enumeration; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.google.common.io.MoreFiles; -import com.google.common.io.RecursiveDeleteOption; - -public class JarExtractor { - - private static final Logger LOGGER = LoggerFactory.getLogger(JarExtractor.class); - private static final String PYTHON_DEPENDENCIES_PATH = "Lib/site-packages"; - private static final String TEMP_DIR_PREFIX = "__tosca__"; - - public Path extractPyhtonPackages() throws IOException { - String codePath = getCodePath(); - if (!isRunningInJar(codePath)) { - LOGGER.info("#extractPyhtonPackages - Nothing to extract, we're not running in a jar file."); - return null; - } - - Path tempDirPath = createTempDirectory(); - String tempDirName = tempDirPath.toString(); - extractJarDirectory(codePath, tempDirName); - LOGGER.info("#extractPyhtonPackages - End. Extracted python dependencies to {}", tempDirName); - return tempDirPath; - } - - private Path createTempDirectory() throws IOException { - Path tempDir = Files.createTempDirectory(TEMP_DIR_PREFIX); - LOGGER.debug("#createTempDirectory - tempDir created: {}", tempDir); - return tempDir; - } - - private void extractJarDirectory(String jarDir, String tempDir) throws IOException { - try (JarFile jarFile = new JarFile(jarDir)) { - Enumeration entries = jarFile.entries(); - while (entries.hasMoreElements()) { - JarEntry entry = entries.nextElement(); - if (shouldExtract(entry)) { - extract(jarFile, entry, tempDir); - } - } - } - } - - private void extract(JarFile jarFile, JarEntry entry, String tempDirName) throws IOException { - try (InputStream source = jarFile.getInputStream(entry)) { - Path targetPath = Paths.get(tempDirName, entry.getName()); - Files.createDirectories(targetPath.getParent()); - Files.copy(source, targetPath); - } - } - - private boolean shouldExtract(JarEntry entry) { - return !entry.isDirectory() && entry.getName() - .startsWith(PYTHON_DEPENDENCIES_PATH); - } - - private String getCodePath() { - String codePath = this.getClass() - .getProtectionDomain() - .getCodeSource() - .getLocation() - .getFile(); - LOGGER.debug("#getCodePath - codePath: {}", codePath); - return codePath; - } - - private boolean isRunningInJar(String path) { - return path.endsWith(".jar"); - } - - public void deleteDirectory(Path path) throws IOException { - MoreFiles.deleteRecursively(path, RecursiveDeleteOption.ALLOW_INSECURE); - LOGGER.info("#deleteDirectory - deleted temp directory: {}", path); - } -} diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/utils/PythonType.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/utils/PythonType.java deleted file mode 100644 index f4d6939..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/utils/PythonType.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.openecomp.sdc.toscaparser.utils; - -import static java.util.stream.Collectors.toMap; - -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.function.Function; - -public enum PythonType { - - INT("int", Integer.class), - FLOAT("float", Double.class), - BOOL("bool", Boolean.class), - STR("str", String.class), - LIST("list", List.class), - DICT("dict", Map.class), - UNKNOWN("", Object.class); - - private static final Map NAME_TO_TYPE; - private final String typeName; - private final Class javaClass; - - static { - NAME_TO_TYPE = Arrays.stream(values()) - .filter(type -> type != UNKNOWN) - .collect(toMap(PythonType::getTypeName, Function.identity())); - } - - private PythonType(String typeName, Class javaClass) { - this.typeName = typeName; - this.javaClass = javaClass; - } - - public static PythonType fromName(String name) { - PythonType pythonType = NAME_TO_TYPE.get(name); - return pythonType != null ? pythonType : UNKNOWN; - } - - public String getTypeName() { - return typeName; - } - - public Class getJavaClass() { - return javaClass; - } -} \ No newline at end of file diff --git a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/utils/PythonUtils.java b/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/utils/PythonUtils.java deleted file mode 100644 index f73c92b..0000000 --- a/jython-tosca-parser/src/main/java/org/openecomp/sdc/toscaparser/utils/PythonUtils.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.openecomp.sdc.toscaparser.utils; - -public final class PythonUtils { - - private PythonUtils() { - // No instances allowed - } - - public static Object cast(Object object, String pythonTypeName) { - PythonType pythonType = PythonType.fromName(pythonTypeName); - return pythonType.getJavaClass().cast(object); - } -} diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/README b/jython-tosca-parser/src/main/resources/Lib/site-packages/README deleted file mode 100644 index 273f625..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/README +++ /dev/null @@ -1,2 +0,0 @@ -This directory exists so that 3rd party packages can be installed -here. Read the source for site.py for more details. diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/_markerlib/__init__.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/_markerlib/__init__.py deleted file mode 100644 index e2b237b..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/_markerlib/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -try: - import ast - from _markerlib.markers import default_environment, compile, interpret -except ImportError: - if 'ast' in globals(): - raise - def default_environment(): - return {} - def compile(marker): - def marker_fn(environment=None, override=None): - # 'empty markers are True' heuristic won't install extra deps. - return not marker.strip() - marker_fn.__doc__ = marker - return marker_fn - def interpret(marker, environment=None, override=None): - return compile(marker)() diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/_markerlib/markers.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/_markerlib/markers.py deleted file mode 100644 index fa83706..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/_markerlib/markers.py +++ /dev/null @@ -1,119 +0,0 @@ -# -*- coding: utf-8 -*- -"""Interpret PEP 345 environment markers. - -EXPR [in|==|!=|not in] EXPR [or|and] ... - -where EXPR belongs to any of those: - - python_version = '%s.%s' % (sys.version_info[0], sys.version_info[1]) - python_full_version = sys.version.split()[0] - os.name = os.name - sys.platform = sys.platform - platform.version = platform.version() - platform.machine = platform.machine() - platform.python_implementation = platform.python_implementation() - a free string, like '2.6', or 'win32' -""" - -__all__ = ['default_environment', 'compile', 'interpret'] - -import ast -import os -import platform -import sys -import weakref - -_builtin_compile = compile - -try: - from platform import python_implementation -except ImportError: - if os.name == "java": - # Jython 2.5 has ast module, but not platform.python_implementation() function. - def python_implementation(): - return "Jython" - else: - raise - - -# restricted set of variables -_VARS = {'sys.platform': sys.platform, - 'python_version': '%s.%s' % sys.version_info[:2], - # FIXME parsing sys.platform is not reliable, but there is no other - # way to get e.g. 2.7.2+, and the PEP is defined with sys.version - 'python_full_version': sys.version.split(' ', 1)[0], - 'os.name': os.name, - 'platform.version': platform.version(), - 'platform.machine': platform.machine(), - 'platform.python_implementation': python_implementation(), - 'extra': None # wheel extension - } - -for var in list(_VARS.keys()): - if '.' in var: - _VARS[var.replace('.', '_')] = _VARS[var] - -def default_environment(): - """Return copy of default PEP 385 globals dictionary.""" - return dict(_VARS) - -class ASTWhitelist(ast.NodeTransformer): - def __init__(self, statement): - self.statement = statement # for error messages - - ALLOWED = (ast.Compare, ast.BoolOp, ast.Attribute, ast.Name, ast.Load, ast.Str) - # Bool operations - ALLOWED += (ast.And, ast.Or) - # Comparison operations - ALLOWED += (ast.Eq, ast.Gt, ast.GtE, ast.In, ast.Is, ast.IsNot, ast.Lt, ast.LtE, ast.NotEq, ast.NotIn) - - def visit(self, node): - """Ensure statement only contains allowed nodes.""" - if not isinstance(node, self.ALLOWED): - raise SyntaxError('Not allowed in environment markers.\n%s\n%s' % - (self.statement, - (' ' * node.col_offset) + '^')) - return ast.NodeTransformer.visit(self, node) - - def visit_Attribute(self, node): - """Flatten one level of attribute access.""" - new_node = ast.Name("%s.%s" % (node.value.id, node.attr), node.ctx) - return ast.copy_location(new_node, node) - -def parse_marker(marker): - tree = ast.parse(marker, mode='eval') - new_tree = ASTWhitelist(marker).generic_visit(tree) - return new_tree - -def compile_marker(parsed_marker): - return _builtin_compile(parsed_marker, '', 'eval', - dont_inherit=True) - -_cache = weakref.WeakValueDictionary() - -def compile(marker): - """Return compiled marker as a function accepting an environment dict.""" - try: - return _cache[marker] - except KeyError: - pass - if not marker.strip(): - def marker_fn(environment=None, override=None): - """""" - return True - else: - compiled_marker = compile_marker(parse_marker(marker)) - def marker_fn(environment=None, override=None): - """override updates environment""" - if override is None: - override = {} - if environment is None: - environment = default_environment() - environment.update(override) - return eval(compiled_marker, environment) - marker_fn.__doc__ = marker - _cache[marker] = marker_fn - return _cache[marker] - -def interpret(marker, environment=None): - return compile(marker)(environment) diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/PKG-INFO b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/PKG-INFO deleted file mode 100644 index 4322f1a..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/PKG-INFO +++ /dev/null @@ -1,24 +0,0 @@ -Metadata-Version: 1.1 -Name: Babel -Version: 2.3.4 -Summary: Internationalization utilities -Home-page: http://babel.pocoo.org/ -Author: Armin Ronacher -Author-email: armin.ronacher@active-4.com -License: BSD -Description: A collection of tools for internationalizing Python applications. -Platform: UNKNOWN -Classifier: Development Status :: 5 - Production/Stable -Classifier: Environment :: Web Environment -Classifier: Intended Audience :: Developers -Classifier: License :: OSI Approved :: BSD License -Classifier: Operating System :: OS Independent -Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2.6 -Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.3 -Classifier: Programming Language :: Python :: 3.4 -Classifier: Programming Language :: Python :: 3.5 -Classifier: Programming Language :: Python :: Implementation :: PyPy -Classifier: Topic :: Software Development :: Libraries :: Python Modules diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/SOURCES.txt b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/SOURCES.txt deleted file mode 100644 index 604140c..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/SOURCES.txt +++ /dev/null @@ -1,838 +0,0 @@ -AUTHORS -CHANGES -LICENSE -MANIFEST.in -Makefile -conftest.py -setup.cfg -setup.py -tox.ini -Babel.egg-info/PKG-INFO -Babel.egg-info/SOURCES.txt -Babel.egg-info/dependency_links.txt -Babel.egg-info/entry_points.txt -Babel.egg-info/not-zip-safe -Babel.egg-info/requires.txt -Babel.egg-info/top_level.txt -babel/__init__.py -babel/_compat.py -babel/core.py -babel/dates.py -babel/global.dat -babel/languages.py -babel/lists.py -babel/localedata.py -babel/numbers.py -babel/plural.py -babel/support.py -babel/units.py -babel/util.py -babel/locale-data/af.dat -babel/locale-data/af_NA.dat -babel/locale-data/af_ZA.dat -babel/locale-data/agq.dat -babel/locale-data/agq_CM.dat -babel/locale-data/ak.dat -babel/locale-data/ak_GH.dat -babel/locale-data/am.dat -babel/locale-data/am_ET.dat -babel/locale-data/ar.dat -babel/locale-data/ar_001.dat -babel/locale-data/ar_AE.dat -babel/locale-data/ar_BH.dat -babel/locale-data/ar_DJ.dat -babel/locale-data/ar_DZ.dat -babel/locale-data/ar_EG.dat -babel/locale-data/ar_EH.dat -babel/locale-data/ar_ER.dat -babel/locale-data/ar_IL.dat -babel/locale-data/ar_IQ.dat -babel/locale-data/ar_JO.dat -babel/locale-data/ar_KM.dat -babel/locale-data/ar_KW.dat -babel/locale-data/ar_LB.dat -babel/locale-data/ar_LY.dat -babel/locale-data/ar_MA.dat -babel/locale-data/ar_MR.dat -babel/locale-data/ar_OM.dat -babel/locale-data/ar_PS.dat -babel/locale-data/ar_QA.dat -babel/locale-data/ar_SA.dat -babel/locale-data/ar_SD.dat -babel/locale-data/ar_SO.dat -babel/locale-data/ar_SS.dat -babel/locale-data/ar_SY.dat -babel/locale-data/ar_TD.dat -babel/locale-data/ar_TN.dat -babel/locale-data/ar_YE.dat -babel/locale-data/as.dat -babel/locale-data/as_IN.dat -babel/locale-data/asa.dat -babel/locale-data/asa_TZ.dat -babel/locale-data/ast.dat -babel/locale-data/ast_ES.dat -babel/locale-data/az.dat -babel/locale-data/az_Cyrl.dat -babel/locale-data/az_Cyrl_AZ.dat -babel/locale-data/az_Latn.dat -babel/locale-data/az_Latn_AZ.dat -babel/locale-data/bas.dat -babel/locale-data/bas_CM.dat -babel/locale-data/be.dat -babel/locale-data/be_BY.dat -babel/locale-data/bem.dat -babel/locale-data/bem_ZM.dat -babel/locale-data/bez.dat -babel/locale-data/bez_TZ.dat -babel/locale-data/bg.dat -babel/locale-data/bg_BG.dat -babel/locale-data/bm.dat -babel/locale-data/bm_ML.dat -babel/locale-data/bn.dat -babel/locale-data/bn_BD.dat -babel/locale-data/bn_IN.dat -babel/locale-data/bo.dat -babel/locale-data/bo_CN.dat -babel/locale-data/bo_IN.dat -babel/locale-data/br.dat -babel/locale-data/br_FR.dat -babel/locale-data/brx.dat -babel/locale-data/brx_IN.dat -babel/locale-data/bs.dat -babel/locale-data/bs_Cyrl.dat -babel/locale-data/bs_Cyrl_BA.dat -babel/locale-data/bs_Latn.dat -babel/locale-data/bs_Latn_BA.dat -babel/locale-data/ca.dat -babel/locale-data/ca_AD.dat -babel/locale-data/ca_ES.dat -babel/locale-data/ca_ES_VALENCIA.dat -babel/locale-data/ca_FR.dat -babel/locale-data/ca_IT.dat -babel/locale-data/ce.dat -babel/locale-data/ce_RU.dat -babel/locale-data/cgg.dat -babel/locale-data/cgg_UG.dat -babel/locale-data/chr.dat -babel/locale-data/chr_US.dat -babel/locale-data/ckb.dat -babel/locale-data/ckb_IQ.dat -babel/locale-data/ckb_IR.dat -babel/locale-data/cs.dat -babel/locale-data/cs_CZ.dat -babel/locale-data/cu.dat -babel/locale-data/cu_RU.dat -babel/locale-data/cy.dat -babel/locale-data/cy_GB.dat -babel/locale-data/da.dat -babel/locale-data/da_DK.dat -babel/locale-data/da_GL.dat -babel/locale-data/dav.dat -babel/locale-data/dav_KE.dat -babel/locale-data/de.dat -babel/locale-data/de_AT.dat -babel/locale-data/de_BE.dat -babel/locale-data/de_CH.dat -babel/locale-data/de_DE.dat -babel/locale-data/de_LI.dat -babel/locale-data/de_LU.dat -babel/locale-data/dje.dat -babel/locale-data/dje_NE.dat -babel/locale-data/dsb.dat -babel/locale-data/dsb_DE.dat -babel/locale-data/dua.dat -babel/locale-data/dua_CM.dat -babel/locale-data/dyo.dat -babel/locale-data/dyo_SN.dat -babel/locale-data/dz.dat -babel/locale-data/dz_BT.dat -babel/locale-data/ebu.dat -babel/locale-data/ebu_KE.dat -babel/locale-data/ee.dat -babel/locale-data/ee_GH.dat -babel/locale-data/ee_TG.dat -babel/locale-data/el.dat -babel/locale-data/el_CY.dat -babel/locale-data/el_GR.dat -babel/locale-data/en.dat -babel/locale-data/en_001.dat -babel/locale-data/en_150.dat -babel/locale-data/en_AG.dat -babel/locale-data/en_AI.dat -babel/locale-data/en_AS.dat -babel/locale-data/en_AT.dat -babel/locale-data/en_AU.dat -babel/locale-data/en_BB.dat -babel/locale-data/en_BE.dat -babel/locale-data/en_BI.dat -babel/locale-data/en_BM.dat -babel/locale-data/en_BS.dat -babel/locale-data/en_BW.dat -babel/locale-data/en_BZ.dat -babel/locale-data/en_CA.dat -babel/locale-data/en_CC.dat -babel/locale-data/en_CH.dat -babel/locale-data/en_CK.dat -babel/locale-data/en_CM.dat -babel/locale-data/en_CX.dat -babel/locale-data/en_CY.dat -babel/locale-data/en_DE.dat -babel/locale-data/en_DG.dat -babel/locale-data/en_DK.dat -babel/locale-data/en_DM.dat -babel/locale-data/en_ER.dat -babel/locale-data/en_FI.dat -babel/locale-data/en_FJ.dat -babel/locale-data/en_FK.dat -babel/locale-data/en_FM.dat -babel/locale-data/en_GB.dat -babel/locale-data/en_GD.dat -babel/locale-data/en_GG.dat -babel/locale-data/en_GH.dat -babel/locale-data/en_GI.dat -babel/locale-data/en_GM.dat -babel/locale-data/en_GU.dat -babel/locale-data/en_GY.dat -babel/locale-data/en_HK.dat -babel/locale-data/en_IE.dat -babel/locale-data/en_IL.dat -babel/locale-data/en_IM.dat -babel/locale-data/en_IN.dat -babel/locale-data/en_IO.dat -babel/locale-data/en_JE.dat -babel/locale-data/en_JM.dat -babel/locale-data/en_KE.dat -babel/locale-data/en_KI.dat -babel/locale-data/en_KN.dat -babel/locale-data/en_KY.dat -babel/locale-data/en_LC.dat -babel/locale-data/en_LR.dat -babel/locale-data/en_LS.dat -babel/locale-data/en_MG.dat -babel/locale-data/en_MH.dat -babel/locale-data/en_MO.dat -babel/locale-data/en_MP.dat -babel/locale-data/en_MS.dat -babel/locale-data/en_MT.dat -babel/locale-data/en_MU.dat -babel/locale-data/en_MW.dat -babel/locale-data/en_MY.dat -babel/locale-data/en_NA.dat -babel/locale-data/en_NF.dat -babel/locale-data/en_NG.dat -babel/locale-data/en_NL.dat -babel/locale-data/en_NR.dat -babel/locale-data/en_NU.dat -babel/locale-data/en_NZ.dat -babel/locale-data/en_PG.dat -babel/locale-data/en_PH.dat -babel/locale-data/en_PK.dat -babel/locale-data/en_PN.dat -babel/locale-data/en_PR.dat -babel/locale-data/en_PW.dat -babel/locale-data/en_RW.dat -babel/locale-data/en_SB.dat -babel/locale-data/en_SC.dat -babel/locale-data/en_SD.dat -babel/locale-data/en_SE.dat -babel/locale-data/en_SG.dat -babel/locale-data/en_SH.dat -babel/locale-data/en_SI.dat -babel/locale-data/en_SL.dat -babel/locale-data/en_SS.dat -babel/locale-data/en_SX.dat -babel/locale-data/en_SZ.dat -babel/locale-data/en_TC.dat -babel/locale-data/en_TK.dat -babel/locale-data/en_TO.dat -babel/locale-data/en_TT.dat -babel/locale-data/en_TV.dat -babel/locale-data/en_TZ.dat -babel/locale-data/en_UG.dat -babel/locale-data/en_UM.dat -babel/locale-data/en_US.dat -babel/locale-data/en_US_POSIX.dat -babel/locale-data/en_VC.dat -babel/locale-data/en_VG.dat -babel/locale-data/en_VI.dat -babel/locale-data/en_VU.dat -babel/locale-data/en_WS.dat -babel/locale-data/en_ZA.dat -babel/locale-data/en_ZM.dat -babel/locale-data/en_ZW.dat -babel/locale-data/eo.dat -babel/locale-data/eo_001.dat -babel/locale-data/es.dat -babel/locale-data/es_419.dat -babel/locale-data/es_AR.dat -babel/locale-data/es_BO.dat -babel/locale-data/es_CL.dat -babel/locale-data/es_CO.dat -babel/locale-data/es_CR.dat -babel/locale-data/es_CU.dat -babel/locale-data/es_DO.dat -babel/locale-data/es_EA.dat -babel/locale-data/es_EC.dat -babel/locale-data/es_ES.dat -babel/locale-data/es_GQ.dat -babel/locale-data/es_GT.dat -babel/locale-data/es_HN.dat -babel/locale-data/es_IC.dat -babel/locale-data/es_MX.dat -babel/locale-data/es_NI.dat -babel/locale-data/es_PA.dat -babel/locale-data/es_PE.dat -babel/locale-data/es_PH.dat -babel/locale-data/es_PR.dat -babel/locale-data/es_PY.dat -babel/locale-data/es_SV.dat -babel/locale-data/es_US.dat -babel/locale-data/es_UY.dat -babel/locale-data/es_VE.dat -babel/locale-data/et.dat -babel/locale-data/et_EE.dat -babel/locale-data/eu.dat -babel/locale-data/eu_ES.dat -babel/locale-data/ewo.dat -babel/locale-data/ewo_CM.dat -babel/locale-data/fa.dat -babel/locale-data/fa_AF.dat -babel/locale-data/fa_IR.dat -babel/locale-data/ff.dat -babel/locale-data/ff_CM.dat -babel/locale-data/ff_GN.dat -babel/locale-data/ff_MR.dat -babel/locale-data/ff_SN.dat -babel/locale-data/fi.dat -babel/locale-data/fi_FI.dat -babel/locale-data/fil.dat -babel/locale-data/fil_PH.dat -babel/locale-data/fo.dat -babel/locale-data/fo_DK.dat -babel/locale-data/fo_FO.dat -babel/locale-data/fr.dat -babel/locale-data/fr_BE.dat -babel/locale-data/fr_BF.dat -babel/locale-data/fr_BI.dat -babel/locale-data/fr_BJ.dat -babel/locale-data/fr_BL.dat -babel/locale-data/fr_CA.dat -babel/locale-data/fr_CD.dat -babel/locale-data/fr_CF.dat -babel/locale-data/fr_CG.dat -babel/locale-data/fr_CH.dat -babel/locale-data/fr_CI.dat -babel/locale-data/fr_CM.dat -babel/locale-data/fr_DJ.dat -babel/locale-data/fr_DZ.dat -babel/locale-data/fr_FR.dat -babel/locale-data/fr_GA.dat -babel/locale-data/fr_GF.dat -babel/locale-data/fr_GN.dat -babel/locale-data/fr_GP.dat -babel/locale-data/fr_GQ.dat -babel/locale-data/fr_HT.dat -babel/locale-data/fr_KM.dat -babel/locale-data/fr_LU.dat -babel/locale-data/fr_MA.dat -babel/locale-data/fr_MC.dat -babel/locale-data/fr_MF.dat -babel/locale-data/fr_MG.dat -babel/locale-data/fr_ML.dat -babel/locale-data/fr_MQ.dat -babel/locale-data/fr_MR.dat -babel/locale-data/fr_MU.dat -babel/locale-data/fr_NC.dat -babel/locale-data/fr_NE.dat -babel/locale-data/fr_PF.dat -babel/locale-data/fr_PM.dat -babel/locale-data/fr_RE.dat -babel/locale-data/fr_RW.dat -babel/locale-data/fr_SC.dat -babel/locale-data/fr_SN.dat -babel/locale-data/fr_SY.dat -babel/locale-data/fr_TD.dat -babel/locale-data/fr_TG.dat -babel/locale-data/fr_TN.dat -babel/locale-data/fr_VU.dat -babel/locale-data/fr_WF.dat -babel/locale-data/fr_YT.dat -babel/locale-data/fur.dat -babel/locale-data/fur_IT.dat -babel/locale-data/fy.dat -babel/locale-data/fy_NL.dat -babel/locale-data/ga.dat -babel/locale-data/ga_IE.dat -babel/locale-data/gd.dat -babel/locale-data/gd_GB.dat -babel/locale-data/gl.dat -babel/locale-data/gl_ES.dat -babel/locale-data/gsw.dat -babel/locale-data/gsw_CH.dat -babel/locale-data/gsw_FR.dat -babel/locale-data/gsw_LI.dat -babel/locale-data/gu.dat -babel/locale-data/gu_IN.dat -babel/locale-data/guz.dat -babel/locale-data/guz_KE.dat -babel/locale-data/gv.dat -babel/locale-data/gv_IM.dat -babel/locale-data/ha.dat -babel/locale-data/ha_GH.dat -babel/locale-data/ha_NE.dat -babel/locale-data/ha_NG.dat -babel/locale-data/haw.dat -babel/locale-data/haw_US.dat -babel/locale-data/he.dat -babel/locale-data/he_IL.dat -babel/locale-data/hi.dat -babel/locale-data/hi_IN.dat -babel/locale-data/hr.dat -babel/locale-data/hr_BA.dat -babel/locale-data/hr_HR.dat -babel/locale-data/hsb.dat -babel/locale-data/hsb_DE.dat -babel/locale-data/hu.dat -babel/locale-data/hu_HU.dat -babel/locale-data/hy.dat -babel/locale-data/hy_AM.dat -babel/locale-data/id.dat -babel/locale-data/id_ID.dat -babel/locale-data/ig.dat -babel/locale-data/ig_NG.dat -babel/locale-data/ii.dat -babel/locale-data/ii_CN.dat -babel/locale-data/is.dat -babel/locale-data/is_IS.dat -babel/locale-data/it.dat -babel/locale-data/it_CH.dat -babel/locale-data/it_IT.dat -babel/locale-data/it_SM.dat -babel/locale-data/ja.dat -babel/locale-data/ja_JP.dat -babel/locale-data/jgo.dat -babel/locale-data/jgo_CM.dat -babel/locale-data/jmc.dat -babel/locale-data/jmc_TZ.dat -babel/locale-data/ka.dat -babel/locale-data/ka_GE.dat -babel/locale-data/kab.dat -babel/locale-data/kab_DZ.dat -babel/locale-data/kam.dat -babel/locale-data/kam_KE.dat -babel/locale-data/kde.dat -babel/locale-data/kde_TZ.dat -babel/locale-data/kea.dat -babel/locale-data/kea_CV.dat -babel/locale-data/khq.dat -babel/locale-data/khq_ML.dat -babel/locale-data/ki.dat -babel/locale-data/ki_KE.dat -babel/locale-data/kk.dat -babel/locale-data/kk_KZ.dat -babel/locale-data/kkj.dat -babel/locale-data/kkj_CM.dat -babel/locale-data/kl.dat -babel/locale-data/kl_GL.dat -babel/locale-data/kln.dat -babel/locale-data/kln_KE.dat -babel/locale-data/km.dat -babel/locale-data/km_KH.dat -babel/locale-data/kn.dat -babel/locale-data/kn_IN.dat -babel/locale-data/ko.dat -babel/locale-data/ko_KP.dat -babel/locale-data/ko_KR.dat -babel/locale-data/kok.dat -babel/locale-data/kok_IN.dat -babel/locale-data/ks.dat -babel/locale-data/ks_IN.dat -babel/locale-data/ksb.dat -babel/locale-data/ksb_TZ.dat -babel/locale-data/ksf.dat -babel/locale-data/ksf_CM.dat -babel/locale-data/ksh.dat -babel/locale-data/ksh_DE.dat -babel/locale-data/kw.dat -babel/locale-data/kw_GB.dat -babel/locale-data/ky.dat -babel/locale-data/ky_KG.dat -babel/locale-data/lag.dat -babel/locale-data/lag_TZ.dat -babel/locale-data/lb.dat -babel/locale-data/lb_LU.dat -babel/locale-data/lg.dat -babel/locale-data/lg_UG.dat -babel/locale-data/lkt.dat -babel/locale-data/lkt_US.dat -babel/locale-data/ln.dat -babel/locale-data/ln_AO.dat -babel/locale-data/ln_CD.dat -babel/locale-data/ln_CF.dat -babel/locale-data/ln_CG.dat -babel/locale-data/lo.dat -babel/locale-data/lo_LA.dat -babel/locale-data/lrc.dat -babel/locale-data/lrc_IQ.dat -babel/locale-data/lrc_IR.dat -babel/locale-data/lt.dat -babel/locale-data/lt_LT.dat -babel/locale-data/lu.dat -babel/locale-data/lu_CD.dat -babel/locale-data/luo.dat -babel/locale-data/luo_KE.dat -babel/locale-data/luy.dat -babel/locale-data/luy_KE.dat -babel/locale-data/lv.dat -babel/locale-data/lv_LV.dat -babel/locale-data/mas.dat -babel/locale-data/mas_KE.dat -babel/locale-data/mas_TZ.dat -babel/locale-data/mer.dat -babel/locale-data/mer_KE.dat -babel/locale-data/mfe.dat -babel/locale-data/mfe_MU.dat -babel/locale-data/mg.dat -babel/locale-data/mg_MG.dat -babel/locale-data/mgh.dat -babel/locale-data/mgh_MZ.dat -babel/locale-data/mgo.dat -babel/locale-data/mgo_CM.dat -babel/locale-data/mk.dat -babel/locale-data/mk_MK.dat -babel/locale-data/ml.dat -babel/locale-data/ml_IN.dat -babel/locale-data/mn.dat -babel/locale-data/mn_MN.dat -babel/locale-data/mr.dat -babel/locale-data/mr_IN.dat -babel/locale-data/ms.dat -babel/locale-data/ms_BN.dat -babel/locale-data/ms_MY.dat -babel/locale-data/ms_SG.dat -babel/locale-data/mt.dat -babel/locale-data/mt_MT.dat -babel/locale-data/mua.dat -babel/locale-data/mua_CM.dat -babel/locale-data/my.dat -babel/locale-data/my_MM.dat -babel/locale-data/mzn.dat -babel/locale-data/mzn_IR.dat -babel/locale-data/naq.dat -babel/locale-data/naq_NA.dat -babel/locale-data/nb.dat -babel/locale-data/nb_NO.dat -babel/locale-data/nb_SJ.dat -babel/locale-data/nd.dat -babel/locale-data/nd_ZW.dat -babel/locale-data/ne.dat -babel/locale-data/ne_IN.dat -babel/locale-data/ne_NP.dat -babel/locale-data/nl.dat -babel/locale-data/nl_AW.dat -babel/locale-data/nl_BE.dat -babel/locale-data/nl_BQ.dat -babel/locale-data/nl_CW.dat -babel/locale-data/nl_NL.dat -babel/locale-data/nl_SR.dat -babel/locale-data/nl_SX.dat -babel/locale-data/nmg.dat -babel/locale-data/nmg_CM.dat -babel/locale-data/nn.dat -babel/locale-data/nn_NO.dat -babel/locale-data/nnh.dat -babel/locale-data/nnh_CM.dat -babel/locale-data/nus.dat -babel/locale-data/nus_SS.dat -babel/locale-data/nyn.dat -babel/locale-data/nyn_UG.dat -babel/locale-data/om.dat -babel/locale-data/om_ET.dat -babel/locale-data/om_KE.dat -babel/locale-data/or.dat -babel/locale-data/or_IN.dat -babel/locale-data/os.dat -babel/locale-data/os_GE.dat -babel/locale-data/os_RU.dat -babel/locale-data/pa.dat -babel/locale-data/pa_Arab.dat -babel/locale-data/pa_Arab_PK.dat -babel/locale-data/pa_Guru.dat -babel/locale-data/pa_Guru_IN.dat -babel/locale-data/pl.dat -babel/locale-data/pl_PL.dat -babel/locale-data/prg.dat -babel/locale-data/prg_001.dat -babel/locale-data/ps.dat -babel/locale-data/ps_AF.dat -babel/locale-data/pt.dat -babel/locale-data/pt_AO.dat -babel/locale-data/pt_BR.dat -babel/locale-data/pt_CV.dat -babel/locale-data/pt_GW.dat -babel/locale-data/pt_MO.dat -babel/locale-data/pt_MZ.dat -babel/locale-data/pt_PT.dat -babel/locale-data/pt_ST.dat -babel/locale-data/pt_TL.dat -babel/locale-data/qu.dat -babel/locale-data/qu_BO.dat -babel/locale-data/qu_EC.dat -babel/locale-data/qu_PE.dat -babel/locale-data/rm.dat -babel/locale-data/rm_CH.dat -babel/locale-data/rn.dat -babel/locale-data/rn_BI.dat -babel/locale-data/ro.dat -babel/locale-data/ro_MD.dat -babel/locale-data/ro_RO.dat -babel/locale-data/rof.dat -babel/locale-data/rof_TZ.dat -babel/locale-data/root.dat -babel/locale-data/ru.dat -babel/locale-data/ru_BY.dat -babel/locale-data/ru_KG.dat -babel/locale-data/ru_KZ.dat -babel/locale-data/ru_MD.dat -babel/locale-data/ru_RU.dat -babel/locale-data/ru_UA.dat -babel/locale-data/rw.dat -babel/locale-data/rw_RW.dat -babel/locale-data/rwk.dat -babel/locale-data/rwk_TZ.dat -babel/locale-data/sah.dat -babel/locale-data/sah_RU.dat -babel/locale-data/saq.dat -babel/locale-data/saq_KE.dat -babel/locale-data/sbp.dat -babel/locale-data/sbp_TZ.dat -babel/locale-data/se.dat -babel/locale-data/se_FI.dat -babel/locale-data/se_NO.dat -babel/locale-data/se_SE.dat -babel/locale-data/seh.dat -babel/locale-data/seh_MZ.dat -babel/locale-data/ses.dat -babel/locale-data/ses_ML.dat -babel/locale-data/sg.dat -babel/locale-data/sg_CF.dat -babel/locale-data/shi.dat -babel/locale-data/shi_Latn.dat -babel/locale-data/shi_Latn_MA.dat -babel/locale-data/shi_Tfng.dat -babel/locale-data/shi_Tfng_MA.dat -babel/locale-data/si.dat -babel/locale-data/si_LK.dat -babel/locale-data/sk.dat -babel/locale-data/sk_SK.dat -babel/locale-data/sl.dat -babel/locale-data/sl_SI.dat -babel/locale-data/smn.dat -babel/locale-data/smn_FI.dat -babel/locale-data/sn.dat -babel/locale-data/sn_ZW.dat -babel/locale-data/so.dat -babel/locale-data/so_DJ.dat -babel/locale-data/so_ET.dat -babel/locale-data/so_KE.dat -babel/locale-data/so_SO.dat -babel/locale-data/sq.dat -babel/locale-data/sq_AL.dat -babel/locale-data/sq_MK.dat -babel/locale-data/sq_XK.dat -babel/locale-data/sr.dat -babel/locale-data/sr_Cyrl.dat -babel/locale-data/sr_Cyrl_BA.dat -babel/locale-data/sr_Cyrl_ME.dat -babel/locale-data/sr_Cyrl_RS.dat -babel/locale-data/sr_Cyrl_XK.dat -babel/locale-data/sr_Latn.dat -babel/locale-data/sr_Latn_BA.dat -babel/locale-data/sr_Latn_ME.dat -babel/locale-data/sr_Latn_RS.dat -babel/locale-data/sr_Latn_XK.dat -babel/locale-data/sv.dat -babel/locale-data/sv_AX.dat -babel/locale-data/sv_FI.dat -babel/locale-data/sv_SE.dat -babel/locale-data/sw.dat -babel/locale-data/sw_CD.dat -babel/locale-data/sw_KE.dat -babel/locale-data/sw_TZ.dat -babel/locale-data/sw_UG.dat -babel/locale-data/ta.dat -babel/locale-data/ta_IN.dat -babel/locale-data/ta_LK.dat -babel/locale-data/ta_MY.dat -babel/locale-data/ta_SG.dat -babel/locale-data/te.dat -babel/locale-data/te_IN.dat -babel/locale-data/teo.dat -babel/locale-data/teo_KE.dat -babel/locale-data/teo_UG.dat -babel/locale-data/th.dat -babel/locale-data/th_TH.dat -babel/locale-data/ti.dat -babel/locale-data/ti_ER.dat -babel/locale-data/ti_ET.dat -babel/locale-data/tk.dat -babel/locale-data/tk_TM.dat -babel/locale-data/to.dat -babel/locale-data/to_TO.dat -babel/locale-data/tr.dat -babel/locale-data/tr_CY.dat -babel/locale-data/tr_TR.dat -babel/locale-data/twq.dat -babel/locale-data/twq_NE.dat -babel/locale-data/tzm.dat -babel/locale-data/tzm_MA.dat -babel/locale-data/ug.dat -babel/locale-data/ug_CN.dat -babel/locale-data/uk.dat -babel/locale-data/uk_UA.dat -babel/locale-data/ur.dat -babel/locale-data/ur_IN.dat -babel/locale-data/ur_PK.dat -babel/locale-data/uz.dat -babel/locale-data/uz_Arab.dat -babel/locale-data/uz_Arab_AF.dat -babel/locale-data/uz_Cyrl.dat -babel/locale-data/uz_Cyrl_UZ.dat -babel/locale-data/uz_Latn.dat -babel/locale-data/uz_Latn_UZ.dat -babel/locale-data/vai.dat -babel/locale-data/vai_Latn.dat -babel/locale-data/vai_Latn_LR.dat -babel/locale-data/vai_Vaii.dat -babel/locale-data/vai_Vaii_LR.dat -babel/locale-data/vi.dat -babel/locale-data/vi_VN.dat -babel/locale-data/vo.dat -babel/locale-data/vo_001.dat -babel/locale-data/vun.dat -babel/locale-data/vun_TZ.dat -babel/locale-data/wae.dat -babel/locale-data/wae_CH.dat -babel/locale-data/xog.dat -babel/locale-data/xog_UG.dat -babel/locale-data/yav.dat -babel/locale-data/yav_CM.dat -babel/locale-data/yi.dat -babel/locale-data/yi_001.dat -babel/locale-data/yo.dat -babel/locale-data/yo_BJ.dat -babel/locale-data/yo_NG.dat -babel/locale-data/zgh.dat -babel/locale-data/zgh_MA.dat -babel/locale-data/zh.dat -babel/locale-data/zh_Hans.dat -babel/locale-data/zh_Hans_CN.dat -babel/locale-data/zh_Hans_HK.dat -babel/locale-data/zh_Hans_MO.dat -babel/locale-data/zh_Hans_SG.dat -babel/locale-data/zh_Hant.dat -babel/locale-data/zh_Hant_HK.dat -babel/locale-data/zh_Hant_MO.dat -babel/locale-data/zh_Hant_TW.dat -babel/locale-data/zu.dat -babel/locale-data/zu_ZA.dat -babel/localtime/__init__.py -babel/localtime/_unix.py -babel/localtime/_win32.py -babel/messages/__init__.py -babel/messages/catalog.py -babel/messages/checkers.py -babel/messages/extract.py -babel/messages/frontend.py -babel/messages/jslexer.py -babel/messages/mofile.py -babel/messages/plurals.py -babel/messages/pofile.py -docs/Makefile -docs/changelog.rst -docs/cmdline.rst -docs/conf.py -docs/dates.rst -docs/dev.rst -docs/index.rst -docs/installation.rst -docs/intro.rst -docs/license.rst -docs/locale.rst -docs/make.bat -docs/messages.rst -docs/numbers.rst -docs/setup.rst -docs/support.rst -docs/_static/logo.pdf -docs/_static/logo.png -docs/_static/logo_small.png -docs/_templates/sidebar-about.html -docs/_templates/sidebar-links.html -docs/_templates/sidebar-logo.html -docs/_themes/LICENSE -docs/_themes/README -docs/_themes/babel/layout.html -docs/_themes/babel/relations.html -docs/_themes/babel/theme.conf -docs/_themes/babel/static/babel.css_t -docs/_themes/babel/static/small_babel.css -docs/api/core.rst -docs/api/dates.rst -docs/api/index.rst -docs/api/languages.rst -docs/api/lists.rst -docs/api/numbers.rst -docs/api/plural.rst -docs/api/support.rst -docs/api/units.rst -docs/api/messages/catalog.rst -docs/api/messages/extract.rst -docs/api/messages/index.rst -docs/api/messages/mofile.rst -docs/api/messages/pofile.rst -scripts/download_import_cldr.py -scripts/dump_data.py -scripts/dump_global.py -scripts/import_cldr.py -scripts/make-release.py -tests/__init__.py -tests/conftest.py -tests/test_core.py -tests/test_date_intervals.py -tests/test_dates.py -tests/test_day_periods.py -tests/test_languages.py -tests/test_lists.py -tests/test_localedata.py -tests/test_numbers.py -tests/test_plural.py -tests/test_support.py -tests/test_util.py -tests/messages/__init__.py -tests/messages/test_catalog.py -tests/messages/test_checkers.py -tests/messages/test_extract.py -tests/messages/test_frontend.py -tests/messages/test_js_extract.py -tests/messages/test_jslexer.py -tests/messages/test_mofile.py -tests/messages/test_plurals.py -tests/messages/test_pofile.py -tests/messages/data/mapping.cfg -tests/messages/data/setup.cfg -tests/messages/data/setup.py -tests/messages/data/project/__init__.py -tests/messages/data/project/file1.py -tests/messages/data/project/file2.py -tests/messages/data/project/i18n/messages.pot -tests/messages/data/project/i18n/messages_non_fuzzy.pot -tests/messages/data/project/i18n/de/LC_MESSAGES/messages.mo -tests/messages/data/project/i18n/de/LC_MESSAGES/messages.po -tests/messages/data/project/i18n/de_DE/LC_MESSAGES/bar.po -tests/messages/data/project/i18n/de_DE/LC_MESSAGES/foo.po -tests/messages/data/project/i18n/de_DE/LC_MESSAGES/messages.po -tests/messages/data/project/i18n/ru_RU/LC_MESSAGES/messages.po -tests/messages/data/project/ignored/a_test_file.txt -tests/messages/data/project/ignored/an_example.txt -tests/messages/data/project/ignored/this_wont_normally_be_here.py \ No newline at end of file diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/dependency_links.txt b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/dependency_links.txt deleted file mode 100644 index 8b13789..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/dependency_links.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/entry_points.txt b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/entry_points.txt deleted file mode 100644 index 18c3a58..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/entry_points.txt +++ /dev/null @@ -1,22 +0,0 @@ - - [console_scripts] - pybabel = babel.messages.frontend:main - - [distutils.commands] - compile_catalog = babel.messages.frontend:compile_catalog - extract_messages = babel.messages.frontend:extract_messages - init_catalog = babel.messages.frontend:init_catalog - update_catalog = babel.messages.frontend:update_catalog - - [distutils.setup_keywords] - message_extractors = babel.messages.frontend:check_message_extractors - - [babel.checkers] - num_plurals = babel.messages.checkers:num_plurals - python_format = babel.messages.checkers:python_format - - [babel.extractors] - ignore = babel.messages.extract:extract_nothing - python = babel.messages.extract:extract_python - javascript = babel.messages.extract:extract_javascript - \ No newline at end of file diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/not-zip-safe b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/not-zip-safe deleted file mode 100644 index 8b13789..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/not-zip-safe +++ /dev/null @@ -1 +0,0 @@ - diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/requires.txt b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/requires.txt deleted file mode 100644 index 84e71d2..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/requires.txt +++ /dev/null @@ -1 +0,0 @@ -pytz>=0a diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/top_level.txt b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/top_level.txt deleted file mode 100644 index 98f6593..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/EGG-INFO/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -babel diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/__init__.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/__init__.py deleted file mode 100644 index ecc4059..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- -""" - babel - ~~~~~ - - Integrated collection of utilities that assist in internationalizing and - localizing applications. - - This package is basically composed of two major parts: - - * tools to build and work with ``gettext`` message catalogs - * a Python interface to the CLDR (Common Locale Data Repository), providing - access to various locale display names, localized number and date - formatting, etc. - - :copyright: (c) 2013 by the Babel Team. - :license: BSD, see LICENSE for more details. -""" - -from babel.core import UnknownLocaleError, Locale, default_locale, \ - negotiate_locale, parse_locale, get_locale_identifier - - -__version__ = '2.3.4' diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/_compat.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/_compat.py deleted file mode 100644 index 75abf9e..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/_compat.py +++ /dev/null @@ -1,76 +0,0 @@ -import sys -import array - -PY2 = sys.version_info[0] == 2 - -_identity = lambda x: x - - -if not PY2: - text_type = str - string_types = (str,) - integer_types = (int, ) - unichr = chr - - text_to_native = lambda s, enc: s - - iterkeys = lambda d: iter(d.keys()) - itervalues = lambda d: iter(d.values()) - iteritems = lambda d: iter(d.items()) - - from io import StringIO, BytesIO - import pickle - - izip = zip - imap = map - range_type = range - - cmp = lambda a, b: (a > b) - (a < b) - - array_tobytes = array.array.tobytes - -else: - text_type = unicode - string_types = (str, unicode) - integer_types = (int, long) - - text_to_native = lambda s, enc: s.encode(enc) - unichr = unichr - - iterkeys = lambda d: d.iterkeys() - itervalues = lambda d: d.itervalues() - iteritems = lambda d: d.iteritems() - - from cStringIO import StringIO as BytesIO - from StringIO import StringIO - import cPickle as pickle - - from itertools import imap - from itertools import izip - range_type = xrange - - cmp = cmp - - array_tobytes = array.array.tostring - - -number_types = integer_types + (float,) - - -# -# Use cdecimal when available -# -from decimal import (Decimal as _dec, - InvalidOperation as _invop, - ROUND_HALF_EVEN as _RHE) -try: - from cdecimal import (Decimal as _cdec, - InvalidOperation as _cinvop, - ROUND_HALF_EVEN as _CRHE) - Decimal = _cdec - InvalidOperation = (_invop, _cinvop) - ROUND_HALF_EVEN = _CRHE -except ImportError: - Decimal = _dec - InvalidOperation = _invop - ROUND_HALF_EVEN = _RHE diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/core.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/core.py deleted file mode 100644 index 4e00ebf..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/core.py +++ /dev/null @@ -1,1135 +0,0 @@ -# -*- coding: utf-8 -*- -""" - babel.core - ~~~~~~~~~~ - - Core locale representation and locale data access. - - :copyright: (c) 2013 by the Babel Team. - :license: BSD, see LICENSE for more details. -""" - -import os - -from babel import localedata -from babel._compat import pickle, string_types -from babel.plural import PluralRule - -__all__ = ['UnknownLocaleError', 'Locale', 'default_locale', 'negotiate_locale', - 'parse_locale'] - - -_global_data = None -_default_plural_rule = PluralRule({}) - - -def _raise_no_data_error(): - raise RuntimeError('The babel data files are not available. ' - 'This usually happens because you are using ' - 'a source checkout from Babel and you did ' - 'not build the data files. Just make sure ' - 'to run "python setup.py import_cldr" before ' - 'installing the library.') - - -def get_global(key): - """Return the dictionary for the given key in the global data. - - The global data is stored in the ``babel/global.dat`` file and contains - information independent of individual locales. - - >>> get_global('zone_aliases')['UTC'] - u'Etc/GMT' - >>> get_global('zone_territories')['Europe/Berlin'] - u'DE' - - The keys available are: - - - ``currency_fractions`` - - ``language_aliases`` - - ``likely_subtags`` - - ``parent_exceptions`` - - ``script_aliases`` - - ``territory_aliases`` - - ``territory_currencies`` - - ``territory_languages`` - - ``territory_zones`` - - ``variant_aliases`` - - ``win_mapping`` - - ``zone_aliases`` - - ``zone_territories`` - - .. note:: The internal structure of the data may change between versions. - - .. versionadded:: 0.9 - - :param key: the data key - """ - global _global_data - if _global_data is None: - dirname = os.path.join(os.path.dirname(__file__)) - filename = os.path.join(dirname, 'global.dat') - if not os.path.isfile(filename): - _raise_no_data_error() - fileobj = open(filename, 'rb') - try: - _global_data = pickle.load(fileobj) - finally: - fileobj.close() - return _global_data.get(key, {}) - - -LOCALE_ALIASES = { - 'ar': 'ar_SY', 'bg': 'bg_BG', 'bs': 'bs_BA', 'ca': 'ca_ES', 'cs': 'cs_CZ', - 'da': 'da_DK', 'de': 'de_DE', 'el': 'el_GR', 'en': 'en_US', 'es': 'es_ES', - 'et': 'et_EE', 'fa': 'fa_IR', 'fi': 'fi_FI', 'fr': 'fr_FR', 'gl': 'gl_ES', - 'he': 'he_IL', 'hu': 'hu_HU', 'id': 'id_ID', 'is': 'is_IS', 'it': 'it_IT', - 'ja': 'ja_JP', 'km': 'km_KH', 'ko': 'ko_KR', 'lt': 'lt_LT', 'lv': 'lv_LV', - 'mk': 'mk_MK', 'nl': 'nl_NL', 'nn': 'nn_NO', 'no': 'nb_NO', 'pl': 'pl_PL', - 'pt': 'pt_PT', 'ro': 'ro_RO', 'ru': 'ru_RU', 'sk': 'sk_SK', 'sl': 'sl_SI', - 'sv': 'sv_SE', 'th': 'th_TH', 'tr': 'tr_TR', 'uk': 'uk_UA' -} - - -class UnknownLocaleError(Exception): - """Exception thrown when a locale is requested for which no locale data - is available. - """ - - def __init__(self, identifier): - """Create the exception. - - :param identifier: the identifier string of the unsupported locale - """ - Exception.__init__(self, 'unknown locale %r' % identifier) - - #: The identifier of the locale that could not be found. - self.identifier = identifier - - -class Locale(object): - """Representation of a specific locale. - - >>> locale = Locale('en', 'US') - >>> repr(locale) - "Locale('en', territory='US')" - >>> locale.display_name - u'English (United States)' - - A `Locale` object can also be instantiated from a raw locale string: - - >>> locale = Locale.parse('en-US', sep='-') - >>> repr(locale) - "Locale('en', territory='US')" - - `Locale` objects provide access to a collection of locale data, such as - territory and language names, number and date format patterns, and more: - - >>> locale.number_symbols['decimal'] - u'.' - - If a locale is requested for which no locale data is available, an - `UnknownLocaleError` is raised: - - >>> Locale.parse('en_XX') - Traceback (most recent call last): - ... - UnknownLocaleError: unknown locale 'en_XX' - - For more information see :rfc:`3066`. - """ - - def __init__(self, language, territory=None, script=None, variant=None): - """Initialize the locale object from the given identifier components. - - >>> locale = Locale('en', 'US') - >>> locale.language - 'en' - >>> locale.territory - 'US' - - :param language: the language code - :param territory: the territory (country or region) code - :param script: the script code - :param variant: the variant code - :raise `UnknownLocaleError`: if no locale data is available for the - requested locale - """ - #: the language code - self.language = language - #: the territory (country or region) code - self.territory = territory - #: the script code - self.script = script - #: the variant code - self.variant = variant - self.__data = None - - identifier = str(self) - if not localedata.exists(identifier): - raise UnknownLocaleError(identifier) - - @classmethod - def default(cls, category=None, aliases=LOCALE_ALIASES): - """Return the system default locale for the specified category. - - >>> for name in ['LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LC_MESSAGES']: - ... os.environ[name] = '' - >>> os.environ['LANG'] = 'fr_FR.UTF-8' - >>> Locale.default('LC_MESSAGES') - Locale('fr', territory='FR') - - The following fallbacks to the variable are always considered: - - - ``LANGUAGE`` - - ``LC_ALL`` - - ``LC_CTYPE`` - - ``LANG`` - - :param category: one of the ``LC_XXX`` environment variable names - :param aliases: a dictionary of aliases for locale identifiers - """ - # XXX: use likely subtag expansion here instead of the - # aliases dictionary. - locale_string = default_locale(category, aliases=aliases) - return cls.parse(locale_string) - - @classmethod - def negotiate(cls, preferred, available, sep='_', aliases=LOCALE_ALIASES): - """Find the best match between available and requested locale strings. - - >>> Locale.negotiate(['de_DE', 'en_US'], ['de_DE', 'de_AT']) - Locale('de', territory='DE') - >>> Locale.negotiate(['de_DE', 'en_US'], ['en', 'de']) - Locale('de') - >>> Locale.negotiate(['de_DE', 'de'], ['en_US']) - - You can specify the character used in the locale identifiers to separate - the differnet components. This separator is applied to both lists. Also, - case is ignored in the comparison: - - >>> Locale.negotiate(['de-DE', 'de'], ['en-us', 'de-de'], sep='-') - Locale('de', territory='DE') - - :param preferred: the list of locale identifers preferred by the user - :param available: the list of locale identifiers available - :param aliases: a dictionary of aliases for locale identifiers - """ - identifier = negotiate_locale(preferred, available, sep=sep, - aliases=aliases) - if identifier: - return Locale.parse(identifier, sep=sep) - - @classmethod - def parse(cls, identifier, sep='_', resolve_likely_subtags=True): - """Create a `Locale` instance for the given locale identifier. - - >>> l = Locale.parse('de-DE', sep='-') - >>> l.display_name - u'Deutsch (Deutschland)' - - If the `identifier` parameter is not a string, but actually a `Locale` - object, that object is returned: - - >>> Locale.parse(l) - Locale('de', territory='DE') - - This also can perform resolving of likely subtags which it does - by default. This is for instance useful to figure out the most - likely locale for a territory you can use ``'und'`` as the - language tag: - - >>> Locale.parse('und_AT') - Locale('de', territory='AT') - - :param identifier: the locale identifier string - :param sep: optional component separator - :param resolve_likely_subtags: if this is specified then a locale will - have its likely subtag resolved if the - locale otherwise does not exist. For - instance ``zh_TW`` by itself is not a - locale that exists but Babel can - automatically expand it to the full - form of ``zh_hant_TW``. Note that this - expansion is only taking place if no - locale exists otherwise. For instance - there is a locale ``en`` that can exist - by itself. - :raise `ValueError`: if the string does not appear to be a valid locale - identifier - :raise `UnknownLocaleError`: if no locale data is available for the - requested locale - """ - if identifier is None: - return None - elif isinstance(identifier, Locale): - return identifier - elif not isinstance(identifier, string_types): - raise TypeError('Unxpected value for identifier: %r' % (identifier,)) - - parts = parse_locale(identifier, sep=sep) - input_id = get_locale_identifier(parts) - - def _try_load(parts): - try: - return cls(*parts) - except UnknownLocaleError: - return None - - def _try_load_reducing(parts): - # Success on first hit, return it. - locale = _try_load(parts) - if locale is not None: - return locale - - # Now try without script and variant - locale = _try_load(parts[:2]) - if locale is not None: - return locale - - locale = _try_load(parts) - if locale is not None: - return locale - if not resolve_likely_subtags: - raise UnknownLocaleError(input_id) - - # From here onwards is some very bad likely subtag resolving. This - # whole logic is not entirely correct but good enough (tm) for the - # time being. This has been added so that zh_TW does not cause - # errors for people when they upgrade. Later we should properly - # implement ICU like fuzzy locale objects and provide a way to - # maximize and minimize locale tags. - - language, territory, script, variant = parts - language = get_global('language_aliases').get(language, language) - territory = get_global('territory_aliases').get(territory, (territory,))[0] - script = get_global('script_aliases').get(script, script) - variant = get_global('variant_aliases').get(variant, variant) - - if territory == 'ZZ': - territory = None - if script == 'Zzzz': - script = None - - parts = language, territory, script, variant - - # First match: try the whole identifier - new_id = get_locale_identifier(parts) - likely_subtag = get_global('likely_subtags').get(new_id) - if likely_subtag is not None: - locale = _try_load_reducing(parse_locale(likely_subtag)) - if locale is not None: - return locale - - # If we did not find anything so far, try again with a - # simplified identifier that is just the language - likely_subtag = get_global('likely_subtags').get(language) - if likely_subtag is not None: - language2, _, script2, variant2 = parse_locale(likely_subtag) - locale = _try_load_reducing((language2, territory, script2, variant2)) - if locale is not None: - return locale - - raise UnknownLocaleError(input_id) - - def __eq__(self, other): - for key in ('language', 'territory', 'script', 'variant'): - if not hasattr(other, key): - return False - return (self.language == other.language) and \ - (self.territory == other.territory) and \ - (self.script == other.script) and \ - (self.variant == other.variant) - - def __ne__(self, other): - return not self.__eq__(other) - - def __hash__(self): - return hash((self.language, self.territory, self.script, self.variant)) - - def __repr__(self): - parameters = [''] - for key in ('territory', 'script', 'variant'): - value = getattr(self, key) - if value is not None: - parameters.append('%s=%r' % (key, value)) - parameter_string = '%r' % self.language + ', '.join(parameters) - return 'Locale(%s)' % parameter_string - - def __str__(self): - return get_locale_identifier((self.language, self.territory, - self.script, self.variant)) - - @property - def _data(self): - if self.__data is None: - self.__data = localedata.LocaleDataDict(localedata.load(str(self))) - return self.__data - - def get_display_name(self, locale=None): - """Return the display name of the locale using the given locale. - - The display name will include the language, territory, script, and - variant, if those are specified. - - >>> Locale('zh', 'CN', script='Hans').get_display_name('en') - u'Chinese (Simplified, China)' - - :param locale: the locale to use - """ - if locale is None: - locale = self - locale = Locale.parse(locale) - retval = locale.languages.get(self.language) - if self.territory or self.script or self.variant: - details = [] - if self.script: - details.append(locale.scripts.get(self.script)) - if self.territory: - details.append(locale.territories.get(self.territory)) - if self.variant: - details.append(locale.variants.get(self.variant)) - details = filter(None, details) - if details: - retval += ' (%s)' % u', '.join(details) - return retval - - display_name = property(get_display_name, doc="""\ - The localized display name of the locale. - - >>> Locale('en').display_name - u'English' - >>> Locale('en', 'US').display_name - u'English (United States)' - >>> Locale('sv').display_name - u'svenska' - - :type: `unicode` - """) - - def get_language_name(self, locale=None): - """Return the language of this locale in the given locale. - - >>> Locale('zh', 'CN', script='Hans').get_language_name('de') - u'Chinesisch' - - .. versionadded:: 1.0 - - :param locale: the locale to use - """ - if locale is None: - locale = self - locale = Locale.parse(locale) - return locale.languages.get(self.language) - - language_name = property(get_language_name, doc="""\ - The localized language name of the locale. - - >>> Locale('en', 'US').language_name - u'English' - """) - - def get_territory_name(self, locale=None): - """Return the territory name in the given locale.""" - if locale is None: - locale = self - locale = Locale.parse(locale) - return locale.territories.get(self.territory) - - territory_name = property(get_territory_name, doc="""\ - The localized territory name of the locale if available. - - >>> Locale('de', 'DE').territory_name - u'Deutschland' - """) - - def get_script_name(self, locale=None): - """Return the script name in the given locale.""" - if locale is None: - locale = self - locale = Locale.parse(locale) - return locale.scripts.get(self.script) - - script_name = property(get_script_name, doc="""\ - The localized script name of the locale if available. - - >>> Locale('sr', 'ME', script='Latn').script_name - u'latinica' - """) - - @property - def english_name(self): - """The english display name of the locale. - - >>> Locale('de').english_name - u'German' - >>> Locale('de', 'DE').english_name - u'German (Germany)' - - :type: `unicode`""" - return self.get_display_name(Locale('en')) - - # { General Locale Display Names - - @property - def languages(self): - """Mapping of language codes to translated language names. - - >>> Locale('de', 'DE').languages['ja'] - u'Japanisch' - - See `ISO 639 `_ for - more information. - """ - return self._data['languages'] - - @property - def scripts(self): - """Mapping of script codes to translated script names. - - >>> Locale('en', 'US').scripts['Hira'] - u'Hiragana' - - See `ISO 15924 `_ - for more information. - """ - return self._data['scripts'] - - @property - def territories(self): - """Mapping of script codes to translated script names. - - >>> Locale('es', 'CO').territories['DE'] - u'Alemania' - - See `ISO 3166 `_ - for more information. - """ - return self._data['territories'] - - @property - def variants(self): - """Mapping of script codes to translated script names. - - >>> Locale('de', 'DE').variants['1901'] - u'Alte deutsche Rechtschreibung' - """ - return self._data['variants'] - - # { Number Formatting - - @property - def currencies(self): - """Mapping of currency codes to translated currency names. This - only returns the generic form of the currency name, not the count - specific one. If an actual number is requested use the - :func:`babel.numbers.get_currency_name` function. - - >>> Locale('en').currencies['COP'] - u'Colombian Peso' - >>> Locale('de', 'DE').currencies['COP'] - u'Kolumbianischer Peso' - """ - return self._data['currency_names'] - - @property - def currency_symbols(self): - """Mapping of currency codes to symbols. - - >>> Locale('en', 'US').currency_symbols['USD'] - u'$' - >>> Locale('es', 'CO').currency_symbols['USD'] - u'US$' - """ - return self._data['currency_symbols'] - - @property - def number_symbols(self): - """Symbols used in number formatting. - - .. note:: The format of the value returned may change between - Babel versions. - - >>> Locale('fr', 'FR').number_symbols['decimal'] - u',' - """ - return self._data['number_symbols'] - - @property - def decimal_formats(self): - """Locale patterns for decimal number formatting. - - .. note:: The format of the value returned may change between - Babel versions. - - >>> Locale('en', 'US').decimal_formats[None] - - """ - return self._data['decimal_formats'] - - @property - def currency_formats(self): - """Locale patterns for currency number formatting. - - .. note:: The format of the value returned may change between - Babel versions. - - >>> Locale('en', 'US').currency_formats['standard'] - - >>> Locale('en', 'US').currency_formats['accounting'] - - """ - return self._data['currency_formats'] - - @property - def percent_formats(self): - """Locale patterns for percent number formatting. - - .. note:: The format of the value returned may change between - Babel versions. - - >>> Locale('en', 'US').percent_formats[None] - - """ - return self._data['percent_formats'] - - @property - def scientific_formats(self): - """Locale patterns for scientific number formatting. - - .. note:: The format of the value returned may change between - Babel versions. - - >>> Locale('en', 'US').scientific_formats[None] - - """ - return self._data['scientific_formats'] - - # { Calendar Information and Date Formatting - - @property - def periods(self): - """Locale display names for day periods (AM/PM). - - >>> Locale('en', 'US').periods['am'] - u'AM' - """ - try: - return self._data['day_periods']['stand-alone']['wide'] - except KeyError: - return {} - - @property - def day_periods(self): - """Locale display names for various day periods (not necessarily only AM/PM). - - These are not meant to be used without the relevant `day_period_rules`. - """ - return self._data['day_periods'] - - @property - def day_period_rules(self): - """Day period rules for the locale. Used by `get_period_id`. - """ - return self._data.get('day_period_rules', {}) - - @property - def days(self): - """Locale display names for weekdays. - - >>> Locale('de', 'DE').days['format']['wide'][3] - u'Donnerstag' - """ - return self._data['days'] - - @property - def months(self): - """Locale display names for months. - - >>> Locale('de', 'DE').months['format']['wide'][10] - u'Oktober' - """ - return self._data['months'] - - @property - def quarters(self): - """Locale display names for quarters. - - >>> Locale('de', 'DE').quarters['format']['wide'][1] - u'1. Quartal' - """ - return self._data['quarters'] - - @property - def eras(self): - """Locale display names for eras. - - .. note:: The format of the value returned may change between - Babel versions. - - >>> Locale('en', 'US').eras['wide'][1] - u'Anno Domini' - >>> Locale('en', 'US').eras['abbreviated'][0] - u'BC' - """ - return self._data['eras'] - - @property - def time_zones(self): - """Locale display names for time zones. - - .. note:: The format of the value returned may change between - Babel versions. - - >>> Locale('en', 'US').time_zones['Europe/London']['long']['daylight'] - u'British Summer Time' - >>> Locale('en', 'US').time_zones['America/St_Johns']['city'] - u'St. John\u2019s' - """ - return self._data['time_zones'] - - @property - def meta_zones(self): - """Locale display names for meta time zones. - - Meta time zones are basically groups of different Olson time zones that - have the same GMT offset and daylight savings time. - - .. note:: The format of the value returned may change between - Babel versions. - - >>> Locale('en', 'US').meta_zones['Europe_Central']['long']['daylight'] - u'Central European Summer Time' - - .. versionadded:: 0.9 - """ - return self._data['meta_zones'] - - @property - def zone_formats(self): - """Patterns related to the formatting of time zones. - - .. note:: The format of the value returned may change between - Babel versions. - - >>> Locale('en', 'US').zone_formats['fallback'] - u'%(1)s (%(0)s)' - >>> Locale('pt', 'BR').zone_formats['region'] - u'Hor\\xe1rio %s' - - .. versionadded:: 0.9 - """ - return self._data['zone_formats'] - - @property - def first_week_day(self): - """The first day of a week, with 0 being Monday. - - >>> Locale('de', 'DE').first_week_day - 0 - >>> Locale('en', 'US').first_week_day - 6 - """ - return self._data['week_data']['first_day'] - - @property - def weekend_start(self): - """The day the weekend starts, with 0 being Monday. - - >>> Locale('de', 'DE').weekend_start - 5 - """ - return self._data['week_data']['weekend_start'] - - @property - def weekend_end(self): - """The day the weekend ends, with 0 being Monday. - - >>> Locale('de', 'DE').weekend_end - 6 - """ - return self._data['week_data']['weekend_end'] - - @property - def min_week_days(self): - """The minimum number of days in a week so that the week is counted as - the first week of a year or month. - - >>> Locale('de', 'DE').min_week_days - 4 - """ - return self._data['week_data']['min_days'] - - @property - def date_formats(self): - """Locale patterns for date formatting. - - .. note:: The format of the value returned may change between - Babel versions. - - >>> Locale('en', 'US').date_formats['short'] - - >>> Locale('fr', 'FR').date_formats['long'] - - """ - return self._data['date_formats'] - - @property - def time_formats(self): - """Locale patterns for time formatting. - - .. note:: The format of the value returned may change between - Babel versions. - - >>> Locale('en', 'US').time_formats['short'] - - >>> Locale('fr', 'FR').time_formats['long'] - - """ - return self._data['time_formats'] - - @property - def datetime_formats(self): - """Locale patterns for datetime formatting. - - .. note:: The format of the value returned may change between - Babel versions. - - >>> Locale('en').datetime_formats['full'] - u"{1} 'at' {0}" - >>> Locale('th').datetime_formats['medium'] - u'{1} {0}' - """ - return self._data['datetime_formats'] - - @property - def datetime_skeletons(self): - """Locale patterns for formatting parts of a datetime. - - >>> Locale('en').datetime_skeletons['MEd'] - - >>> Locale('fr').datetime_skeletons['MEd'] - - >>> Locale('fr').datetime_skeletons['H'] - - """ - return self._data['datetime_skeletons'] - - @property - def interval_formats(self): - """Locale patterns for interval formatting. - - .. note:: The format of the value returned may change between - Babel versions. - - How to format date intervals in Finnish when the day is the - smallest changing component: - - >>> Locale('fi_FI').interval_formats['MEd']['d'] - [u'E d. \u2013 ', u'E d.M.'] - - .. seealso:: - - The primary API to use this data is :py:func:`babel.dates.format_interval`. - - - :rtype: dict[str, dict[str, list[str]]] - """ - return self._data['interval_formats'] - - @property - def plural_form(self): - """Plural rules for the locale. - - >>> Locale('en').plural_form(1) - 'one' - >>> Locale('en').plural_form(0) - 'other' - >>> Locale('fr').plural_form(0) - 'one' - >>> Locale('ru').plural_form(100) - 'many' - """ - return self._data.get('plural_form', _default_plural_rule) - - @property - def list_patterns(self): - """Patterns for generating lists - - .. note:: The format of the value returned may change between - Babel versions. - - >>> Locale('en').list_patterns['start'] - u'{0}, {1}' - >>> Locale('en').list_patterns['end'] - u'{0}, and {1}' - >>> Locale('en_GB').list_patterns['end'] - u'{0} and {1}' - """ - return self._data['list_patterns'] - - @property - def ordinal_form(self): - """Plural rules for the locale. - - >>> Locale('en').ordinal_form(1) - 'one' - >>> Locale('en').ordinal_form(2) - 'two' - >>> Locale('en').ordinal_form(3) - 'few' - >>> Locale('fr').ordinal_form(2) - 'other' - >>> Locale('ru').ordinal_form(100) - 'other' - """ - return self._data.get('ordinal_form', _default_plural_rule) - - @property - def measurement_systems(self): - """Localized names for various measurement systems. - - >>> Locale('fr', 'FR').measurement_systems['US'] - u'am\\xe9ricain' - >>> Locale('en', 'US').measurement_systems['US'] - u'US' - - """ - return self._data['measurement_systems'] - - @property - def character_order(self): - """The text direction for the language. - - >>> Locale('de', 'DE').character_order - 'left-to-right' - >>> Locale('ar', 'SA').character_order - 'right-to-left' - """ - return self._data['character_order'] - - @property - def text_direction(self): - """The text direction for the language in CSS short-hand form. - - >>> Locale('de', 'DE').text_direction - 'ltr' - >>> Locale('ar', 'SA').text_direction - 'rtl' - """ - return ''.join(word[0] for word in self.character_order.split('-')) - - @property - def unit_display_names(self): - """Display names for units of measurement. - - .. seealso:: - - You may want to use :py:func:`babel.units.get_unit_name` instead. - - .. note:: The format of the value returned may change between - Babel versions. - - """ - return self._data['unit_display_names'] - - -def default_locale(category=None, aliases=LOCALE_ALIASES): - """Returns the system default locale for a given category, based on - environment variables. - - >>> for name in ['LANGUAGE', 'LC_ALL', 'LC_CTYPE']: - ... os.environ[name] = '' - >>> os.environ['LANG'] = 'fr_FR.UTF-8' - >>> default_locale('LC_MESSAGES') - 'fr_FR' - - The "C" or "POSIX" pseudo-locales are treated as aliases for the - "en_US_POSIX" locale: - - >>> os.environ['LC_MESSAGES'] = 'POSIX' - >>> default_locale('LC_MESSAGES') - 'en_US_POSIX' - - The following fallbacks to the variable are always considered: - - - ``LANGUAGE`` - - ``LC_ALL`` - - ``LC_CTYPE`` - - ``LANG`` - - :param category: one of the ``LC_XXX`` environment variable names - :param aliases: a dictionary of aliases for locale identifiers - """ - varnames = (category, 'LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LANG') - for name in filter(None, varnames): - locale = os.getenv(name) - if locale: - if name == 'LANGUAGE' and ':' in locale: - # the LANGUAGE variable may contain a colon-separated list of - # language codes; we just pick the language on the list - locale = locale.split(':')[0] - if locale.split('.')[0] in ('C', 'POSIX'): - locale = 'en_US_POSIX' - elif aliases and locale in aliases: - locale = aliases[locale] - try: - return get_locale_identifier(parse_locale(locale)) - except ValueError: - pass - - -def negotiate_locale(preferred, available, sep='_', aliases=LOCALE_ALIASES): - """Find the best match between available and requested locale strings. - - >>> negotiate_locale(['de_DE', 'en_US'], ['de_DE', 'de_AT']) - 'de_DE' - >>> negotiate_locale(['de_DE', 'en_US'], ['en', 'de']) - 'de' - - Case is ignored by the algorithm, the result uses the case of the preferred - locale identifier: - - >>> negotiate_locale(['de_DE', 'en_US'], ['de_de', 'de_at']) - 'de_DE' - - >>> negotiate_locale(['de_DE', 'en_US'], ['de_de', 'de_at']) - 'de_DE' - - By default, some web browsers unfortunately do not include the territory - in the locale identifier for many locales, and some don't even allow the - user to easily add the territory. So while you may prefer using qualified - locale identifiers in your web-application, they would not normally match - the language-only locale sent by such browsers. To workaround that, this - function uses a default mapping of commonly used langauge-only locale - identifiers to identifiers including the territory: - - >>> negotiate_locale(['ja', 'en_US'], ['ja_JP', 'en_US']) - 'ja_JP' - - Some browsers even use an incorrect or outdated language code, such as "no" - for Norwegian, where the correct locale identifier would actually be "nb_NO" - (Bokmål) or "nn_NO" (Nynorsk). The aliases are intended to take care of - such cases, too: - - >>> negotiate_locale(['no', 'sv'], ['nb_NO', 'sv_SE']) - 'nb_NO' - - You can override this default mapping by passing a different `aliases` - dictionary to this function, or you can bypass the behavior althogher by - setting the `aliases` parameter to `None`. - - :param preferred: the list of locale strings preferred by the user - :param available: the list of locale strings available - :param sep: character that separates the different parts of the locale - strings - :param aliases: a dictionary of aliases for locale identifiers - """ - available = [a.lower() for a in available if a] - for locale in preferred: - ll = locale.lower() - if ll in available: - return locale - if aliases: - alias = aliases.get(ll) - if alias: - alias = alias.replace('_', sep) - if alias.lower() in available: - return alias - parts = locale.split(sep) - if len(parts) > 1 and parts[0].lower() in available: - return parts[0] - return None - - -def parse_locale(identifier, sep='_'): - """Parse a locale identifier into a tuple of the form ``(language, - territory, script, variant)``. - - >>> parse_locale('zh_CN') - ('zh', 'CN', None, None) - >>> parse_locale('zh_Hans_CN') - ('zh', 'CN', 'Hans', None) - - The default component separator is "_", but a different separator can be - specified using the `sep` parameter: - - >>> parse_locale('zh-CN', sep='-') - ('zh', 'CN', None, None) - - If the identifier cannot be parsed into a locale, a `ValueError` exception - is raised: - - >>> parse_locale('not_a_LOCALE_String') - Traceback (most recent call last): - ... - ValueError: 'not_a_LOCALE_String' is not a valid locale identifier - - Encoding information and locale modifiers are removed from the identifier: - - >>> parse_locale('it_IT@euro') - ('it', 'IT', None, None) - >>> parse_locale('en_US.UTF-8') - ('en', 'US', None, None) - >>> parse_locale('de_DE.iso885915@euro') - ('de', 'DE', None, None) - - See :rfc:`4646` for more information. - - :param identifier: the locale identifier string - :param sep: character that separates the different components of the locale - identifier - :raise `ValueError`: if the string does not appear to be a valid locale - identifier - """ - if '.' in identifier: - # this is probably the charset/encoding, which we don't care about - identifier = identifier.split('.', 1)[0] - if '@' in identifier: - # this is a locale modifier such as @euro, which we don't care about - # either - identifier = identifier.split('@', 1)[0] - - parts = identifier.split(sep) - lang = parts.pop(0).lower() - if not lang.isalpha(): - raise ValueError('expected only letters, got %r' % lang) - - script = territory = variant = None - if parts: - if len(parts[0]) == 4 and parts[0].isalpha(): - script = parts.pop(0).title() - - if parts: - if len(parts[0]) == 2 and parts[0].isalpha(): - territory = parts.pop(0).upper() - elif len(parts[0]) == 3 and parts[0].isdigit(): - territory = parts.pop(0) - - if parts: - if len(parts[0]) == 4 and parts[0][0].isdigit() or \ - len(parts[0]) >= 5 and parts[0][0].isalpha(): - variant = parts.pop() - - if parts: - raise ValueError('%r is not a valid locale identifier' % identifier) - - return lang, territory, script, variant - - -def get_locale_identifier(tup, sep='_'): - """The reverse of :func:`parse_locale`. It creates a locale identifier out - of a ``(language, territory, script, variant)`` tuple. Items can be set to - ``None`` and trailing ``None``\s can also be left out of the tuple. - - >>> get_locale_identifier(('de', 'DE', None, '1999')) - 'de_DE_1999' - - .. versionadded:: 1.0 - - :param tup: the tuple as returned by :func:`parse_locale`. - :param sep: the separator for the identifier. - """ - tup = tuple(tup[:4]) - lang, territory, script, variant = tup + (None,) * (4 - len(tup)) - return sep.join(filter(None, (lang, script, territory, variant))) diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/dates.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/dates.py deleted file mode 100644 index 4a0bbd3..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/dates.py +++ /dev/null @@ -1,1754 +0,0 @@ -# -*- coding: utf-8 -*- -""" - babel.dates - ~~~~~~~~~~~ - - Locale dependent formatting and parsing of dates and times. - - The default locale for the functions in this module is determined by the - following environment variables, in that order: - - * ``LC_TIME``, - * ``LC_ALL``, and - * ``LANG`` - - :copyright: (c) 2013 by the Babel Team. - :license: BSD, see LICENSE for more details. -""" - -from __future__ import division - -import re -import warnings -import pytz as _pytz - -from datetime import date, datetime, time, timedelta -from bisect import bisect_right - -from babel.core import default_locale, get_global, Locale -from babel.util import UTC, LOCALTZ -from babel._compat import string_types, integer_types, number_types - - -LC_TIME = default_locale('LC_TIME') - -# Aliases for use in scopes where the modules are shadowed by local variables -date_ = date -datetime_ = datetime -time_ = time - - -def _get_dt_and_tzinfo(dt_or_tzinfo): - """ - Parse a `dt_or_tzinfo` value into a datetime and a tzinfo. - - See the docs for this function's callers for semantics. - - :rtype: tuple[datetime, tzinfo] - """ - if dt_or_tzinfo is None: - dt = datetime.now() - tzinfo = LOCALTZ - elif isinstance(dt_or_tzinfo, string_types): - dt = None - tzinfo = get_timezone(dt_or_tzinfo) - elif isinstance(dt_or_tzinfo, integer_types): - dt = None - tzinfo = UTC - elif isinstance(dt_or_tzinfo, (datetime, time)): - dt = _get_datetime(dt_or_tzinfo) - if dt.tzinfo is not None: - tzinfo = dt.tzinfo - else: - tzinfo = UTC - else: - dt = None - tzinfo = dt_or_tzinfo - return dt, tzinfo - - -def _get_datetime(instant): - """ - Get a datetime out of an "instant" (date, time, datetime, number). - - .. warning:: The return values of this function may depend on the system clock. - - If the instant is None, the current moment is used. - If the instant is a time, it's augmented with today's date. - - Dates are converted to naive datetimes with midnight as the time component. - - >>> _get_datetime(date(2015, 1, 1)) - datetime.datetime(2015, 1, 1, 0, 0) - - UNIX timestamps are converted to datetimes. - - >>> _get_datetime(1400000000) - datetime.datetime(2014, 5, 13, 16, 53, 20) - - Other values are passed through as-is. - - >>> x = datetime(2015, 1, 1) - >>> _get_datetime(x) is x - True - - :param instant: date, time, datetime, integer, float or None - :type instant: date|time|datetime|int|float|None - :return: a datetime - :rtype: datetime - """ - if instant is None: - return datetime_.utcnow() - elif isinstance(instant, integer_types) or isinstance(instant, float): - return datetime_.utcfromtimestamp(instant) - elif isinstance(instant, time): - return datetime_.combine(date.today(), instant) - elif isinstance(instant, date) and not isinstance(instant, datetime): - return datetime_.combine(instant, time()) - # TODO (3.x): Add an assertion/type check for this fallthrough branch: - return instant - - -def _ensure_datetime_tzinfo(datetime, tzinfo=None): - """ - Ensure the datetime passed has an attached tzinfo. - - If the datetime is tz-naive to begin with, UTC is attached. - - If a tzinfo is passed in, the datetime is normalized to that timezone. - - >>> _ensure_datetime_tzinfo(datetime(2015, 1, 1)).tzinfo.zone - 'UTC' - - >>> tz = get_timezone("Europe/Stockholm") - >>> _ensure_datetime_tzinfo(datetime(2015, 1, 1, 13, 15, tzinfo=UTC), tzinfo=tz).hour - 14 - - :param datetime: Datetime to augment. - :param tzinfo: Optional tznfo. - :return: datetime with tzinfo - :rtype: datetime - """ - if datetime.tzinfo is None: - datetime = datetime.replace(tzinfo=UTC) - if tzinfo is not None: - datetime = datetime.astimezone(get_timezone(tzinfo)) - if hasattr(tzinfo, 'normalize'): # pytz - datetime = tzinfo.normalize(datetime) - return datetime - - -def _get_time(time, tzinfo=None): - """ - Get a timezoned time from a given instant. - - .. warning:: The return values of this function may depend on the system clock. - - :param time: time, datetime or None - :rtype: time - """ - if time is None: - time = datetime.utcnow() - elif isinstance(time, number_types): - time = datetime.utcfromtimestamp(time) - if time.tzinfo is None: - time = time.replace(tzinfo=UTC) - if isinstance(time, datetime): - if tzinfo is not None: - time = time.astimezone(tzinfo) - if hasattr(tzinfo, 'normalize'): # pytz - time = tzinfo.normalize(time) - time = time.timetz() - elif tzinfo is not None: - time = time.replace(tzinfo=tzinfo) - return time - - -def get_timezone(zone=None): - """Looks up a timezone by name and returns it. The timezone object - returned comes from ``pytz`` and corresponds to the `tzinfo` interface and - can be used with all of the functions of Babel that operate with dates. - - If a timezone is not known a :exc:`LookupError` is raised. If `zone` - is ``None`` a local zone object is returned. - - :param zone: the name of the timezone to look up. If a timezone object - itself is passed in, mit's returned unchanged. - """ - if zone is None: - return LOCALTZ - if not isinstance(zone, string_types): - return zone - try: - return _pytz.timezone(zone) - except _pytz.UnknownTimeZoneError: - raise LookupError('Unknown timezone %s' % zone) - - -def get_next_timezone_transition(zone=None, dt=None): - """Given a timezone it will return a :class:`TimezoneTransition` object - that holds the information about the next timezone transition that's going - to happen. For instance this can be used to detect when the next DST - change is going to happen and how it looks like. - - The transition is calculated relative to the given datetime object. The - next transition that follows the date is used. If a transition cannot - be found the return value will be `None`. - - Transition information can only be provided for timezones returned by - the :func:`get_timezone` function. - - :param zone: the timezone for which the transition should be looked up. - If not provided the local timezone is used. - :param dt: the date after which the next transition should be found. - If not given the current time is assumed. - """ - zone = get_timezone(zone) - dt = _get_datetime(dt).replace(tzinfo=None) - - if not hasattr(zone, '_utc_transition_times'): - raise TypeError('Given timezone does not have UTC transition ' - 'times. This can happen because the operating ' - 'system fallback local timezone is used or a ' - 'custom timezone object') - - try: - idx = max(0, bisect_right(zone._utc_transition_times, dt)) - old_trans = zone._transition_info[idx - 1] - new_trans = zone._transition_info[idx] - old_tz = zone._tzinfos[old_trans] - new_tz = zone._tzinfos[new_trans] - except (LookupError, ValueError): - return None - - return TimezoneTransition( - activates=zone._utc_transition_times[idx], - from_tzinfo=old_tz, - to_tzinfo=new_tz, - reference_date=dt - ) - - -class TimezoneTransition(object): - """A helper object that represents the return value from - :func:`get_next_timezone_transition`. - """ - - def __init__(self, activates, from_tzinfo, to_tzinfo, reference_date=None): - #: the time of the activation of the timezone transition in UTC. - self.activates = activates - #: the timezone from where the transition starts. - self.from_tzinfo = from_tzinfo - #: the timezone for after the transition. - self.to_tzinfo = to_tzinfo - #: the reference date that was provided. This is the `dt` parameter - #: to the :func:`get_next_timezone_transition`. - self.reference_date = reference_date - - @property - def from_tz(self): - """The name of the timezone before the transition.""" - return self.from_tzinfo._tzname - - @property - def to_tz(self): - """The name of the timezone after the transition.""" - return self.to_tzinfo._tzname - - @property - def from_offset(self): - """The UTC offset in seconds before the transition.""" - return int(self.from_tzinfo._utcoffset.total_seconds()) - - @property - def to_offset(self): - """The UTC offset in seconds after the transition.""" - return int(self.to_tzinfo._utcoffset.total_seconds()) - - def __repr__(self): - return ' %s (%s)>' % ( - self.from_tz, - self.to_tz, - self.activates, - ) - - -def get_period_names(width='wide', context='stand-alone', locale=LC_TIME): - """Return the names for day periods (AM/PM) used by the locale. - - >>> get_period_names(locale='en_US')['am'] - u'AM' - - :param width: the width to use, one of "abbreviated", "narrow", or "wide" - :param context: the context, either "format" or "stand-alone" - :param locale: the `Locale` object, or a locale string - """ - return Locale.parse(locale).day_periods[context][width] - - -def get_day_names(width='wide', context='format', locale=LC_TIME): - """Return the day names used by the locale for the specified format. - - >>> get_day_names('wide', locale='en_US')[1] - u'Tuesday' - >>> get_day_names('short', locale='en_US')[1] - u'Tu' - >>> get_day_names('abbreviated', locale='es')[1] - u'mar.' - >>> get_day_names('narrow', context='stand-alone', locale='de_DE')[1] - u'D' - - :param width: the width to use, one of "wide", "abbreviated", "short" or "narrow" - :param context: the context, either "format" or "stand-alone" - :param locale: the `Locale` object, or a locale string - """ - return Locale.parse(locale).days[context][width] - - -def get_month_names(width='wide', context='format', locale=LC_TIME): - """Return the month names used by the locale for the specified format. - - >>> get_month_names('wide', locale='en_US')[1] - u'January' - >>> get_month_names('abbreviated', locale='es')[1] - u'ene.' - >>> get_month_names('narrow', context='stand-alone', locale='de_DE')[1] - u'J' - - :param width: the width to use, one of "wide", "abbreviated", or "narrow" - :param context: the context, either "format" or "stand-alone" - :param locale: the `Locale` object, or a locale string - """ - return Locale.parse(locale).months[context][width] - - -def get_quarter_names(width='wide', context='format', locale=LC_TIME): - """Return the quarter names used by the locale for the specified format. - - >>> get_quarter_names('wide', locale='en_US')[1] - u'1st quarter' - >>> get_quarter_names('abbreviated', locale='de_DE')[1] - u'Q1' - >>> get_quarter_names('narrow', locale='de_DE')[1] - u'1' - - :param width: the width to use, one of "wide", "abbreviated", or "narrow" - :param context: the context, either "format" or "stand-alone" - :param locale: the `Locale` object, or a locale string - """ - return Locale.parse(locale).quarters[context][width] - - -def get_era_names(width='wide', locale=LC_TIME): - """Return the era names used by the locale for the specified format. - - >>> get_era_names('wide', locale='en_US')[1] - u'Anno Domini' - >>> get_era_names('abbreviated', locale='de_DE')[1] - u'n. Chr.' - - :param width: the width to use, either "wide", "abbreviated", or "narrow" - :param locale: the `Locale` object, or a locale string - """ - return Locale.parse(locale).eras[width] - - -def get_date_format(format='medium', locale=LC_TIME): - """Return the date formatting patterns used by the locale for the specified - format. - - >>> get_date_format(locale='en_US') - - >>> get_date_format('full', locale='de_DE') - - - :param format: the format to use, one of "full", "long", "medium", or - "short" - :param locale: the `Locale` object, or a locale string - """ - return Locale.parse(locale).date_formats[format] - - -def get_datetime_format(format='medium', locale=LC_TIME): - """Return the datetime formatting patterns used by the locale for the - specified format. - - >>> get_datetime_format(locale='en_US') - u'{1}, {0}' - - :param format: the format to use, one of "full", "long", "medium", or - "short" - :param locale: the `Locale` object, or a locale string - """ - patterns = Locale.parse(locale).datetime_formats - if format not in patterns: - format = None - return patterns[format] - - -def get_time_format(format='medium', locale=LC_TIME): - """Return the time formatting patterns used by the locale for the specified - format. - - >>> get_time_format(locale='en_US') - - >>> get_time_format('full', locale='de_DE') - - - :param format: the format to use, one of "full", "long", "medium", or - "short" - :param locale: the `Locale` object, or a locale string - """ - return Locale.parse(locale).time_formats[format] - - -def get_timezone_gmt(datetime=None, width='long', locale=LC_TIME, return_z=False): - """Return the timezone associated with the given `datetime` object formatted - as string indicating the offset from GMT. - - >>> dt = datetime(2007, 4, 1, 15, 30) - >>> get_timezone_gmt(dt, locale='en') - u'GMT+00:00' - >>> get_timezone_gmt(dt, locale='en', return_z=True) - 'Z' - >>> get_timezone_gmt(dt, locale='en', width='iso8601_short') - u'+00' - >>> tz = get_timezone('America/Los_Angeles') - >>> dt = tz.localize(datetime(2007, 4, 1, 15, 30)) - >>> get_timezone_gmt(dt, locale='en') - u'GMT-07:00' - >>> get_timezone_gmt(dt, 'short', locale='en') - u'-0700' - >>> get_timezone_gmt(dt, locale='en', width='iso8601_short') - u'-07' - - The long format depends on the locale, for example in France the acronym - UTC string is used instead of GMT: - - >>> get_timezone_gmt(dt, 'long', locale='fr_FR') - u'UTC-07:00' - - .. versionadded:: 0.9 - - :param datetime: the ``datetime`` object; if `None`, the current date and - time in UTC is used - :param width: either "long" or "short" or "iso8601" or "iso8601_short" - :param locale: the `Locale` object, or a locale string - :param return_z: True or False; Function returns indicator "Z" - when local time offset is 0 - """ - datetime = _ensure_datetime_tzinfo(_get_datetime(datetime)) - locale = Locale.parse(locale) - - offset = datetime.tzinfo.utcoffset(datetime) - seconds = offset.days * 24 * 60 * 60 + offset.seconds - hours, seconds = divmod(seconds, 3600) - if return_z and hours == 0 and seconds == 0: - return 'Z' - elif seconds == 0 and width == 'iso8601_short': - return u'%+03d' % hours - elif width == 'short' or width == 'iso8601_short': - pattern = u'%+03d%02d' - elif width == 'iso8601': - pattern = u'%+03d:%02d' - else: - pattern = locale.zone_formats['gmt'] % '%+03d:%02d' - return pattern % (hours, seconds // 60) - - -def get_timezone_location(dt_or_tzinfo=None, locale=LC_TIME, return_city=False): - u"""Return a representation of the given timezone using "location format". - - The result depends on both the local display name of the country and the - city associated with the time zone: - - >>> tz = get_timezone('America/St_Johns') - >>> print(get_timezone_location(tz, locale='de_DE')) - Kanada (St. John’s) Zeit - >>> print(get_timezone_location(tz, locale='en')) - Canada (St. John’s) Time - >>> print(get_timezone_location(tz, locale='en', return_city=True)) - St. John’s - >>> tz = get_timezone('America/Mexico_City') - >>> get_timezone_location(tz, locale='de_DE') - u'Mexiko (Mexiko-Stadt) Zeit' - - If the timezone is associated with a country that uses only a single - timezone, just the localized country name is returned: - - >>> tz = get_timezone('Europe/Berlin') - >>> get_timezone_name(tz, locale='de_DE') - u'Mitteleurop\\xe4ische Zeit' - - .. versionadded:: 0.9 - - :param dt_or_tzinfo: the ``datetime`` or ``tzinfo`` object that determines - the timezone; if `None`, the current date and time in - UTC is assumed - :param locale: the `Locale` object, or a locale string - :param return_city: True or False, if True then return exemplar city (location) - for the time zone - :return: the localized timezone name using location format - - """ - dt, tzinfo = _get_dt_and_tzinfo(dt_or_tzinfo) - locale = Locale.parse(locale) - - if hasattr(tzinfo, 'zone'): - zone = tzinfo.zone - else: - zone = tzinfo.tzname(dt or datetime.utcnow()) - - # Get the canonical time-zone code - zone = get_global('zone_aliases').get(zone, zone) - - info = locale.time_zones.get(zone, {}) - - # Otherwise, if there is only one timezone for the country, return the - # localized country name - region_format = locale.zone_formats['region'] - territory = get_global('zone_territories').get(zone) - if territory not in locale.territories: - territory = 'ZZ' # invalid/unknown - territory_name = locale.territories[territory] - if not return_city and territory and len(get_global('territory_zones').get(territory, [])) == 1: - return region_format % (territory_name) - - # Otherwise, include the city in the output - fallback_format = locale.zone_formats['fallback'] - if 'city' in info: - city_name = info['city'] - else: - metazone = get_global('meta_zones').get(zone) - metazone_info = locale.meta_zones.get(metazone, {}) - if 'city' in metazone_info: - city_name = metazone_info['city'] - elif '/' in zone: - city_name = zone.split('/', 1)[1].replace('_', ' ') - else: - city_name = zone.replace('_', ' ') - - if return_city: - return city_name - return region_format % (fallback_format % { - '0': city_name, - '1': territory_name - }) - - -def get_timezone_name(dt_or_tzinfo=None, width='long', uncommon=False, - locale=LC_TIME, zone_variant=None, return_zone=False): - r"""Return the localized display name for the given timezone. The timezone - may be specified using a ``datetime`` or `tzinfo` object. - - >>> dt = time(15, 30, tzinfo=get_timezone('America/Los_Angeles')) - >>> get_timezone_name(dt, locale='en_US') - u'Pacific Standard Time' - >>> get_timezone_name(dt, locale='en_US', return_zone=True) - 'America/Los_Angeles' - >>> get_timezone_name(dt, width='short', locale='en_US') - u'PST' - - If this function gets passed only a `tzinfo` object and no concrete - `datetime`, the returned display name is indenpendent of daylight savings - time. This can be used for example for selecting timezones, or to set the - time of events that recur across DST changes: - - >>> tz = get_timezone('America/Los_Angeles') - >>> get_timezone_name(tz, locale='en_US') - u'Pacific Time' - >>> get_timezone_name(tz, 'short', locale='en_US') - u'PT' - - If no localized display name for the timezone is available, and the timezone - is associated with a country that uses only a single timezone, the name of - that country is returned, formatted according to the locale: - - >>> tz = get_timezone('Europe/Berlin') - >>> get_timezone_name(tz, locale='de_DE') - u'Mitteleurop\xe4ische Zeit' - >>> get_timezone_name(tz, locale='pt_BR') - u'Hor\xe1rio da Europa Central' - - On the other hand, if the country uses multiple timezones, the city is also - included in the representation: - - >>> tz = get_timezone('America/St_Johns') - >>> get_timezone_name(tz, locale='de_DE') - u'Neufundland-Zeit' - - Note that short format is currently not supported for all timezones and - all locales. This is partially because not every timezone has a short - code in every locale. In that case it currently falls back to the long - format. - - For more information see `LDML Appendix J: Time Zone Display Names - `_ - - .. versionadded:: 0.9 - - .. versionchanged:: 1.0 - Added `zone_variant` support. - - :param dt_or_tzinfo: the ``datetime`` or ``tzinfo`` object that determines - the timezone; if a ``tzinfo`` object is used, the - resulting display name will be generic, i.e. - independent of daylight savings time; if `None`, the - current date in UTC is assumed - :param width: either "long" or "short" - :param uncommon: deprecated and ignored - :param zone_variant: defines the zone variation to return. By default the - variation is defined from the datetime object - passed in. If no datetime object is passed in, the - ``'generic'`` variation is assumed. The following - values are valid: ``'generic'``, ``'daylight'`` and - ``'standard'``. - :param locale: the `Locale` object, or a locale string - :param return_zone: True or False. If true then function - returns long time zone ID - """ - dt, tzinfo = _get_dt_and_tzinfo(dt_or_tzinfo) - locale = Locale.parse(locale) - - if hasattr(tzinfo, 'zone'): - zone = tzinfo.zone - else: - zone = tzinfo.tzname(dt) - - if zone_variant is None: - if dt is None: - zone_variant = 'generic' - else: - dst = tzinfo.dst(dt) - if dst: - zone_variant = 'daylight' - else: - zone_variant = 'standard' - else: - if zone_variant not in ('generic', 'standard', 'daylight'): - raise ValueError('Invalid zone variation') - - # Get the canonical time-zone code - zone = get_global('zone_aliases').get(zone, zone) - if return_zone: - return zone - info = locale.time_zones.get(zone, {}) - # Try explicitly translated zone names first - if width in info: - if zone_variant in info[width]: - return info[width][zone_variant] - - metazone = get_global('meta_zones').get(zone) - if metazone: - metazone_info = locale.meta_zones.get(metazone, {}) - if width in metazone_info: - if zone_variant in metazone_info[width]: - return metazone_info[width][zone_variant] - - # If we have a concrete datetime, we assume that the result can't be - # independent of daylight savings time, so we return the GMT offset - if dt is not None: - return get_timezone_gmt(dt, width=width, locale=locale) - - return get_timezone_location(dt_or_tzinfo, locale=locale) - - -def format_date(date=None, format='medium', locale=LC_TIME): - """Return a date formatted according to the given pattern. - - >>> d = date(2007, 4, 1) - >>> format_date(d, locale='en_US') - u'Apr 1, 2007' - >>> format_date(d, format='full', locale='de_DE') - u'Sonntag, 1. April 2007' - - If you don't want to use the locale default formats, you can specify a - custom date pattern: - - >>> format_date(d, "EEE, MMM d, ''yy", locale='en') - u"Sun, Apr 1, '07" - - :param date: the ``date`` or ``datetime`` object; if `None`, the current - date is used - :param format: one of "full", "long", "medium", or "short", or a custom - date/time pattern - :param locale: a `Locale` object or a locale identifier - """ - if date is None: - date = date_.today() - elif isinstance(date, datetime): - date = date.date() - - locale = Locale.parse(locale) - if format in ('full', 'long', 'medium', 'short'): - format = get_date_format(format, locale=locale) - pattern = parse_pattern(format) - return pattern.apply(date, locale) - - -def format_datetime(datetime=None, format='medium', tzinfo=None, - locale=LC_TIME): - r"""Return a date formatted according to the given pattern. - - >>> dt = datetime(2007, 4, 1, 15, 30) - >>> format_datetime(dt, locale='en_US') - u'Apr 1, 2007, 3:30:00 PM' - - For any pattern requiring the display of the time-zone, the third-party - ``pytz`` package is needed to explicitly specify the time-zone: - - >>> format_datetime(dt, 'full', tzinfo=get_timezone('Europe/Paris'), - ... locale='fr_FR') - u'dimanche 1 avril 2007 \xe0 17:30:00 heure d\u2019\xe9t\xe9 d\u2019Europe centrale' - >>> format_datetime(dt, "yyyy.MM.dd G 'at' HH:mm:ss zzz", - ... tzinfo=get_timezone('US/Eastern'), locale='en') - u'2007.04.01 AD at 11:30:00 EDT' - - :param datetime: the `datetime` object; if `None`, the current date and - time is used - :param format: one of "full", "long", "medium", or "short", or a custom - date/time pattern - :param tzinfo: the timezone to apply to the time for display - :param locale: a `Locale` object or a locale identifier - """ - datetime = _ensure_datetime_tzinfo(_get_datetime(datetime), tzinfo) - - locale = Locale.parse(locale) - if format in ('full', 'long', 'medium', 'short'): - return get_datetime_format(format, locale=locale) \ - .replace("'", "") \ - .replace('{0}', format_time(datetime, format, tzinfo=None, - locale=locale)) \ - .replace('{1}', format_date(datetime, format, locale=locale)) - else: - return parse_pattern(format).apply(datetime, locale) - - -def format_time(time=None, format='medium', tzinfo=None, locale=LC_TIME): - r"""Return a time formatted according to the given pattern. - - >>> t = time(15, 30) - >>> format_time(t, locale='en_US') - u'3:30:00 PM' - >>> format_time(t, format='short', locale='de_DE') - u'15:30' - - If you don't want to use the locale default formats, you can specify a - custom time pattern: - - >>> format_time(t, "hh 'o''clock' a", locale='en') - u"03 o'clock PM" - - For any pattern requiring the display of the time-zone a - timezone has to be specified explicitly: - - >>> t = datetime(2007, 4, 1, 15, 30) - >>> tzinfo = get_timezone('Europe/Paris') - >>> t = tzinfo.localize(t) - >>> format_time(t, format='full', tzinfo=tzinfo, locale='fr_FR') - u'15:30:00 heure d\u2019\xe9t\xe9 d\u2019Europe centrale' - >>> format_time(t, "hh 'o''clock' a, zzzz", tzinfo=get_timezone('US/Eastern'), - ... locale='en') - u"09 o'clock AM, Eastern Daylight Time" - - As that example shows, when this function gets passed a - ``datetime.datetime`` value, the actual time in the formatted string is - adjusted to the timezone specified by the `tzinfo` parameter. If the - ``datetime`` is "naive" (i.e. it has no associated timezone information), - it is assumed to be in UTC. - - These timezone calculations are **not** performed if the value is of type - ``datetime.time``, as without date information there's no way to determine - what a given time would translate to in a different timezone without - information about whether daylight savings time is in effect or not. This - means that time values are left as-is, and the value of the `tzinfo` - parameter is only used to display the timezone name if needed: - - >>> t = time(15, 30) - >>> format_time(t, format='full', tzinfo=get_timezone('Europe/Paris'), - ... locale='fr_FR') - u'15:30:00 heure normale d\u2019Europe centrale' - >>> format_time(t, format='full', tzinfo=get_timezone('US/Eastern'), - ... locale='en_US') - u'3:30:00 PM Eastern Standard Time' - - :param time: the ``time`` or ``datetime`` object; if `None`, the current - time in UTC is used - :param format: one of "full", "long", "medium", or "short", or a custom - date/time pattern - :param tzinfo: the time-zone to apply to the time for display - :param locale: a `Locale` object or a locale identifier - """ - time = _get_time(time, tzinfo) - - locale = Locale.parse(locale) - if format in ('full', 'long', 'medium', 'short'): - format = get_time_format(format, locale=locale) - return parse_pattern(format).apply(time, locale) - - -def format_skeleton(skeleton, datetime=None, tzinfo=None, fuzzy=True, locale=LC_TIME): - r"""Return a time and/or date formatted according to the given pattern. - - The skeletons are defined in the CLDR data and provide more flexibility - than the simple short/long/medium formats, but are a bit harder to use. - The are defined using the date/time symbols without order or punctuation - and map to a suitable format for the given locale. - - >>> t = datetime(2007, 4, 1, 15, 30) - >>> format_skeleton('MMMEd', t, locale='fr') - u'dim. 1 avr.' - >>> format_skeleton('MMMEd', t, locale='en') - u'Sun, Apr 1' - >>> format_skeleton('yMMd', t, locale='fi') # yMMd is not in the Finnish locale; yMd gets used - u'1.4.2007' - >>> format_skeleton('yMMd', t, fuzzy=False, locale='fi') # yMMd is not in the Finnish locale, an error is thrown - Traceback (most recent call last): - ... - KeyError: yMMd - - After the skeleton is resolved to a pattern `format_datetime` is called so - all timezone processing etc is the same as for that. - - :param skeleton: A date time skeleton as defined in the cldr data. - :param datetime: the ``time`` or ``datetime`` object; if `None`, the current - time in UTC is used - :param tzinfo: the time-zone to apply to the time for display - :param fuzzy: If the skeleton is not found, allow choosing a skeleton that's - close enough to it. - :param locale: a `Locale` object or a locale identifier - """ - locale = Locale.parse(locale) - if fuzzy and skeleton not in locale.datetime_skeletons: - skeleton = match_skeleton(skeleton, locale.datetime_skeletons) - format = locale.datetime_skeletons[skeleton] - return format_datetime(datetime, format, tzinfo, locale) - - -TIMEDELTA_UNITS = ( - ('year', 3600 * 24 * 365), - ('month', 3600 * 24 * 30), - ('week', 3600 * 24 * 7), - ('day', 3600 * 24), - ('hour', 3600), - ('minute', 60), - ('second', 1) -) - - -def format_timedelta(delta, granularity='second', threshold=.85, - add_direction=False, format='long', - locale=LC_TIME): - """Return a time delta according to the rules of the given locale. - - >>> format_timedelta(timedelta(weeks=12), locale='en_US') - u'3 months' - >>> format_timedelta(timedelta(seconds=1), locale='es') - u'1 segundo' - - The granularity parameter can be provided to alter the lowest unit - presented, which defaults to a second. - - >>> format_timedelta(timedelta(hours=3), granularity='day', - ... locale='en_US') - u'1 day' - - The threshold parameter can be used to determine at which value the - presentation switches to the next higher unit. A higher threshold factor - means the presentation will switch later. For example: - - >>> format_timedelta(timedelta(hours=23), threshold=0.9, locale='en_US') - u'1 day' - >>> format_timedelta(timedelta(hours=23), threshold=1.1, locale='en_US') - u'23 hours' - - In addition directional information can be provided that informs - the user if the date is in the past or in the future: - - >>> format_timedelta(timedelta(hours=1), add_direction=True, locale='en') - u'in 1 hour' - >>> format_timedelta(timedelta(hours=-1), add_direction=True, locale='en') - u'1 hour ago' - - The format parameter controls how compact or wide the presentation is: - - >>> format_timedelta(timedelta(hours=3), format='short', locale='en') - u'3 hr' - >>> format_timedelta(timedelta(hours=3), format='narrow', locale='en') - u'3h' - - :param delta: a ``timedelta`` object representing the time difference to - format, or the delta in seconds as an `int` value - :param granularity: determines the smallest unit that should be displayed, - the value can be one of "year", "month", "week", "day", - "hour", "minute" or "second" - :param threshold: factor that determines at which point the presentation - switches to the next higher unit - :param add_direction: if this flag is set to `True` the return value will - include directional information. For instance a - positive timedelta will include the information about - it being in the future, a negative will be information - about the value being in the past. - :param format: the format, can be "narrow", "short" or "long". ( - "medium" is deprecated, currently converted to "long" to - maintain compatibility) - :param locale: a `Locale` object or a locale identifier - """ - if format not in ('narrow', 'short', 'medium', 'long'): - raise TypeError('Format must be one of "narrow", "short" or "long"') - if format == 'medium': - warnings.warn('"medium" value for format param of format_timedelta' - ' is deprecated. Use "long" instead', - category=DeprecationWarning) - format = 'long' - if isinstance(delta, timedelta): - seconds = int((delta.days * 86400) + delta.seconds) - else: - seconds = delta - locale = Locale.parse(locale) - - def _iter_patterns(a_unit): - if add_direction: - unit_rel_patterns = locale._data['date_fields'][a_unit] - if seconds >= 0: - yield unit_rel_patterns['future'] - else: - yield unit_rel_patterns['past'] - a_unit = 'duration-' + a_unit - yield locale._data['unit_patterns'].get(a_unit, {}).get(format) - - for unit, secs_per_unit in TIMEDELTA_UNITS: - value = abs(seconds) / secs_per_unit - if value >= threshold or unit == granularity: - if unit == granularity and value > 0: - value = max(1, value) - value = int(round(value)) - plural_form = locale.plural_form(value) - pattern = None - for patterns in _iter_patterns(unit): - if patterns is not None: - pattern = patterns[plural_form] - break - # This really should not happen - if pattern is None: - return u'' - return pattern.replace('{0}', str(value)) - - return u'' - - -def _format_fallback_interval(start, end, skeleton, tzinfo, locale): - if skeleton in locale.datetime_skeletons: # Use the given skeleton - format = lambda dt: format_skeleton(skeleton, dt, tzinfo, locale=locale) - elif all((isinstance(d, date) and not isinstance(d, datetime)) for d in (start, end)): # Both are just dates - format = lambda dt: format_date(dt, locale=locale) - elif all((isinstance(d, time) and not isinstance(d, date)) for d in (start, end)): # Both are times - format = lambda dt: format_time(dt, tzinfo=tzinfo, locale=locale) - else: - format = lambda dt: format_datetime(dt, tzinfo=tzinfo, locale=locale) - - formatted_start = format(start) - formatted_end = format(end) - - if formatted_start == formatted_end: - return format(start) - - return ( - locale.interval_formats.get(None, "{0}-{1}"). - replace("{0}", formatted_start). - replace("{1}", formatted_end) - ) - - -def format_interval(start, end, skeleton=None, tzinfo=None, fuzzy=True, locale=LC_TIME): - """ - Format an interval between two instants according to the locale's rules. - - >>> format_interval(date(2016, 1, 15), date(2016, 1, 17), "yMd", locale="fi") - u'15.\u201317.1.2016' - - >>> format_interval(time(12, 12), time(16, 16), "Hm", locale="en_GB") - '12:12 \u2013 16:16' - - >>> format_interval(time(5, 12), time(16, 16), "hm", locale="en_US") - '5:12 AM \u2013 4:16 PM' - - >>> format_interval(time(16, 18), time(16, 24), "Hm", locale="it") - '16:18\u201316:24' - - If the start instant equals the end instant, the interval is formatted like the instant. - - >>> format_interval(time(16, 18), time(16, 18), "Hm", locale="it") - '16:18' - - Unknown skeletons fall back to "default" formatting. - - >>> format_interval(date(2015, 1, 1), date(2017, 1, 1), "wzq", locale="ja") - '2015/01/01\uff5e2017/01/01' - - >>> format_interval(time(16, 18), time(16, 24), "xxx", locale="ja") - '16:18:00\uff5e16:24:00' - - >>> format_interval(date(2016, 1, 15), date(2016, 1, 17), "xxx", locale="de") - '15.01.2016 \u2013 17.01.2016' - - :param start: First instant (datetime/date/time) - :param end: Second instant (datetime/date/time) - :param skeleton: The "skeleton format" to use for formatting. - :param tzinfo: tzinfo to use (if none is already attached) - :param fuzzy: If the skeleton is not found, allow choosing a skeleton that's - close enough to it. - :param locale: A locale object or identifier. - :return: Formatted interval - """ - locale = Locale.parse(locale) - - # NB: The quote comments below are from the algorithm description in - # http://www.unicode.org/reports/tr35/tr35-dates.html#intervalFormats - - # > Look for the intervalFormatItem element that matches the "skeleton", - # > starting in the current locale and then following the locale fallback - # > chain up to, but not including root. - - interval_formats = locale.interval_formats - - if skeleton not in interval_formats or not skeleton: - # > If no match was found from the previous step, check what the closest - # > match is in the fallback locale chain, as in availableFormats. That - # > is, this allows for adjusting the string value field's width, - # > including adjusting between "MMM" and "MMMM", and using different - # > variants of the same field, such as 'v' and 'z'. - if skeleton and fuzzy: - skeleton = match_skeleton(skeleton, interval_formats) - else: - skeleton = None - if not skeleton: # Still no match whatsoever? - # > Otherwise, format the start and end datetime using the fallback pattern. - return _format_fallback_interval(start, end, skeleton, tzinfo, locale) - - skel_formats = interval_formats[skeleton] - - if start == end: - return format_skeleton(skeleton, start, tzinfo, fuzzy=fuzzy, locale=locale) - - start = _ensure_datetime_tzinfo(_get_datetime(start), tzinfo=tzinfo) - end = _ensure_datetime_tzinfo(_get_datetime(end), tzinfo=tzinfo) - - start_fmt = DateTimeFormat(start, locale=locale) - end_fmt = DateTimeFormat(end, locale=locale) - - # > If a match is found from previous steps, compute the calendar field - # > with the greatest difference between start and end datetime. If there - # > is no difference among any of the fields in the pattern, format as a - # > single date using availableFormats, and return. - - for field in PATTERN_CHAR_ORDER: # These are in largest-to-smallest order - if field in skel_formats: - if start_fmt.extract(field) != end_fmt.extract(field): - # > If there is a match, use the pieces of the corresponding pattern to - # > format the start and end datetime, as above. - return "".join( - parse_pattern(pattern).apply(instant, locale) - for pattern, instant - in zip(skel_formats[field], (start, end)) - ) - - # > Otherwise, format the start and end datetime using the fallback pattern. - - return _format_fallback_interval(start, end, skeleton, tzinfo, locale) - - -def get_period_id(time, tzinfo=None, type=None, locale=LC_TIME): - """ - Get the day period ID for a given time. - - This ID can be used as a key for the period name dictionary. - - >>> get_period_names(locale="de")[get_period_id(time(7, 42), locale="de")] - u'Morgen' - - :param time: The time to inspect. - :param tzinfo: The timezone for the time. See ``format_time``. - :param type: The period type to use. Either "selection" or None. - The selection type is used for selecting among phrases such as - “Your email arrived yesterday evening” or “Your email arrived last night”. - :param locale: the `Locale` object, or a locale string - :return: period ID. Something is always returned -- even if it's just "am" or "pm". - """ - time = _get_time(time, tzinfo) - seconds_past_midnight = int(time.hour * 60 * 60 + time.minute * 60 + time.second) - locale = Locale.parse(locale) - - # The LDML rules state that the rules may not overlap, so iterating in arbitrary - # order should be alright. - for rule_id, rules in locale.day_period_rules.get(type, {}).items(): - for rule in rules: - if "at" in rule and rule["at"] == seconds_past_midnight: - return rule_id - - start_ok = end_ok = False - - if "from" in rule and seconds_past_midnight >= rule["from"]: - start_ok = True - if "to" in rule and seconds_past_midnight <= rule["to"]: - # This rule type does not exist in the present CLDR data; - # excuse the lack of test coverage. - end_ok = True - if "before" in rule and seconds_past_midnight < rule["before"]: - end_ok = True - if "after" in rule and seconds_past_midnight > rule["after"]: - start_ok = True - - if start_ok and end_ok: - return rule_id - - if seconds_past_midnight < 43200: - return "am" - else: - return "pm" - - -def parse_date(string, locale=LC_TIME): - """Parse a date from a string. - - This function uses the date format for the locale as a hint to determine - the order in which the date fields appear in the string. - - >>> parse_date('4/1/04', locale='en_US') - datetime.date(2004, 4, 1) - >>> parse_date('01.04.2004', locale='de_DE') - datetime.date(2004, 4, 1) - - :param string: the string containing the date - :param locale: a `Locale` object or a locale identifier - """ - # TODO: try ISO format first? - format = get_date_format(locale=locale).pattern.lower() - year_idx = format.index('y') - month_idx = format.index('m') - if month_idx < 0: - month_idx = format.index('l') - day_idx = format.index('d') - - indexes = [(year_idx, 'Y'), (month_idx, 'M'), (day_idx, 'D')] - indexes.sort() - indexes = dict([(item[1], idx) for idx, item in enumerate(indexes)]) - - # FIXME: this currently only supports numbers, but should also support month - # names, both in the requested locale, and english - - numbers = re.findall('(\d+)', string) - year = numbers[indexes['Y']] - if len(year) == 2: - year = 2000 + int(year) - else: - year = int(year) - month = int(numbers[indexes['M']]) - day = int(numbers[indexes['D']]) - if month > 12: - month, day = day, month - return date(year, month, day) - - -def parse_time(string, locale=LC_TIME): - """Parse a time from a string. - - This function uses the time format for the locale as a hint to determine - the order in which the time fields appear in the string. - - >>> parse_time('15:30:00', locale='en_US') - datetime.time(15, 30) - - :param string: the string containing the time - :param locale: a `Locale` object or a locale identifier - :return: the parsed time - :rtype: `time` - """ - # TODO: try ISO format first? - format = get_time_format(locale=locale).pattern.lower() - hour_idx = format.index('h') - if hour_idx < 0: - hour_idx = format.index('k') - min_idx = format.index('m') - sec_idx = format.index('s') - - indexes = [(hour_idx, 'H'), (min_idx, 'M'), (sec_idx, 'S')] - indexes.sort() - indexes = dict([(item[1], idx) for idx, item in enumerate(indexes)]) - - # FIXME: support 12 hour clock, and 0-based hour specification - # and seconds should be optional, maybe minutes too - # oh, and time-zones, of course - - numbers = re.findall('(\d+)', string) - hour = int(numbers[indexes['H']]) - minute = int(numbers[indexes['M']]) - second = int(numbers[indexes['S']]) - return time(hour, minute, second) - - -class DateTimePattern(object): - - def __init__(self, pattern, format): - self.pattern = pattern - self.format = format - - def __repr__(self): - return '<%s %r>' % (type(self).__name__, self.pattern) - - def __unicode__(self): - return self.pattern - - def __mod__(self, other): - if type(other) is not DateTimeFormat: - return NotImplemented - return self.format % other - - def apply(self, datetime, locale): - return self % DateTimeFormat(datetime, locale) - - -class DateTimeFormat(object): - - def __init__(self, value, locale): - assert isinstance(value, (date, datetime, time)) - if isinstance(value, (datetime, time)) and value.tzinfo is None: - value = value.replace(tzinfo=UTC) - self.value = value - self.locale = Locale.parse(locale) - - def __getitem__(self, name): - char = name[0] - num = len(name) - if char == 'G': - return self.format_era(char, num) - elif char in ('y', 'Y', 'u'): - return self.format_year(char, num) - elif char in ('Q', 'q'): - return self.format_quarter(char, num) - elif char in ('M', 'L'): - return self.format_month(char, num) - elif char in ('w', 'W'): - return self.format_week(char, num) - elif char == 'd': - return self.format(self.value.day, num) - elif char == 'D': - return self.format_day_of_year(num) - elif char == 'F': - return self.format_day_of_week_in_month() - elif char in ('E', 'e', 'c'): - return self.format_weekday(char, num) - elif char == 'a': - # TODO: Add support for the rest of the period formats (a*, b*, B*) - return self.format_period(char) - elif char == 'h': - if self.value.hour % 12 == 0: - return self.format(12, num) - else: - return self.format(self.value.hour % 12, num) - elif char == 'H': - return self.format(self.value.hour, num) - elif char == 'K': - return self.format(self.value.hour % 12, num) - elif char == 'k': - if self.value.hour == 0: - return self.format(24, num) - else: - return self.format(self.value.hour, num) - elif char == 'm': - return self.format(self.value.minute, num) - elif char == 's': - return self.format(self.value.second, num) - elif char == 'S': - return self.format_frac_seconds(num) - elif char == 'A': - return self.format_milliseconds_in_day(num) - elif char in ('z', 'Z', 'v', 'V', 'x', 'X', 'O'): - return self.format_timezone(char, num) - else: - raise KeyError('Unsupported date/time field %r' % char) - - def extract(self, char): - char = str(char)[0] - if char == 'y': - return self.value.year - elif char == 'M': - return self.value.month - elif char == 'd': - return self.value.day - elif char == 'H': - return self.value.hour - elif char == 'h': - return (self.value.hour % 12 or 12) - elif char == 'm': - return self.value.minute - elif char == 'a': - return int(self.value.hour >= 12) # 0 for am, 1 for pm - else: - raise NotImplementedError("Not implemented: extracting %r from %r" % (char, self.value)) - - def format_era(self, char, num): - width = {3: 'abbreviated', 4: 'wide', 5: 'narrow'}[max(3, num)] - era = int(self.value.year >= 0) - return get_era_names(width, self.locale)[era] - - def format_year(self, char, num): - value = self.value.year - if char.isupper(): - week = self.get_week_number(self.get_day_of_year()) - if week == 0: - value -= 1 - year = self.format(value, num) - if num == 2: - year = year[-2:] - return year - - def format_quarter(self, char, num): - quarter = (self.value.month - 1) // 3 + 1 - if num <= 2: - return ('%%0%dd' % num) % quarter - width = {3: 'abbreviated', 4: 'wide', 5: 'narrow'}[num] - context = {'Q': 'format', 'q': 'stand-alone'}[char] - return get_quarter_names(width, context, self.locale)[quarter] - - def format_month(self, char, num): - if num <= 2: - return ('%%0%dd' % num) % self.value.month - width = {3: 'abbreviated', 4: 'wide', 5: 'narrow'}[num] - context = {'M': 'format', 'L': 'stand-alone'}[char] - return get_month_names(width, context, self.locale)[self.value.month] - - def format_week(self, char, num): - if char.islower(): # week of year - day_of_year = self.get_day_of_year() - week = self.get_week_number(day_of_year) - if week == 0: - date = self.value - timedelta(days=day_of_year) - week = self.get_week_number(self.get_day_of_year(date), - date.weekday()) - return self.format(week, num) - else: # week of month - week = self.get_week_number(self.value.day) - if week == 0: - date = self.value - timedelta(days=self.value.day) - week = self.get_week_number(date.day, date.weekday()) - return '%d' % week - - def format_weekday(self, char='E', num=4): - """ - Return weekday from parsed datetime according to format pattern. - - >>> format = DateTimeFormat(date(2016, 2, 28), Locale.parse('en_US')) - >>> format.format_weekday() - u'Sunday' - - 'E': Day of week - Use one through three letters for the abbreviated day name, four for the full (wide) name, - five for the narrow name, or six for the short name. - >>> format.format_weekday('E',2) - u'Sun' - - 'e': Local day of week. Same as E except adds a numeric value that will depend on the local starting day of the - week, using one or two letters. For this example, Monday is the first day of the week. - >>> format.format_weekday('e',2) - '01' - - 'c': Stand-Alone local day of week - Use one letter for the local numeric value (same as 'e'), three for the - abbreviated day name, four for the full (wide) name, five for the narrow name, or six for the short name. - >>> format.format_weekday('c',1) - '1' - - :param char: pattern format character ('e','E','c') - :param num: count of format character - - """ - if num < 3: - if char.islower(): - value = 7 - self.locale.first_week_day + self.value.weekday() - return self.format(value % 7 + 1, num) - num = 3 - weekday = self.value.weekday() - width = {3: 'abbreviated', 4: 'wide', 5: 'narrow', 6: 'short'}[num] - if char == 'c': - context = 'stand-alone' - else: - context = 'format' - return get_day_names(width, context, self.locale)[weekday] - - def format_day_of_year(self, num): - return self.format(self.get_day_of_year(), num) - - def format_day_of_week_in_month(self): - return '%d' % ((self.value.day - 1) // 7 + 1) - - def format_period(self, char): - period = {0: 'am', 1: 'pm'}[int(self.value.hour >= 12)] - for width in ('wide', 'narrow', 'abbreviated'): - period_names = get_period_names(context='format', width=width, locale=self.locale) - if period in period_names: - return period_names[period] - raise ValueError('Could not format period %s in %s' % (period, self.locale)) - - def format_frac_seconds(self, num): - """ Return fractional seconds. - - Rounds the time's microseconds to the precision given by the number \ - of digits passed in. - """ - value = self.value.microsecond / 1000000 - return self.format(round(value, num) * 10**num, num) - - def format_milliseconds_in_day(self, num): - msecs = self.value.microsecond // 1000 + self.value.second * 1000 + \ - self.value.minute * 60000 + self.value.hour * 3600000 - return self.format(msecs, num) - - def format_timezone(self, char, num): - width = {3: 'short', 4: 'long', 5: 'iso8601'}[max(3, num)] - if char == 'z': - return get_timezone_name(self.value, width, locale=self.locale) - elif char == 'Z': - if num == 5: - return get_timezone_gmt(self.value, width, locale=self.locale, return_z=True) - return get_timezone_gmt(self.value, width, locale=self.locale) - elif char == 'O': - if num == 4: - return get_timezone_gmt(self.value, width, locale=self.locale) - # TODO: To add support for O:1 - elif char == 'v': - return get_timezone_name(self.value.tzinfo, width, - locale=self.locale) - elif char == 'V': - if num == 1: - return get_timezone_name(self.value.tzinfo, width, - uncommon=True, locale=self.locale) - elif num == 2: - return get_timezone_name(self.value.tzinfo, locale=self.locale, return_zone=True) - elif num == 3: - return get_timezone_location(self.value.tzinfo, locale=self.locale, return_city=True) - return get_timezone_location(self.value.tzinfo, locale=self.locale) - # Included additional elif condition to add support for 'Xx' in timezone format - elif char == 'X': - if num == 1: - return get_timezone_gmt(self.value, width='iso8601_short', locale=self.locale, - return_z=True) - elif num in (2, 4): - return get_timezone_gmt(self.value, width='short', locale=self.locale, - return_z=True) - elif num in (3, 5): - return get_timezone_gmt(self.value, width='iso8601', locale=self.locale, - return_z=True) - elif char == 'x': - if num == 1: - return get_timezone_gmt(self.value, width='iso8601_short', locale=self.locale) - elif num in (2, 4): - return get_timezone_gmt(self.value, width='short', locale=self.locale) - elif num in (3, 5): - return get_timezone_gmt(self.value, width='iso8601', locale=self.locale) - - def format(self, value, length): - return ('%%0%dd' % length) % value - - def get_day_of_year(self, date=None): - if date is None: - date = self.value - return (date - date.replace(month=1, day=1)).days + 1 - - def get_week_number(self, day_of_period, day_of_week=None): - """Return the number of the week of a day within a period. This may be - the week number in a year or the week number in a month. - - Usually this will return a value equal to or greater than 1, but if the - first week of the period is so short that it actually counts as the last - week of the previous period, this function will return 0. - - >>> format = DateTimeFormat(date(2006, 1, 8), Locale.parse('de_DE')) - >>> format.get_week_number(6) - 1 - - >>> format = DateTimeFormat(date(2006, 1, 8), Locale.parse('en_US')) - >>> format.get_week_number(6) - 2 - - :param day_of_period: the number of the day in the period (usually - either the day of month or the day of year) - :param day_of_week: the week day; if ommitted, the week day of the - current date is assumed - """ - if day_of_week is None: - day_of_week = self.value.weekday() - first_day = (day_of_week - self.locale.first_week_day - - day_of_period + 1) % 7 - if first_day < 0: - first_day += 7 - week_number = (day_of_period + first_day - 1) // 7 - if 7 - first_day >= self.locale.min_week_days: - week_number += 1 - return week_number - - -PATTERN_CHARS = { - 'G': [1, 2, 3, 4, 5], # era - 'y': None, 'Y': None, 'u': None, # year - 'Q': [1, 2, 3, 4, 5], 'q': [1, 2, 3, 4, 5], # quarter - 'M': [1, 2, 3, 4, 5], 'L': [1, 2, 3, 4, 5], # month - 'w': [1, 2], 'W': [1], # week - 'd': [1, 2], 'D': [1, 2, 3], 'F': [1], 'g': None, # day - 'E': [1, 2, 3, 4, 5, 6], 'e': [1, 2, 3, 4, 5, 6], 'c': [1, 3, 4, 5, 6], # week day - 'a': [1], # period - 'h': [1, 2], 'H': [1, 2], 'K': [1, 2], 'k': [1, 2], # hour - 'm': [1, 2], # minute - 's': [1, 2], 'S': None, 'A': None, # second - 'z': [1, 2, 3, 4], 'Z': [1, 2, 3, 4, 5], 'O': [1, 4], 'v': [1, 4], # zone - 'V': [1, 2, 3, 4], 'x': [1, 2, 3, 4, 5], 'X': [1, 2, 3, 4, 5] # zone -} - -#: The pattern characters declared in the Date Field Symbol Table -#: (http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table) -#: in order of decreasing magnitude. -PATTERN_CHAR_ORDER = "GyYuUQqMLlwWdDFgEecabBChHKkjJmsSAzZOvVXx" - -_pattern_cache = {} - - -def parse_pattern(pattern): - """Parse date, time, and datetime format patterns. - - >>> parse_pattern("MMMMd").format - u'%(MMMM)s%(d)s' - >>> parse_pattern("MMM d, yyyy").format - u'%(MMM)s %(d)s, %(yyyy)s' - - Pattern can contain literal strings in single quotes: - - >>> parse_pattern("H:mm' Uhr 'z").format - u'%(H)s:%(mm)s Uhr %(z)s' - - An actual single quote can be used by using two adjacent single quote - characters: - - >>> parse_pattern("hh' o''clock'").format - u"%(hh)s o'clock" - - :param pattern: the formatting pattern to parse - """ - if type(pattern) is DateTimePattern: - return pattern - - if pattern in _pattern_cache: - return _pattern_cache[pattern] - - result = [] - - for tok_type, tok_value in tokenize_pattern(pattern): - if tok_type == "chars": - result.append(tok_value.replace('%', '%%')) - elif tok_type == "field": - fieldchar, fieldnum = tok_value - limit = PATTERN_CHARS[fieldchar] - if limit and fieldnum not in limit: - raise ValueError('Invalid length for field: %r' - % (fieldchar * fieldnum)) - result.append('%%(%s)s' % (fieldchar * fieldnum)) - else: - raise NotImplementedError("Unknown token type: %s" % tok_type) - - _pattern_cache[pattern] = pat = DateTimePattern(pattern, u''.join(result)) - return pat - - -def tokenize_pattern(pattern): - """ - Tokenize date format patterns. - - Returns a list of (token_type, token_value) tuples. - - ``token_type`` may be either "chars" or "field". - - For "chars" tokens, the value is the literal value. - - For "field" tokens, the value is a tuple of (field character, repetition count). - - :param pattern: Pattern string - :type pattern: str - :rtype: list[tuple] - """ - result = [] - quotebuf = None - charbuf = [] - fieldchar = [''] - fieldnum = [0] - - def append_chars(): - result.append(('chars', ''.join(charbuf).replace('\0', "'"))) - del charbuf[:] - - def append_field(): - result.append(('field', (fieldchar[0], fieldnum[0]))) - fieldchar[0] = '' - fieldnum[0] = 0 - - for idx, char in enumerate(pattern.replace("''", '\0')): - if quotebuf is None: - if char == "'": # quote started - if fieldchar[0]: - append_field() - elif charbuf: - append_chars() - quotebuf = [] - elif char in PATTERN_CHARS: - if charbuf: - append_chars() - if char == fieldchar[0]: - fieldnum[0] += 1 - else: - if fieldchar[0]: - append_field() - fieldchar[0] = char - fieldnum[0] = 1 - else: - if fieldchar[0]: - append_field() - charbuf.append(char) - - elif quotebuf is not None: - if char == "'": # end of quote - charbuf.extend(quotebuf) - quotebuf = None - else: # inside quote - quotebuf.append(char) - - if fieldchar[0]: - append_field() - elif charbuf: - append_chars() - - return result - - -def untokenize_pattern(tokens): - """ - Turn a date format pattern token stream back into a string. - - This is the reverse operation of ``tokenize_pattern``. - - :type tokens: Iterable[tuple] - :rtype: str - """ - output = [] - for tok_type, tok_value in tokens: - if tok_type == "field": - output.append(tok_value[0] * tok_value[1]) - elif tok_type == "chars": - if not any(ch in PATTERN_CHARS for ch in tok_value): # No need to quote - output.append(tok_value) - else: - output.append("'%s'" % tok_value.replace("'", "''")) - return "".join(output) - - -def split_interval_pattern(pattern): - """ - Split an interval-describing datetime pattern into multiple pieces. - - > The pattern is then designed to be broken up into two pieces by determining the first repeating field. - - http://www.unicode.org/reports/tr35/tr35-dates.html#intervalFormats - - >>> split_interval_pattern(u'E d.M. \u2013 E d.M.') - [u'E d.M. \u2013 ', 'E d.M.'] - >>> split_interval_pattern("Y 'text' Y 'more text'") - ["Y 'text '", "Y 'more text'"] - >>> split_interval_pattern(u"E, MMM d \u2013 E") - [u'E, MMM d \u2013 ', u'E'] - >>> split_interval_pattern("MMM d") - ['MMM d'] - >>> split_interval_pattern("y G") - ['y G'] - >>> split_interval_pattern(u"MMM d \u2013 d") - [u'MMM d \u2013 ', u'd'] - - :param pattern: Interval pattern string - :return: list of "subpatterns" - """ - - seen_fields = set() - parts = [[]] - - for tok_type, tok_value in tokenize_pattern(pattern): - if tok_type == "field": - if tok_value[0] in seen_fields: # Repeated field - parts.append([]) - seen_fields.clear() - seen_fields.add(tok_value[0]) - parts[-1].append((tok_type, tok_value)) - - return [untokenize_pattern(tokens) for tokens in parts] - - -def match_skeleton(skeleton, options, allow_different_fields=False): - """ - Find the closest match for the given datetime skeleton among the options given. - - This uses the rules outlined in the TR35 document. - - >>> match_skeleton('yMMd', ('yMd', 'yMMMd')) - 'yMd' - - >>> match_skeleton('yMMd', ('jyMMd',), allow_different_fields=True) - 'jyMMd' - - >>> match_skeleton('yMMd', ('qyMMd',), allow_different_fields=False) - - >>> match_skeleton('hmz', ('hmv',)) - 'hmv' - - :param skeleton: The skeleton to match - :type skeleton: str - :param options: An iterable of other skeletons to match against - :type options: Iterable[str] - :return: The closest skeleton match, or if no match was found, None. - :rtype: str|None - """ - - # TODO: maybe implement pattern expansion? - - # Based on the implementation in - # http://source.icu-project.org/repos/icu/icu4j/trunk/main/classes/core/src/com/ibm/icu/text/DateIntervalInfo.java - - # Filter out falsy values and sort for stability; when `interval_formats` is passed in, there may be a None key. - options = sorted(option for option in options if option) - - if 'z' in skeleton and not any('z' in option for option in options): - skeleton = skeleton.replace('z', 'v') - - get_input_field_width = dict(t[1] for t in tokenize_pattern(skeleton) if t[0] == "field").get - best_skeleton = None - best_distance = None - for option in options: - get_opt_field_width = dict(t[1] for t in tokenize_pattern(option) if t[0] == "field").get - distance = 0 - for field in PATTERN_CHARS: - input_width = get_input_field_width(field, 0) - opt_width = get_opt_field_width(field, 0) - if input_width == opt_width: - continue - if opt_width == 0 or input_width == 0: - if not allow_different_fields: # This one is not okay - option = None - break - distance += 0x1000 # Magic weight constant for "entirely different fields" - elif field == 'M' and ((input_width > 2 and opt_width <= 2) or (input_width <= 2 and opt_width > 2)): - distance += 0x100 # Magic weight for "text turns into a number" - else: - distance += abs(input_width - opt_width) - - if not option: # We lost the option along the way (probably due to "allow_different_fields") - continue - - if not best_skeleton or distance < best_distance: - best_skeleton = option - best_distance = distance - - if distance == 0: # Found a perfect match! - break - - return best_skeleton diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/global.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/global.dat deleted file mode 100644 index 722de1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/global.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/languages.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/languages.py deleted file mode 100644 index 40f5d98..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/languages.py +++ /dev/null @@ -1,71 +0,0 @@ -# -- encoding: UTF-8 -- -from babel.core import get_global - - -def get_official_languages(territory, regional=False, de_facto=False): - """ - Get the official language(s) for the given territory. - - The language codes, if any are known, are returned in order of descending popularity. - - If the `regional` flag is set, then languages which are regionally official are also returned. - - If the `de_facto` flag is set, then languages which are "de facto" official are also returned. - - .. warning:: Note that the data is as up to date as the current version of the CLDR used - by Babel. If you need scientifically accurate information, use another source! - - :param territory: Territory code - :type territory: str - :param regional: Whether to return regionally official languages too - :type regional: bool - :param de_facto: Whether to return de-facto official languages too - :type de_facto: bool - :return: Tuple of language codes - :rtype: tuple[str] - """ - - territory = str(territory).upper() - allowed_stati = set(("official",)) - if regional: - allowed_stati.add("official_regional") - if de_facto: - allowed_stati.add("de_facto_official") - - languages = get_global("territory_languages").get(territory, {}) - pairs = [ - (info['population_percent'], language) - for language, info in languages.items() - if info.get('official_status') in allowed_stati - ] - pairs.sort(reverse=True) - return tuple(lang for _, lang in pairs) - - -def get_territory_language_info(territory): - """ - Get a dictionary of language information for a territory. - - The dictionary is keyed by language code; the values are dicts with more information. - - The following keys are currently known for the values: - - * `population_percent`: The percentage of the territory's population speaking the - language. - * `official_status`: An optional string describing the officiality status of the language. - Known values are "official", "official_regional" and "de_facto_official". - - .. warning:: Note that the data is as up to date as the current version of the CLDR used - by Babel. If you need scientifically accurate information, use another source! - - .. note:: Note that the format of the dict returned may change between Babel versions. - - See http://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html - - :param territory: Territory code - :type territory: str - :return: Language information dictionary - :rtype: dict[str, dict] - """ - territory = str(territory).upper() - return get_global("territory_languages").get(territory, {}).copy() diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/lists.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/lists.py deleted file mode 100644 index 82e5590..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/lists.py +++ /dev/null @@ -1,48 +0,0 @@ -# -*- coding: utf-8 -*- -""" - babel.lists - ~~~~~~~~~~~ - - Locale dependent formatting of lists. - - The default locale for the functions in this module is determined by the - following environment variables, in that order: - - * ``LC_ALL``, and - * ``LANG`` - - :copyright: (c) 2015 by the Babel Team. - :license: BSD, see LICENSE for more details. -""" - -from babel.core import Locale, default_locale - -DEFAULT_LOCALE = default_locale() - - -def format_list(lst, locale=DEFAULT_LOCALE): - """ - Format the items in `lst` as a list. - - >>> format_list(['apples', 'oranges', 'pears'], 'en') - u'apples, oranges, and pears' - >>> format_list(['apples', 'oranges', 'pears'], 'zh') - u'apples\u3001oranges\u548cpears' - - :param lst: a sequence of items to format in to a list - :param locale: the locale - """ - locale = Locale.parse(locale) - if not lst: - return '' - if len(lst) == 1: - return lst[0] - if len(lst) == 2: - return locale.list_patterns['2'].format(*lst) - - result = locale.list_patterns['start'].format(lst[0], lst[1]) - for elem in lst[2:-1]: - result = locale.list_patterns['middle'].format(result, elem) - result = locale.list_patterns['end'].format(result, lst[-1]) - - return result diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/af.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/af.dat deleted file mode 100644 index f13005b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/af.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/af_NA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/af_NA.dat deleted file mode 100644 index 17ae33f..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/af_NA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/af_ZA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/af_ZA.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/af_ZA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/agq.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/agq.dat deleted file mode 100644 index 83744b1..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/agq.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/agq_CM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/agq_CM.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/agq_CM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ak.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ak.dat deleted file mode 100644 index 090e1c0..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ak.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ak_GH.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ak_GH.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ak_GH.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/am.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/am.dat deleted file mode 100644 index 059447c..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/am.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/am_ET.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/am_ET.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/am_ET.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar.dat deleted file mode 100644 index ff4427f..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_001.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_001.dat deleted file mode 100644 index 81603a3..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_001.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_AE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_AE.dat deleted file mode 100644 index 77cdbd6..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_AE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_BH.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_BH.dat deleted file mode 100644 index 6ef5435..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_BH.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_DJ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_DJ.dat deleted file mode 100644 index 798ada4..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_DJ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_DZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_DZ.dat deleted file mode 100644 index e5a35b9..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_DZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_EG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_EG.dat deleted file mode 100644 index 67c65fb..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_EG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_EH.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_EH.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_EH.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_ER.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_ER.dat deleted file mode 100644 index 509dc59..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_ER.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_IL.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_IL.dat deleted file mode 100644 index 5262dbb..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_IL.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_IQ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_IQ.dat deleted file mode 100644 index db60d29..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_IQ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_JO.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_JO.dat deleted file mode 100644 index 01689f4..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_JO.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_KM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_KM.dat deleted file mode 100644 index e81dc0a..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_KM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_KW.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_KW.dat deleted file mode 100644 index 6ef5435..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_KW.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_LB.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_LB.dat deleted file mode 100644 index 4b5a2ee..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_LB.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_LY.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_LY.dat deleted file mode 100644 index 2bd52d4..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_LY.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_MA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_MA.dat deleted file mode 100644 index 9fe954e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_MA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_MR.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_MR.dat deleted file mode 100644 index 68e2c3e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_MR.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_OM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_OM.dat deleted file mode 100644 index 6ef5435..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_OM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_PS.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_PS.dat deleted file mode 100644 index c932e0a..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_PS.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_QA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_QA.dat deleted file mode 100644 index 6ef5435..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_QA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_SA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_SA.dat deleted file mode 100644 index e54f1ec..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_SA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_SD.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_SD.dat deleted file mode 100644 index 6ef5435..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_SD.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_SO.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_SO.dat deleted file mode 100644 index 2e44ae2..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_SO.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_SS.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_SS.dat deleted file mode 100644 index a51d6b9..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_SS.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_SY.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_SY.dat deleted file mode 100644 index 01689f4..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_SY.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_TD.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_TD.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_TD.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_TN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_TN.dat deleted file mode 100644 index 00437cb..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_TN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_YE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_YE.dat deleted file mode 100644 index e54f1ec..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ar_YE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/as.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/as.dat deleted file mode 100644 index 5b30190..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/as.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/as_IN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/as_IN.dat deleted file mode 100644 index 2e3173b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/as_IN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/asa.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/asa.dat deleted file mode 100644 index 629d726..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/asa.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/asa_TZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/asa_TZ.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/asa_TZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ast.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ast.dat deleted file mode 100644 index 61bfd46..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ast.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ast_ES.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ast_ES.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ast_ES.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/az.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/az.dat deleted file mode 100644 index b70d043..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/az.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/az_Cyrl.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/az_Cyrl.dat deleted file mode 100644 index b76a2c3..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/az_Cyrl.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/az_Cyrl_AZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/az_Cyrl_AZ.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/az_Cyrl_AZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/az_Latn.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/az_Latn.dat deleted file mode 100644 index effd506..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/az_Latn.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/az_Latn_AZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/az_Latn_AZ.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/az_Latn_AZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bas.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bas.dat deleted file mode 100644 index f198c93..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bas.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bas_CM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bas_CM.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bas_CM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/be.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/be.dat deleted file mode 100644 index 0a358fd..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/be.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/be_BY.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/be_BY.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/be_BY.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bem.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bem.dat deleted file mode 100644 index a9f9ae4..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bem.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bem_ZM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bem_ZM.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bem_ZM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bez.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bez.dat deleted file mode 100644 index 756e189..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bez.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bez_TZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bez_TZ.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bez_TZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bg.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bg.dat deleted file mode 100644 index e2de4dc..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bg.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bg_BG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bg_BG.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bg_BG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bm.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bm.dat deleted file mode 100644 index aca5bbd..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bm.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bm_ML.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bm_ML.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bm_ML.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bn.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bn.dat deleted file mode 100644 index 69c6f1b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bn.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bn_BD.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bn_BD.dat deleted file mode 100644 index 71dbca2..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bn_BD.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bn_IN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bn_IN.dat deleted file mode 100644 index 2e3173b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bn_IN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bo.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bo.dat deleted file mode 100644 index d878dfa..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bo.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bo_CN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bo_CN.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bo_CN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bo_IN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bo_IN.dat deleted file mode 100644 index 7ecbd3c..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bo_IN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/br.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/br.dat deleted file mode 100644 index ae77d88..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/br.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/br_FR.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/br_FR.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/br_FR.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/brx.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/brx.dat deleted file mode 100644 index 5bbd966..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/brx.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/brx_IN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/brx_IN.dat deleted file mode 100644 index 2e3173b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/brx_IN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bs.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bs.dat deleted file mode 100644 index 641d1d1..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bs.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bs_Cyrl.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bs_Cyrl.dat deleted file mode 100644 index 57c1159..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bs_Cyrl.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bs_Cyrl_BA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bs_Cyrl_BA.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bs_Cyrl_BA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bs_Latn.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bs_Latn.dat deleted file mode 100644 index 4c7255e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bs_Latn.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bs_Latn_BA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bs_Latn_BA.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/bs_Latn_BA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ca.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ca.dat deleted file mode 100644 index 8d7f2dc..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ca.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ca_AD.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ca_AD.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ca_AD.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ca_ES.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ca_ES.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ca_ES.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ca_ES_VALENCIA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ca_ES_VALENCIA.dat deleted file mode 100644 index 495f020..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ca_ES_VALENCIA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ca_FR.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ca_FR.dat deleted file mode 100644 index 300089b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ca_FR.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ca_IT.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ca_IT.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ca_IT.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ce.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ce.dat deleted file mode 100644 index 6339fd9..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ce.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ce_RU.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ce_RU.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ce_RU.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cgg.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cgg.dat deleted file mode 100644 index 39c4a23..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cgg.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cgg_UG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cgg_UG.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cgg_UG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/chr.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/chr.dat deleted file mode 100644 index dec59b6..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/chr.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/chr_US.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/chr_US.dat deleted file mode 100644 index a3e9cfa..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/chr_US.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ckb.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ckb.dat deleted file mode 100644 index 7153b98..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ckb.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ckb_IQ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ckb_IQ.dat deleted file mode 100644 index 6ef5435..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ckb_IQ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ckb_IR.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ckb_IR.dat deleted file mode 100644 index 534294e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ckb_IR.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cs.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cs.dat deleted file mode 100644 index 8c62eee..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cs.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cs_CZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cs_CZ.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cs_CZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cu.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cu.dat deleted file mode 100644 index 2f36619..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cu.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cu_RU.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cu_RU.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cu_RU.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cy.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cy.dat deleted file mode 100644 index f8811a7..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cy.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cy_GB.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cy_GB.dat deleted file mode 100644 index bf35389..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/cy_GB.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/da.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/da.dat deleted file mode 100644 index 733268b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/da.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/da_DK.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/da_DK.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/da_DK.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/da_GL.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/da_GL.dat deleted file mode 100644 index 47adae3..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/da_GL.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dav.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dav.dat deleted file mode 100644 index 39c4ca7..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dav.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dav_KE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dav_KE.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dav_KE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de.dat deleted file mode 100644 index 01a1794..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de_AT.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de_AT.dat deleted file mode 100644 index b1ec8fa..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de_AT.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de_BE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de_BE.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de_BE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de_CH.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de_CH.dat deleted file mode 100644 index 7dae4b0..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de_CH.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de_DE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de_DE.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de_DE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de_LI.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de_LI.dat deleted file mode 100644 index 8760597..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de_LI.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de_LU.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de_LU.dat deleted file mode 100644 index a8ceb1f..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/de_LU.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dje.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dje.dat deleted file mode 100644 index f7b6677..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dje.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dje_NE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dje_NE.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dje_NE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dsb.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dsb.dat deleted file mode 100644 index 52d6909..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dsb.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dsb_DE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dsb_DE.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dsb_DE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dua.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dua.dat deleted file mode 100644 index d27be09..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dua.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dua_CM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dua_CM.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dua_CM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dyo.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dyo.dat deleted file mode 100644 index f1a2078..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dyo.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dyo_SN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dyo_SN.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dyo_SN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dz.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dz.dat deleted file mode 100644 index 18f72f2..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dz.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dz_BT.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dz_BT.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/dz_BT.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ebu.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ebu.dat deleted file mode 100644 index fe64ba4..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ebu.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ebu_KE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ebu_KE.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ebu_KE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ee.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ee.dat deleted file mode 100644 index 7e10385..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ee.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ee_GH.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ee_GH.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ee_GH.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ee_TG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ee_TG.dat deleted file mode 100644 index e81dc0a..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ee_TG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/el.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/el.dat deleted file mode 100644 index 2b0c586..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/el.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/el_CY.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/el_CY.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/el_CY.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/el_GR.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/el_GR.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/el_GR.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en.dat deleted file mode 100644 index 8b03cff..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_001.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_001.dat deleted file mode 100644 index 778cbec..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_001.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_150.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_150.dat deleted file mode 100644 index ad02956..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_150.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_AG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_AG.dat deleted file mode 100644 index b8f7203..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_AG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_AI.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_AI.dat deleted file mode 100644 index 40aafa5..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_AI.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_AS.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_AS.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_AS.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_AT.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_AT.dat deleted file mode 100644 index f86a520..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_AT.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_AU.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_AU.dat deleted file mode 100644 index e5619cf..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_AU.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BB.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BB.dat deleted file mode 100644 index 94ac305..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BB.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BE.dat deleted file mode 100644 index ad1d6ad..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BI.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BI.dat deleted file mode 100644 index cb07df7..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BI.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BM.dat deleted file mode 100644 index 6cd525d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BS.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BS.dat deleted file mode 100644 index a626d47..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BS.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BW.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BW.dat deleted file mode 100644 index 7e32fb3..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BW.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BZ.dat deleted file mode 100644 index c2cf5d9..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_BZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CA.dat deleted file mode 100644 index d10ae4a..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CC.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CC.dat deleted file mode 100644 index cca18e0..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CC.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CH.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CH.dat deleted file mode 100644 index f350895..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CH.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CK.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CK.dat deleted file mode 100644 index 6c982fa..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CK.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CM.dat deleted file mode 100644 index c01aaa0..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CX.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CX.dat deleted file mode 100644 index cca18e0..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CX.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CY.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CY.dat deleted file mode 100644 index b6abb23..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_CY.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_DE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_DE.dat deleted file mode 100644 index 7f85707..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_DE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_DG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_DG.dat deleted file mode 100644 index e81dc0a..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_DG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_DK.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_DK.dat deleted file mode 100644 index 9458bb3..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_DK.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_DM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_DM.dat deleted file mode 100644 index b8f7203..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_DM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_ER.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_ER.dat deleted file mode 100644 index 7335f03..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_ER.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_FI.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_FI.dat deleted file mode 100644 index d92be75..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_FI.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_FJ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_FJ.dat deleted file mode 100644 index 96801c3..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_FJ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_FK.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_FK.dat deleted file mode 100644 index 2d1d657..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_FK.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_FM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_FM.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_FM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GB.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GB.dat deleted file mode 100644 index 3c8d46c..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GB.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GD.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GD.dat deleted file mode 100644 index f67c516..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GD.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GG.dat deleted file mode 100644 index 8bf64bc..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GH.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GH.dat deleted file mode 100644 index 538f90f..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GH.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GI.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GI.dat deleted file mode 100644 index ef5786f..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GI.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GM.dat deleted file mode 100644 index d69c204..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GU.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GU.dat deleted file mode 100644 index 8fd3e76..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GU.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GY.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GY.dat deleted file mode 100644 index 526875a..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_GY.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_HK.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_HK.dat deleted file mode 100644 index 8d16016..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_HK.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_IE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_IE.dat deleted file mode 100644 index 5b99f49..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_IE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_IL.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_IL.dat deleted file mode 100644 index 5672204..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_IL.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_IM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_IM.dat deleted file mode 100644 index 8bf64bc..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_IM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_IN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_IN.dat deleted file mode 100644 index 4493a81..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_IN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_IO.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_IO.dat deleted file mode 100644 index e81dc0a..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_IO.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_JE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_JE.dat deleted file mode 100644 index 8bf64bc..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_JE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_JM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_JM.dat deleted file mode 100644 index e869938..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_JM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_KE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_KE.dat deleted file mode 100644 index a8992a5..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_KE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_KI.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_KI.dat deleted file mode 100644 index 812aeac..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_KI.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_KN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_KN.dat deleted file mode 100644 index f67c516..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_KN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_KY.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_KY.dat deleted file mode 100644 index dbd8585..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_KY.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_LC.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_LC.dat deleted file mode 100644 index f67c516..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_LC.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_LR.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_LR.dat deleted file mode 100644 index ca40edd..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_LR.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_LS.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_LS.dat deleted file mode 100644 index 9187f16..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_LS.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MG.dat deleted file mode 100644 index 32a8e4e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MH.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MH.dat deleted file mode 100644 index 275a110..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MH.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MO.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MO.dat deleted file mode 100644 index e9949a1..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MO.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MP.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MP.dat deleted file mode 100644 index 04d04bf..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MP.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MS.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MS.dat deleted file mode 100644 index 844d9b6..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MS.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MT.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MT.dat deleted file mode 100644 index e48e9dd..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MT.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MU.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MU.dat deleted file mode 100644 index 3cea0e2..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MU.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MW.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MW.dat deleted file mode 100644 index ee5bbc9..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MW.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MY.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MY.dat deleted file mode 100644 index 02a5774..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_MY.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NA.dat deleted file mode 100644 index 23f76c5..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NF.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NF.dat deleted file mode 100644 index cca18e0..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NF.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NG.dat deleted file mode 100644 index 8eeea13..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NL.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NL.dat deleted file mode 100644 index 6a1ebed..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NL.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NR.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NR.dat deleted file mode 100644 index cca18e0..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NR.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NU.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NU.dat deleted file mode 100644 index 6c982fa..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NU.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NZ.dat deleted file mode 100644 index 85d5ada..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_NZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_PG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_PG.dat deleted file mode 100644 index b67e10f..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_PG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_PH.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_PH.dat deleted file mode 100644 index 804ac28..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_PH.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_PK.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_PK.dat deleted file mode 100644 index 29bfe7b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_PK.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_PN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_PN.dat deleted file mode 100644 index 6c982fa..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_PN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_PR.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_PR.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_PR.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_PW.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_PW.dat deleted file mode 100644 index 04475e4..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_PW.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_RW.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_RW.dat deleted file mode 100644 index 2bc76ad..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_RW.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SB.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SB.dat deleted file mode 100644 index 0caddda..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SB.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SC.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SC.dat deleted file mode 100644 index 00057d2..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SC.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SD.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SD.dat deleted file mode 100644 index 8d724a1..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SD.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SE.dat deleted file mode 100644 index 7427840..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SG.dat deleted file mode 100644 index 642a708..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SH.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SH.dat deleted file mode 100644 index 83affa4..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SH.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SI.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SI.dat deleted file mode 100644 index 3f57366..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SI.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SL.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SL.dat deleted file mode 100644 index 48bb0c5..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SL.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SS.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SS.dat deleted file mode 100644 index 0dd2047..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SS.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SX.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SX.dat deleted file mode 100644 index d4b9caa..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SX.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SZ.dat deleted file mode 100644 index 0d18e49..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_SZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_TC.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_TC.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_TC.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_TK.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_TK.dat deleted file mode 100644 index 6c982fa..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_TK.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_TO.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_TO.dat deleted file mode 100644 index d7ca87d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_TO.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_TT.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_TT.dat deleted file mode 100644 index 8d1a24e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_TT.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_TV.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_TV.dat deleted file mode 100644 index cca18e0..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_TV.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_TZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_TZ.dat deleted file mode 100644 index 12faf11..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_TZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_UG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_UG.dat deleted file mode 100644 index f669af4..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_UG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_UM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_UM.dat deleted file mode 100644 index a3e9cfa..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_UM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_US.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_US.dat deleted file mode 100644 index a3e9cfa..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_US.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_US_POSIX.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_US_POSIX.dat deleted file mode 100644 index 67e9d63..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_US_POSIX.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_VC.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_VC.dat deleted file mode 100644 index f67c516..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_VC.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_VG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_VG.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_VG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_VI.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_VI.dat deleted file mode 100644 index a3e9cfa..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_VI.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_VU.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_VU.dat deleted file mode 100644 index 28a3040..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_VU.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_WS.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_WS.dat deleted file mode 100644 index f75d014..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_WS.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_ZA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_ZA.dat deleted file mode 100644 index 3e72421..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_ZA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_ZM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_ZM.dat deleted file mode 100644 index 66306a2..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_ZM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_ZW.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_ZW.dat deleted file mode 100644 index c795fc6..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/en_ZW.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/eo.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/eo.dat deleted file mode 100644 index 94d6b11..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/eo.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/eo_001.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/eo_001.dat deleted file mode 100644 index 373facb..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/eo_001.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es.dat deleted file mode 100644 index d0d650e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_419.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_419.dat deleted file mode 100644 index 7f40b6b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_419.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_AR.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_AR.dat deleted file mode 100644 index 43e653d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_AR.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_BO.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_BO.dat deleted file mode 100644 index 4043adf..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_BO.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_CL.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_CL.dat deleted file mode 100644 index 5ae6601..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_CL.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_CO.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_CO.dat deleted file mode 100644 index 0a721e2..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_CO.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_CR.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_CR.dat deleted file mode 100644 index 3e78fe0..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_CR.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_CU.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_CU.dat deleted file mode 100644 index d9824b1..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_CU.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_DO.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_DO.dat deleted file mode 100644 index eb32ea3..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_DO.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_EA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_EA.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_EA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_EC.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_EC.dat deleted file mode 100644 index 967b9a1..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_EC.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_ES.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_ES.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_ES.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_GQ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_GQ.dat deleted file mode 100644 index a34d155..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_GQ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_GT.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_GT.dat deleted file mode 100644 index c444f6a..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_GT.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_HN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_HN.dat deleted file mode 100644 index 6f8ab95..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_HN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_IC.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_IC.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_IC.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_MX.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_MX.dat deleted file mode 100644 index 9adbc5a..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_MX.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_NI.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_NI.dat deleted file mode 100644 index 6edc54b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_NI.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_PA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_PA.dat deleted file mode 100644 index d2e2fe0..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_PA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_PE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_PE.dat deleted file mode 100644 index dc9d0aa..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_PE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_PH.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_PH.dat deleted file mode 100644 index 167400d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_PH.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_PR.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_PR.dat deleted file mode 100644 index 72bab73..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_PR.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_PY.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_PY.dat deleted file mode 100644 index 50cfc25..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_PY.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_SV.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_SV.dat deleted file mode 100644 index 3ccfea6..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_SV.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_US.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_US.dat deleted file mode 100644 index 521f9fb..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_US.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_UY.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_UY.dat deleted file mode 100644 index 15d7e83..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_UY.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_VE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_VE.dat deleted file mode 100644 index 9fb8147..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/es_VE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/et.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/et.dat deleted file mode 100644 index 39332e4..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/et.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/et_EE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/et_EE.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/et_EE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/eu.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/eu.dat deleted file mode 100644 index def99aa..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/eu.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/eu_ES.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/eu_ES.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/eu_ES.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ewo.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ewo.dat deleted file mode 100644 index c0dea1f..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ewo.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ewo_CM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ewo_CM.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ewo_CM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fa.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fa.dat deleted file mode 100644 index 9b7e24b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fa.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fa_AF.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fa_AF.dat deleted file mode 100644 index 46ffb42..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fa_AF.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fa_IR.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fa_IR.dat deleted file mode 100644 index d952d61..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fa_IR.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ff.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ff.dat deleted file mode 100644 index f044474..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ff.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ff_CM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ff_CM.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ff_CM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ff_GN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ff_GN.dat deleted file mode 100644 index 16efd10..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ff_GN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ff_MR.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ff_MR.dat deleted file mode 100644 index 97cec8b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ff_MR.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ff_SN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ff_SN.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ff_SN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fi.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fi.dat deleted file mode 100644 index 4d9e9d5..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fi.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fi_FI.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fi_FI.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fi_FI.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fil.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fil.dat deleted file mode 100644 index 65a482d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fil.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fil_PH.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fil_PH.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fil_PH.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fo.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fo.dat deleted file mode 100644 index eabfb46..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fo.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fo_DK.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fo_DK.dat deleted file mode 100644 index ff0f284..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fo_DK.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fo_FO.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fo_FO.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fo_FO.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr.dat deleted file mode 100644 index 3a7b33d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_BE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_BE.dat deleted file mode 100644 index caa0d81..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_BE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_BF.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_BF.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_BF.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_BI.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_BI.dat deleted file mode 100644 index cb07df7..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_BI.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_BJ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_BJ.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_BJ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_BL.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_BL.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_BL.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CA.dat deleted file mode 100644 index 8ac0ab6..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CD.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CD.dat deleted file mode 100644 index c70d91f..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CD.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CF.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CF.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CF.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CG.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CH.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CH.dat deleted file mode 100644 index 36128df..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CH.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CI.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CI.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CI.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CM.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_CM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_DJ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_DJ.dat deleted file mode 100644 index 2ff3c56..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_DJ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_DZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_DZ.dat deleted file mode 100644 index 9a5ff81..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_DZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_FR.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_FR.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_FR.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_GA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_GA.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_GA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_GF.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_GF.dat deleted file mode 100644 index bca9dbf..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_GF.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_GN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_GN.dat deleted file mode 100644 index 16efd10..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_GN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_GP.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_GP.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_GP.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_GQ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_GQ.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_GQ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_HT.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_HT.dat deleted file mode 100644 index 712703b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_HT.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_KM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_KM.dat deleted file mode 100644 index 4c99872..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_KM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_LU.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_LU.dat deleted file mode 100644 index 95eb3ce..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_LU.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MA.dat deleted file mode 100644 index baa1724..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MC.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MC.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MC.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MF.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MF.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MF.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MG.dat deleted file mode 100644 index 7212d4d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_ML.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_ML.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_ML.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MQ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MQ.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MQ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MR.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MR.dat deleted file mode 100644 index 97cec8b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MR.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MU.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MU.dat deleted file mode 100644 index 9a1c15d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_MU.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_NC.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_NC.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_NC.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_NE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_NE.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_NE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_PF.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_PF.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_PF.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_PM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_PM.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_PM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_RE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_RE.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_RE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_RW.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_RW.dat deleted file mode 100644 index c1257c4..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_RW.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_SC.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_SC.dat deleted file mode 100644 index 0139731..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_SC.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_SN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_SN.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_SN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_SY.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_SY.dat deleted file mode 100644 index 7b28945..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_SY.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_TD.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_TD.dat deleted file mode 100644 index 12c89ff..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_TD.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_TG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_TG.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_TG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_TN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_TN.dat deleted file mode 100644 index 76412dd..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_TN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_VU.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_VU.dat deleted file mode 100644 index 3f8ef15..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_VU.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_WF.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_WF.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_WF.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_YT.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_YT.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fr_YT.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fur.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fur.dat deleted file mode 100644 index 9f29209..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fur.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fur_IT.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fur_IT.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fur_IT.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fy.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fy.dat deleted file mode 100644 index fca694e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fy.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fy_NL.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fy_NL.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/fy_NL.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ga.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ga.dat deleted file mode 100644 index 1a8677f..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ga.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ga_IE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ga_IE.dat deleted file mode 100644 index bf35389..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ga_IE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gd.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gd.dat deleted file mode 100644 index 4a9217e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gd.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gd_GB.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gd_GB.dat deleted file mode 100644 index bf35389..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gd_GB.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gl.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gl.dat deleted file mode 100644 index 124f1d6..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gl.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gl_ES.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gl_ES.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gl_ES.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gsw.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gsw.dat deleted file mode 100644 index 837ebc3..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gsw.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gsw_CH.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gsw_CH.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gsw_CH.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gsw_FR.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gsw_FR.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gsw_FR.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gsw_LI.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gsw_LI.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gsw_LI.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gu.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gu.dat deleted file mode 100644 index 699891d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gu.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gu_IN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gu_IN.dat deleted file mode 100644 index 2e3173b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gu_IN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/guz.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/guz.dat deleted file mode 100644 index 32ffb46..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/guz.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/guz_KE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/guz_KE.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/guz_KE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gv.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gv.dat deleted file mode 100644 index 0fb5bc9..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gv.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gv_IM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gv_IM.dat deleted file mode 100644 index 1e3a600..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/gv_IM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ha.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ha.dat deleted file mode 100644 index 4b34af3..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ha.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ha_GH.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ha_GH.dat deleted file mode 100644 index 9f66110..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ha_GH.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ha_NE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ha_NE.dat deleted file mode 100644 index e81dc0a..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ha_NE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ha_NG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ha_NG.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ha_NG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/haw.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/haw.dat deleted file mode 100644 index 5d4d249..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/haw.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/haw_US.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/haw_US.dat deleted file mode 100644 index a3e9cfa..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/haw_US.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/he.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/he.dat deleted file mode 100644 index 6d2bf2a..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/he.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/he_IL.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/he_IL.dat deleted file mode 100644 index e54f1ec..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/he_IL.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hi.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hi.dat deleted file mode 100644 index 0018db7..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hi.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hi_IN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hi_IN.dat deleted file mode 100644 index 2e3173b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hi_IN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hr.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hr.dat deleted file mode 100644 index ca5284a..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hr.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hr_BA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hr_BA.dat deleted file mode 100644 index cc19172..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hr_BA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hr_HR.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hr_HR.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hr_HR.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hsb.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hsb.dat deleted file mode 100644 index dd2cf21..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hsb.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hsb_DE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hsb_DE.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hsb_DE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hu.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hu.dat deleted file mode 100644 index 0f21390..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hu.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hu_HU.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hu_HU.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hu_HU.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hy.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hy.dat deleted file mode 100644 index 0da4d64..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hy.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hy_AM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hy_AM.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/hy_AM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/id.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/id.dat deleted file mode 100644 index 20df4eb..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/id.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/id_ID.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/id_ID.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/id_ID.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ig.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ig.dat deleted file mode 100644 index 80db0ba..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ig.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ig_NG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ig_NG.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ig_NG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ii.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ii.dat deleted file mode 100644 index a80b990..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ii.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ii_CN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ii_CN.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ii_CN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/is.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/is.dat deleted file mode 100644 index 1e1aa4a..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/is.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/is_IS.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/is_IS.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/is_IS.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/it.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/it.dat deleted file mode 100644 index 4a9382f..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/it.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/it_CH.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/it_CH.dat deleted file mode 100644 index 016ee3e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/it_CH.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/it_IT.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/it_IT.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/it_IT.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/it_SM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/it_SM.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/it_SM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ja.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ja.dat deleted file mode 100644 index cef4cb2..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ja.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ja_JP.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ja_JP.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ja_JP.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/jgo.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/jgo.dat deleted file mode 100644 index 532ebd3..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/jgo.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/jgo_CM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/jgo_CM.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/jgo_CM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/jmc.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/jmc.dat deleted file mode 100644 index 274f6ac..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/jmc.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/jmc_TZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/jmc_TZ.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/jmc_TZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ka.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ka.dat deleted file mode 100644 index dacd865..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ka.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ka_GE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ka_GE.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ka_GE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kab.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kab.dat deleted file mode 100644 index c0212a5..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kab.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kab_DZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kab_DZ.dat deleted file mode 100644 index 6ef5435..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kab_DZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kam.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kam.dat deleted file mode 100644 index 74bce04..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kam.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kam_KE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kam_KE.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kam_KE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kde.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kde.dat deleted file mode 100644 index 3e28166..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kde.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kde_TZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kde_TZ.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kde_TZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kea.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kea.dat deleted file mode 100644 index 16664f3..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kea.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kea_CV.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kea_CV.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kea_CV.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/khq.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/khq.dat deleted file mode 100644 index 73d7243..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/khq.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/khq_ML.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/khq_ML.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/khq_ML.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ki.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ki.dat deleted file mode 100644 index ff74a5f..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ki.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ki_KE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ki_KE.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ki_KE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kk.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kk.dat deleted file mode 100644 index 75fea63..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kk.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kk_KZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kk_KZ.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kk_KZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kkj.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kkj.dat deleted file mode 100644 index 042dc2d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kkj.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kkj_CM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kkj_CM.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kkj_CM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kl.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kl.dat deleted file mode 100644 index b6da6ff..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kl.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kl_GL.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kl_GL.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kl_GL.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kln.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kln.dat deleted file mode 100644 index 3410441..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kln.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kln_KE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kln_KE.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kln_KE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/km.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/km.dat deleted file mode 100644 index 94df896..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/km.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/km_KH.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/km_KH.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/km_KH.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kn.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kn.dat deleted file mode 100644 index b9612d5..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kn.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kn_IN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kn_IN.dat deleted file mode 100644 index 2e3173b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kn_IN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ko.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ko.dat deleted file mode 100644 index 50eb4b0..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ko.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ko_KP.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ko_KP.dat deleted file mode 100644 index 6cfd780..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ko_KP.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ko_KR.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ko_KR.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ko_KR.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kok.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kok.dat deleted file mode 100644 index 4788432..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kok.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kok_IN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kok_IN.dat deleted file mode 100644 index 2e3173b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kok_IN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ks.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ks.dat deleted file mode 100644 index 32eee5d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ks.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ks_IN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ks_IN.dat deleted file mode 100644 index 2e3173b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ks_IN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ksb.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ksb.dat deleted file mode 100644 index 19fd387..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ksb.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ksb_TZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ksb_TZ.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ksb_TZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ksf.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ksf.dat deleted file mode 100644 index b8e6743..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ksf.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ksf_CM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ksf_CM.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ksf_CM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ksh.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ksh.dat deleted file mode 100644 index 617a1b5..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ksh.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ksh_DE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ksh_DE.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ksh_DE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kw.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kw.dat deleted file mode 100644 index 64acba5..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kw.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kw_GB.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kw_GB.dat deleted file mode 100644 index bf35389..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/kw_GB.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ky.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ky.dat deleted file mode 100644 index fe344c7..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ky.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ky_KG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ky_KG.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ky_KG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lag.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lag.dat deleted file mode 100644 index 385a070..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lag.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lag_TZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lag_TZ.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lag_TZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lb.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lb.dat deleted file mode 100644 index 1c3c0a2..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lb.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lb_LU.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lb_LU.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lb_LU.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lg.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lg.dat deleted file mode 100644 index 269bf1e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lg.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lg_UG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lg_UG.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lg_UG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lkt.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lkt.dat deleted file mode 100644 index 36b411f..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lkt.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lkt_US.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lkt_US.dat deleted file mode 100644 index a3e9cfa..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lkt_US.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ln.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ln.dat deleted file mode 100644 index 82926ec..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ln.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ln_AO.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ln_AO.dat deleted file mode 100644 index 535a13a..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ln_AO.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ln_CD.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ln_CD.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ln_CD.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ln_CF.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ln_CF.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ln_CF.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ln_CG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ln_CG.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ln_CG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lo.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lo.dat deleted file mode 100644 index 4eac8a3..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lo.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lo_LA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lo_LA.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lo_LA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lrc.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lrc.dat deleted file mode 100644 index daaa873..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lrc.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lrc_IQ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lrc_IQ.dat deleted file mode 100644 index 3aaf885..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lrc_IQ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lrc_IR.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lrc_IR.dat deleted file mode 100644 index d952d61..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lrc_IR.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lt.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lt.dat deleted file mode 100644 index 4f70a95..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lt.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lt_LT.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lt_LT.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lt_LT.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lu.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lu.dat deleted file mode 100644 index 16b5f77..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lu.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lu_CD.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lu_CD.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lu_CD.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/luo.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/luo.dat deleted file mode 100644 index 5c8a95b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/luo.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/luo_KE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/luo_KE.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/luo_KE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/luy.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/luy.dat deleted file mode 100644 index b6bed4e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/luy.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/luy_KE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/luy_KE.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/luy_KE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lv.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lv.dat deleted file mode 100644 index 3bbf958..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lv.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lv_LV.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lv_LV.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/lv_LV.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mas.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mas.dat deleted file mode 100644 index 9014e67..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mas.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mas_KE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mas_KE.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mas_KE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mas_TZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mas_TZ.dat deleted file mode 100644 index 28f21d6..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mas_TZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mer.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mer.dat deleted file mode 100644 index 54a9dac..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mer.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mer_KE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mer_KE.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mer_KE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mfe.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mfe.dat deleted file mode 100644 index 1024ece..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mfe.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mfe_MU.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mfe_MU.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mfe_MU.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mg.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mg.dat deleted file mode 100644 index e500a3e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mg.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mg_MG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mg_MG.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mg_MG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mgh.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mgh.dat deleted file mode 100644 index 880eae4..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mgh.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mgh_MZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mgh_MZ.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mgh_MZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mgo.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mgo.dat deleted file mode 100644 index a4bbb04..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mgo.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mgo_CM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mgo_CM.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mgo_CM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mk.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mk.dat deleted file mode 100644 index 5406358..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mk.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mk_MK.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mk_MK.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mk_MK.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ml.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ml.dat deleted file mode 100644 index e377237..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ml.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ml_IN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ml_IN.dat deleted file mode 100644 index 2e3173b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ml_IN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mn.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mn.dat deleted file mode 100644 index 639fa48..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mn.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mn_MN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mn_MN.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mn_MN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mr.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mr.dat deleted file mode 100644 index 182f378..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mr.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mr_IN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mr_IN.dat deleted file mode 100644 index 2e3173b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mr_IN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ms.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ms.dat deleted file mode 100644 index 011a8fb..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ms.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ms_BN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ms_BN.dat deleted file mode 100644 index 4a41635..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ms_BN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ms_MY.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ms_MY.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ms_MY.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ms_SG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ms_SG.dat deleted file mode 100644 index e8f8942..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ms_SG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mt.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mt.dat deleted file mode 100644 index 18d047b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mt.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mt_MT.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mt_MT.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mt_MT.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mua.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mua.dat deleted file mode 100644 index 5bbe549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mua.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mua_CM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mua_CM.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mua_CM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/my.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/my.dat deleted file mode 100644 index 11cad70..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/my.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/my_MM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/my_MM.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/my_MM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mzn.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mzn.dat deleted file mode 100644 index 7c2d0c6..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mzn.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mzn_IR.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mzn_IR.dat deleted file mode 100644 index d952d61..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/mzn_IR.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/naq.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/naq.dat deleted file mode 100644 index f8b36b4..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/naq.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/naq_NA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/naq_NA.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/naq_NA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nb.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nb.dat deleted file mode 100644 index 19370af..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nb.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nb_NO.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nb_NO.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nb_NO.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nb_SJ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nb_SJ.dat deleted file mode 100644 index 1e3a600..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nb_SJ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nd.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nd.dat deleted file mode 100644 index 4b93101..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nd.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nd_ZW.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nd_ZW.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nd_ZW.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ne.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ne.dat deleted file mode 100644 index 42d539f..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ne.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ne_IN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ne_IN.dat deleted file mode 100644 index 1185794..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ne_IN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ne_NP.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ne_NP.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ne_NP.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl.dat deleted file mode 100644 index 1fcde79..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_AW.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_AW.dat deleted file mode 100644 index 5cdba38..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_AW.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_BE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_BE.dat deleted file mode 100644 index c8f6e59..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_BE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_BQ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_BQ.dat deleted file mode 100644 index 907df7d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_BQ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_CW.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_CW.dat deleted file mode 100644 index ab71be3..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_CW.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_NL.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_NL.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_NL.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_SR.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_SR.dat deleted file mode 100644 index 9db38be..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_SR.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_SX.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_SX.dat deleted file mode 100644 index ab71be3..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nl_SX.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nmg.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nmg.dat deleted file mode 100644 index 862bd6f..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nmg.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nmg_CM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nmg_CM.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nmg_CM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nn.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nn.dat deleted file mode 100644 index 16643db..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nn.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nn_NO.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nn_NO.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nn_NO.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nnh.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nnh.dat deleted file mode 100644 index 52a7f53..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nnh.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nnh_CM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nnh_CM.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nnh_CM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nus.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nus.dat deleted file mode 100644 index ca47198..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nus.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nus_SS.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nus_SS.dat deleted file mode 100644 index 34ef9d4..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nus_SS.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nyn.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nyn.dat deleted file mode 100644 index 550752a..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nyn.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nyn_UG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nyn_UG.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/nyn_UG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/om.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/om.dat deleted file mode 100644 index 2bf7277..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/om.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/om_ET.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/om_ET.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/om_ET.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/om_KE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/om_KE.dat deleted file mode 100644 index 949848b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/om_KE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/or.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/or.dat deleted file mode 100644 index ff7d3de..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/or.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/or_IN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/or_IN.dat deleted file mode 100644 index 2e3173b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/or_IN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/os.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/os.dat deleted file mode 100644 index 6758bd2..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/os.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/os_GE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/os_GE.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/os_GE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/os_RU.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/os_RU.dat deleted file mode 100644 index 4c9568f..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/os_RU.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pa.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pa.dat deleted file mode 100644 index 3ed1c43..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pa.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pa_Arab.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pa_Arab.dat deleted file mode 100644 index 05fad71..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pa_Arab.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pa_Arab_PK.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pa_Arab_PK.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pa_Arab_PK.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pa_Guru.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pa_Guru.dat deleted file mode 100644 index ea76e95..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pa_Guru.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pa_Guru_IN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pa_Guru_IN.dat deleted file mode 100644 index 2e3173b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pa_Guru_IN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pl.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pl.dat deleted file mode 100644 index 8c16040..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pl.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pl_PL.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pl_PL.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pl_PL.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/prg.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/prg.dat deleted file mode 100644 index 86f903b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/prg.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/prg_001.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/prg_001.dat deleted file mode 100644 index 2b4c58b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/prg_001.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ps.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ps.dat deleted file mode 100644 index 252cd66..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ps.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ps_AF.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ps_AF.dat deleted file mode 100644 index d05ad17..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ps_AF.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt.dat deleted file mode 100644 index 75ba546..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_AO.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_AO.dat deleted file mode 100644 index b4923b6..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_AO.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_BR.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_BR.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_BR.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_CV.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_CV.dat deleted file mode 100644 index 8b4fd69..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_CV.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_GW.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_GW.dat deleted file mode 100644 index 288cfe2..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_GW.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_MO.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_MO.dat deleted file mode 100644 index 0ffaf3e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_MO.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_MZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_MZ.dat deleted file mode 100644 index e2b479f..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_MZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_PT.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_PT.dat deleted file mode 100644 index b8e2b08..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_PT.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_ST.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_ST.dat deleted file mode 100644 index 55bef7c..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_ST.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_TL.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_TL.dat deleted file mode 100644 index 288cfe2..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/pt_TL.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/qu.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/qu.dat deleted file mode 100644 index 1e4e24c..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/qu.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/qu_BO.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/qu_BO.dat deleted file mode 100644 index e8a8e42..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/qu_BO.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/qu_EC.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/qu_EC.dat deleted file mode 100644 index 37c6beb..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/qu_EC.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/qu_PE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/qu_PE.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/qu_PE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rm.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rm.dat deleted file mode 100644 index b53a350..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rm.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rm_CH.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rm_CH.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rm_CH.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rn.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rn.dat deleted file mode 100644 index 6870345..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rn.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rn_BI.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rn_BI.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rn_BI.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ro.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ro.dat deleted file mode 100644 index b4af5bc..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ro.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ro_MD.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ro_MD.dat deleted file mode 100644 index f66f6d2..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ro_MD.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ro_RO.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ro_RO.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ro_RO.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rof.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rof.dat deleted file mode 100644 index 903d26d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rof.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rof_TZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rof_TZ.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rof_TZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/root.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/root.dat deleted file mode 100644 index 324aeec..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/root.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru.dat deleted file mode 100644 index eaf4139..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru_BY.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru_BY.dat deleted file mode 100644 index 5e64e86..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru_BY.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru_KG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru_KG.dat deleted file mode 100644 index 3c7d261..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru_KG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru_KZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru_KZ.dat deleted file mode 100644 index 83f88ed..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru_KZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru_MD.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru_MD.dat deleted file mode 100644 index 4b98931..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru_MD.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru_RU.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru_RU.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru_RU.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru_UA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru_UA.dat deleted file mode 100644 index dea4d61..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ru_UA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rw.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rw.dat deleted file mode 100644 index 0493d4e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rw.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rw_RW.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rw_RW.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rw_RW.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rwk.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rwk.dat deleted file mode 100644 index 9765816..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rwk.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rwk_TZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rwk_TZ.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/rwk_TZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sah.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sah.dat deleted file mode 100644 index 835086d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sah.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sah_RU.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sah_RU.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sah_RU.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/saq.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/saq.dat deleted file mode 100644 index 4f1f025..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/saq.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/saq_KE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/saq_KE.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/saq_KE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sbp.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sbp.dat deleted file mode 100644 index 5145017..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sbp.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sbp_TZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sbp_TZ.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sbp_TZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/se.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/se.dat deleted file mode 100644 index 585bde9..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/se.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/se_FI.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/se_FI.dat deleted file mode 100644 index 5d2dae1..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/se_FI.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/se_NO.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/se_NO.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/se_NO.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/se_SE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/se_SE.dat deleted file mode 100644 index c5530cd..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/se_SE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/seh.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/seh.dat deleted file mode 100644 index eb8065a..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/seh.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/seh_MZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/seh_MZ.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/seh_MZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ses.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ses.dat deleted file mode 100644 index 4f062a5..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ses.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ses_ML.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ses_ML.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ses_ML.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sg.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sg.dat deleted file mode 100644 index 4a7d026..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sg.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sg_CF.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sg_CF.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sg_CF.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/shi.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/shi.dat deleted file mode 100644 index 7e1dcb7..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/shi.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/shi_Latn.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/shi_Latn.dat deleted file mode 100644 index 3728133..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/shi_Latn.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/shi_Latn_MA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/shi_Latn_MA.dat deleted file mode 100644 index 6ef5435..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/shi_Latn_MA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/shi_Tfng.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/shi_Tfng.dat deleted file mode 100644 index 122d3cb..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/shi_Tfng.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/shi_Tfng_MA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/shi_Tfng_MA.dat deleted file mode 100644 index 6ef5435..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/shi_Tfng_MA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/si.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/si.dat deleted file mode 100644 index 35510f9..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/si.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/si_LK.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/si_LK.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/si_LK.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sk.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sk.dat deleted file mode 100644 index 4f296bb..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sk.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sk_SK.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sk_SK.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sk_SK.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sl.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sl.dat deleted file mode 100644 index 07dc283..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sl.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sl_SI.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sl_SI.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sl_SI.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/smn.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/smn.dat deleted file mode 100644 index 991fe1a..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/smn.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/smn_FI.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/smn_FI.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/smn_FI.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sn.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sn.dat deleted file mode 100644 index 0d80e5b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sn.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sn_ZW.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sn_ZW.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sn_ZW.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/so.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/so.dat deleted file mode 100644 index bf35d5b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/so.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/so_DJ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/so_DJ.dat deleted file mode 100644 index 798ada4..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/so_DJ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/so_ET.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/so_ET.dat deleted file mode 100644 index 4fab7bc..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/so_ET.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/so_KE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/so_KE.dat deleted file mode 100644 index 949848b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/so_KE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/so_SO.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/so_SO.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/so_SO.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sq.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sq.dat deleted file mode 100644 index 423d448..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sq.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sq_AL.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sq_AL.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sq_AL.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sq_MK.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sq_MK.dat deleted file mode 100644 index af125c4..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sq_MK.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sq_XK.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sq_XK.dat deleted file mode 100644 index 0a01d65..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sq_XK.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr.dat deleted file mode 100644 index eefba8c..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Cyrl.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Cyrl.dat deleted file mode 100644 index 6ebcd9c..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Cyrl.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Cyrl_BA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Cyrl_BA.dat deleted file mode 100644 index 9ea5857..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Cyrl_BA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Cyrl_ME.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Cyrl_ME.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Cyrl_ME.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Cyrl_RS.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Cyrl_RS.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Cyrl_RS.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Cyrl_XK.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Cyrl_XK.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Cyrl_XK.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Latn.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Latn.dat deleted file mode 100644 index c5be381..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Latn.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Latn_BA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Latn_BA.dat deleted file mode 100644 index 9ea5857..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Latn_BA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Latn_ME.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Latn_ME.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Latn_ME.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Latn_RS.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Latn_RS.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Latn_RS.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Latn_XK.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Latn_XK.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sr_Latn_XK.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sv.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sv.dat deleted file mode 100644 index ef292b7..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sv.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sv_AX.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sv_AX.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sv_AX.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sv_FI.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sv_FI.dat deleted file mode 100644 index dfc52f2..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sv_FI.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sv_SE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sv_SE.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sv_SE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sw.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sw.dat deleted file mode 100644 index 0cb4274..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sw.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sw_CD.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sw_CD.dat deleted file mode 100644 index b545b9e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sw_CD.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sw_KE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sw_KE.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sw_KE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sw_TZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sw_TZ.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sw_TZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sw_UG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sw_UG.dat deleted file mode 100644 index c4d6a08..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/sw_UG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ta.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ta.dat deleted file mode 100644 index ae0cae7..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ta.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ta_IN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ta_IN.dat deleted file mode 100644 index 2e3173b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ta_IN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ta_LK.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ta_LK.dat deleted file mode 100644 index 3622e74..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ta_LK.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ta_MY.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ta_MY.dat deleted file mode 100644 index 462dcdc..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ta_MY.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ta_SG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ta_SG.dat deleted file mode 100644 index b182725..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ta_SG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/te.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/te.dat deleted file mode 100644 index 1b74046..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/te.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/te_IN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/te_IN.dat deleted file mode 100644 index 2e3173b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/te_IN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/teo.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/teo.dat deleted file mode 100644 index 28b296a..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/teo.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/teo_KE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/teo_KE.dat deleted file mode 100644 index 1fa88a5..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/teo_KE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/teo_UG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/teo_UG.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/teo_UG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/th.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/th.dat deleted file mode 100644 index 58be6f3..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/th.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/th_TH.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/th_TH.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/th_TH.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ti.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ti.dat deleted file mode 100644 index 03ecdb0..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ti.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ti_ER.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ti_ER.dat deleted file mode 100644 index f86b8f7..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ti_ER.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ti_ET.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ti_ET.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ti_ET.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tk.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tk.dat deleted file mode 100644 index f431ccb..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tk.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tk_TM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tk_TM.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tk_TM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/to.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/to.dat deleted file mode 100644 index 0ae7e46..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/to.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/to_TO.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/to_TO.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/to_TO.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tr.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tr.dat deleted file mode 100644 index 9f9c068..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tr.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tr_CY.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tr_CY.dat deleted file mode 100644 index d12c58c..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tr_CY.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tr_TR.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tr_TR.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tr_TR.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/twq.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/twq.dat deleted file mode 100644 index ba28516..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/twq.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/twq_NE.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/twq_NE.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/twq_NE.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tzm.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tzm.dat deleted file mode 100644 index 870c666..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tzm.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tzm_MA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tzm_MA.dat deleted file mode 100644 index 6ef5435..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/tzm_MA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ug.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ug.dat deleted file mode 100644 index d229987..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ug.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ug_CN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ug_CN.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ug_CN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uk.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uk.dat deleted file mode 100644 index 7743a37..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uk.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uk_UA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uk_UA.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uk_UA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ur.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ur.dat deleted file mode 100644 index 186132d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ur.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ur_IN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ur_IN.dat deleted file mode 100644 index e68113f..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ur_IN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ur_PK.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ur_PK.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/ur_PK.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz.dat deleted file mode 100644 index f87e34f..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz_Arab.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz_Arab.dat deleted file mode 100644 index c67463b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz_Arab.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz_Arab_AF.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz_Arab_AF.dat deleted file mode 100644 index d05ad17..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz_Arab_AF.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz_Cyrl.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz_Cyrl.dat deleted file mode 100644 index 64d671b..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz_Cyrl.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz_Cyrl_UZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz_Cyrl_UZ.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz_Cyrl_UZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz_Latn.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz_Latn.dat deleted file mode 100644 index aeeaf50..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz_Latn.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz_Latn_UZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz_Latn_UZ.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/uz_Latn_UZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vai.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vai.dat deleted file mode 100644 index bf4d421..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vai.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vai_Latn.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vai_Latn.dat deleted file mode 100644 index 67d1817..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vai_Latn.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vai_Latn_LR.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vai_Latn_LR.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vai_Latn_LR.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vai_Vaii.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vai_Vaii.dat deleted file mode 100644 index f91feb1..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vai_Vaii.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vai_Vaii_LR.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vai_Vaii_LR.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vai_Vaii_LR.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vi.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vi.dat deleted file mode 100644 index 7b768d6..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vi.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vi_VN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vi_VN.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vi_VN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vo.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vo.dat deleted file mode 100644 index 47c0353..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vo.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vo_001.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vo_001.dat deleted file mode 100644 index 373facb..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vo_001.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vun.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vun.dat deleted file mode 100644 index 8f4dd89..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vun.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vun_TZ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vun_TZ.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/vun_TZ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/wae.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/wae.dat deleted file mode 100644 index 4a50ec9..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/wae.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/wae_CH.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/wae_CH.dat deleted file mode 100644 index b10ea1d..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/wae_CH.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/xog.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/xog.dat deleted file mode 100644 index 8787b85..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/xog.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/xog_UG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/xog_UG.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/xog_UG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yav.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yav.dat deleted file mode 100644 index 77c29ac..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yav.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yav_CM.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yav_CM.dat deleted file mode 100644 index 113f82e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yav_CM.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yi.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yi.dat deleted file mode 100644 index ee830c9..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yi.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yi_001.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yi_001.dat deleted file mode 100644 index e2ab8c1..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yi_001.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yo.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yo.dat deleted file mode 100644 index 71e61e8..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yo.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yo_BJ.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yo_BJ.dat deleted file mode 100644 index 7622964..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yo_BJ.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yo_NG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yo_NG.dat deleted file mode 100644 index ecf6549..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/yo_NG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zgh.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zgh.dat deleted file mode 100644 index 9be348e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zgh.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zgh_MA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zgh_MA.dat deleted file mode 100644 index 6ef5435..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zgh_MA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh.dat deleted file mode 100644 index 961a72f..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hans.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hans.dat deleted file mode 100644 index 6558aa2..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hans.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hans_CN.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hans_CN.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hans_CN.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hans_HK.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hans_HK.dat deleted file mode 100644 index b7a9b85..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hans_HK.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hans_MO.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hans_MO.dat deleted file mode 100644 index 7196ee4..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hans_MO.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hans_SG.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hans_SG.dat deleted file mode 100644 index d089661..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hans_SG.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hant.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hant.dat deleted file mode 100644 index e2f1111..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hant.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hant_HK.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hant_HK.dat deleted file mode 100644 index 2074a36..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hant_HK.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hant_MO.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hant_MO.dat deleted file mode 100644 index ed6b903..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hant_MO.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hant_TW.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hant_TW.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zh_Hant_TW.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zu.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zu.dat deleted file mode 100644 index 71a0b4f..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zu.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zu_ZA.dat b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zu_ZA.dat deleted file mode 100644 index 301251e..0000000 Binary files a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/locale-data/zu_ZA.dat and /dev/null differ diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/localedata.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/localedata.py deleted file mode 100644 index 9c6f9f2..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/localedata.py +++ /dev/null @@ -1,227 +0,0 @@ -# -*- coding: utf-8 -*- -""" - babel.localedata - ~~~~~~~~~~~~~~~~ - - Low-level locale data access. - - :note: The `Locale` class, which uses this module under the hood, provides a - more convenient interface for accessing the locale data. - - :copyright: (c) 2013 by the Babel Team. - :license: BSD, see LICENSE for more details. -""" - -import os -import threading -from collections import MutableMapping -from itertools import chain - -from babel._compat import pickle - - -_cache = {} -_cache_lock = threading.RLock() -_dirname = os.path.join(os.path.dirname(__file__), 'locale-data') - - -def normalize_locale(name): - """Normalize a locale ID by stripping spaces and apply proper casing. - - Returns the normalized locale ID string or `None` if the ID is not - recognized. - """ - name = name.strip().lower() - for locale_id in chain.from_iterable([_cache, locale_identifiers()]): - if name == locale_id.lower(): - return locale_id - - -def exists(name): - """Check whether locale data is available for the given locale. - - Returns `True` if it exists, `False` otherwise. - - :param name: the locale identifier string - """ - if name in _cache: - return True - file_found = os.path.exists(os.path.join(_dirname, '%s.dat' % name)) - return True if file_found else bool(normalize_locale(name)) - - -def locale_identifiers(): - """Return a list of all locale identifiers for which locale data is - available. - - .. versionadded:: 0.8.1 - - :return: a list of locale identifiers (strings) - """ - return [stem for stem, extension in [ - os.path.splitext(filename) for filename in os.listdir(_dirname) - ] if extension == '.dat' and stem != 'root'] - - -def load(name, merge_inherited=True): - """Load the locale data for the given locale. - - The locale data is a dictionary that contains much of the data defined by - the Common Locale Data Repository (CLDR). This data is stored as a - collection of pickle files inside the ``babel`` package. - - >>> d = load('en_US') - >>> d['languages']['sv'] - u'Swedish' - - Note that the results are cached, and subsequent requests for the same - locale return the same dictionary: - - >>> d1 = load('en_US') - >>> d2 = load('en_US') - >>> d1 is d2 - True - - :param name: the locale identifier string (or "root") - :param merge_inherited: whether the inherited data should be merged into - the data of the requested locale - :raise `IOError`: if no locale data file is found for the given locale - identifer, or one of the locales it inherits from - """ - _cache_lock.acquire() - try: - data = _cache.get(name) - if not data: - # Load inherited data - if name == 'root' or not merge_inherited: - data = {} - else: - from babel.core import get_global - parent = get_global('parent_exceptions').get(name) - if not parent: - parts = name.split('_') - if len(parts) == 1: - parent = 'root' - else: - parent = '_'.join(parts[:-1]) - data = load(parent).copy() - filename = os.path.join(_dirname, '%s.dat' % name) - fileobj = open(filename, 'rb') - try: - if name != 'root' and merge_inherited: - merge(data, pickle.load(fileobj)) - else: - data = pickle.load(fileobj) - _cache[name] = data - finally: - fileobj.close() - return data - finally: - _cache_lock.release() - - -def merge(dict1, dict2): - """Merge the data from `dict2` into the `dict1` dictionary, making copies - of nested dictionaries. - - >>> d = {1: 'foo', 3: 'baz'} - >>> merge(d, {1: 'Foo', 2: 'Bar'}) - >>> sorted(d.items()) - [(1, 'Foo'), (2, 'Bar'), (3, 'baz')] - - :param dict1: the dictionary to merge into - :param dict2: the dictionary containing the data that should be merged - """ - for key, val2 in dict2.items(): - if val2 is not None: - val1 = dict1.get(key) - if isinstance(val2, dict): - if val1 is None: - val1 = {} - if isinstance(val1, Alias): - val1 = (val1, val2) - elif isinstance(val1, tuple): - alias, others = val1 - others = others.copy() - merge(others, val2) - val1 = (alias, others) - else: - val1 = val1.copy() - merge(val1, val2) - else: - val1 = val2 - dict1[key] = val1 - - -class Alias(object): - """Representation of an alias in the locale data. - - An alias is a value that refers to some other part of the locale data, - as specified by the `keys`. - """ - - def __init__(self, keys): - self.keys = tuple(keys) - - def __repr__(self): - return '<%s %r>' % (type(self).__name__, self.keys) - - def resolve(self, data): - """Resolve the alias based on the given data. - - This is done recursively, so if one alias resolves to a second alias, - that second alias will also be resolved. - - :param data: the locale data - :type data: `dict` - """ - base = data - for key in self.keys: - data = data[key] - if isinstance(data, Alias): - data = data.resolve(base) - elif isinstance(data, tuple): - alias, others = data - data = alias.resolve(base) - return data - - -class LocaleDataDict(MutableMapping): - """Dictionary wrapper that automatically resolves aliases to the actual - values. - """ - - def __init__(self, data, base=None): - self._data = data - if base is None: - base = data - self.base = base - - def __len__(self): - return len(self._data) - - def __iter__(self): - return iter(self._data) - - def __getitem__(self, key): - orig = val = self._data[key] - if isinstance(val, Alias): # resolve an alias - val = val.resolve(self.base) - if isinstance(val, tuple): # Merge a partial dict with an alias - alias, others = val - val = alias.resolve(self.base).copy() - merge(val, others) - if type(val) is dict: # Return a nested alias-resolving dict - val = LocaleDataDict(val, base=self.base) - if val is not orig: - self._data[key] = val - return val - - def __setitem__(self, key, value): - self._data[key] = value - - def __delitem__(self, key): - del self._data[key] - - def copy(self): - return LocaleDataDict(self._data.copy(), base=self.base) diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/localtime/__init__.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/localtime/__init__.py deleted file mode 100644 index 883ff16..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/localtime/__init__.py +++ /dev/null @@ -1,76 +0,0 @@ -# -*- coding: utf-8 -*- -""" - babel.localtime - ~~~~~~~~~~~~~~~ - - Babel specific fork of tzlocal to determine the local timezone - of the system. - - :copyright: (c) 2013 by the Babel Team. - :license: BSD, see LICENSE for more details. -""" - -import sys -import pytz -import time -from datetime import timedelta -from datetime import tzinfo -from threading import RLock - -if sys.platform == 'win32': - from babel.localtime._win32 import _get_localzone -else: - from babel.localtime._unix import _get_localzone - - -_cached_tz = None -_cache_lock = RLock() - -STDOFFSET = timedelta(seconds=-time.timezone) -if time.daylight: - DSTOFFSET = timedelta(seconds=-time.altzone) -else: - DSTOFFSET = STDOFFSET - -DSTDIFF = DSTOFFSET - STDOFFSET -ZERO = timedelta(0) - - -class _FallbackLocalTimezone(tzinfo): - - def utcoffset(self, dt): - if self._isdst(dt): - return DSTOFFSET - else: - return STDOFFSET - - def dst(self, dt): - if self._isdst(dt): - return DSTDIFF - else: - return ZERO - - def tzname(self, dt): - return time.tzname[self._isdst(dt)] - - def _isdst(self, dt): - tt = (dt.year, dt.month, dt.day, - dt.hour, dt.minute, dt.second, - dt.weekday(), 0, -1) - stamp = time.mktime(tt) - tt = time.localtime(stamp) - return tt.tm_isdst > 0 - - -def get_localzone(): - """Returns the current underlying local timezone object. - Generally this function does not need to be used, it's a - better idea to use the :data:`LOCALTZ` singleton instead. - """ - return _get_localzone() - - -try: - LOCALTZ = get_localzone() -except pytz.UnknownTimeZoneError: - LOCALTZ = _FallbackLocalTimezone() diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/localtime/_unix.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/localtime/_unix.py deleted file mode 100644 index 378a90b..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/localtime/_unix.py +++ /dev/null @@ -1,138 +0,0 @@ -from __future__ import with_statement -import os -import re -import sys -import pytz -import subprocess - -_systemconfig_tz = re.compile(r'^Time Zone: (.*)$(?m)') - - -def _tz_from_env(tzenv): - if tzenv[0] == ':': - tzenv = tzenv[1:] - - # TZ specifies a file - if os.path.exists(tzenv): - with open(tzenv, 'rb') as tzfile: - return pytz.tzfile.build_tzinfo('local', tzfile) - - # TZ specifies a zoneinfo zone. - try: - tz = pytz.timezone(tzenv) - # That worked, so we return this: - return tz - except pytz.UnknownTimeZoneError: - raise pytz.UnknownTimeZoneError( - "tzlocal() does not support non-zoneinfo timezones like %s. \n" - "Please use a timezone in the form of Continent/City") - - -def _get_localzone(_root='/'): - """Tries to find the local timezone configuration. - This method prefers finding the timezone name and passing that to pytz, - over passing in the localtime file, as in the later case the zoneinfo - name is unknown. - The parameter _root makes the function look for files like /etc/localtime - beneath the _root directory. This is primarily used by the tests. - In normal usage you call the function without parameters. - """ - - tzenv = os.environ.get('TZ') - if tzenv: - return _tz_from_env(tzenv) - - # This is actually a pretty reliable way to test for the local time - # zone on operating systems like OS X. On OS X especially this is the - # only one that actually works. - try: - link_dst = os.readlink('/etc/localtime') - except OSError: - pass - else: - pos = link_dst.find('/zoneinfo/') - if pos >= 0: - zone_name = link_dst[pos + 10:] - try: - return pytz.timezone(zone_name) - except pytz.UnknownTimeZoneError: - pass - - # If we are on OS X now we are pretty sure that the rest of the - # code will fail and just fall through until it hits the reading - # of /etc/localtime and using it without name. At this point we - # can invoke systemconfig which internally invokes ICU. ICU itself - # does the same thing we do (readlink + compare file contents) but - # since it knows where the zone files are that should be a bit - # better than reimplementing the logic here. - if sys.platform == 'darwin': - c = subprocess.Popen(['systemsetup', '-gettimezone'], - stdout=subprocess.PIPE) - sys_result = c.communicate()[0] - c.wait() - tz_match = _systemconfig_tz.search(sys_result) - if tz_match is not None: - zone_name = tz_match.group(1) - try: - return pytz.timezone(zone_name) - except pytz.UnknownTimeZoneError: - pass - - # Now look for distribution specific configuration files - # that contain the timezone name. - tzpath = os.path.join(_root, 'etc/timezone') - if os.path.exists(tzpath): - with open(tzpath, 'rb') as tzfile: - data = tzfile.read() - - # Issue #3 in tzlocal was that /etc/timezone was a zoneinfo file. - # That's a misconfiguration, but we need to handle it gracefully: - if data[:5] != 'TZif2': - etctz = data.strip().decode() - # Get rid of host definitions and comments: - if ' ' in etctz: - etctz, dummy = etctz.split(' ', 1) - if '#' in etctz: - etctz, dummy = etctz.split('#', 1) - return pytz.timezone(etctz.replace(' ', '_')) - - # CentOS has a ZONE setting in /etc/sysconfig/clock, - # OpenSUSE has a TIMEZONE setting in /etc/sysconfig/clock and - # Gentoo has a TIMEZONE setting in /etc/conf.d/clock - # We look through these files for a timezone: - zone_re = re.compile('\s*ZONE\s*=\s*\"') - timezone_re = re.compile('\s*TIMEZONE\s*=\s*\"') - end_re = re.compile('\"') - - for filename in ('etc/sysconfig/clock', 'etc/conf.d/clock'): - tzpath = os.path.join(_root, filename) - if not os.path.exists(tzpath): - continue - with open(tzpath, 'rt') as tzfile: - data = tzfile.readlines() - - for line in data: - # Look for the ZONE= setting. - match = zone_re.match(line) - if match is None: - # No ZONE= setting. Look for the TIMEZONE= setting. - match = timezone_re.match(line) - if match is not None: - # Some setting existed - line = line[match.end():] - etctz = line[:end_re.search(line).start()] - - # We found a timezone - return pytz.timezone(etctz.replace(' ', '_')) - - # No explicit setting existed. Use localtime - for filename in ('etc/localtime', 'usr/local/etc/localtime'): - tzpath = os.path.join(_root, filename) - - if not os.path.exists(tzpath): - continue - - with open(tzpath, 'rb') as tzfile: - return pytz.tzfile.build_tzinfo('local', tzfile) - - raise pytz.UnknownTimeZoneError('Can not find any timezone configuration') diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/localtime/_win32.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/localtime/_win32.py deleted file mode 100644 index 3752dff..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/localtime/_win32.py +++ /dev/null @@ -1,96 +0,0 @@ -try: - import _winreg as winreg -except ImportError: - try: - import winreg - except ImportError: - winreg = None - -from babel.core import get_global -import pytz - - -# When building the cldr data on windows this module gets imported. -# Because at that point there is no global.dat yet this call will -# fail. We want to catch it down in that case then and just assume -# the mapping was empty. -try: - tz_names = get_global('windows_zone_mapping') -except RuntimeError: - tz_names = {} - - -def valuestodict(key): - """Convert a registry key's values to a dictionary.""" - dict = {} - size = winreg.QueryInfoKey(key)[1] - for i in range(size): - data = winreg.EnumValue(key, i) - dict[data[0]] = data[1] - return dict - - -def get_localzone_name(): - # Windows is special. It has unique time zone names (in several - # meanings of the word) available, but unfortunately, they can be - # translated to the language of the operating system, so we need to - # do a backwards lookup, by going through all time zones and see which - # one matches. - handle = winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE) - - TZLOCALKEYNAME = r'SYSTEM\CurrentControlSet\Control\TimeZoneInformation' - localtz = winreg.OpenKey(handle, TZLOCALKEYNAME) - keyvalues = valuestodict(localtz) - localtz.Close() - if 'TimeZoneKeyName' in keyvalues: - # Windows 7 (and Vista?) - - # For some reason this returns a string with loads of NUL bytes at - # least on some systems. I don't know if this is a bug somewhere, I - # just work around it. - tzkeyname = keyvalues['TimeZoneKeyName'].split('\x00', 1)[0] - else: - # Windows 2000 or XP - - # This is the localized name: - tzwin = keyvalues['StandardName'] - - # Open the list of timezones to look up the real name: - TZKEYNAME = r'SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones' - tzkey = winreg.OpenKey(handle, TZKEYNAME) - - # Now, match this value to Time Zone information - tzkeyname = None - for i in range(winreg.QueryInfoKey(tzkey)[0]): - subkey = winreg.EnumKey(tzkey, i) - sub = winreg.OpenKey(tzkey, subkey) - data = valuestodict(sub) - sub.Close() - if data['Std'] == tzwin: - tzkeyname = subkey - break - - tzkey.Close() - handle.Close() - - if tzkeyname is None: - raise LookupError('Can not find Windows timezone configuration') - - timezone = tz_names.get(tzkeyname) - if timezone is None: - # Nope, that didn't work. Try adding 'Standard Time', - # it seems to work a lot of times: - timezone = tz_names.get(tzkeyname + ' Standard Time') - - # Return what we have. - if timezone is None: - raise pytz.UnknownTimeZoneError('Can not find timezone ' + tzkeyname) - - return timezone - - -def _get_localzone(): - if winreg is None: - raise pytz.UnknownTimeZoneError( - 'Runtime support not available') - return pytz.timezone(get_localzone_name()) diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/messages/__init__.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/messages/__init__.py deleted file mode 100644 index 1b63bae..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/messages/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# -*- coding: utf-8 -*- -""" - babel.messages - ~~~~~~~~~~~~~~ - - Support for ``gettext`` message catalogs. - - :copyright: (c) 2013 by the Babel Team. - :license: BSD, see LICENSE for more details. -""" - -from babel.messages.catalog import * diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/messages/catalog.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/messages/catalog.py deleted file mode 100644 index 8c807f8..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/messages/catalog.py +++ /dev/null @@ -1,820 +0,0 @@ -# -*- coding: utf-8 -*- -""" - babel.messages.catalog - ~~~~~~~~~~~~~~~~~~~~~~ - - Data structures for message catalogs. - - :copyright: (c) 2013 by the Babel Team. - :license: BSD, see LICENSE for more details. -""" - -import re -import time - -from cgi import parse_header -from datetime import datetime, time as time_ -from difflib import get_close_matches -from email import message_from_string -from copy import copy - -from babel import __version__ as VERSION -from babel.core import Locale -from babel.dates import format_datetime -from babel.messages.plurals import get_plural -from babel.util import odict, distinct, LOCALTZ, FixedOffsetTimezone -from babel._compat import string_types, number_types, PY2, cmp - -__all__ = ['Message', 'Catalog', 'TranslationError'] - - -PYTHON_FORMAT = re.compile(r'''(?x) - \% - (?:\(([\w]*)\))? - ( - [-#0\ +]?(?:\*|[\d]+)? - (?:\.(?:\*|[\d]+))? - [hlL]? - ) - ([diouxXeEfFgGcrs%]) -''') - - -def _parse_datetime_header(value): - match = re.match(r'^(?P.*?)(?P[+-]\d{4})?$', value) - - tt = time.strptime(match.group('datetime'), '%Y-%m-%d %H:%M') - ts = time.mktime(tt) - dt = datetime.fromtimestamp(ts) - - # Separate the offset into a sign component, hours, and # minutes - tzoffset = match.group('tzoffset') - if tzoffset is not None: - plus_minus_s, rest = tzoffset[0], tzoffset[1:] - hours_offset_s, mins_offset_s = rest[:2], rest[2:] - - # Make them all integers - plus_minus = int(plus_minus_s + '1') - hours_offset = int(hours_offset_s) - mins_offset = int(mins_offset_s) - - # Calculate net offset - net_mins_offset = hours_offset * 60 - net_mins_offset += mins_offset - net_mins_offset *= plus_minus - - # Create an offset object - tzoffset = FixedOffsetTimezone(net_mins_offset) - - # Store the offset in a datetime object - dt = dt.replace(tzinfo=tzoffset) - - return dt - - -class Message(object): - """Representation of a single message in a catalog.""" - - def __init__(self, id, string=u'', locations=(), flags=(), auto_comments=(), - user_comments=(), previous_id=(), lineno=None, context=None): - """Create the message object. - - :param id: the message ID, or a ``(singular, plural)`` tuple for - pluralizable messages - :param string: the translated message string, or a - ``(singular, plural)`` tuple for pluralizable messages - :param locations: a sequence of ``(filenname, lineno)`` tuples - :param flags: a set or sequence of flags - :param auto_comments: a sequence of automatic comments for the message - :param user_comments: a sequence of user comments for the message - :param previous_id: the previous message ID, or a ``(singular, plural)`` - tuple for pluralizable messages - :param lineno: the line number on which the msgid line was found in the - PO file, if any - :param context: the message context - """ - self.id = id - if not string and self.pluralizable: - string = (u'', u'') - self.string = string - self.locations = list(distinct(locations)) - self.flags = set(flags) - if id and self.python_format: - self.flags.add('python-format') - else: - self.flags.discard('python-format') - self.auto_comments = list(distinct(auto_comments)) - self.user_comments = list(distinct(user_comments)) - if isinstance(previous_id, string_types): - self.previous_id = [previous_id] - else: - self.previous_id = list(previous_id) - self.lineno = lineno - self.context = context - - def __repr__(self): - return '<%s %r (flags: %r)>' % (type(self).__name__, self.id, - list(self.flags)) - - def __cmp__(self, obj): - """Compare Messages, taking into account plural ids""" - def values_to_compare(): - if isinstance(obj, Message): - plural = self.pluralizable - obj_plural = obj.pluralizable - if plural and obj_plural: - return self.id[0], obj.id[0] - elif plural: - return self.id[0], obj.id - elif obj_plural: - return self.id, obj.id[0] - return self.id, obj.id - this, other = values_to_compare() - return cmp(this, other) - - def __gt__(self, other): - return self.__cmp__(other) > 0 - - def __lt__(self, other): - return self.__cmp__(other) < 0 - - def __ge__(self, other): - return self.__cmp__(other) >= 0 - - def __le__(self, other): - return self.__cmp__(other) <= 0 - - def __eq__(self, other): - return self.__cmp__(other) == 0 - - def __ne__(self, other): - return self.__cmp__(other) != 0 - - def clone(self): - return Message(*map(copy, (self.id, self.string, self.locations, - self.flags, self.auto_comments, - self.user_comments, self.previous_id, - self.lineno, self.context))) - - def check(self, catalog=None): - """Run various validation checks on the message. Some validations - are only performed if the catalog is provided. This method returns - a sequence of `TranslationError` objects. - - :rtype: ``iterator`` - :param catalog: A catalog instance that is passed to the checkers - :see: `Catalog.check` for a way to perform checks for all messages - in a catalog. - """ - from babel.messages.checkers import checkers - errors = [] - for checker in checkers: - try: - checker(catalog, self) - except TranslationError as e: - errors.append(e) - return errors - - @property - def fuzzy(self): - """Whether the translation is fuzzy. - - >>> Message('foo').fuzzy - False - >>> msg = Message('foo', 'foo', flags=['fuzzy']) - >>> msg.fuzzy - True - >>> msg - - - :type: `bool`""" - return 'fuzzy' in self.flags - - @property - def pluralizable(self): - """Whether the message is plurizable. - - >>> Message('foo').pluralizable - False - >>> Message(('foo', 'bar')).pluralizable - True - - :type: `bool`""" - return isinstance(self.id, (list, tuple)) - - @property - def python_format(self): - """Whether the message contains Python-style parameters. - - >>> Message('foo %(name)s bar').python_format - True - >>> Message(('foo %(name)s', 'foo %(name)s')).python_format - True - - :type: `bool`""" - ids = self.id - if not isinstance(ids, (list, tuple)): - ids = [ids] - return any(PYTHON_FORMAT.search(id) for id in ids) - - -class TranslationError(Exception): - """Exception thrown by translation checkers when invalid message - translations are encountered.""" - - -DEFAULT_HEADER = u"""\ -# Translations template for PROJECT. -# Copyright (C) YEAR ORGANIZATION -# This file is distributed under the same license as the PROJECT project. -# FIRST AUTHOR , YEAR. -#""" - - -if PY2: - def _parse_header(header_string): - # message_from_string only works for str, not for unicode - headers = message_from_string(header_string.encode('utf8')) - decoded_headers = {} - for name, value in headers.items(): - name = name.decode('utf8') - value = value.decode('utf8') - decoded_headers[name] = value - return decoded_headers - -else: - _parse_header = message_from_string - - -class Catalog(object): - """Representation of a message catalog.""" - - def __init__(self, locale=None, domain=None, header_comment=DEFAULT_HEADER, - project=None, version=None, copyright_holder=None, - msgid_bugs_address=None, creation_date=None, - revision_date=None, last_translator=None, language_team=None, - charset=None, fuzzy=True): - """Initialize the catalog object. - - :param locale: the locale identifier or `Locale` object, or `None` - if the catalog is not bound to a locale (which basically - means it's a template) - :param domain: the message domain - :param header_comment: the header comment as string, or `None` for the - default header - :param project: the project's name - :param version: the project's version - :param copyright_holder: the copyright holder of the catalog - :param msgid_bugs_address: the email address or URL to submit bug - reports to - :param creation_date: the date the catalog was created - :param revision_date: the date the catalog was revised - :param last_translator: the name and email of the last translator - :param language_team: the name and email of the language team - :param charset: the encoding to use in the output (defaults to utf-8) - :param fuzzy: the fuzzy bit on the catalog header - """ - self.domain = domain - if locale: - locale = Locale.parse(locale) - self.locale = locale - self._header_comment = header_comment - self._messages = odict() - - self.project = project or 'PROJECT' - self.version = version or 'VERSION' - self.copyright_holder = copyright_holder or 'ORGANIZATION' - self.msgid_bugs_address = msgid_bugs_address or 'EMAIL@ADDRESS' - - self.last_translator = last_translator or 'FULL NAME ' - """Name and email address of the last translator.""" - self.language_team = language_team or 'LANGUAGE ' - """Name and email address of the language team.""" - - self.charset = charset or 'utf-8' - - if creation_date is None: - creation_date = datetime.now(LOCALTZ) - elif isinstance(creation_date, datetime) and not creation_date.tzinfo: - creation_date = creation_date.replace(tzinfo=LOCALTZ) - self.creation_date = creation_date - if revision_date is None: - revision_date = 'YEAR-MO-DA HO:MI+ZONE' - elif isinstance(revision_date, datetime) and not revision_date.tzinfo: - revision_date = revision_date.replace(tzinfo=LOCALTZ) - self.revision_date = revision_date - self.fuzzy = fuzzy - - self.obsolete = odict() # Dictionary of obsolete messages - self._num_plurals = None - self._plural_expr = None - - def _get_header_comment(self): - comment = self._header_comment - year = datetime.now(LOCALTZ).strftime('%Y') - if hasattr(self.revision_date, 'strftime'): - year = self.revision_date.strftime('%Y') - comment = comment.replace('PROJECT', self.project) \ - .replace('VERSION', self.version) \ - .replace('YEAR', year) \ - .replace('ORGANIZATION', self.copyright_holder) - if self.locale: - comment = comment.replace('Translations template', '%s translations' - % self.locale.english_name) - return comment - - def _set_header_comment(self, string): - self._header_comment = string - - header_comment = property(_get_header_comment, _set_header_comment, doc="""\ - The header comment for the catalog. - - >>> catalog = Catalog(project='Foobar', version='1.0', - ... copyright_holder='Foo Company') - >>> print(catalog.header_comment) #doctest: +ELLIPSIS - # Translations template for Foobar. - # Copyright (C) ... Foo Company - # This file is distributed under the same license as the Foobar project. - # FIRST AUTHOR , .... - # - - The header can also be set from a string. Any known upper-case variables - will be replaced when the header is retrieved again: - - >>> catalog = Catalog(project='Foobar', version='1.0', - ... copyright_holder='Foo Company') - >>> catalog.header_comment = '''\\ - ... # The POT for my really cool PROJECT project. - ... # Copyright (C) 1990-2003 ORGANIZATION - ... # This file is distributed under the same license as the PROJECT - ... # project. - ... #''' - >>> print(catalog.header_comment) - # The POT for my really cool Foobar project. - # Copyright (C) 1990-2003 Foo Company - # This file is distributed under the same license as the Foobar - # project. - # - - :type: `unicode` - """) - - def _get_mime_headers(self): - headers = [] - headers.append(('Project-Id-Version', - '%s %s' % (self.project, self.version))) - headers.append(('Report-Msgid-Bugs-To', self.msgid_bugs_address)) - headers.append(('POT-Creation-Date', - format_datetime(self.creation_date, 'yyyy-MM-dd HH:mmZ', - locale='en'))) - if isinstance(self.revision_date, (datetime, time_) + number_types): - headers.append(('PO-Revision-Date', - format_datetime(self.revision_date, - 'yyyy-MM-dd HH:mmZ', locale='en'))) - else: - headers.append(('PO-Revision-Date', self.revision_date)) - headers.append(('Last-Translator', self.last_translator)) - if self.locale is not None: - headers.append(('Language', str(self.locale))) - if (self.locale is not None) and ('LANGUAGE' in self.language_team): - headers.append(('Language-Team', - self.language_team.replace('LANGUAGE', - str(self.locale)))) - else: - headers.append(('Language-Team', self.language_team)) - if self.locale is not None: - headers.append(('Plural-Forms', self.plural_forms)) - headers.append(('MIME-Version', '1.0')) - headers.append(('Content-Type', - 'text/plain; charset=%s' % self.charset)) - headers.append(('Content-Transfer-Encoding', '8bit')) - headers.append(('Generated-By', 'Babel %s\n' % VERSION)) - return headers - - def _set_mime_headers(self, headers): - for name, value in headers: - name = name.lower() - if name == 'project-id-version': - parts = value.split(' ') - self.project = u' '.join(parts[:-1]) - self.version = parts[-1] - elif name == 'report-msgid-bugs-to': - self.msgid_bugs_address = value - elif name == 'last-translator': - self.last_translator = value - elif name == 'language-team': - self.language_team = value - elif name == 'content-type': - mimetype, params = parse_header(value) - if 'charset' in params: - self.charset = params['charset'].lower() - elif name == 'plural-forms': - _, params = parse_header(' ;' + value) - self._num_plurals = int(params.get('nplurals', 2)) - self._plural_expr = params.get('plural', '(n != 1)') - elif name == 'pot-creation-date': - self.creation_date = _parse_datetime_header(value) - elif name == 'po-revision-date': - # Keep the value if it's not the default one - if 'YEAR' not in value: - self.revision_date = _parse_datetime_header(value) - - mime_headers = property(_get_mime_headers, _set_mime_headers, doc="""\ - The MIME headers of the catalog, used for the special ``msgid ""`` entry. - - The behavior of this property changes slightly depending on whether a locale - is set or not, the latter indicating that the catalog is actually a template - for actual translations. - - Here's an example of the output for such a catalog template: - - >>> from babel.dates import UTC - >>> created = datetime(1990, 4, 1, 15, 30, tzinfo=UTC) - >>> catalog = Catalog(project='Foobar', version='1.0', - ... creation_date=created) - >>> for name, value in catalog.mime_headers: - ... print('%s: %s' % (name, value)) - Project-Id-Version: Foobar 1.0 - Report-Msgid-Bugs-To: EMAIL@ADDRESS - POT-Creation-Date: 1990-04-01 15:30+0000 - PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE - Last-Translator: FULL NAME - Language-Team: LANGUAGE - MIME-Version: 1.0 - Content-Type: text/plain; charset=utf-8 - Content-Transfer-Encoding: 8bit - Generated-By: Babel ... - - And here's an example of the output when the locale is set: - - >>> revised = datetime(1990, 8, 3, 12, 0, tzinfo=UTC) - >>> catalog = Catalog(locale='de_DE', project='Foobar', version='1.0', - ... creation_date=created, revision_date=revised, - ... last_translator='John Doe ', - ... language_team='de_DE ') - >>> for name, value in catalog.mime_headers: - ... print('%s: %s' % (name, value)) - Project-Id-Version: Foobar 1.0 - Report-Msgid-Bugs-To: EMAIL@ADDRESS - POT-Creation-Date: 1990-04-01 15:30+0000 - PO-Revision-Date: 1990-08-03 12:00+0000 - Last-Translator: John Doe - Language: de_DE - Language-Team: de_DE - Plural-Forms: nplurals=2; plural=(n != 1) - MIME-Version: 1.0 - Content-Type: text/plain; charset=utf-8 - Content-Transfer-Encoding: 8bit - Generated-By: Babel ... - - :type: `list` - """) - - @property - def num_plurals(self): - """The number of plurals used by the catalog or locale. - - >>> Catalog(locale='en').num_plurals - 2 - >>> Catalog(locale='ga').num_plurals - 3 - - :type: `int`""" - if self._num_plurals is None: - num = 2 - if self.locale: - num = get_plural(self.locale)[0] - self._num_plurals = num - return self._num_plurals - - @property - def plural_expr(self): - """The plural expression used by the catalog or locale. - - >>> Catalog(locale='en').plural_expr - '(n != 1)' - >>> Catalog(locale='ga').plural_expr - '(n==1 ? 0 : n==2 ? 1 : 2)' - - :type: `string_types`""" - if self._plural_expr is None: - expr = '(n != 1)' - if self.locale: - expr = get_plural(self.locale)[1] - self._plural_expr = expr - return self._plural_expr - - @property - def plural_forms(self): - """Return the plural forms declaration for the locale. - - >>> Catalog(locale='en').plural_forms - 'nplurals=2; plural=(n != 1)' - >>> Catalog(locale='pt_BR').plural_forms - 'nplurals=2; plural=(n > 1)' - - :type: `str`""" - return 'nplurals=%s; plural=%s' % (self.num_plurals, self.plural_expr) - - def __contains__(self, id): - """Return whether the catalog has a message with the specified ID.""" - return self._key_for(id) in self._messages - - def __len__(self): - """The number of messages in the catalog. - - This does not include the special ``msgid ""`` entry.""" - return len(self._messages) - - def __iter__(self): - """Iterates through all the entries in the catalog, in the order they - were added, yielding a `Message` object for every entry. - - :rtype: ``iterator``""" - buf = [] - for name, value in self.mime_headers: - buf.append('%s: %s' % (name, value)) - flags = set() - if self.fuzzy: - flags |= set(['fuzzy']) - yield Message(u'', '\n'.join(buf), flags=flags) - for key in self._messages: - yield self._messages[key] - - def __repr__(self): - locale = '' - if self.locale: - locale = ' %s' % self.locale - return '<%s %r%s>' % (type(self).__name__, self.domain, locale) - - def __delitem__(self, id): - """Delete the message with the specified ID.""" - self.delete(id) - - def __getitem__(self, id): - """Return the message with the specified ID. - - :param id: the message ID - """ - return self.get(id) - - def __setitem__(self, id, message): - """Add or update the message with the specified ID. - - >>> catalog = Catalog() - >>> catalog[u'foo'] = Message(u'foo') - >>> catalog[u'foo'] - - - If a message with that ID is already in the catalog, it is updated - to include the locations and flags of the new message. - - >>> catalog = Catalog() - >>> catalog[u'foo'] = Message(u'foo', locations=[('main.py', 1)]) - >>> catalog[u'foo'].locations - [('main.py', 1)] - >>> catalog[u'foo'] = Message(u'foo', locations=[('utils.py', 5)]) - >>> catalog[u'foo'].locations - [('main.py', 1), ('utils.py', 5)] - - :param id: the message ID - :param message: the `Message` object - """ - assert isinstance(message, Message), 'expected a Message object' - key = self._key_for(id, message.context) - current = self._messages.get(key) - if current: - if message.pluralizable and not current.pluralizable: - # The new message adds pluralization - current.id = message.id - current.string = message.string - current.locations = list(distinct(current.locations + - message.locations)) - current.auto_comments = list(distinct(current.auto_comments + - message.auto_comments)) - current.user_comments = list(distinct(current.user_comments + - message.user_comments)) - current.flags |= message.flags - message = current - elif id == '': - # special treatment for the header message - self.mime_headers = _parse_header(message.string).items() - self.header_comment = '\n'.join([('# %s' % c).rstrip() for c - in message.user_comments]) - self.fuzzy = message.fuzzy - else: - if isinstance(id, (list, tuple)): - assert isinstance(message.string, (list, tuple)), \ - 'Expected sequence but got %s' % type(message.string) - self._messages[key] = message - - def add(self, id, string=None, locations=(), flags=(), auto_comments=(), - user_comments=(), previous_id=(), lineno=None, context=None): - """Add or update the message with the specified ID. - - >>> catalog = Catalog() - >>> catalog.add(u'foo') - - >>> catalog[u'foo'] - - - This method simply constructs a `Message` object with the given - arguments and invokes `__setitem__` with that object. - - :param id: the message ID, or a ``(singular, plural)`` tuple for - pluralizable messages - :param string: the translated message string, or a - ``(singular, plural)`` tuple for pluralizable messages - :param locations: a sequence of ``(filenname, lineno)`` tuples - :param flags: a set or sequence of flags - :param auto_comments: a sequence of automatic comments - :param user_comments: a sequence of user comments - :param previous_id: the previous message ID, or a ``(singular, plural)`` - tuple for pluralizable messages - :param lineno: the line number on which the msgid line was found in the - PO file, if any - :param context: the message context - """ - message = Message(id, string, list(locations), flags, auto_comments, - user_comments, previous_id, lineno=lineno, - context=context) - self[id] = message - return message - - def check(self): - """Run various validation checks on the translations in the catalog. - - For every message which fails validation, this method yield a - ``(message, errors)`` tuple, where ``message`` is the `Message` object - and ``errors`` is a sequence of `TranslationError` objects. - - :rtype: ``iterator`` - """ - for message in self._messages.values(): - errors = message.check(catalog=self) - if errors: - yield message, errors - - def get(self, id, context=None): - """Return the message with the specified ID and context. - - :param id: the message ID - :param context: the message context, or ``None`` for no context - """ - return self._messages.get(self._key_for(id, context)) - - def delete(self, id, context=None): - """Delete the message with the specified ID and context. - - :param id: the message ID - :param context: the message context, or ``None`` for no context - """ - key = self._key_for(id, context) - if key in self._messages: - del self._messages[key] - - def update(self, template, no_fuzzy_matching=False, update_header_comment=False): - """Update the catalog based on the given template catalog. - - >>> from babel.messages import Catalog - >>> template = Catalog() - >>> template.add('green', locations=[('main.py', 99)]) - - >>> template.add('blue', locations=[('main.py', 100)]) - - >>> template.add(('salad', 'salads'), locations=[('util.py', 42)]) - - >>> catalog = Catalog(locale='de_DE') - >>> catalog.add('blue', u'blau', locations=[('main.py', 98)]) - - >>> catalog.add('head', u'Kopf', locations=[('util.py', 33)]) - - >>> catalog.add(('salad', 'salads'), (u'Salat', u'Salate'), - ... locations=[('util.py', 38)]) - - - >>> catalog.update(template) - >>> len(catalog) - 3 - - >>> msg1 = catalog['green'] - >>> msg1.string - >>> msg1.locations - [('main.py', 99)] - - >>> msg2 = catalog['blue'] - >>> msg2.string - u'blau' - >>> msg2.locations - [('main.py', 100)] - - >>> msg3 = catalog['salad'] - >>> msg3.string - (u'Salat', u'Salate') - >>> msg3.locations - [('util.py', 42)] - - Messages that are in the catalog but not in the template are removed - from the main collection, but can still be accessed via the `obsolete` - member: - - >>> 'head' in catalog - False - >>> list(catalog.obsolete.values()) - [] - - :param template: the reference catalog, usually read from a POT file - :param no_fuzzy_matching: whether to use fuzzy matching of message IDs - """ - messages = self._messages - remaining = messages.copy() - self._messages = odict() - - # Prepare for fuzzy matching - fuzzy_candidates = [] - if not no_fuzzy_matching: - fuzzy_candidates = dict([ - (self._key_for(msgid), messages[msgid].context) - for msgid in messages if msgid and messages[msgid].string - ]) - fuzzy_matches = set() - - def _merge(message, oldkey, newkey): - message = message.clone() - fuzzy = False - if oldkey != newkey: - fuzzy = True - fuzzy_matches.add(oldkey) - oldmsg = messages.get(oldkey) - if isinstance(oldmsg.id, string_types): - message.previous_id = [oldmsg.id] - else: - message.previous_id = list(oldmsg.id) - else: - oldmsg = remaining.pop(oldkey, None) - message.string = oldmsg.string - if isinstance(message.id, (list, tuple)): - if not isinstance(message.string, (list, tuple)): - fuzzy = True - message.string = tuple( - [message.string] + ([u''] * (len(message.id) - 1)) - ) - elif len(message.string) != self.num_plurals: - fuzzy = True - message.string = tuple(message.string[:len(oldmsg.string)]) - elif isinstance(message.string, (list, tuple)): - fuzzy = True - message.string = message.string[0] - message.flags |= oldmsg.flags - if fuzzy: - message.flags |= set([u'fuzzy']) - self[message.id] = message - - for message in template: - if message.id: - key = self._key_for(message.id, message.context) - if key in messages: - _merge(message, key, key) - else: - if no_fuzzy_matching is False: - # do some fuzzy matching with difflib - if isinstance(key, tuple): - matchkey = key[0] # just the msgid, no context - else: - matchkey = key - matches = get_close_matches(matchkey.lower().strip(), - fuzzy_candidates.keys(), 1) - if matches: - newkey = matches[0] - newctxt = fuzzy_candidates[newkey] - if newctxt is not None: - newkey = newkey, newctxt - _merge(message, newkey, key) - continue - - self[message.id] = message - - for msgid in remaining: - if no_fuzzy_matching or msgid not in fuzzy_matches: - self.obsolete[msgid] = remaining[msgid] - - if update_header_comment: - # Allow the updated catalog's header to be rewritten based on the - # template's header - self.header_comment = template.header_comment - - # Make updated catalog's POT-Creation-Date equal to the template - # used to update the catalog - self.creation_date = template.creation_date - - def _key_for(self, id, context=None): - """The key for a message is just the singular ID even for pluralizable - messages, but is a ``(msgid, msgctxt)`` tuple for context-specific - messages. - """ - key = id - if isinstance(key, (list, tuple)): - key = id[0] - if context is not None: - key = (key, context) - return key diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/messages/checkers.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/messages/checkers.py deleted file mode 100644 index 24ecdcf..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/messages/checkers.py +++ /dev/null @@ -1,173 +0,0 @@ -# -*- coding: utf-8 -*- -""" - babel.messages.checkers - ~~~~~~~~~~~~~~~~~~~~~~~ - - Various routines that help with validation of translations. - - :since: version 0.9 - - :copyright: (c) 2013 by the Babel Team. - :license: BSD, see LICENSE for more details. -""" - -from babel.messages.catalog import TranslationError, PYTHON_FORMAT -from babel._compat import string_types, izip - - -#: list of format chars that are compatible to each other -_string_format_compatibilities = [ - set(['i', 'd', 'u']), - set(['x', 'X']), - set(['f', 'F', 'g', 'G']) -] - - -def num_plurals(catalog, message): - """Verify the number of plurals in the translation.""" - if not message.pluralizable: - if not isinstance(message.string, string_types): - raise TranslationError("Found plural forms for non-pluralizable " - "message") - return - - # skip further tests if no catalog is provided. - elif catalog is None: - return - - msgstrs = message.string - if not isinstance(msgstrs, (list, tuple)): - msgstrs = (msgstrs,) - if len(msgstrs) != catalog.num_plurals: - raise TranslationError("Wrong number of plural forms (expected %d)" % - catalog.num_plurals) - - -def python_format(catalog, message): - """Verify the format string placeholders in the translation.""" - if 'python-format' not in message.flags: - return - msgids = message.id - if not isinstance(msgids, (list, tuple)): - msgids = (msgids,) - msgstrs = message.string - if not isinstance(msgstrs, (list, tuple)): - msgstrs = (msgstrs,) - - for msgid, msgstr in izip(msgids, msgstrs): - if msgstr: - _validate_format(msgid, msgstr) - - -def _validate_format(format, alternative): - """Test format string `alternative` against `format`. `format` can be the - msgid of a message and `alternative` one of the `msgstr`\s. The two - arguments are not interchangeable as `alternative` may contain less - placeholders if `format` uses named placeholders. - - The behavior of this function is undefined if the string does not use - string formattings. - - If the string formatting of `alternative` is compatible to `format` the - function returns `None`, otherwise a `TranslationError` is raised. - - Examples for compatible format strings: - - >>> _validate_format('Hello %s!', 'Hallo %s!') - >>> _validate_format('Hello %i!', 'Hallo %d!') - - Example for an incompatible format strings: - - >>> _validate_format('Hello %(name)s!', 'Hallo %s!') - Traceback (most recent call last): - ... - TranslationError: the format strings are of different kinds - - This function is used by the `python_format` checker. - - :param format: The original format string - :param alternative: The alternative format string that should be checked - against format - :raises TranslationError: on formatting errors - """ - - def _parse(string): - result = [] - for match in PYTHON_FORMAT.finditer(string): - name, format, typechar = match.groups() - if typechar == '%' and name is None: - continue - result.append((name, str(typechar))) - return result - - def _compatible(a, b): - if a == b: - return True - for set in _string_format_compatibilities: - if a in set and b in set: - return True - return False - - def _check_positional(results): - positional = None - for name, char in results: - if positional is None: - positional = name is None - else: - if (name is None) != positional: - raise TranslationError('format string mixes positional ' - 'and named placeholders') - return bool(positional) - - a, b = map(_parse, (format, alternative)) - - # now check if both strings are positional or named - a_positional, b_positional = map(_check_positional, (a, b)) - if a_positional and not b_positional and not b: - raise TranslationError('placeholders are incompatible') - elif a_positional != b_positional: - raise TranslationError('the format strings are of different kinds') - - # if we are operating on positional strings both must have the - # same number of format chars and those must be compatible - if a_positional: - if len(a) != len(b): - raise TranslationError('positional format placeholders are ' - 'unbalanced') - for idx, ((_, first), (_, second)) in enumerate(izip(a, b)): - if not _compatible(first, second): - raise TranslationError('incompatible format for placeholder ' - '%d: %r and %r are not compatible' % - (idx + 1, first, second)) - - # otherwise the second string must not have names the first one - # doesn't have and the types of those included must be compatible - else: - type_map = dict(a) - for name, typechar in b: - if name not in type_map: - raise TranslationError('unknown named placeholder %r' % name) - elif not _compatible(typechar, type_map[name]): - raise TranslationError('incompatible format for ' - 'placeholder %r: ' - '%r and %r are not compatible' % - (name, typechar, type_map[name])) - - -def _find_checkers(): - checkers = [] - try: - from pkg_resources import working_set - except ImportError: - pass - else: - for entry_point in working_set.iter_entry_points('babel.checkers'): - checkers.append(entry_point.load()) - if len(checkers) == 0: - # if pkg_resources is not available or no usable egg-info was found - # (see #230), just resort to hard-coded checkers - return [num_plurals, python_format] - return checkers - - -checkers = _find_checkers() diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/messages/extract.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/messages/extract.py deleted file mode 100644 index 7162627..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/messages/extract.py +++ /dev/null @@ -1,632 +0,0 @@ -# -*- coding: utf-8 -*- -""" - babel.messages.extract - ~~~~~~~~~~~~~~~~~~~~~~ - - Basic infrastructure for extracting localizable messages from source files. - - This module defines an extensible system for collecting localizable message - strings from a variety of sources. A native extractor for Python source - files is builtin, extractors for other sources can be added using very - simple plugins. - - The main entry points into the extraction functionality are the functions - `extract_from_dir` and `extract_from_file`. - - :copyright: (c) 2013 by the Babel Team. - :license: BSD, see LICENSE for more details. -""" - -import os -from os.path import relpath -import sys -from tokenize import generate_tokens, COMMENT, NAME, OP, STRING - -from babel.util import parse_encoding, pathmatch -from babel._compat import PY2, text_type -from textwrap import dedent - - -GROUP_NAME = 'babel.extractors' - -DEFAULT_KEYWORDS = { - '_': None, - 'gettext': None, - 'ngettext': (1, 2), - 'ugettext': None, - 'ungettext': (1, 2), - 'dgettext': (2,), - 'dngettext': (2, 3), - 'N_': None, - 'pgettext': ((1, 'c'), 2), - 'npgettext': ((1, 'c'), 2, 3) -} - -DEFAULT_MAPPING = [('**.py', 'python')] - -empty_msgid_warning = ( - '%s: warning: Empty msgid. It is reserved by GNU gettext: gettext("") ' - 'returns the header entry with meta information, not the empty string.') - - -def _strip_comment_tags(comments, tags): - """Helper function for `extract` that strips comment tags from strings - in a list of comment lines. This functions operates in-place. - """ - def _strip(line): - for tag in tags: - if line.startswith(tag): - return line[len(tag):].strip() - return line - comments[:] = map(_strip, comments) - - -def extract_from_dir(dirname=None, method_map=DEFAULT_MAPPING, - options_map=None, keywords=DEFAULT_KEYWORDS, - comment_tags=(), callback=None, strip_comment_tags=False): - """Extract messages from any source files found in the given directory. - - This function generates tuples of the form ``(filename, lineno, message, - comments, context)``. - - Which extraction method is used per file is determined by the `method_map` - parameter, which maps extended glob patterns to extraction method names. - For example, the following is the default mapping: - - >>> method_map = [ - ... ('**.py', 'python') - ... ] - - This basically says that files with the filename extension ".py" at any - level inside the directory should be processed by the "python" extraction - method. Files that don't match any of the mapping patterns are ignored. See - the documentation of the `pathmatch` function for details on the pattern - syntax. - - The following extended mapping would also use the "genshi" extraction - method on any file in "templates" subdirectory: - - >>> method_map = [ - ... ('**/templates/**.*', 'genshi'), - ... ('**.py', 'python') - ... ] - - The dictionary provided by the optional `options_map` parameter augments - these mappings. It uses extended glob patterns as keys, and the values are - dictionaries mapping options names to option values (both strings). - - The glob patterns of the `options_map` do not necessarily need to be the - same as those used in the method mapping. For example, while all files in - the ``templates`` folders in an application may be Genshi applications, the - options for those files may differ based on extension: - - >>> options_map = { - ... '**/templates/**.txt': { - ... 'template_class': 'genshi.template:TextTemplate', - ... 'encoding': 'latin-1' - ... }, - ... '**/templates/**.html': { - ... 'include_attrs': '' - ... } - ... } - - :param dirname: the path to the directory to extract messages from. If - not given the current working directory is used. - :param method_map: a list of ``(pattern, method)`` tuples that maps of - extraction method names to extended glob patterns - :param options_map: a dictionary of additional options (optional) - :param keywords: a dictionary mapping keywords (i.e. names of functions - that should be recognized as translation functions) to - tuples that specify which of their arguments contain - localizable strings - :param comment_tags: a list of tags of translator comments to search for - and include in the results - :param callback: a function that is called for every file that message are - extracted from, just before the extraction itself is - performed; the function is passed the filename, the name - of the extraction method and and the options dictionary as - positional arguments, in that order - :param strip_comment_tags: a flag that if set to `True` causes all comment - tags to be removed from the collected comments. - :see: `pathmatch` - """ - if dirname is None: - dirname = os.getcwd() - if options_map is None: - options_map = {} - - absname = os.path.abspath(dirname) - for root, dirnames, filenames in os.walk(absname): - for subdir in dirnames: - if subdir.startswith('.') or subdir.startswith('_'): - dirnames.remove(subdir) - dirnames.sort() - filenames.sort() - for filename in filenames: - filepath = os.path.join(root, filename).replace(os.sep, '/') - - for message_tuple in check_and_call_extract_file( - filepath, - method_map, - options_map, - callback, - keywords, - comment_tags, - strip_comment_tags, - dirpath=absname, - ): - yield message_tuple - - -def check_and_call_extract_file(filepath, method_map, options_map, - callback, keywords, comment_tags, - strip_comment_tags, dirpath=None): - """Checks if the given file matches an extraction method mapping, and if so, calls extract_from_file. - - Note that the extraction method mappings are based relative to dirpath. - So, given an absolute path to a file `filepath`, we want to check using - just the relative path from `dirpath` to `filepath`. - - :param filepath: An absolute path to a file that exists. - :param method_map: a list of ``(pattern, method)`` tuples that maps of - extraction method names to extended glob patterns - :param options_map: a dictionary of additional options (optional) - :param callback: a function that is called for every file that message are - extracted from, just before the extraction itself is - performed; the function is passed the filename, the name - of the extraction method and and the options dictionary as - positional arguments, in that order - :param keywords: a dictionary mapping keywords (i.e. names of functions - that should be recognized as translation functions) to - tuples that specify which of their arguments contain - localizable strings - :param comment_tags: a list of tags of translator comments to search for - and include in the results - :param strip_comment_tags: a flag that if set to `True` causes all comment - tags to be removed from the collected comments. - :param dirpath: the path to the directory to extract messages from. - """ - # filename is the relative path from dirpath to the actual file - filename = relpath(filepath, dirpath) - - for pattern, method in method_map: - if not pathmatch(pattern, filename): - continue - - options = {} - for opattern, odict in options_map.items(): - if pathmatch(opattern, filename): - options = odict - if callback: - callback(filename, method, options) - for message_tuple in extract_from_file( - method, filepath, - keywords=keywords, - comment_tags=comment_tags, - options=options, - strip_comment_tags=strip_comment_tags - ): - yield (filename, ) + message_tuple - - break - - -def extract_from_file(method, filename, keywords=DEFAULT_KEYWORDS, - comment_tags=(), options=None, strip_comment_tags=False): - """Extract messages from a specific file. - - This function returns a list of tuples of the form ``(lineno, funcname, - message)``. - - :param filename: the path to the file to extract messages from - :param method: a string specifying the extraction method (.e.g. "python") - :param keywords: a dictionary mapping keywords (i.e. names of functions - that should be recognized as translation functions) to - tuples that specify which of their arguments contain - localizable strings - :param comment_tags: a list of translator tags to search for and include - in the results - :param strip_comment_tags: a flag that if set to `True` causes all comment - tags to be removed from the collected comments. - :param options: a dictionary of additional options (optional) - """ - fileobj = open(filename, 'rb') - try: - return list(extract(method, fileobj, keywords, comment_tags, options, - strip_comment_tags)) - finally: - fileobj.close() - - -def extract(method, fileobj, keywords=DEFAULT_KEYWORDS, comment_tags=(), - options=None, strip_comment_tags=False): - """Extract messages from the given file-like object using the specified - extraction method. - - This function returns tuples of the form ``(lineno, message, comments)``. - - The implementation dispatches the actual extraction to plugins, based on the - value of the ``method`` parameter. - - >>> source = b'''# foo module - ... def run(argv): - ... print(_('Hello, world!')) - ... ''' - - >>> from babel._compat import BytesIO - >>> for message in extract('python', BytesIO(source)): - ... print(message) - (3, u'Hello, world!', [], None) - - :param method: an extraction method (a callable), or - a string specifying the extraction method (.e.g. "python"); - if this is a simple name, the extraction function will be - looked up by entry point; if it is an explicit reference - to a function (of the form ``package.module:funcname`` or - ``package.module.funcname``), the corresponding function - will be imported and used - :param fileobj: the file-like object the messages should be extracted from - :param keywords: a dictionary mapping keywords (i.e. names of functions - that should be recognized as translation functions) to - tuples that specify which of their arguments contain - localizable strings - :param comment_tags: a list of translator tags to search for and include - in the results - :param options: a dictionary of additional options (optional) - :param strip_comment_tags: a flag that if set to `True` causes all comment - tags to be removed from the collected comments. - :raise ValueError: if the extraction method is not registered - """ - func = None - if callable(method): - func = method - elif ':' in method or '.' in method: - if ':' not in method: - lastdot = method.rfind('.') - module, attrname = method[:lastdot], method[lastdot + 1:] - else: - module, attrname = method.split(':', 1) - func = getattr(__import__(module, {}, {}, [attrname]), attrname) - else: - try: - from pkg_resources import working_set - except ImportError: - pass - else: - for entry_point in working_set.iter_entry_points(GROUP_NAME, - method): - func = entry_point.load(require=True) - break - if func is None: - # if pkg_resources is not available or no usable egg-info was found - # (see #230), we resort to looking up the builtin extractors - # directly - builtin = { - 'ignore': extract_nothing, - 'python': extract_python, - 'javascript': extract_javascript - } - func = builtin.get(method) - - if func is None: - raise ValueError('Unknown extraction method %r' % method) - - results = func(fileobj, keywords.keys(), comment_tags, - options=options or {}) - - for lineno, funcname, messages, comments in results: - if funcname: - spec = keywords[funcname] or (1,) - else: - spec = (1,) - if not isinstance(messages, (list, tuple)): - messages = [messages] - if not messages: - continue - - # Validate the messages against the keyword's specification - context = None - msgs = [] - invalid = False - # last_index is 1 based like the keyword spec - last_index = len(messages) - for index in spec: - if isinstance(index, tuple): - context = messages[index[0] - 1] - continue - if last_index < index: - # Not enough arguments - invalid = True - break - message = messages[index - 1] - if message is None: - invalid = True - break - msgs.append(message) - if invalid: - continue - - # keyword spec indexes are 1 based, therefore '-1' - if isinstance(spec[0], tuple): - # context-aware *gettext method - first_msg_index = spec[1] - 1 - else: - first_msg_index = spec[0] - 1 - if not messages[first_msg_index]: - # An empty string msgid isn't valid, emit a warning - where = '%s:%i' % (hasattr(fileobj, 'name') and - fileobj.name or '(unknown)', lineno) - sys.stderr.write((empty_msgid_warning % where) + '\n') - continue - - messages = tuple(msgs) - if len(messages) == 1: - messages = messages[0] - - if strip_comment_tags: - _strip_comment_tags(comments, comment_tags) - yield lineno, messages, comments, context - - -def extract_nothing(fileobj, keywords, comment_tags, options): - """Pseudo extractor that does not actually extract anything, but simply - returns an empty list. - """ - return [] - - -def extract_python(fileobj, keywords, comment_tags, options): - """Extract messages from Python source code. - - It returns an iterator yielding tuples in the following form ``(lineno, - funcname, message, comments)``. - - :param fileobj: the seekable, file-like object the messages should be - extracted from - :param keywords: a list of keywords (i.e. function names) that should be - recognized as translation functions - :param comment_tags: a list of translator tags to search for and include - in the results - :param options: a dictionary of additional options (optional) - :rtype: ``iterator`` - """ - funcname = lineno = message_lineno = None - call_stack = -1 - buf = [] - messages = [] - translator_comments = [] - in_def = in_translator_comments = False - comment_tag = None - - encoding = parse_encoding(fileobj) or options.get('encoding', 'iso-8859-1') - - if PY2: - next_line = fileobj.readline - else: - next_line = lambda: fileobj.readline().decode(encoding) - - tokens = generate_tokens(next_line) - for tok, value, (lineno, _), _, _ in tokens: - if call_stack == -1 and tok == NAME and value in ('def', 'class'): - in_def = True - elif tok == OP and value == '(': - if in_def: - # Avoid false positives for declarations such as: - # def gettext(arg='message'): - in_def = False - continue - if funcname: - message_lineno = lineno - call_stack += 1 - elif in_def and tok == OP and value == ':': - # End of a class definition without parens - in_def = False - continue - elif call_stack == -1 and tok == COMMENT: - # Strip the comment token from the line - if PY2: - value = value.decode(encoding) - value = value[1:].strip() - if in_translator_comments and \ - translator_comments[-1][0] == lineno - 1: - # We're already inside a translator comment, continue appending - translator_comments.append((lineno, value)) - continue - # If execution reaches this point, let's see if comment line - # starts with one of the comment tags - for comment_tag in comment_tags: - if value.startswith(comment_tag): - in_translator_comments = True - translator_comments.append((lineno, value)) - break - elif funcname and call_stack == 0: - if tok == OP and value == ')': - if buf: - messages.append(''.join(buf)) - del buf[:] - else: - messages.append(None) - - if len(messages) > 1: - messages = tuple(messages) - else: - messages = messages[0] - # Comments don't apply unless they immediately preceed the - # message - if translator_comments and \ - translator_comments[-1][0] < message_lineno - 1: - translator_comments = [] - - yield (message_lineno, funcname, messages, - [comment[1] for comment in translator_comments]) - - funcname = lineno = message_lineno = None - call_stack = -1 - messages = [] - translator_comments = [] - in_translator_comments = False - elif tok == STRING: - # Unwrap quotes in a safe manner, maintaining the string's - # encoding - # https://sourceforge.net/tracker/?func=detail&atid=355470& - # aid=617979&group_id=5470 - value = eval('# coding=%s\n%s' % (str(encoding), value), - {'__builtins__': {}}, {}) - if PY2 and not isinstance(value, text_type): - value = value.decode(encoding) - buf.append(value) - elif tok == OP and value == ',': - if buf: - messages.append(''.join(buf)) - del buf[:] - else: - messages.append(None) - if translator_comments: - # We have translator comments, and since we're on a - # comma(,) user is allowed to break into a new line - # Let's increase the last comment's lineno in order - # for the comment to still be a valid one - old_lineno, old_comment = translator_comments.pop() - translator_comments.append((old_lineno + 1, old_comment)) - elif call_stack > 0 and tok == OP and value == ')': - call_stack -= 1 - elif funcname and call_stack == -1: - funcname = None - elif tok == NAME and value in keywords: - funcname = value - - -def extract_javascript(fileobj, keywords, comment_tags, options): - """Extract messages from JavaScript source code. - - :param fileobj: the seekable, file-like object the messages should be - extracted from - :param keywords: a list of keywords (i.e. function names) that should be - recognized as translation functions - :param comment_tags: a list of translator tags to search for and include - in the results - :param options: a dictionary of additional options (optional) - Supported options are: - * `jsx` -- set to false to disable JSX/E4X support. - * `template_string` -- set to false to disable ES6 - template string support. - """ - from babel.messages.jslexer import Token, tokenize, unquote_string - funcname = message_lineno = None - messages = [] - last_argument = None - translator_comments = [] - concatenate_next = False - encoding = options.get('encoding', 'utf-8') - last_token = None - call_stack = -1 - dotted = any('.' in kw for kw in keywords) - - for token in tokenize( - fileobj.read().decode(encoding), - jsx=options.get("jsx", True), - template_string=options.get("template_string", True), - dotted=dotted - ): - if ( # Turn keyword`foo` expressions into keyword("foo") calls: - funcname and # have a keyword... - (last_token and last_token.type == 'name') and # we've seen nothing after the keyword... - token.type == 'template_string' # this is a template string - ): - message_lineno = token.lineno - messages = [unquote_string(token.value)] - call_stack = 0 - token = Token('operator', ')', token.lineno) - - if token.type == 'operator' and token.value == '(': - if funcname: - message_lineno = token.lineno - call_stack += 1 - - elif call_stack == -1 and token.type == 'linecomment': - value = token.value[2:].strip() - if translator_comments and \ - translator_comments[-1][0] == token.lineno - 1: - translator_comments.append((token.lineno, value)) - continue - - for comment_tag in comment_tags: - if value.startswith(comment_tag): - translator_comments.append((token.lineno, value.strip())) - break - - elif token.type == 'multilinecomment': - # only one multi-line comment may preceed a translation - translator_comments = [] - value = token.value[2:-2].strip() - for comment_tag in comment_tags: - if value.startswith(comment_tag): - lines = value.splitlines() - if lines: - lines[0] = lines[0].strip() - lines[1:] = dedent('\n'.join(lines[1:])).splitlines() - for offset, line in enumerate(lines): - translator_comments.append((token.lineno + offset, - line)) - break - - elif funcname and call_stack == 0: - if token.type == 'operator' and token.value == ')': - if last_argument is not None: - messages.append(last_argument) - if len(messages) > 1: - messages = tuple(messages) - elif messages: - messages = messages[0] - else: - messages = None - - # Comments don't apply unless they immediately precede the - # message - if translator_comments and \ - translator_comments[-1][0] < message_lineno - 1: - translator_comments = [] - - if messages is not None: - yield (message_lineno, funcname, messages, - [comment[1] for comment in translator_comments]) - - funcname = message_lineno = last_argument = None - concatenate_next = False - translator_comments = [] - messages = [] - call_stack = -1 - - elif token.type in ('string', 'template_string'): - new_value = unquote_string(token.value) - if concatenate_next: - last_argument = (last_argument or '') + new_value - concatenate_next = False - else: - last_argument = new_value - - elif token.type == 'operator': - if token.value == ',': - if last_argument is not None: - messages.append(last_argument) - last_argument = None - else: - messages.append(None) - concatenate_next = False - elif token.value == '+': - concatenate_next = True - - elif call_stack > 0 and token.type == 'operator' \ - and token.value == ')': - call_stack -= 1 - - elif funcname and call_stack == -1: - funcname = None - - elif call_stack == -1 and token.type == 'name' and \ - token.value in keywords and \ - (last_token is None or last_token.type != 'name' or - last_token.value != 'function'): - funcname = token.value - - last_token = token diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/messages/frontend.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/messages/frontend.py deleted file mode 100644 index d190a2c..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/messages/frontend.py +++ /dev/null @@ -1,1018 +0,0 @@ -# -*- coding: utf-8 -*- -""" - babel.messages.frontend - ~~~~~~~~~~~~~~~~~~~~~~~ - - Frontends for the message extraction functionality. - - :copyright: (c) 2013 by the Babel Team. - :license: BSD, see LICENSE for more details. -""" -from __future__ import print_function - -import logging -import optparse -import os -import re -import shutil -import sys -import tempfile -from datetime import datetime -from locale import getpreferredencoding - -from babel import __version__ as VERSION -from babel import Locale, localedata -from babel._compat import StringIO, string_types, text_type -from babel.core import UnknownLocaleError -from babel.messages.catalog import Catalog -from babel.messages.extract import DEFAULT_KEYWORDS, DEFAULT_MAPPING, check_and_call_extract_file, extract_from_dir -from babel.messages.mofile import write_mo -from babel.messages.pofile import read_po, write_po -from babel.util import LOCALTZ, odict -from distutils import log as distutils_log -from distutils.cmd import Command as _Command -from distutils.errors import DistutilsOptionError, DistutilsSetupError - -try: - from ConfigParser import RawConfigParser -except ImportError: - from configparser import RawConfigParser - - -def listify_value(arg, split=None): - """ - Make a list out of an argument. - - Values from `distutils` argument parsing are always single strings; - values from `optparse` parsing may be lists of strings that may need - to be further split. - - No matter the input, this function returns a flat list of whitespace-trimmed - strings, with `None` values filtered out. - - >>> listify_value("foo bar") - ['foo', 'bar'] - >>> listify_value(["foo bar"]) - ['foo', 'bar'] - >>> listify_value([["foo"], "bar"]) - ['foo', 'bar'] - >>> listify_value([["foo"], ["bar", None, "foo"]]) - ['foo', 'bar', 'foo'] - >>> listify_value("foo, bar, quux", ",") - ['foo', 'bar', 'quux'] - - :param arg: A string or a list of strings - :param split: The argument to pass to `str.split()`. - :return: - """ - out = [] - - if not isinstance(arg, (list, tuple)): - arg = [arg] - - for val in arg: - if val is None: - continue - if isinstance(val, (list, tuple)): - out.extend(listify_value(val, split=split)) - continue - out.extend(s.strip() for s in text_type(val).split(split)) - assert all(isinstance(val, string_types) for val in out) - return out - - -class Command(_Command): - # This class is a small shim between Distutils commands and - # optparse option parsing in the frontend command line. - - #: Option name to be input as `args` on the script command line. - as_args = None - - #: Options which allow multiple values. - #: This is used by the `optparse` transmogrification code. - multiple_value_options = () - - #: Options which are booleans. - #: This is used by the `optparse` transmogrification code. - # (This is actually used by distutils code too, but is never - # declared in the base class.) - boolean_options = () - - #: Option aliases, to retain standalone command compatibility. - #: Distutils does not support option aliases, but optparse does. - #: This maps the distutils argument name to an iterable of aliases - #: that are usable with optparse. - option_aliases = {} - - #: Log object. To allow replacement in the script command line runner. - log = distutils_log - - def __init__(self, dist=None): - # A less strict version of distutils' `__init__`. - self.distribution = dist - self.initialize_options() - self._dry_run = None - self.verbose = False - self.force = None - self.help = 0 - self.finalized = 0 - - -class compile_catalog(Command): - """Catalog compilation command for use in ``setup.py`` scripts. - - If correctly installed, this command is available to Setuptools-using - setup scripts automatically. For projects using plain old ``distutils``, - the command needs to be registered explicitly in ``setup.py``:: - - from babel.messages.frontend import compile_catalog - - setup( - ... - cmdclass = {'compile_catalog': compile_catalog} - ) - - .. versionadded:: 0.9 - """ - - description = 'compile message catalogs to binary MO files' - user_options = [ - ('domain=', 'D', - "domains of PO files (space separated list, default 'messages')"), - ('directory=', 'd', - 'path to base directory containing the catalogs'), - ('input-file=', 'i', - 'name of the input file'), - ('output-file=', 'o', - "name of the output file (default " - "'//LC_MESSAGES/.mo')"), - ('locale=', 'l', - 'locale of the catalog to compile'), - ('use-fuzzy', 'f', - 'also include fuzzy translations'), - ('statistics', None, - 'print statistics about translations') - ] - boolean_options = ['use-fuzzy', 'statistics'] - - def initialize_options(self): - self.domain = 'messages' - self.directory = None - self.input_file = None - self.output_file = None - self.locale = None - self.use_fuzzy = False - self.statistics = False - - def finalize_options(self): - self.domain = listify_value(self.domain) - if not self.input_file and not self.directory: - raise DistutilsOptionError('you must specify either the input file ' - 'or the base directory') - if not self.output_file and not self.directory: - raise DistutilsOptionError('you must specify either the output file ' - 'or the base directory') - - def run(self): - for domain in self.domain: - self._run_domain(domain) - - def _run_domain(self, domain): - po_files = [] - mo_files = [] - - if not self.input_file: - if self.locale: - po_files.append((self.locale, - os.path.join(self.directory, self.locale, - 'LC_MESSAGES', - domain + '.po'))) - mo_files.append(os.path.join(self.directory, self.locale, - 'LC_MESSAGES', - domain + '.mo')) - else: - for locale in os.listdir(self.directory): - po_file = os.path.join(self.directory, locale, - 'LC_MESSAGES', domain + '.po') - if os.path.exists(po_file): - po_files.append((locale, po_file)) - mo_files.append(os.path.join(self.directory, locale, - 'LC_MESSAGES', - domain + '.mo')) - else: - po_files.append((self.locale, self.input_file)) - if self.output_file: - mo_files.append(self.output_file) - else: - mo_files.append(os.path.join(self.directory, self.locale, - 'LC_MESSAGES', - domain + '.mo')) - - if not po_files: - raise DistutilsOptionError('no message catalogs found') - - for idx, (locale, po_file) in enumerate(po_files): - mo_file = mo_files[idx] - infile = open(po_file, 'rb') - try: - catalog = read_po(infile, locale) - finally: - infile.close() - - if self.statistics: - translated = 0 - for message in list(catalog)[1:]: - if message.string: - translated += 1 - percentage = 0 - if len(catalog): - percentage = translated * 100 // len(catalog) - self.log.info( - '%d of %d messages (%d%%) translated in %s', - translated, len(catalog), percentage, po_file - ) - - if catalog.fuzzy and not self.use_fuzzy: - self.log.info('catalog %s is marked as fuzzy, skipping', po_file) - continue - - for message, errors in catalog.check(): - for error in errors: - self.log.error( - 'error: %s:%d: %s', po_file, message.lineno, error - ) - - self.log.info('compiling catalog %s to %s', po_file, mo_file) - - outfile = open(mo_file, 'wb') - try: - write_mo(outfile, catalog, use_fuzzy=self.use_fuzzy) - finally: - outfile.close() - - -class extract_messages(Command): - """Message extraction command for use in ``setup.py`` scripts. - - If correctly installed, this command is available to Setuptools-using - setup scripts automatically. For projects using plain old ``distutils``, - the command needs to be registered explicitly in ``setup.py``:: - - from babel.messages.frontend import extract_messages - - setup( - ... - cmdclass = {'extract_messages': extract_messages} - ) - """ - - description = 'extract localizable strings from the project code' - user_options = [ - ('charset=', None, - 'charset to use in the output file (default "utf-8")'), - ('keywords=', 'k', - 'space-separated list of keywords to look for in addition to the ' - 'defaults (may be repeated multiple times)'), - ('no-default-keywords', None, - 'do not include the default keywords'), - ('mapping-file=', 'F', - 'path to the mapping configuration file'), - ('no-location', None, - 'do not include location comments with filename and line number'), - ('omit-header', None, - 'do not include msgid "" entry in header'), - ('output-file=', 'o', - 'name of the output file'), - ('width=', 'w', - 'set output line width (default 76)'), - ('no-wrap', None, - 'do not break long message lines, longer than the output line width, ' - 'into several lines'), - ('sort-output', None, - 'generate sorted output (default False)'), - ('sort-by-file', None, - 'sort output by file location (default False)'), - ('msgid-bugs-address=', None, - 'set report address for msgid'), - ('copyright-holder=', None, - 'set copyright holder in output'), - ('project=', None, - 'set project name in output'), - ('version=', None, - 'set project version in output'), - ('add-comments=', 'c', - 'place comment block with TAG (or those preceding keyword lines) in ' - 'output file. Separate multiple TAGs with commas(,)'), # TODO: Support repetition of this argument - ('strip-comments', 's', - 'strip the comment TAGs from the comments.'), - ('input-paths=', None, - 'files or directories that should be scanned for messages. Separate multiple ' - 'files or directories with commas(,)'), # TODO: Support repetition of this argument - ('input-dirs=', None, # TODO (3.x): Remove me. - 'alias for input-paths (does allow files as well as directories).'), - ] - boolean_options = [ - 'no-default-keywords', 'no-location', 'omit-header', 'no-wrap', - 'sort-output', 'sort-by-file', 'strip-comments' - ] - as_args = 'input-paths' - multiple_value_options = ('add-comments', 'keywords') - option_aliases = { - 'keywords': ('--keyword',), - 'mapping-file': ('--mapping',), - 'output-file': ('--output',), - 'strip-comments': ('--strip-comment-tags',), - } - - def initialize_options(self): - self.charset = 'utf-8' - self.keywords = None - self.no_default_keywords = False - self.mapping_file = None - self.no_location = False - self.omit_header = False - self.output_file = None - self.input_dirs = None - self.input_paths = None - self.width = None - self.no_wrap = False - self.sort_output = False - self.sort_by_file = False - self.msgid_bugs_address = None - self.copyright_holder = None - self.project = None - self.version = None - self.add_comments = None - self.strip_comments = False - - def finalize_options(self): - if self.input_dirs: - if not self.input_paths: - self.input_paths = self.input_dirs - else: - raise DistutilsOptionError( - 'input-dirs and input-paths are mutually exclusive' - ) - - if self.no_default_keywords: - keywords = {} - else: - keywords = DEFAULT_KEYWORDS.copy() - - keywords.update(parse_keywords(listify_value(self.keywords))) - - self.keywords = keywords - - if not self.keywords: - raise DistutilsOptionError('you must specify new keywords if you ' - 'disable the default ones') - - if not self.output_file: - raise DistutilsOptionError('no output file specified') - if self.no_wrap and self.width: - raise DistutilsOptionError("'--no-wrap' and '--width' are mutually " - "exclusive") - if not self.no_wrap and not self.width: - self.width = 76 - elif self.width is not None: - self.width = int(self.width) - - if self.sort_output and self.sort_by_file: - raise DistutilsOptionError("'--sort-output' and '--sort-by-file' " - "are mutually exclusive") - - if self.input_paths: - if isinstance(self.input_paths, string_types): - self.input_paths = re.split(',\s*', self.input_paths) - elif self.distribution is not None: - self.input_paths = dict.fromkeys([ - k.split('.', 1)[0] - for k in (self.distribution.packages or ()) - ]).keys() - else: - self.input_paths = [] - - if not self.input_paths: - raise DistutilsOptionError("no input files or directories specified") - - for path in self.input_paths: - if not os.path.exists(path): - raise DistutilsOptionError("Input path: %s does not exist" % path) - - self.add_comments = listify_value(self.add_comments or (), ",") - - if self.distribution: - if not self.project: - self.project = self.distribution.get_name() - if not self.version: - self.version = self.distribution.get_version() - - def run(self): - mappings = self._get_mappings() - with open(self.output_file, 'wb') as outfile: - catalog = Catalog(project=self.project, - version=self.version, - msgid_bugs_address=self.msgid_bugs_address, - copyright_holder=self.copyright_holder, - charset=self.charset) - - for path, (method_map, options_map) in mappings.items(): - def callback(filename, method, options): - if method == 'ignore': - return - - # If we explicitly provide a full filepath, just use that. - # Otherwise, path will be the directory path and filename - # is the relative path from that dir to the file. - # So we can join those to get the full filepath. - if os.path.isfile(path): - filepath = path - else: - filepath = os.path.normpath(os.path.join(path, filename)) - - optstr = '' - if options: - optstr = ' (%s)' % ', '.join(['%s="%s"' % (k, v) for - k, v in options.items()]) - self.log.info('extracting messages from %s%s', filepath, optstr) - - if os.path.isfile(path): - current_dir = os.getcwd() - extracted = check_and_call_extract_file( - path, method_map, options_map, - callback, self.keywords, self.add_comments, - self.strip_comments, current_dir - ) - else: - extracted = extract_from_dir( - path, method_map, options_map, - keywords=self.keywords, - comment_tags=self.add_comments, - callback=callback, - strip_comment_tags=self.strip_comments - ) - for filename, lineno, message, comments, context in extracted: - if os.path.isfile(path): - filepath = filename # already normalized - else: - filepath = os.path.normpath(os.path.join(path, filename)) - - catalog.add(message, None, [(filepath, lineno)], - auto_comments=comments, context=context) - - self.log.info('writing PO template file to %s' % self.output_file) - write_po(outfile, catalog, width=self.width, - no_location=self.no_location, - omit_header=self.omit_header, - sort_output=self.sort_output, - sort_by_file=self.sort_by_file) - - def _get_mappings(self): - mappings = {} - - if self.mapping_file: - fileobj = open(self.mapping_file, 'U') - try: - method_map, options_map = parse_mapping(fileobj) - for path in self.input_paths: - mappings[path] = method_map, options_map - finally: - fileobj.close() - - elif getattr(self.distribution, 'message_extractors', None): - message_extractors = self.distribution.message_extractors - for path, mapping in message_extractors.items(): - if isinstance(mapping, string_types): - method_map, options_map = parse_mapping(StringIO(mapping)) - else: - method_map, options_map = [], {} - for pattern, method, options in mapping: - method_map.append((pattern, method)) - options_map[pattern] = options or {} - mappings[path] = method_map, options_map - - else: - for path in self.input_paths: - mappings[path] = DEFAULT_MAPPING, {} - - return mappings - - -def check_message_extractors(dist, name, value): - """Validate the ``message_extractors`` keyword argument to ``setup()``. - - :param dist: the distutils/setuptools ``Distribution`` object - :param name: the name of the keyword argument (should always be - "message_extractors") - :param value: the value of the keyword argument - :raise `DistutilsSetupError`: if the value is not valid - """ - assert name == 'message_extractors' - if not isinstance(value, dict): - raise DistutilsSetupError('the value of the "message_extractors" ' - 'parameter must be a dictionary') - - -class init_catalog(Command): - """New catalog initialization command for use in ``setup.py`` scripts. - - If correctly installed, this command is available to Setuptools-using - setup scripts automatically. For projects using plain old ``distutils``, - the command needs to be registered explicitly in ``setup.py``:: - - from babel.messages.frontend import init_catalog - - setup( - ... - cmdclass = {'init_catalog': init_catalog} - ) - """ - - description = 'create a new catalog based on a POT file' - user_options = [ - ('domain=', 'D', - "domain of PO file (default 'messages')"), - ('input-file=', 'i', - 'name of the input file'), - ('output-dir=', 'd', - 'path to output directory'), - ('output-file=', 'o', - "name of the output file (default " - "'//LC_MESSAGES/.po')"), - ('locale=', 'l', - 'locale for the new localized catalog'), - ('width=', 'w', - 'set output line width (default 76)'), - ('no-wrap', None, - 'do not break long message lines, longer than the output line width, ' - 'into several lines'), - ] - boolean_options = ['no-wrap'] - - def initialize_options(self): - self.output_dir = None - self.output_file = None - self.input_file = None - self.locale = None - self.domain = 'messages' - self.no_wrap = False - self.width = None - - def finalize_options(self): - if not self.input_file: - raise DistutilsOptionError('you must specify the input file') - - if not self.locale: - raise DistutilsOptionError('you must provide a locale for the ' - 'new catalog') - try: - self._locale = Locale.parse(self.locale) - except UnknownLocaleError as e: - raise DistutilsOptionError(e) - - if not self.output_file and not self.output_dir: - raise DistutilsOptionError('you must specify the output directory') - if not self.output_file: - self.output_file = os.path.join(self.output_dir, self.locale, - 'LC_MESSAGES', self.domain + '.po') - - if not os.path.exists(os.path.dirname(self.output_file)): - os.makedirs(os.path.dirname(self.output_file)) - if self.no_wrap and self.width: - raise DistutilsOptionError("'--no-wrap' and '--width' are mutually " - "exclusive") - if not self.no_wrap and not self.width: - self.width = 76 - elif self.width is not None: - self.width = int(self.width) - - def run(self): - self.log.info( - 'creating catalog %s based on %s', self.output_file, self.input_file - ) - - infile = open(self.input_file, 'rb') - try: - # Although reading from the catalog template, read_po must be fed - # the locale in order to correctly calculate plurals - catalog = read_po(infile, locale=self.locale) - finally: - infile.close() - - catalog.locale = self._locale - catalog.revision_date = datetime.now(LOCALTZ) - catalog.fuzzy = False - - outfile = open(self.output_file, 'wb') - try: - write_po(outfile, catalog, width=self.width) - finally: - outfile.close() - - -class update_catalog(Command): - """Catalog merging command for use in ``setup.py`` scripts. - - If correctly installed, this command is available to Setuptools-using - setup scripts automatically. For projects using plain old ``distutils``, - the command needs to be registered explicitly in ``setup.py``:: - - from babel.messages.frontend import update_catalog - - setup( - ... - cmdclass = {'update_catalog': update_catalog} - ) - - .. versionadded:: 0.9 - """ - - description = 'update message catalogs from a POT file' - user_options = [ - ('domain=', 'D', - "domain of PO file (default 'messages')"), - ('input-file=', 'i', - 'name of the input file'), - ('output-dir=', 'd', - 'path to base directory containing the catalogs'), - ('output-file=', 'o', - "name of the output file (default " - "'//LC_MESSAGES/.po')"), - ('locale=', 'l', - 'locale of the catalog to compile'), - ('width=', 'w', - 'set output line width (default 76)'), - ('no-wrap', None, - 'do not break long message lines, longer than the output line width, ' - 'into several lines'), - ('ignore-obsolete=', None, - 'whether to omit obsolete messages from the output'), - ('no-fuzzy-matching', 'N', - 'do not use fuzzy matching'), - ('update-header-comment', None, - 'update target header comment'), - ('previous', None, - 'keep previous msgids of translated messages') - ] - boolean_options = ['no-wrap', 'ignore-obsolete', 'no-fuzzy-matching', 'previous', 'update-header-comment'] - - def initialize_options(self): - self.domain = 'messages' - self.input_file = None - self.output_dir = None - self.output_file = None - self.locale = None - self.width = None - self.no_wrap = False - self.ignore_obsolete = False - self.no_fuzzy_matching = False - self.update_header_comment = False - self.previous = False - - def finalize_options(self): - if not self.input_file: - raise DistutilsOptionError('you must specify the input file') - if not self.output_file and not self.output_dir: - raise DistutilsOptionError('you must specify the output file or ' - 'directory') - if self.output_file and not self.locale: - raise DistutilsOptionError('you must specify the locale') - if self.no_wrap and self.width: - raise DistutilsOptionError("'--no-wrap' and '--width' are mutually " - "exclusive") - if not self.no_wrap and not self.width: - self.width = 76 - elif self.width is not None: - self.width = int(self.width) - if self.no_fuzzy_matching and self.previous: - self.previous = False - - def run(self): - po_files = [] - if not self.output_file: - if self.locale: - po_files.append((self.locale, - os.path.join(self.output_dir, self.locale, - 'LC_MESSAGES', - self.domain + '.po'))) - else: - for locale in os.listdir(self.output_dir): - po_file = os.path.join(self.output_dir, locale, - 'LC_MESSAGES', - self.domain + '.po') - if os.path.exists(po_file): - po_files.append((locale, po_file)) - else: - po_files.append((self.locale, self.output_file)) - - domain = self.domain - if not domain: - domain = os.path.splitext(os.path.basename(self.input_file))[0] - - infile = open(self.input_file, 'rb') - try: - template = read_po(infile) - finally: - infile.close() - - if not po_files: - raise DistutilsOptionError('no message catalogs found') - - for locale, filename in po_files: - self.log.info('updating catalog %s based on %s', filename, self.input_file) - infile = open(filename, 'rb') - try: - catalog = read_po(infile, locale=locale, domain=domain) - finally: - infile.close() - - catalog.update( - template, self.no_fuzzy_matching, - update_header_comment=self.update_header_comment - ) - - tmpname = os.path.join(os.path.dirname(filename), - tempfile.gettempprefix() + - os.path.basename(filename)) - tmpfile = open(tmpname, 'wb') - try: - try: - write_po(tmpfile, catalog, - ignore_obsolete=self.ignore_obsolete, - include_previous=self.previous, width=self.width) - finally: - tmpfile.close() - except: - os.remove(tmpname) - raise - - try: - os.rename(tmpname, filename) - except OSError: - # We're probably on Windows, which doesn't support atomic - # renames, at least not through Python - # If the error is in fact due to a permissions problem, that - # same error is going to be raised from one of the following - # operations - os.remove(filename) - shutil.copy(tmpname, filename) - os.remove(tmpname) - - -class CommandLineInterface(object): - """Command-line interface. - - This class provides a simple command-line interface to the message - extraction and PO file generation functionality. - """ - - usage = '%%prog %s [options] %s' - version = '%%prog %s' % VERSION - commands = { - 'compile': 'compile message catalogs to MO files', - 'extract': 'extract messages from source files and generate a POT file', - 'init': 'create new message catalogs from a POT file', - 'update': 'update existing message catalogs from a POT file' - } - - command_classes = { - 'compile': compile_catalog, - 'extract': extract_messages, - 'init': init_catalog, - 'update': update_catalog, - } - - log = None # Replaced on instance level - - def run(self, argv=None): - """Main entry point of the command-line interface. - - :param argv: list of arguments passed on the command-line - """ - - if argv is None: - argv = sys.argv - - self.parser = optparse.OptionParser(usage=self.usage % ('command', '[args]'), - version=self.version) - self.parser.disable_interspersed_args() - self.parser.print_help = self._help - self.parser.add_option('--list-locales', dest='list_locales', - action='store_true', - help="print all known locales and exit") - self.parser.add_option('-v', '--verbose', action='store_const', - dest='loglevel', const=logging.DEBUG, - help='print as much as possible') - self.parser.add_option('-q', '--quiet', action='store_const', - dest='loglevel', const=logging.ERROR, - help='print as little as possible') - self.parser.set_defaults(list_locales=False, loglevel=logging.INFO) - - options, args = self.parser.parse_args(argv[1:]) - - self._configure_logging(options.loglevel) - if options.list_locales: - identifiers = localedata.locale_identifiers() - longest = max([len(identifier) for identifier in identifiers]) - identifiers.sort() - format = u'%%-%ds %%s' % (longest + 1) - for identifier in identifiers: - locale = Locale.parse(identifier) - output = format % (identifier, locale.english_name) - print(output.encode(sys.stdout.encoding or - getpreferredencoding() or - 'ascii', 'replace')) - return 0 - - if not args: - self.parser.error('no valid command or option passed. ' - 'Try the -h/--help option for more information.') - - cmdname = args[0] - if cmdname not in self.commands: - self.parser.error('unknown command "%s"' % cmdname) - - cmdinst = self._configure_command(cmdname, args[1:]) - return cmdinst.run() - - def _configure_logging(self, loglevel): - self.log = logging.getLogger('babel') - self.log.setLevel(loglevel) - # Don't add a new handler for every instance initialization (#227), this - # would cause duplicated output when the CommandLineInterface as an - # normal Python class. - if self.log.handlers: - handler = self.log.handlers[0] - else: - handler = logging.StreamHandler() - self.log.addHandler(handler) - handler.setLevel(loglevel) - formatter = logging.Formatter('%(message)s') - handler.setFormatter(formatter) - - def _help(self): - print(self.parser.format_help()) - print("commands:") - longest = max([len(command) for command in self.commands]) - format = " %%-%ds %%s" % max(8, longest + 1) - commands = sorted(self.commands.items()) - for name, description in commands: - print(format % (name, description)) - - def _configure_command(self, cmdname, argv): - """ - :type cmdname: str - :type argv: list[str] - """ - cmdclass = self.command_classes[cmdname] - cmdinst = cmdclass() - if self.log: - cmdinst.log = self.log # Use our logger, not distutils'. - assert isinstance(cmdinst, Command) - cmdinst.initialize_options() - - parser = optparse.OptionParser( - usage=self.usage % (cmdname, ''), - description=self.commands[cmdname] - ) - as_args = getattr(cmdclass, "as_args", ()) - for long, short, help in cmdclass.user_options: - name = long.strip("=") - default = getattr(cmdinst, name.replace('-', '_')) - strs = ["--%s" % name] - if short: - strs.append("-%s" % short) - strs.extend(cmdclass.option_aliases.get(name, ())) - if name == as_args: - parser.usage += "<%s>" % name - elif name in cmdclass.boolean_options: - parser.add_option(*strs, action="store_true", help=help) - elif name in cmdclass.multiple_value_options: - parser.add_option(*strs, action="append", help=help) - else: - parser.add_option(*strs, help=help, default=default) - options, args = parser.parse_args(argv) - - if as_args: - setattr(options, as_args.replace('-', '_'), args) - - for key, value in vars(options).items(): - setattr(cmdinst, key, value) - - try: - cmdinst.ensure_finalized() - except DistutilsOptionError as err: - parser.error(str(err)) - - return cmdinst - - -def main(): - return CommandLineInterface().run(sys.argv) - - -def parse_mapping(fileobj, filename=None): - """Parse an extraction method mapping from a file-like object. - - >>> buf = StringIO(''' - ... [extractors] - ... custom = mypackage.module:myfunc - ... - ... # Python source files - ... [python: **.py] - ... - ... # Genshi templates - ... [genshi: **/templates/**.html] - ... include_attrs = - ... [genshi: **/templates/**.txt] - ... template_class = genshi.template:TextTemplate - ... encoding = latin-1 - ... - ... # Some custom extractor - ... [custom: **/custom/*.*] - ... ''') - - >>> method_map, options_map = parse_mapping(buf) - >>> len(method_map) - 4 - - >>> method_map[0] - ('**.py', 'python') - >>> options_map['**.py'] - {} - >>> method_map[1] - ('**/templates/**.html', 'genshi') - >>> options_map['**/templates/**.html']['include_attrs'] - '' - >>> method_map[2] - ('**/templates/**.txt', 'genshi') - >>> options_map['**/templates/**.txt']['template_class'] - 'genshi.template:TextTemplate' - >>> options_map['**/templates/**.txt']['encoding'] - 'latin-1' - - >>> method_map[3] - ('**/custom/*.*', 'mypackage.module:myfunc') - >>> options_map['**/custom/*.*'] - {} - - :param fileobj: a readable file-like object containing the configuration - text to parse - :see: `extract_from_directory` - """ - extractors = {} - method_map = [] - options_map = {} - - parser = RawConfigParser() - parser._sections = odict(parser._sections) # We need ordered sections - parser.readfp(fileobj, filename) - for section in parser.sections(): - if section == 'extractors': - extractors = dict(parser.items(section)) - else: - method, pattern = [part.strip() for part in section.split(':', 1)] - method_map.append((pattern, method)) - options_map[pattern] = dict(parser.items(section)) - - if extractors: - for idx, (pattern, method) in enumerate(method_map): - if method in extractors: - method = extractors[method] - method_map[idx] = (pattern, method) - - return (method_map, options_map) - - -def parse_keywords(strings=[]): - """Parse keywords specifications from the given list of strings. - - >>> kw = sorted(parse_keywords(['_', 'dgettext:2', 'dngettext:2,3', 'pgettext:1c,2']).items()) - >>> for keyword, indices in kw: - ... print((keyword, indices)) - ('_', None) - ('dgettext', (2,)) - ('dngettext', (2, 3)) - ('pgettext', ((1, 'c'), 2)) - """ - keywords = {} - for string in strings: - if ':' in string: - funcname, indices = string.split(':') - else: - funcname, indices = string, None - if funcname not in keywords: - if indices: - inds = [] - for x in indices.split(','): - if x[-1] == 'c': - inds.append((int(x[:-1]), 'c')) - else: - inds.append(int(x)) - indices = tuple(inds) - keywords[funcname] = indices - return keywords - - -if __name__ == '__main__': - main() diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/messages/jslexer.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/messages/jslexer.py deleted file mode 100644 index aed39f3..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/babel-2.3.4-py2.7.egg/babel/messages/jslexer.py +++ /dev/null @@ -1,185 +0,0 @@ -# -*- coding: utf-8 -*- -""" - babel.messages.jslexer - ~~~~~~~~~~~~~~~~~~~~~~ - - A simple JavaScript 1.5 lexer which is used for the JavaScript - extractor. - - :copyright: (c) 2013 by the Babel Team. - :license: BSD, see LICENSE for more details. -""" -from collections import namedtuple -import re -from babel._compat import unichr - -operators = sorted([ - '+', '-', '*', '%', '!=', '==', '<', '>', '<=', '>=', '=', - '+=', '-=', '*=', '%=', '<<', '>>', '>>>', '<<=', '>>=', - '>>>=', '&', '&=', '|', '|=', '&&', '||', '^', '^=', '(', ')', - '[', ']', '{', '}', '!', '--', '++', '~', ',', ';', '.', ':' -], key=len, reverse=True) - -escapes = {'b': '\b', 'f': '\f', 'n': '\n', 'r': '\r', 't': '\t'} - -name_re = re.compile(r'[\w$_][\w\d$_]*', re.UNICODE) -dotted_name_re = re.compile(r'[\w$_][\w\d$_.]*[\w\d$_.]', re.UNICODE) -division_re = re.compile(r'/=?') -regex_re = re.compile(r'/(?:[^/\\]*(?:\\.[^/\\]*)*)/[a-zA-Z]*(?s)') -line_re = re.compile(r'(\r\n|\n|\r)') -line_join_re = re.compile(r'\\' + line_re.pattern) -uni_escape_re = re.compile(r'[a-fA-F0-9]{1,4}') - -Token = namedtuple('Token', 'type value lineno') - -_rules = [ - (None, re.compile(r'\s+(?u)')), - (None, re.compile(r' 'user[:passwd]', 'host[:port]'.""" - global _userprog - if _userprog is None: - import re - _userprog = re.compile('^(.*)@(.*)$') - - match = _userprog.match(host) - if match: return match.group(1, 2) - return None, host - -else: - from io import StringIO - string_types = str, - text_type = str - from io import TextIOWrapper as file_type - import builtins - import configparser - import shutil - from urllib.parse import (urlparse, urlunparse, urljoin, splituser, quote, - unquote, urlsplit, urlunsplit, splittype) - from urllib.request import (urlopen, urlretrieve, Request, url2pathname, - pathname2url, - HTTPBasicAuthHandler, HTTPPasswordMgr, - HTTPSHandler, HTTPHandler, HTTPRedirectHandler, - build_opener) - from urllib.error import HTTPError, URLError, ContentTooShortError - import http.client as httplib - import urllib.request as urllib2 - import xmlrpc.client as xmlrpclib - import queue - from html.parser import HTMLParser - import html.entities as htmlentitydefs - raw_input = input - from itertools import filterfalse - filter = filter - -try: - from ssl import match_hostname, CertificateError -except ImportError: - class CertificateError(ValueError): - pass - - - def _dnsname_to_pat(dn): - pats = [] - for frag in dn.split(r'.'): - if frag == '*': - # When '*' is a fragment by itself, it matches a non-empty - # dotless fragment. - pats.append('[^.]+') - else: - # Otherwise, '*' matches any dotless fragment. - frag = re.escape(frag) - pats.append(frag.replace(r'\*', '[^.]*')) - return re.compile(r'\A' + r'\.'.join(pats) + r'\Z', re.IGNORECASE) - - - def match_hostname(cert, hostname): - """Verify that *cert* (in decoded format as returned by - SSLSocket.getpeercert()) matches the *hostname*. RFC 2818 rules - are mostly followed, but IP addresses are not accepted for *hostname*. - - CertificateError is raised on failure. On success, the function - returns nothing. - """ - if not cert: - raise ValueError("empty or no certificate") - dnsnames = [] - san = cert.get('subjectAltName', ()) - for key, value in san: - if key == 'DNS': - if _dnsname_to_pat(value).match(hostname): - return - dnsnames.append(value) - if not dnsnames: - # The subject is only checked when there is no dNSName entry - # in subjectAltName - for sub in cert.get('subject', ()): - for key, value in sub: - # XXX according to RFC 2818, the most specific Common Name - # must be used. - if key == 'commonName': - if _dnsname_to_pat(value).match(hostname): - return - dnsnames.append(value) - if len(dnsnames) > 1: - raise CertificateError("hostname %r " - "doesn't match either of %s" - % (hostname, ', '.join(map(repr, dnsnames)))) - elif len(dnsnames) == 1: - raise CertificateError("hostname %r " - "doesn't match %r" - % (hostname, dnsnames[0])) - else: - raise CertificateError("no appropriate commonName or " - "subjectAltName fields were found") - - -try: - from types import SimpleNamespace as Container -except ImportError: - class Container(object): - """ - A generic container for when multiple values need to be returned - """ - def __init__(self, **kwargs): - self.__dict__.update(kwargs) - - -try: - from shutil import which -except ImportError: - # Implementation from Python 3.3 - def which(cmd, mode=os.F_OK | os.X_OK, path=None): - """Given a command, mode, and a PATH string, return the path which - conforms to the given mode on the PATH, or None if there is no such - file. - - `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result - of os.environ.get("PATH"), or can be overridden with a custom search - path. - - """ - # Check that a given file can be accessed with the correct mode. - # Additionally check that `file` is not a directory, as on Windows - # directories pass the os.access check. - def _access_check(fn, mode): - return (os.path.exists(fn) and os.access(fn, mode) - and not os.path.isdir(fn)) - - # If we're given a path with a directory part, look it up directly rather - # than referring to PATH directories. This includes checking relative to the - # current directory, e.g. ./script - if os.path.dirname(cmd): - if _access_check(cmd, mode): - return cmd - return None - - if path is None: - path = os.environ.get("PATH", os.defpath) - if not path: - return None - path = path.split(os.pathsep) - - if sys.platform == "win32": - # The current directory takes precedence on Windows. - if not os.curdir in path: - path.insert(0, os.curdir) - - # PATHEXT is necessary to check on Windows. - pathext = os.environ.get("PATHEXT", "").split(os.pathsep) - # See if the given file matches any of the expected path extensions. - # This will allow us to short circuit when given "python.exe". - # If it does match, only test that one, otherwise we have to try - # others. - if any(cmd.lower().endswith(ext.lower()) for ext in pathext): - files = [cmd] - else: - files = [cmd + ext for ext in pathext] - else: - # On other platforms you don't have things like PATHEXT to tell you - # what file suffixes are executable, so just pass on cmd as-is. - files = [cmd] - - seen = set() - for dir in path: - normdir = os.path.normcase(dir) - if not normdir in seen: - seen.add(normdir) - for thefile in files: - name = os.path.join(dir, thefile) - if _access_check(name, mode): - return name - return None - - -# ZipFile is a context manager in 2.7, but not in 2.6 - -from zipfile import ZipFile as BaseZipFile - -if hasattr(BaseZipFile, '__enter__'): - ZipFile = BaseZipFile -else: - from zipfile import ZipExtFile as BaseZipExtFile - - class ZipExtFile(BaseZipExtFile): - def __init__(self, base): - self.__dict__.update(base.__dict__) - - def __enter__(self): - return self - - def __exit__(self, *exc_info): - self.close() - # return None, so if an exception occurred, it will propagate - - class ZipFile(BaseZipFile): - def __enter__(self): - return self - - def __exit__(self, *exc_info): - self.close() - # return None, so if an exception occurred, it will propagate - - def open(self, *args, **kwargs): - base = BaseZipFile.open(self, *args, **kwargs) - return ZipExtFile(base) - -try: - from platform import python_implementation -except ImportError: # pragma: no cover - def python_implementation(): - """Return a string identifying the Python implementation.""" - if 'PyPy' in sys.version: - return 'PyPy' - if os.name == 'java': - return 'Jython' - if sys.version.startswith('IronPython'): - return 'IronPython' - return 'CPython' - -try: - import sysconfig -except ImportError: # pragma: no cover - from ._backport import sysconfig - -try: - callable = callable -except NameError: # pragma: no cover - from collections import Callable - - def callable(obj): - return isinstance(obj, Callable) - - -try: - fsencode = os.fsencode - fsdecode = os.fsdecode -except AttributeError: # pragma: no cover - _fsencoding = sys.getfilesystemencoding() - if _fsencoding == 'mbcs': - _fserrors = 'strict' - else: - _fserrors = 'surrogateescape' - - def fsencode(filename): - if isinstance(filename, bytes): - return filename - elif isinstance(filename, text_type): - return filename.encode(_fsencoding, _fserrors) - else: - raise TypeError("expect bytes or str, not %s" % - type(filename).__name__) - - def fsdecode(filename): - if isinstance(filename, text_type): - return filename - elif isinstance(filename, bytes): - return filename.decode(_fsencoding, _fserrors) - else: - raise TypeError("expect bytes or str, not %s" % - type(filename).__name__) - -try: - from tokenize import detect_encoding -except ImportError: # pragma: no cover - from codecs import BOM_UTF8, lookup - import re - - cookie_re = re.compile("coding[:=]\s*([-\w.]+)") - - def _get_normal_name(orig_enc): - """Imitates get_normal_name in tokenizer.c.""" - # Only care about the first 12 characters. - enc = orig_enc[:12].lower().replace("_", "-") - if enc == "utf-8" or enc.startswith("utf-8-"): - return "utf-8" - if enc in ("latin-1", "iso-8859-1", "iso-latin-1") or \ - enc.startswith(("latin-1-", "iso-8859-1-", "iso-latin-1-")): - return "iso-8859-1" - return orig_enc - - def detect_encoding(readline): - """ - The detect_encoding() function is used to detect the encoding that should - be used to decode a Python source file. It requires one argment, readline, - in the same way as the tokenize() generator. - - It will call readline a maximum of twice, and return the encoding used - (as a string) and a list of any lines (left as bytes) it has read in. - - It detects the encoding from the presence of a utf-8 bom or an encoding - cookie as specified in pep-0263. If both a bom and a cookie are present, - but disagree, a SyntaxError will be raised. If the encoding cookie is an - invalid charset, raise a SyntaxError. Note that if a utf-8 bom is found, - 'utf-8-sig' is returned. - - If no encoding is specified, then the default of 'utf-8' will be returned. - """ - try: - filename = readline.__self__.name - except AttributeError: - filename = None - bom_found = False - encoding = None - default = 'utf-8' - def read_or_stop(): - try: - return readline() - except StopIteration: - return b'' - - def find_cookie(line): - try: - # Decode as UTF-8. Either the line is an encoding declaration, - # in which case it should be pure ASCII, or it must be UTF-8 - # per default encoding. - line_string = line.decode('utf-8') - except UnicodeDecodeError: - msg = "invalid or missing encoding declaration" - if filename is not None: - msg = '{} for {!r}'.format(msg, filename) - raise SyntaxError(msg) - - matches = cookie_re.findall(line_string) - if not matches: - return None - encoding = _get_normal_name(matches[0]) - try: - codec = lookup(encoding) - except LookupError: - # This behaviour mimics the Python interpreter - if filename is None: - msg = "unknown encoding: " + encoding - else: - msg = "unknown encoding for {!r}: {}".format(filename, - encoding) - raise SyntaxError(msg) - - if bom_found: - if codec.name != 'utf-8': - # This behaviour mimics the Python interpreter - if filename is None: - msg = 'encoding problem: utf-8' - else: - msg = 'encoding problem for {!r}: utf-8'.format(filename) - raise SyntaxError(msg) - encoding += '-sig' - return encoding - - first = read_or_stop() - if first.startswith(BOM_UTF8): - bom_found = True - first = first[3:] - default = 'utf-8-sig' - if not first: - return default, [] - - encoding = find_cookie(first) - if encoding: - return encoding, [first] - - second = read_or_stop() - if not second: - return default, [first] - - encoding = find_cookie(second) - if encoding: - return encoding, [first, second] - - return default, [first, second] - -# For converting & <-> & etc. -try: - from html import escape -except ImportError: - from cgi import escape -if sys.version_info[:2] < (3, 4): - unescape = HTMLParser().unescape -else: - from html import unescape - -try: - from collections import ChainMap -except ImportError: # pragma: no cover - from collections import MutableMapping - - try: - from reprlib import recursive_repr as _recursive_repr - except ImportError: - def _recursive_repr(fillvalue='...'): - ''' - Decorator to make a repr function return fillvalue for a recursive - call - ''' - - def decorating_function(user_function): - repr_running = set() - - def wrapper(self): - key = id(self), get_ident() - if key in repr_running: - return fillvalue - repr_running.add(key) - try: - result = user_function(self) - finally: - repr_running.discard(key) - return result - - # Can't use functools.wraps() here because of bootstrap issues - wrapper.__module__ = getattr(user_function, '__module__') - wrapper.__doc__ = getattr(user_function, '__doc__') - wrapper.__name__ = getattr(user_function, '__name__') - wrapper.__annotations__ = getattr(user_function, '__annotations__', {}) - return wrapper - - return decorating_function - - class ChainMap(MutableMapping): - ''' A ChainMap groups multiple dicts (or other mappings) together - to create a single, updateable view. - - The underlying mappings are stored in a list. That list is public and can - accessed or updated using the *maps* attribute. There is no other state. - - Lookups search the underlying mappings successively until a key is found. - In contrast, writes, updates, and deletions only operate on the first - mapping. - - ''' - - def __init__(self, *maps): - '''Initialize a ChainMap by setting *maps* to the given mappings. - If no mappings are provided, a single empty dictionary is used. - - ''' - self.maps = list(maps) or [{}] # always at least one map - - def __missing__(self, key): - raise KeyError(key) - - def __getitem__(self, key): - for mapping in self.maps: - try: - return mapping[key] # can't use 'key in mapping' with defaultdict - except KeyError: - pass - return self.__missing__(key) # support subclasses that define __missing__ - - def get(self, key, default=None): - return self[key] if key in self else default - - def __len__(self): - return len(set().union(*self.maps)) # reuses stored hash values if possible - - def __iter__(self): - return iter(set().union(*self.maps)) - - def __contains__(self, key): - return any(key in m for m in self.maps) - - def __bool__(self): - return any(self.maps) - - @_recursive_repr() - def __repr__(self): - return '{0.__class__.__name__}({1})'.format( - self, ', '.join(map(repr, self.maps))) - - @classmethod - def fromkeys(cls, iterable, *args): - 'Create a ChainMap with a single dict created from the iterable.' - return cls(dict.fromkeys(iterable, *args)) - - def copy(self): - 'New ChainMap or subclass with a new copy of maps[0] and refs to maps[1:]' - return self.__class__(self.maps[0].copy(), *self.maps[1:]) - - __copy__ = copy - - def new_child(self): # like Django's Context.push() - 'New ChainMap with a new dict followed by all previous maps.' - return self.__class__({}, *self.maps) - - @property - def parents(self): # like Django's Context.pop() - 'New ChainMap from maps[1:].' - return self.__class__(*self.maps[1:]) - - def __setitem__(self, key, value): - self.maps[0][key] = value - - def __delitem__(self, key): - try: - del self.maps[0][key] - except KeyError: - raise KeyError('Key not found in the first mapping: {!r}'.format(key)) - - def popitem(self): - 'Remove and return an item pair from maps[0]. Raise KeyError is maps[0] is empty.' - try: - return self.maps[0].popitem() - except KeyError: - raise KeyError('No keys found in the first mapping.') - - def pop(self, key, *args): - 'Remove *key* from maps[0] and return its value. Raise KeyError if *key* not in maps[0].' - try: - return self.maps[0].pop(key, *args) - except KeyError: - raise KeyError('Key not found in the first mapping: {!r}'.format(key)) - - def clear(self): - 'Clear maps[0], leaving maps[1:] intact.' - self.maps[0].clear() - -try: - from imp import cache_from_source -except ImportError: # pragma: no cover - def cache_from_source(path, debug_override=None): - assert path.endswith('.py') - if debug_override is None: - debug_override = __debug__ - if debug_override: - suffix = 'c' - else: - suffix = 'o' - return path + suffix - -try: - from collections import OrderedDict -except ImportError: # pragma: no cover -## {{{ http://code.activestate.com/recipes/576693/ (r9) -# Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy. -# Passes Python2.7's test suite and incorporates all the latest updates. - try: - from thread import get_ident as _get_ident - except ImportError: - from dummy_thread import get_ident as _get_ident - - try: - from _abcoll import KeysView, ValuesView, ItemsView - except ImportError: - pass - - - class OrderedDict(dict): - 'Dictionary that remembers insertion order' - # An inherited dict maps keys to values. - # The inherited dict provides __getitem__, __len__, __contains__, and get. - # The remaining methods are order-aware. - # Big-O running times for all methods are the same as for regular dictionaries. - - # The internal self.__map dictionary maps keys to links in a doubly linked list. - # The circular doubly linked list starts and ends with a sentinel element. - # The sentinel element never gets deleted (this simplifies the algorithm). - # Each link is stored as a list of length three: [PREV, NEXT, KEY]. - - def __init__(self, *args, **kwds): - '''Initialize an ordered dictionary. Signature is the same as for - regular dictionaries, but keyword arguments are not recommended - because their insertion order is arbitrary. - - ''' - if len(args) > 1: - raise TypeError('expected at most 1 arguments, got %d' % len(args)) - try: - self.__root - except AttributeError: - self.__root = root = [] # sentinel node - root[:] = [root, root, None] - self.__map = {} - self.__update(*args, **kwds) - - def __setitem__(self, key, value, dict_setitem=dict.__setitem__): - 'od.__setitem__(i, y) <==> od[i]=y' - # Setting a new item creates a new link which goes at the end of the linked - # list, and the inherited dictionary is updated with the new key/value pair. - if key not in self: - root = self.__root - last = root[0] - last[1] = root[0] = self.__map[key] = [last, root, key] - dict_setitem(self, key, value) - - def __delitem__(self, key, dict_delitem=dict.__delitem__): - 'od.__delitem__(y) <==> del od[y]' - # Deleting an existing item uses self.__map to find the link which is - # then removed by updating the links in the predecessor and successor nodes. - dict_delitem(self, key) - link_prev, link_next, key = self.__map.pop(key) - link_prev[1] = link_next - link_next[0] = link_prev - - def __iter__(self): - 'od.__iter__() <==> iter(od)' - root = self.__root - curr = root[1] - while curr is not root: - yield curr[2] - curr = curr[1] - - def __reversed__(self): - 'od.__reversed__() <==> reversed(od)' - root = self.__root - curr = root[0] - while curr is not root: - yield curr[2] - curr = curr[0] - - def clear(self): - 'od.clear() -> None. Remove all items from od.' - try: - for node in self.__map.itervalues(): - del node[:] - root = self.__root - root[:] = [root, root, None] - self.__map.clear() - except AttributeError: - pass - dict.clear(self) - - def popitem(self, last=True): - '''od.popitem() -> (k, v), return and remove a (key, value) pair. - Pairs are returned in LIFO order if last is true or FIFO order if false. - - ''' - if not self: - raise KeyError('dictionary is empty') - root = self.__root - if last: - link = root[0] - link_prev = link[0] - link_prev[1] = root - root[0] = link_prev - else: - link = root[1] - link_next = link[1] - root[1] = link_next - link_next[0] = root - key = link[2] - del self.__map[key] - value = dict.pop(self, key) - return key, value - - # -- the following methods do not depend on the internal structure -- - - def keys(self): - 'od.keys() -> list of keys in od' - return list(self) - - def values(self): - 'od.values() -> list of values in od' - return [self[key] for key in self] - - def items(self): - 'od.items() -> list of (key, value) pairs in od' - return [(key, self[key]) for key in self] - - def iterkeys(self): - 'od.iterkeys() -> an iterator over the keys in od' - return iter(self) - - def itervalues(self): - 'od.itervalues -> an iterator over the values in od' - for k in self: - yield self[k] - - def iteritems(self): - 'od.iteritems -> an iterator over the (key, value) items in od' - for k in self: - yield (k, self[k]) - - def update(*args, **kwds): - '''od.update(E, **F) -> None. Update od from dict/iterable E and F. - - If E is a dict instance, does: for k in E: od[k] = E[k] - If E has a .keys() method, does: for k in E.keys(): od[k] = E[k] - Or if E is an iterable of items, does: for k, v in E: od[k] = v - In either case, this is followed by: for k, v in F.items(): od[k] = v - - ''' - if len(args) > 2: - raise TypeError('update() takes at most 2 positional ' - 'arguments (%d given)' % (len(args),)) - elif not args: - raise TypeError('update() takes at least 1 argument (0 given)') - self = args[0] - # Make progressively weaker assumptions about "other" - other = () - if len(args) == 2: - other = args[1] - if isinstance(other, dict): - for key in other: - self[key] = other[key] - elif hasattr(other, 'keys'): - for key in other.keys(): - self[key] = other[key] - else: - for key, value in other: - self[key] = value - for key, value in kwds.items(): - self[key] = value - - __update = update # let subclasses override update without breaking __init__ - - __marker = object() - - def pop(self, key, default=__marker): - '''od.pop(k[,d]) -> v, remove specified key and return the corresponding value. - If key is not found, d is returned if given, otherwise KeyError is raised. - - ''' - if key in self: - result = self[key] - del self[key] - return result - if default is self.__marker: - raise KeyError(key) - return default - - def setdefault(self, key, default=None): - 'od.setdefault(k[,d]) -> od.get(k,d), also set od[k]=d if k not in od' - if key in self: - return self[key] - self[key] = default - return default - - def __repr__(self, _repr_running=None): - 'od.__repr__() <==> repr(od)' - if not _repr_running: _repr_running = {} - call_key = id(self), _get_ident() - if call_key in _repr_running: - return '...' - _repr_running[call_key] = 1 - try: - if not self: - return '%s()' % (self.__class__.__name__,) - return '%s(%r)' % (self.__class__.__name__, self.items()) - finally: - del _repr_running[call_key] - - def __reduce__(self): - 'Return state information for pickling' - items = [[k, self[k]] for k in self] - inst_dict = vars(self).copy() - for k in vars(OrderedDict()): - inst_dict.pop(k, None) - if inst_dict: - return (self.__class__, (items,), inst_dict) - return self.__class__, (items,) - - def copy(self): - 'od.copy() -> a shallow copy of od' - return self.__class__(self) - - @classmethod - def fromkeys(cls, iterable, value=None): - '''OD.fromkeys(S[, v]) -> New ordered dictionary with keys from S - and values equal to v (which defaults to None). - - ''' - d = cls() - for key in iterable: - d[key] = value - return d - - def __eq__(self, other): - '''od.__eq__(y) <==> od==y. Comparison to another OD is order-sensitive - while comparison to a regular mapping is order-insensitive. - - ''' - if isinstance(other, OrderedDict): - return len(self)==len(other) and self.items() == other.items() - return dict.__eq__(self, other) - - def __ne__(self, other): - return not self == other - - # -- the following methods are only used in Python 2.7 -- - - def viewkeys(self): - "od.viewkeys() -> a set-like object providing a view on od's keys" - return KeysView(self) - - def viewvalues(self): - "od.viewvalues() -> an object providing a view on od's values" - return ValuesView(self) - - def viewitems(self): - "od.viewitems() -> a set-like object providing a view on od's items" - return ItemsView(self) - -try: - from logging.config import BaseConfigurator, valid_ident -except ImportError: # pragma: no cover - IDENTIFIER = re.compile('^[a-z_][a-z0-9_]*$', re.I) - - - def valid_ident(s): - m = IDENTIFIER.match(s) - if not m: - raise ValueError('Not a valid Python identifier: %r' % s) - return True - - - # The ConvertingXXX classes are wrappers around standard Python containers, - # and they serve to convert any suitable values in the container. The - # conversion converts base dicts, lists and tuples to their wrapped - # equivalents, whereas strings which match a conversion format are converted - # appropriately. - # - # Each wrapper should have a configurator attribute holding the actual - # configurator to use for conversion. - - class ConvertingDict(dict): - """A converting dictionary wrapper.""" - - def __getitem__(self, key): - value = dict.__getitem__(self, key) - result = self.configurator.convert(value) - #If the converted value is different, save for next time - if value is not result: - self[key] = result - if type(result) in (ConvertingDict, ConvertingList, - ConvertingTuple): - result.parent = self - result.key = key - return result - - def get(self, key, default=None): - value = dict.get(self, key, default) - result = self.configurator.convert(value) - #If the converted value is different, save for next time - if value is not result: - self[key] = result - if type(result) in (ConvertingDict, ConvertingList, - ConvertingTuple): - result.parent = self - result.key = key - return result - - def pop(self, key, default=None): - value = dict.pop(self, key, default) - result = self.configurator.convert(value) - if value is not result: - if type(result) in (ConvertingDict, ConvertingList, - ConvertingTuple): - result.parent = self - result.key = key - return result - - class ConvertingList(list): - """A converting list wrapper.""" - def __getitem__(self, key): - value = list.__getitem__(self, key) - result = self.configurator.convert(value) - #If the converted value is different, save for next time - if value is not result: - self[key] = result - if type(result) in (ConvertingDict, ConvertingList, - ConvertingTuple): - result.parent = self - result.key = key - return result - - def pop(self, idx=-1): - value = list.pop(self, idx) - result = self.configurator.convert(value) - if value is not result: - if type(result) in (ConvertingDict, ConvertingList, - ConvertingTuple): - result.parent = self - return result - - class ConvertingTuple(tuple): - """A converting tuple wrapper.""" - def __getitem__(self, key): - value = tuple.__getitem__(self, key) - result = self.configurator.convert(value) - if value is not result: - if type(result) in (ConvertingDict, ConvertingList, - ConvertingTuple): - result.parent = self - result.key = key - return result - - class BaseConfigurator(object): - """ - The configurator base class which defines some useful defaults. - """ - - CONVERT_PATTERN = re.compile(r'^(?P[a-z]+)://(?P.*)$') - - WORD_PATTERN = re.compile(r'^\s*(\w+)\s*') - DOT_PATTERN = re.compile(r'^\.\s*(\w+)\s*') - INDEX_PATTERN = re.compile(r'^\[\s*(\w+)\s*\]\s*') - DIGIT_PATTERN = re.compile(r'^\d+$') - - value_converters = { - 'ext' : 'ext_convert', - 'cfg' : 'cfg_convert', - } - - # We might want to use a different one, e.g. importlib - importer = staticmethod(__import__) - - def __init__(self, config): - self.config = ConvertingDict(config) - self.config.configurator = self - - def resolve(self, s): - """ - Resolve strings to objects using standard import and attribute - syntax. - """ - name = s.split('.') - used = name.pop(0) - try: - found = self.importer(used) - for frag in name: - used += '.' + frag - try: - found = getattr(found, frag) - except AttributeError: - self.importer(used) - found = getattr(found, frag) - return found - except ImportError: - e, tb = sys.exc_info()[1:] - v = ValueError('Cannot resolve %r: %s' % (s, e)) - v.__cause__, v.__traceback__ = e, tb - raise v - - def ext_convert(self, value): - """Default converter for the ext:// protocol.""" - return self.resolve(value) - - def cfg_convert(self, value): - """Default converter for the cfg:// protocol.""" - rest = value - m = self.WORD_PATTERN.match(rest) - if m is None: - raise ValueError("Unable to convert %r" % value) - else: - rest = rest[m.end():] - d = self.config[m.groups()[0]] - #print d, rest - while rest: - m = self.DOT_PATTERN.match(rest) - if m: - d = d[m.groups()[0]] - else: - m = self.INDEX_PATTERN.match(rest) - if m: - idx = m.groups()[0] - if not self.DIGIT_PATTERN.match(idx): - d = d[idx] - else: - try: - n = int(idx) # try as number first (most likely) - d = d[n] - except TypeError: - d = d[idx] - if m: - rest = rest[m.end():] - else: - raise ValueError('Unable to convert ' - '%r at %r' % (value, rest)) - #rest should be empty - return d - - def convert(self, value): - """ - Convert values to an appropriate type. dicts, lists and tuples are - replaced by their converting alternatives. Strings are checked to - see if they have a conversion format and are converted if they do. - """ - if not isinstance(value, ConvertingDict) and isinstance(value, dict): - value = ConvertingDict(value) - value.configurator = self - elif not isinstance(value, ConvertingList) and isinstance(value, list): - value = ConvertingList(value) - value.configurator = self - elif not isinstance(value, ConvertingTuple) and\ - isinstance(value, tuple): - value = ConvertingTuple(value) - value.configurator = self - elif isinstance(value, string_types): - m = self.CONVERT_PATTERN.match(value) - if m: - d = m.groupdict() - prefix = d['prefix'] - converter = self.value_converters.get(prefix, None) - if converter: - suffix = d['suffix'] - converter = getattr(self, converter) - value = converter(suffix) - return value - - def configure_custom(self, config): - """Configure an object with a user-supplied factory.""" - c = config.pop('()') - if not callable(c): - c = self.resolve(c) - props = config.pop('.', None) - # Check for valid identifiers - kwargs = dict([(k, config[k]) for k in config if valid_ident(k)]) - result = c(**kwargs) - if props: - for name, value in props.items(): - setattr(result, name, value) - return result - - def as_tuple(self, value): - """Utility function which converts lists to tuples.""" - if isinstance(value, list): - value = tuple(value) - return value diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/database.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/database.py deleted file mode 100644 index 0f013ec..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/database.py +++ /dev/null @@ -1,1301 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2012-2013 The Python Software Foundation. -# See LICENSE.txt and CONTRIBUTORS.txt. -# -"""PEP 376 implementation.""" - -from __future__ import unicode_literals - -import base64 -import codecs -import contextlib -import hashlib -import logging -import os -import posixpath -import sys -import zipimport - -from . import DistlibException, resources -from .compat import StringIO -from .version import get_scheme, UnsupportedVersionError -from .metadata import Metadata, METADATA_FILENAME -from .util import (parse_requirement, cached_property, parse_name_and_version, - read_exports, write_exports, CSVReader, CSVWriter) - - -__all__ = ['Distribution', 'BaseInstalledDistribution', - 'InstalledDistribution', 'EggInfoDistribution', - 'DistributionPath'] - - -logger = logging.getLogger(__name__) - -EXPORTS_FILENAME = 'pydist-exports.json' -COMMANDS_FILENAME = 'pydist-commands.json' - -DIST_FILES = ('INSTALLER', METADATA_FILENAME, 'RECORD', 'REQUESTED', - 'RESOURCES', EXPORTS_FILENAME, 'SHARED') - -DISTINFO_EXT = '.dist-info' - - -class _Cache(object): - """ - A simple cache mapping names and .dist-info paths to distributions - """ - def __init__(self): - """ - Initialise an instance. There is normally one for each DistributionPath. - """ - self.name = {} - self.path = {} - self.generated = False - - def clear(self): - """ - Clear the cache, setting it to its initial state. - """ - self.name.clear() - self.path.clear() - self.generated = False - - def add(self, dist): - """ - Add a distribution to the cache. - :param dist: The distribution to add. - """ - if dist.path not in self.path: - self.path[dist.path] = dist - self.name.setdefault(dist.key, []).append(dist) - - -class DistributionPath(object): - """ - Represents a set of distributions installed on a path (typically sys.path). - """ - def __init__(self, path=None, include_egg=False): - """ - Create an instance from a path, optionally including legacy (distutils/ - setuptools/distribute) distributions. - :param path: The path to use, as a list of directories. If not specified, - sys.path is used. - :param include_egg: If True, this instance will look for and return legacy - distributions as well as those based on PEP 376. - """ - if path is None: - path = sys.path - self.path = path - self._include_dist = True - self._include_egg = include_egg - - self._cache = _Cache() - self._cache_egg = _Cache() - self._cache_enabled = True - self._scheme = get_scheme('default') - - def _get_cache_enabled(self): - return self._cache_enabled - - def _set_cache_enabled(self, value): - self._cache_enabled = value - - cache_enabled = property(_get_cache_enabled, _set_cache_enabled) - - def clear_cache(self): - """ - Clears the internal cache. - """ - self._cache.clear() - self._cache_egg.clear() - - - def _yield_distributions(self): - """ - Yield .dist-info and/or .egg(-info) distributions. - """ - # We need to check if we've seen some resources already, because on - # some Linux systems (e.g. some Debian/Ubuntu variants) there are - # symlinks which alias other files in the environment. - seen = set() - for path in self.path: - finder = resources.finder_for_path(path) - if finder is None: - continue - r = finder.find('') - if not r or not r.is_container: - continue - rset = sorted(r.resources) - for entry in rset: - r = finder.find(entry) - if not r or r.path in seen: - continue - if self._include_dist and entry.endswith(DISTINFO_EXT): - metadata_path = posixpath.join(entry, METADATA_FILENAME) - pydist = finder.find(metadata_path) - if not pydist: - continue - - metadata = Metadata(fileobj=pydist.as_stream(), - scheme='legacy') - logger.debug('Found %s', r.path) - seen.add(r.path) - yield new_dist_class(r.path, metadata=metadata, - env=self) - elif self._include_egg and entry.endswith(('.egg-info', - '.egg')): - logger.debug('Found %s', r.path) - seen.add(r.path) - yield old_dist_class(r.path, self) - - def _generate_cache(self): - """ - Scan the path for distributions and populate the cache with - those that are found. - """ - gen_dist = not self._cache.generated - gen_egg = self._include_egg and not self._cache_egg.generated - if gen_dist or gen_egg: - for dist in self._yield_distributions(): - if isinstance(dist, InstalledDistribution): - self._cache.add(dist) - else: - self._cache_egg.add(dist) - - if gen_dist: - self._cache.generated = True - if gen_egg: - self._cache_egg.generated = True - - @classmethod - def distinfo_dirname(cls, name, version): - """ - The *name* and *version* parameters are converted into their - filename-escaped form, i.e. any ``'-'`` characters are replaced - with ``'_'`` other than the one in ``'dist-info'`` and the one - separating the name from the version number. - - :parameter name: is converted to a standard distribution name by replacing - any runs of non- alphanumeric characters with a single - ``'-'``. - :type name: string - :parameter version: is converted to a standard version string. Spaces - become dots, and all other non-alphanumeric characters - (except dots) become dashes, with runs of multiple - dashes condensed to a single dash. - :type version: string - :returns: directory name - :rtype: string""" - name = name.replace('-', '_') - return '-'.join([name, version]) + DISTINFO_EXT - - def get_distributions(self): - """ - Provides an iterator that looks for distributions and returns - :class:`InstalledDistribution` or - :class:`EggInfoDistribution` instances for each one of them. - - :rtype: iterator of :class:`InstalledDistribution` and - :class:`EggInfoDistribution` instances - """ - if not self._cache_enabled: - for dist in self._yield_distributions(): - yield dist - else: - self._generate_cache() - - for dist in self._cache.path.values(): - yield dist - - if self._include_egg: - for dist in self._cache_egg.path.values(): - yield dist - - def get_distribution(self, name): - """ - Looks for a named distribution on the path. - - This function only returns the first result found, as no more than one - value is expected. If nothing is found, ``None`` is returned. - - :rtype: :class:`InstalledDistribution`, :class:`EggInfoDistribution` - or ``None`` - """ - result = None - name = name.lower() - if not self._cache_enabled: - for dist in self._yield_distributions(): - if dist.key == name: - result = dist - break - else: - self._generate_cache() - - if name in self._cache.name: - result = self._cache.name[name][0] - elif self._include_egg and name in self._cache_egg.name: - result = self._cache_egg.name[name][0] - return result - - def provides_distribution(self, name, version=None): - """ - Iterates over all distributions to find which distributions provide *name*. - If a *version* is provided, it will be used to filter the results. - - This function only returns the first result found, since no more than - one values are expected. If the directory is not found, returns ``None``. - - :parameter version: a version specifier that indicates the version - required, conforming to the format in ``PEP-345`` - - :type name: string - :type version: string - """ - matcher = None - if not version is None: - try: - matcher = self._scheme.matcher('%s (%s)' % (name, version)) - except ValueError: - raise DistlibException('invalid name or version: %r, %r' % - (name, version)) - - for dist in self.get_distributions(): - provided = dist.provides - - for p in provided: - p_name, p_ver = parse_name_and_version(p) - if matcher is None: - if p_name == name: - yield dist - break - else: - if p_name == name and matcher.match(p_ver): - yield dist - break - - def get_file_path(self, name, relative_path): - """ - Return the path to a resource file. - """ - dist = self.get_distribution(name) - if dist is None: - raise LookupError('no distribution named %r found' % name) - return dist.get_resource_path(relative_path) - - def get_exported_entries(self, category, name=None): - """ - Return all of the exported entries in a particular category. - - :param category: The category to search for entries. - :param name: If specified, only entries with that name are returned. - """ - for dist in self.get_distributions(): - r = dist.exports - if category in r: - d = r[category] - if name is not None: - if name in d: - yield d[name] - else: - for v in d.values(): - yield v - - -class Distribution(object): - """ - A base class for distributions, whether installed or from indexes. - Either way, it must have some metadata, so that's all that's needed - for construction. - """ - - build_time_dependency = False - """ - Set to True if it's known to be only a build-time dependency (i.e. - not needed after installation). - """ - - requested = False - """A boolean that indicates whether the ``REQUESTED`` metadata file is - present (in other words, whether the package was installed by user - request or it was installed as a dependency).""" - - def __init__(self, metadata): - """ - Initialise an instance. - :param metadata: The instance of :class:`Metadata` describing this - distribution. - """ - self.metadata = metadata - self.name = metadata.name - self.key = self.name.lower() # for case-insensitive comparisons - self.version = metadata.version - self.locator = None - self.digest = None - self.extras = None # additional features requested - self.context = None # environment marker overrides - - @property - def source_url(self): - """ - The source archive download URL for this distribution. - """ - return self.metadata.source_url - - download_url = source_url # Backward compatibility - - @property - def name_and_version(self): - """ - A utility property which displays the name and version in parentheses. - """ - return '%s (%s)' % (self.name, self.version) - - @property - def provides(self): - """ - A set of distribution names and versions provided by this distribution. - :return: A set of "name (version)" strings. - """ - plist = self.metadata.provides - s = '%s (%s)' % (self.name, self.version) - if s not in plist: - plist.append(s) - return plist - - def _get_requirements(self, req_attr): - reqts = getattr(self.metadata, req_attr) - return set(self.metadata.get_requirements(reqts, extras=self.extras, - env=self.context)) - - @property - def run_requires(self): - return self._get_requirements('run_requires') - - @property - def meta_requires(self): - return self._get_requirements('meta_requires') - - @property - def build_requires(self): - return self._get_requirements('build_requires') - - @property - def test_requires(self): - return self._get_requirements('test_requires') - - @property - def dev_requires(self): - return self._get_requirements('dev_requires') - - def matches_requirement(self, req): - """ - Say if this instance matches (fulfills) a requirement. - :param req: The requirement to match. - :rtype req: str - :return: True if it matches, else False. - """ - # Requirement may contain extras - parse to lose those - # from what's passed to the matcher - r = parse_requirement(req) - scheme = get_scheme(self.metadata.scheme) - try: - matcher = scheme.matcher(r.requirement) - except UnsupportedVersionError: - # XXX compat-mode if cannot read the version - logger.warning('could not read version %r - using name only', - req) - name = req.split()[0] - matcher = scheme.matcher(name) - - name = matcher.key # case-insensitive - - result = False - for p in self.provides: - p_name, p_ver = parse_name_and_version(p) - if p_name != name: - continue - try: - result = matcher.match(p_ver) - break - except UnsupportedVersionError: - pass - return result - - def __repr__(self): - """ - Return a textual representation of this instance, - """ - if self.source_url: - suffix = ' [%s]' % self.source_url - else: - suffix = '' - return '' % (self.name, self.version, suffix) - - def __eq__(self, other): - """ - See if this distribution is the same as another. - :param other: The distribution to compare with. To be equal to one - another. distributions must have the same type, name, - version and source_url. - :return: True if it is the same, else False. - """ - if type(other) is not type(self): - result = False - else: - result = (self.name == other.name and - self.version == other.version and - self.source_url == other.source_url) - return result - - def __hash__(self): - """ - Compute hash in a way which matches the equality test. - """ - return hash(self.name) + hash(self.version) + hash(self.source_url) - - -class BaseInstalledDistribution(Distribution): - """ - This is the base class for installed distributions (whether PEP 376 or - legacy). - """ - - hasher = None - - def __init__(self, metadata, path, env=None): - """ - Initialise an instance. - :param metadata: An instance of :class:`Metadata` which describes the - distribution. This will normally have been initialised - from a metadata file in the ``path``. - :param path: The path of the ``.dist-info`` or ``.egg-info`` - directory for the distribution. - :param env: This is normally the :class:`DistributionPath` - instance where this distribution was found. - """ - super(BaseInstalledDistribution, self).__init__(metadata) - self.path = path - self.dist_path = env - - def get_hash(self, data, hasher=None): - """ - Get the hash of some data, using a particular hash algorithm, if - specified. - - :param data: The data to be hashed. - :type data: bytes - :param hasher: The name of a hash implementation, supported by hashlib, - or ``None``. Examples of valid values are ``'sha1'``, - ``'sha224'``, ``'sha384'``, '``sha256'``, ``'md5'`` and - ``'sha512'``. If no hasher is specified, the ``hasher`` - attribute of the :class:`InstalledDistribution` instance - is used. If the hasher is determined to be ``None``, MD5 - is used as the hashing algorithm. - :returns: The hash of the data. If a hasher was explicitly specified, - the returned hash will be prefixed with the specified hasher - followed by '='. - :rtype: str - """ - if hasher is None: - hasher = self.hasher - if hasher is None: - hasher = hashlib.md5 - prefix = '' - else: - hasher = getattr(hashlib, hasher) - prefix = '%s=' % self.hasher - digest = hasher(data).digest() - digest = base64.urlsafe_b64encode(digest).rstrip(b'=').decode('ascii') - return '%s%s' % (prefix, digest) - - -class InstalledDistribution(BaseInstalledDistribution): - """ - Created with the *path* of the ``.dist-info`` directory provided to the - constructor. It reads the metadata contained in ``pydist.json`` when it is - instantiated., or uses a passed in Metadata instance (useful for when - dry-run mode is being used). - """ - - hasher = 'sha256' - - def __init__(self, path, metadata=None, env=None): - self.finder = finder = resources.finder_for_path(path) - if finder is None: - import pdb; pdb.set_trace () - if env and env._cache_enabled and path in env._cache.path: - metadata = env._cache.path[path].metadata - elif metadata is None: - r = finder.find(METADATA_FILENAME) - # Temporary - for legacy support - if r is None: - r = finder.find('METADATA') - if r is None: - raise ValueError('no %s found in %s' % (METADATA_FILENAME, - path)) - with contextlib.closing(r.as_stream()) as stream: - metadata = Metadata(fileobj=stream, scheme='legacy') - - super(InstalledDistribution, self).__init__(metadata, path, env) - - if env and env._cache_enabled: - env._cache.add(self) - - try: - r = finder.find('REQUESTED') - except AttributeError: - import pdb; pdb.set_trace () - self.requested = r is not None - - def __repr__(self): - return '' % ( - self.name, self.version, self.path) - - def __str__(self): - return "%s %s" % (self.name, self.version) - - def _get_records(self): - """ - Get the list of installed files for the distribution - :return: A list of tuples of path, hash and size. Note that hash and - size might be ``None`` for some entries. The path is exactly - as stored in the file (which is as in PEP 376). - """ - results = [] - r = self.get_distinfo_resource('RECORD') - with contextlib.closing(r.as_stream()) as stream: - with CSVReader(stream=stream) as record_reader: - # Base location is parent dir of .dist-info dir - #base_location = os.path.dirname(self.path) - #base_location = os.path.abspath(base_location) - for row in record_reader: - missing = [None for i in range(len(row), 3)] - path, checksum, size = row + missing - #if not os.path.isabs(path): - # path = path.replace('/', os.sep) - # path = os.path.join(base_location, path) - results.append((path, checksum, size)) - return results - - @cached_property - def exports(self): - """ - Return the information exported by this distribution. - :return: A dictionary of exports, mapping an export category to a dict - of :class:`ExportEntry` instances describing the individual - export entries, and keyed by name. - """ - result = {} - r = self.get_distinfo_resource(EXPORTS_FILENAME) - if r: - result = self.read_exports() - return result - - def read_exports(self): - """ - Read exports data from a file in .ini format. - - :return: A dictionary of exports, mapping an export category to a list - of :class:`ExportEntry` instances describing the individual - export entries. - """ - result = {} - r = self.get_distinfo_resource(EXPORTS_FILENAME) - if r: - with contextlib.closing(r.as_stream()) as stream: - result = read_exports(stream) - return result - - def write_exports(self, exports): - """ - Write a dictionary of exports to a file in .ini format. - :param exports: A dictionary of exports, mapping an export category to - a list of :class:`ExportEntry` instances describing the - individual export entries. - """ - rf = self.get_distinfo_file(EXPORTS_FILENAME) - with open(rf, 'w') as f: - write_exports(exports, f) - - def get_resource_path(self, relative_path): - """ - NOTE: This API may change in the future. - - Return the absolute path to a resource file with the given relative - path. - - :param relative_path: The path, relative to .dist-info, of the resource - of interest. - :return: The absolute path where the resource is to be found. - """ - r = self.get_distinfo_resource('RESOURCES') - with contextlib.closing(r.as_stream()) as stream: - with CSVReader(stream=stream) as resources_reader: - for relative, destination in resources_reader: - if relative == relative_path: - return destination - raise KeyError('no resource file with relative path %r ' - 'is installed' % relative_path) - - def list_installed_files(self): - """ - Iterates over the ``RECORD`` entries and returns a tuple - ``(path, hash, size)`` for each line. - - :returns: iterator of (path, hash, size) - """ - for result in self._get_records(): - yield result - - def write_installed_files(self, paths, prefix, dry_run=False): - """ - Writes the ``RECORD`` file, using the ``paths`` iterable passed in. Any - existing ``RECORD`` file is silently overwritten. - - prefix is used to determine when to write absolute paths. - """ - prefix = os.path.join(prefix, '') - base = os.path.dirname(self.path) - base_under_prefix = base.startswith(prefix) - base = os.path.join(base, '') - record_path = self.get_distinfo_file('RECORD') - logger.info('creating %s', record_path) - if dry_run: - return None - with CSVWriter(record_path) as writer: - for path in paths: - if os.path.isdir(path) or path.endswith(('.pyc', '.pyo')): - # do not put size and hash, as in PEP-376 - hash_value = size = '' - else: - size = '%d' % os.path.getsize(path) - with open(path, 'rb') as fp: - hash_value = self.get_hash(fp.read()) - if path.startswith(base) or (base_under_prefix and - path.startswith(prefix)): - path = os.path.relpath(path, base) - writer.writerow((path, hash_value, size)) - - # add the RECORD file itself - if record_path.startswith(base): - record_path = os.path.relpath(record_path, base) - writer.writerow((record_path, '', '')) - return record_path - - def check_installed_files(self): - """ - Checks that the hashes and sizes of the files in ``RECORD`` are - matched by the files themselves. Returns a (possibly empty) list of - mismatches. Each entry in the mismatch list will be a tuple consisting - of the path, 'exists', 'size' or 'hash' according to what didn't match - (existence is checked first, then size, then hash), the expected - value and the actual value. - """ - mismatches = [] - base = os.path.dirname(self.path) - record_path = self.get_distinfo_file('RECORD') - for path, hash_value, size in self.list_installed_files(): - if not os.path.isabs(path): - path = os.path.join(base, path) - if path == record_path: - continue - if not os.path.exists(path): - mismatches.append((path, 'exists', True, False)) - elif os.path.isfile(path): - actual_size = str(os.path.getsize(path)) - if size and actual_size != size: - mismatches.append((path, 'size', size, actual_size)) - elif hash_value: - if '=' in hash_value: - hasher = hash_value.split('=', 1)[0] - else: - hasher = None - - with open(path, 'rb') as f: - actual_hash = self.get_hash(f.read(), hasher) - if actual_hash != hash_value: - mismatches.append((path, 'hash', hash_value, actual_hash)) - return mismatches - - @cached_property - def shared_locations(self): - """ - A dictionary of shared locations whose keys are in the set 'prefix', - 'purelib', 'platlib', 'scripts', 'headers', 'data' and 'namespace'. - The corresponding value is the absolute path of that category for - this distribution, and takes into account any paths selected by the - user at installation time (e.g. via command-line arguments). In the - case of the 'namespace' key, this would be a list of absolute paths - for the roots of namespace packages in this distribution. - - The first time this property is accessed, the relevant information is - read from the SHARED file in the .dist-info directory. - """ - result = {} - shared_path = os.path.join(self.path, 'SHARED') - if os.path.isfile(shared_path): - with codecs.open(shared_path, 'r', encoding='utf-8') as f: - lines = f.read().splitlines() - for line in lines: - key, value = line.split('=', 1) - if key == 'namespace': - result.setdefault(key, []).append(value) - else: - result[key] = value - return result - - def write_shared_locations(self, paths, dry_run=False): - """ - Write shared location information to the SHARED file in .dist-info. - :param paths: A dictionary as described in the documentation for - :meth:`shared_locations`. - :param dry_run: If True, the action is logged but no file is actually - written. - :return: The path of the file written to. - """ - shared_path = os.path.join(self.path, 'SHARED') - logger.info('creating %s', shared_path) - if dry_run: - return None - lines = [] - for key in ('prefix', 'lib', 'headers', 'scripts', 'data'): - path = paths[key] - if os.path.isdir(paths[key]): - lines.append('%s=%s' % (key, path)) - for ns in paths.get('namespace', ()): - lines.append('namespace=%s' % ns) - - with codecs.open(shared_path, 'w', encoding='utf-8') as f: - f.write('\n'.join(lines)) - return shared_path - - def get_distinfo_resource(self, path): - if path not in DIST_FILES: - raise DistlibException('invalid path for a dist-info file: ' - '%r at %r' % (path, self.path)) - finder = resources.finder_for_path(self.path) - if finder is None: - raise DistlibException('Unable to get a finder for %s' % self.path) - return finder.find(path) - - def get_distinfo_file(self, path): - """ - Returns a path located under the ``.dist-info`` directory. Returns a - string representing the path. - - :parameter path: a ``'/'``-separated path relative to the - ``.dist-info`` directory or an absolute path; - If *path* is an absolute path and doesn't start - with the ``.dist-info`` directory path, - a :class:`DistlibException` is raised - :type path: str - :rtype: str - """ - # Check if it is an absolute path # XXX use relpath, add tests - if path.find(os.sep) >= 0: - # it's an absolute path? - distinfo_dirname, path = path.split(os.sep)[-2:] - if distinfo_dirname != self.path.split(os.sep)[-1]: - raise DistlibException( - 'dist-info file %r does not belong to the %r %s ' - 'distribution' % (path, self.name, self.version)) - - # The file must be relative - if path not in DIST_FILES: - raise DistlibException('invalid path for a dist-info file: ' - '%r at %r' % (path, self.path)) - - return os.path.join(self.path, path) - - def list_distinfo_files(self): - """ - Iterates over the ``RECORD`` entries and returns paths for each line if - the path is pointing to a file located in the ``.dist-info`` directory - or one of its subdirectories. - - :returns: iterator of paths - """ - base = os.path.dirname(self.path) - for path, checksum, size in self._get_records(): - # XXX add separator or use real relpath algo - if not os.path.isabs(path): - path = os.path.join(base, path) - if path.startswith(self.path): - yield path - - def __eq__(self, other): - return (isinstance(other, InstalledDistribution) and - self.path == other.path) - - # See http://docs.python.org/reference/datamodel#object.__hash__ - __hash__ = object.__hash__ - - -class EggInfoDistribution(BaseInstalledDistribution): - """Created with the *path* of the ``.egg-info`` directory or file provided - to the constructor. It reads the metadata contained in the file itself, or - if the given path happens to be a directory, the metadata is read from the - file ``PKG-INFO`` under that directory.""" - - requested = True # as we have no way of knowing, assume it was - shared_locations = {} - - def __init__(self, path, env=None): - def set_name_and_version(s, n, v): - s.name = n - s.key = n.lower() # for case-insensitive comparisons - s.version = v - - self.path = path - self.dist_path = env - if env and env._cache_enabled and path in env._cache_egg.path: - metadata = env._cache_egg.path[path].metadata - set_name_and_version(self, metadata.name, metadata.version) - else: - metadata = self._get_metadata(path) - - # Need to be set before caching - set_name_and_version(self, metadata.name, metadata.version) - - if env and env._cache_enabled: - env._cache_egg.add(self) - super(EggInfoDistribution, self).__init__(metadata, path, env) - - def _get_metadata(self, path): - requires = None - - def parse_requires_data(data): - """Create a list of dependencies from a requires.txt file. - - *data*: the contents of a setuptools-produced requires.txt file. - """ - reqs = [] - lines = data.splitlines() - for line in lines: - line = line.strip() - if line.startswith('['): - logger.warning('Unexpected line: quitting requirement scan: %r', - line) - break - r = parse_requirement(line) - if not r: - logger.warning('Not recognised as a requirement: %r', line) - continue - if r.extras: - logger.warning('extra requirements in requires.txt are ' - 'not supported') - if not r.constraints: - reqs.append(r.name) - else: - cons = ', '.join('%s%s' % c for c in r.constraints) - reqs.append('%s (%s)' % (r.name, cons)) - return reqs - - def parse_requires_path(req_path): - """Create a list of dependencies from a requires.txt file. - - *req_path*: the path to a setuptools-produced requires.txt file. - """ - - reqs = [] - try: - with codecs.open(req_path, 'r', 'utf-8') as fp: - reqs = parse_requires_data(fp.read()) - except IOError: - pass - return reqs - - if path.endswith('.egg'): - if os.path.isdir(path): - meta_path = os.path.join(path, 'EGG-INFO', 'PKG-INFO') - metadata = Metadata(path=meta_path, scheme='legacy') - req_path = os.path.join(path, 'EGG-INFO', 'requires.txt') - requires = parse_requires_path(req_path) - else: - # FIXME handle the case where zipfile is not available - zipf = zipimport.zipimporter(path) - fileobj = StringIO( - zipf.get_data('EGG-INFO/PKG-INFO').decode('utf8')) - metadata = Metadata(fileobj=fileobj, scheme='legacy') - try: - data = zipf.get_data('EGG-INFO/requires.txt') - requires = parse_requires_data(data.decode('utf-8')) - except IOError: - requires = None - elif path.endswith('.egg-info'): - if os.path.isdir(path): - path = os.path.join(path, 'PKG-INFO') - req_path = os.path.join(path, 'requires.txt') - requires = parse_requires_path(req_path) - metadata = Metadata(path=path, scheme='legacy') - else: - raise DistlibException('path must end with .egg-info or .egg, ' - 'got %r' % path) - - if requires: - metadata.add_requirements(requires) - return metadata - - def __repr__(self): - return '' % ( - self.name, self.version, self.path) - - def __str__(self): - return "%s %s" % (self.name, self.version) - - def check_installed_files(self): - """ - Checks that the hashes and sizes of the files in ``RECORD`` are - matched by the files themselves. Returns a (possibly empty) list of - mismatches. Each entry in the mismatch list will be a tuple consisting - of the path, 'exists', 'size' or 'hash' according to what didn't match - (existence is checked first, then size, then hash), the expected - value and the actual value. - """ - mismatches = [] - record_path = os.path.join(self.path, 'installed-files.txt') - if os.path.exists(record_path): - for path, _, _ in self.list_installed_files(): - if path == record_path: - continue - if not os.path.exists(path): - mismatches.append((path, 'exists', True, False)) - return mismatches - - def list_installed_files(self): - """ - Iterates over the ``installed-files.txt`` entries and returns a tuple - ``(path, hash, size)`` for each line. - - :returns: a list of (path, hash, size) - """ - - def _md5(path): - f = open(path, 'rb') - try: - content = f.read() - finally: - f.close() - return hashlib.md5(content).hexdigest() - - def _size(path): - return os.stat(path).st_size - - record_path = os.path.join(self.path, 'installed-files.txt') - result = [] - if os.path.exists(record_path): - with codecs.open(record_path, 'r', encoding='utf-8') as f: - for line in f: - line = line.strip() - p = os.path.normpath(os.path.join(self.path, line)) - # "./" is present as a marker between installed files - # and installation metadata files - if not os.path.exists(p): - logger.warning('Non-existent file: %s', p) - if p.endswith(('.pyc', '.pyo')): - continue - #otherwise fall through and fail - if not os.path.isdir(p): - result.append((p, _md5(p), _size(p))) - result.append((record_path, None, None)) - return result - - def list_distinfo_files(self, absolute=False): - """ - Iterates over the ``installed-files.txt`` entries and returns paths for - each line if the path is pointing to a file located in the - ``.egg-info`` directory or one of its subdirectories. - - :parameter absolute: If *absolute* is ``True``, each returned path is - transformed into a local absolute path. Otherwise the - raw value from ``installed-files.txt`` is returned. - :type absolute: boolean - :returns: iterator of paths - """ - record_path = os.path.join(self.path, 'installed-files.txt') - skip = True - with codecs.open(record_path, 'r', encoding='utf-8') as f: - for line in f: - line = line.strip() - if line == './': - skip = False - continue - if not skip: - p = os.path.normpath(os.path.join(self.path, line)) - if p.startswith(self.path): - if absolute: - yield p - else: - yield line - - def __eq__(self, other): - return (isinstance(other, EggInfoDistribution) and - self.path == other.path) - - # See http://docs.python.org/reference/datamodel#object.__hash__ - __hash__ = object.__hash__ - -new_dist_class = InstalledDistribution -old_dist_class = EggInfoDistribution - - -class DependencyGraph(object): - """ - Represents a dependency graph between distributions. - - The dependency relationships are stored in an ``adjacency_list`` that maps - distributions to a list of ``(other, label)`` tuples where ``other`` - is a distribution and the edge is labeled with ``label`` (i.e. the version - specifier, if such was provided). Also, for more efficient traversal, for - every distribution ``x``, a list of predecessors is kept in - ``reverse_list[x]``. An edge from distribution ``a`` to - distribution ``b`` means that ``a`` depends on ``b``. If any missing - dependencies are found, they are stored in ``missing``, which is a - dictionary that maps distributions to a list of requirements that were not - provided by any other distributions. - """ - - def __init__(self): - self.adjacency_list = {} - self.reverse_list = {} - self.missing = {} - - def add_distribution(self, distribution): - """Add the *distribution* to the graph. - - :type distribution: :class:`distutils2.database.InstalledDistribution` - or :class:`distutils2.database.EggInfoDistribution` - """ - self.adjacency_list[distribution] = [] - self.reverse_list[distribution] = [] - #self.missing[distribution] = [] - - def add_edge(self, x, y, label=None): - """Add an edge from distribution *x* to distribution *y* with the given - *label*. - - :type x: :class:`distutils2.database.InstalledDistribution` or - :class:`distutils2.database.EggInfoDistribution` - :type y: :class:`distutils2.database.InstalledDistribution` or - :class:`distutils2.database.EggInfoDistribution` - :type label: ``str`` or ``None`` - """ - self.adjacency_list[x].append((y, label)) - # multiple edges are allowed, so be careful - if x not in self.reverse_list[y]: - self.reverse_list[y].append(x) - - def add_missing(self, distribution, requirement): - """ - Add a missing *requirement* for the given *distribution*. - - :type distribution: :class:`distutils2.database.InstalledDistribution` - or :class:`distutils2.database.EggInfoDistribution` - :type requirement: ``str`` - """ - logger.debug('%s missing %r', distribution, requirement) - self.missing.setdefault(distribution, []).append(requirement) - - def _repr_dist(self, dist): - return '%s %s' % (dist.name, dist.version) - - def repr_node(self, dist, level=1): - """Prints only a subgraph""" - output = [self._repr_dist(dist)] - for other, label in self.adjacency_list[dist]: - dist = self._repr_dist(other) - if label is not None: - dist = '%s [%s]' % (dist, label) - output.append(' ' * level + str(dist)) - suboutput = self.repr_node(other, level + 1) - subs = suboutput.split('\n') - output.extend(subs[1:]) - return '\n'.join(output) - - def to_dot(self, f, skip_disconnected=True): - """Writes a DOT output for the graph to the provided file *f*. - - If *skip_disconnected* is set to ``True``, then all distributions - that are not dependent on any other distribution are skipped. - - :type f: has to support ``file``-like operations - :type skip_disconnected: ``bool`` - """ - disconnected = [] - - f.write("digraph dependencies {\n") - for dist, adjs in self.adjacency_list.items(): - if len(adjs) == 0 and not skip_disconnected: - disconnected.append(dist) - for other, label in adjs: - if not label is None: - f.write('"%s" -> "%s" [label="%s"]\n' % - (dist.name, other.name, label)) - else: - f.write('"%s" -> "%s"\n' % (dist.name, other.name)) - if not skip_disconnected and len(disconnected) > 0: - f.write('subgraph disconnected {\n') - f.write('label = "Disconnected"\n') - f.write('bgcolor = red\n') - - for dist in disconnected: - f.write('"%s"' % dist.name) - f.write('\n') - f.write('}\n') - f.write('}\n') - - def topological_sort(self): - """ - Perform a topological sort of the graph. - :return: A tuple, the first element of which is a topologically sorted - list of distributions, and the second element of which is a - list of distributions that cannot be sorted because they have - circular dependencies and so form a cycle. - """ - result = [] - # Make a shallow copy of the adjacency list - alist = {} - for k, v in self.adjacency_list.items(): - alist[k] = v[:] - while True: - # See what we can remove in this run - to_remove = [] - for k, v in list(alist.items())[:]: - if not v: - to_remove.append(k) - del alist[k] - if not to_remove: - # What's left in alist (if anything) is a cycle. - break - # Remove from the adjacency list of others - for k, v in alist.items(): - alist[k] = [(d, r) for d, r in v if d not in to_remove] - logger.debug('Moving to result: %s', - ['%s (%s)' % (d.name, d.version) for d in to_remove]) - result.extend(to_remove) - return result, list(alist.keys()) - - def __repr__(self): - """Representation of the graph""" - output = [] - for dist, adjs in self.adjacency_list.items(): - output.append(self.repr_node(dist)) - return '\n'.join(output) - - -def make_graph(dists, scheme='default'): - """Makes a dependency graph from the given distributions. - - :parameter dists: a list of distributions - :type dists: list of :class:`distutils2.database.InstalledDistribution` and - :class:`distutils2.database.EggInfoDistribution` instances - :rtype: a :class:`DependencyGraph` instance - """ - scheme = get_scheme(scheme) - graph = DependencyGraph() - provided = {} # maps names to lists of (version, dist) tuples - - # first, build the graph and find out what's provided - for dist in dists: - graph.add_distribution(dist) - - for p in dist.provides: - name, version = parse_name_and_version(p) - logger.debug('Add to provided: %s, %s, %s', name, version, dist) - provided.setdefault(name, []).append((version, dist)) - - # now make the edges - for dist in dists: - requires = (dist.run_requires | dist.meta_requires | - dist.build_requires | dist.dev_requires) - for req in requires: - try: - matcher = scheme.matcher(req) - except UnsupportedVersionError: - # XXX compat-mode if cannot read the version - logger.warning('could not read version %r - using name only', - req) - name = req.split()[0] - matcher = scheme.matcher(name) - - name = matcher.key # case-insensitive - - matched = False - if name in provided: - for version, provider in provided[name]: - try: - match = matcher.match(version) - except UnsupportedVersionError: - match = False - - if match: - graph.add_edge(dist, provider, req) - matched = True - break - if not matched: - graph.add_missing(dist, req) - return graph - - -def get_dependent_dists(dists, dist): - """Recursively generate a list of distributions from *dists* that are - dependent on *dist*. - - :param dists: a list of distributions - :param dist: a distribution, member of *dists* for which we are interested - """ - if dist not in dists: - raise DistlibException('given distribution %r is not a member ' - 'of the list' % dist.name) - graph = make_graph(dists) - - dep = [dist] # dependent distributions - todo = graph.reverse_list[dist] # list of nodes we should inspect - - while todo: - d = todo.pop() - dep.append(d) - for succ in graph.reverse_list[d]: - if succ not in dep: - todo.append(succ) - - dep.pop(0) # remove dist from dep, was there to prevent infinite loops - return dep - - -def get_required_dists(dists, dist): - """Recursively generate a list of distributions from *dists* that are - required by *dist*. - - :param dists: a list of distributions - :param dist: a distribution, member of *dists* for which we are interested - """ - if dist not in dists: - raise DistlibException('given distribution %r is not a member ' - 'of the list' % dist.name) - graph = make_graph(dists) - - req = [] # required distributions - todo = graph.adjacency_list[dist] # list of nodes we should inspect - - while todo: - d = todo.pop()[0] - req.append(d) - for pred in graph.adjacency_list[d]: - if pred not in req: - todo.append(pred) - - return req - - -def make_dist(name, version, **kwargs): - """ - A convenience method for making a dist given just a name and version. - """ - summary = kwargs.pop('summary', 'Placeholder for summary') - md = Metadata(**kwargs) - md.name = name - md.version = version - md.summary = summary or 'Plaeholder for summary' - return Distribution(md) diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/index.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/index.py deleted file mode 100644 index 30b2aa5..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/index.py +++ /dev/null @@ -1,480 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2013 Vinay Sajip. -# Licensed to the Python Software Foundation under a contributor agreement. -# See LICENSE.txt and CONTRIBUTORS.txt. -# -import hashlib -import logging -import os -import shutil -import subprocess -import tempfile -try: - from threading import Thread -except ImportError: - from dummy_threading import Thread - -from distlib import DistlibException -from distlib.compat import (HTTPBasicAuthHandler, Request, HTTPPasswordMgr, - urlparse, build_opener) -from distlib.util import cached_property, zip_dir - -logger = logging.getLogger(__name__) - -DEFAULT_INDEX = 'https://pypi.python.org/pypi' -DEFAULT_REALM = 'pypi' - -class PackageIndex(object): - """ - This class represents a package index compatible with PyPI, the Python - Package Index. - """ - - boundary = b'----------ThIs_Is_tHe_distlib_index_bouNdaRY_$' - - def __init__(self, url=None): - """ - Initialise an instance. - - :param url: The URL of the index. If not specified, the URL for PyPI is - used. - """ - self.url = url or DEFAULT_INDEX - self.read_configuration() - scheme, netloc, path, params, query, frag = urlparse(self.url) - if params or query or frag or scheme not in ('http', 'https'): - raise DistlibException('invalid repository: %s' % self.url) - self.password_handler = None - self.ssl_verifier = None - self.gpg = None - self.gpg_home = None - with open(os.devnull, 'w') as sink: - for s in ('gpg2', 'gpg'): - try: - rc = subprocess.check_call([s, '--version'], stdout=sink, - stderr=sink) - if rc == 0: - self.gpg = s - break - except OSError: - pass - - def _get_pypirc_command(self): - """ - Get the distutils command for interacting with PyPI configurations. - :return: the command. - """ - from distutils.core import Distribution - from distutils.config import PyPIRCCommand - d = Distribution() - return PyPIRCCommand(d) - - def read_configuration(self): - """ - Read the PyPI access configuration as supported by distutils, getting - PyPI to do the acutal work. This populates ``username``, ``password``, - ``realm`` and ``url`` attributes from the configuration. - """ - # get distutils to do the work - c = self._get_pypirc_command() - c.repository = self.url - cfg = c._read_pypirc() - self.username = cfg.get('username') - self.password = cfg.get('password') - self.realm = cfg.get('realm', 'pypi') - self.url = cfg.get('repository', self.url) - - def save_configuration(self): - """ - Save the PyPI access configuration. You must have set ``username`` and - ``password`` attributes before calling this method. - - Again, distutils is used to do the actual work. - """ - self.check_credentials() - # get distutils to do the work - c = self._get_pypirc_command() - c._store_pypirc(self.username, self.password) - - def check_credentials(self): - """ - Check that ``username`` and ``password`` have been set, and raise an - exception if not. - """ - if self.username is None or self.password is None: - raise DistlibException('username and password must be set') - pm = HTTPPasswordMgr() - _, netloc, _, _, _, _ = urlparse(self.url) - pm.add_password(self.realm, netloc, self.username, self.password) - self.password_handler = HTTPBasicAuthHandler(pm) - - def register(self, metadata): - """ - Register a distribution on PyPI, using the provided metadata. - - :param metadata: A :class:`Metadata` instance defining at least a name - and version number for the distribution to be - registered. - :return: The HTTP response received from PyPI upon submission of the - request. - """ - self.check_credentials() - metadata.validate() - d = metadata.todict() - d[':action'] = 'verify' - request = self.encode_request(d.items(), []) - response = self.send_request(request) - d[':action'] = 'submit' - request = self.encode_request(d.items(), []) - return self.send_request(request) - - def _reader(self, name, stream, outbuf): - """ - Thread runner for reading lines of from a subprocess into a buffer. - - :param name: The logical name of the stream (used for logging only). - :param stream: The stream to read from. This will typically a pipe - connected to the output stream of a subprocess. - :param outbuf: The list to append the read lines to. - """ - while True: - s = stream.readline() - if not s: - break - s = s.decode('utf-8').rstrip() - outbuf.append(s) - logger.debug('%s: %s' % (name, s)) - stream.close() - - def get_sign_command(self, filename, signer, sign_password): - """ - Return a suitable command for signing a file. - - :param filename: The pathname to the file to be signed. - :param signer: The identifier of the signer of the file. - :param sign_password: The passphrase for the signer's - private key used for signing. - :return: The signing command as a list suitable to be - passed to :class:`subprocess.Popen`. - """ - cmd = [self.gpg, '--status-fd', '2', '--no-tty'] - if self.gpg_home: - cmd.extend(['--homedir', self.gpg_home]) - if sign_password is not None: - cmd.extend(['--batch', '--passphrase-fd', '0']) - td = tempfile.mkdtemp() - sf = os.path.join(td, os.path.basename(filename) + '.asc') - cmd.extend(['--detach-sign', '--armor', '--local-user', - signer, '--output', sf, filename]) - logger.debug('invoking: %s', ' '.join(cmd)) - return cmd, sf - - def run_command(self, cmd, input_data=None): - """ - Run a command in a child process , passing it any input data specified. - - :param cmd: The command to run. - :param input_data: If specified, this must be a byte string containing - data to be sent to the child process. - :return: A tuple consisting of the subprocess' exit code, a list of - lines read from the subprocess' ``stdout``, and a list of - lines read from the subprocess' ``stderr``. - """ - kwargs = { - 'stdout': subprocess.PIPE, - 'stderr': subprocess.PIPE, - } - if input_data is not None: - kwargs['stdin'] = subprocess.PIPE - stdout = [] - stderr = [] - p = subprocess.Popen(cmd, **kwargs) - # We don't use communicate() here because we may need to - # get clever with interacting with the command - t1 = Thread(target=self._reader, args=('stdout', p.stdout, stdout)) - t1.start() - t2 = Thread(target=self._reader, args=('stderr', p.stderr, stderr)) - t2.start() - if input_data is not None: - p.stdin.write(input_data) - p.stdin.close() - - p.wait() - t1.join() - t2.join() - return p.returncode, stdout, stderr - - def sign_file(self, filename, signer, sign_password): - """ - Sign a file. - - :param filename: The pathname to the file to be signed. - :param signer: The identifier of the signer of the file. - :param sign_password: The passphrase for the signer's - private key used for signing. - :return: The absolute pathname of the file where the signature is - stored. - """ - cmd, sig_file = self.get_sign_command(filename, signer, sign_password) - rc, stdout, stderr = self.run_command(cmd, - sign_password.encode('utf-8')) - if rc != 0: - raise DistlibException('sign command failed with error ' - 'code %s' % rc) - return sig_file - - def upload_file(self, metadata, filename, signer=None, sign_password=None, - filetype='sdist', pyversion='source'): - """ - Upload a release file to the index. - - :param metadata: A :class:`Metadata` instance defining at least a name - and version number for the file to be uploaded. - :param filename: The pathname of the file to be uploaded. - :param signer: The identifier of the signer of the file. - :param sign_password: The passphrase for the signer's - private key used for signing. - :param filetype: The type of the file being uploaded. This is the - distutils command which produced that file, e.g. - ``sdist`` or ``bdist_wheel``. - :param pyversion: The version of Python which the release relates - to. For code compatible with any Python, this would - be ``source``, otherwise it would be e.g. ``3.2``. - :return: The HTTP response received from PyPI upon submission of the - request. - """ - self.check_credentials() - if not os.path.exists(filename): - raise DistlibException('not found: %s' % filename) - metadata.validate() - d = metadata.todict() - sig_file = None - if signer: - if not self.gpg: - logger.warning('no signing program available - not signed') - else: - sig_file = self.sign_file(filename, signer, sign_password) - with open(filename, 'rb') as f: - file_data = f.read() - md5_digest = hashlib.md5(file_data).hexdigest() - sha256_digest = hashlib.sha256(file_data).hexdigest() - d.update({ - ':action': 'file_upload', - 'protcol_version': '1', - 'filetype': filetype, - 'pyversion': pyversion, - 'md5_digest': md5_digest, - 'sha256_digest': sha256_digest, - }) - files = [('content', os.path.basename(filename), file_data)] - if sig_file: - with open(sig_file, 'rb') as f: - sig_data = f.read() - files.append(('gpg_signature', os.path.basename(sig_file), - sig_data)) - shutil.rmtree(os.path.dirname(sig_file)) - request = self.encode_request(d.items(), files) - return self.send_request(request) - - def upload_documentation(self, metadata, doc_dir): - """ - Upload documentation to the index. - - :param metadata: A :class:`Metadata` instance defining at least a name - and version number for the documentation to be - uploaded. - :param doc_dir: The pathname of the directory which contains the - documentation. This should be the directory that - contains the ``index.html`` for the documentation. - :return: The HTTP response received from PyPI upon submission of the - request. - """ - self.check_credentials() - if not os.path.isdir(doc_dir): - raise DistlibException('not a directory: %r' % doc_dir) - fn = os.path.join(doc_dir, 'index.html') - if not os.path.exists(fn): - raise DistlibException('not found: %r' % fn) - metadata.validate() - name, version = metadata.name, metadata.version - zip_data = zip_dir(doc_dir).getvalue() - fields = [(':action', 'doc_upload'), - ('name', name), ('version', version)] - files = [('content', name, zip_data)] - request = self.encode_request(fields, files) - return self.send_request(request) - - def get_verify_command(self, signature_filename, data_filename): - """ - Return a suitable command for verifying a file. - - :param signature_filename: The pathname to the file containing the - signature. - :param data_filename: The pathname to the file containing the - signed data. - :return: The verifying command as a list suitable to be - passed to :class:`subprocess.Popen`. - """ - cmd = [self.gpg, '--status-fd', '2', '--no-tty'] - if self.gpg_home: - cmd.extend(['--homedir', self.gpg_home]) - cmd.extend(['--verify', signature_filename, data_filename]) - logger.debug('invoking: %s', ' '.join(cmd)) - return cmd - - def verify_signature(self, signature_filename, data_filename): - """ - Verify a signature for a file. - - :param signature_filename: The pathname to the file containing the - signature. - :param data_filename: The pathname to the file containing the - signed data. - :return: True if the signature was verified, else False. - """ - if not self.gpg: - raise DistlibException('verification unavailable because gpg ' - 'unavailable') - cmd = self.get_verify_command(signature_filename, data_filename) - rc, stdout, stderr = self.run_command(cmd) - if rc not in (0, 1): - raise DistlibException('verify command failed with error ' - 'code %s' % rc) - return rc == 0 - - def download_file(self, url, destfile, digest=None, reporthook=None): - """ - This is a convenience method for downloading a file from an URL. - Normally, this will be a file from the index, though currently - no check is made for this (i.e. a file can be downloaded from - anywhere). - - The method is just like the :func:`urlretrieve` function in the - standard library, except that it allows digest computation to be - done during download and checking that the downloaded data - matched any expected value. - - :param url: The URL of the file to be downloaded (assumed to be - available via an HTTP GET request). - :param destfile: The pathname where the downloaded file is to be - saved. - :param digest: If specified, this must be a (hasher, value) - tuple, where hasher is the algorithm used (e.g. - ``'md5'``) and ``value`` is the expected value. - :param reporthook: The same as for :func:`urlretrieve` in the - standard library. - """ - if digest is None: - digester = None - logger.debug('No digest specified') - else: - if isinstance(digest, (list, tuple)): - hasher, digest = digest - else: - hasher = 'md5' - digester = getattr(hashlib, hasher)() - logger.debug('Digest specified: %s' % digest) - # The following code is equivalent to urlretrieve. - # We need to do it this way so that we can compute the - # digest of the file as we go. - with open(destfile, 'wb') as dfp: - # addinfourl is not a context manager on 2.x - # so we have to use try/finally - sfp = self.send_request(Request(url)) - try: - headers = sfp.info() - blocksize = 8192 - size = -1 - read = 0 - blocknum = 0 - if "content-length" in headers: - size = int(headers["Content-Length"]) - if reporthook: - reporthook(blocknum, blocksize, size) - while True: - block = sfp.read(blocksize) - if not block: - break - read += len(block) - dfp.write(block) - if digester: - digester.update(block) - blocknum += 1 - if reporthook: - reporthook(blocknum, blocksize, size) - finally: - sfp.close() - - # check that we got the whole file, if we can - if size >= 0 and read < size: - raise DistlibException( - 'retrieval incomplete: got only %d out of %d bytes' - % (read, size)) - # if we have a digest, it must match. - if digester: - actual = digester.hexdigest() - if digest != actual: - raise DistlibException('%s digest mismatch for %s: expected ' - '%s, got %s' % (hasher, destfile, - digest, actual)) - logger.debug('Digest verified: %s', digest) - - def send_request(self, req): - """ - Send a standard library :class:`Request` to PyPI and return its - response. - - :param req: The request to send. - :return: The HTTP response from PyPI (a standard library HTTPResponse). - """ - handlers = [] - if self.password_handler: - handlers.append(self.password_handler) - if self.ssl_verifier: - handlers.append(self.ssl_verifier) - opener = build_opener(*handlers) - return opener.open(req) - - def encode_request(self, fields, files): - """ - Encode fields and files for posting to an HTTP server. - - :param fields: The fields to send as a list of (fieldname, value) - tuples. - :param files: The files to send as a list of (fieldname, filename, - file_bytes) tuple. - """ - # Adapted from packaging, which in turn was adapted from - # http://code.activestate.com/recipes/146306 - - parts = [] - boundary = self.boundary - for k, values in fields: - if not isinstance(values, (list, tuple)): - values = [values] - - for v in values: - parts.extend(( - b'--' + boundary, - ('Content-Disposition: form-data; name="%s"' % - k).encode('utf-8'), - b'', - v.encode('utf-8'))) - for key, filename, value in files: - parts.extend(( - b'--' + boundary, - ('Content-Disposition: form-data; name="%s"; filename="%s"' % - (key, filename)).encode('utf-8'), - b'', - value)) - - parts.extend((b'--' + boundary + b'--', b'')) - - body = b'\r\n'.join(parts) - ct = b'multipart/form-data; boundary=' + boundary - headers = { - 'Content-type': ct, - 'Content-length': str(len(body)) - } - return Request(self.url, body, headers) diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/locators.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/locators.py deleted file mode 100644 index ffe9931..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/locators.py +++ /dev/null @@ -1,1187 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2012-2013 Vinay Sajip. -# Licensed to the Python Software Foundation under a contributor agreement. -# See LICENSE.txt and CONTRIBUTORS.txt. -# - -import gzip -from io import BytesIO -import json -import logging -import os -import posixpath -import re -try: - import threading -except ImportError: - import dummy_threading as threading -import zlib - -from . import DistlibException -from .compat import (urljoin, urlparse, urlunparse, url2pathname, pathname2url, - queue, quote, unescape, string_types, build_opener, - HTTPRedirectHandler as BaseRedirectHandler, - Request, HTTPError, URLError) -from .database import Distribution, DistributionPath, make_dist -from .metadata import Metadata -from .util import (cached_property, parse_credentials, ensure_slash, - split_filename, get_project_data, parse_requirement, - parse_name_and_version, ServerProxy) -from .version import get_scheme, UnsupportedVersionError -from .wheel import Wheel, is_compatible - -logger = logging.getLogger(__name__) - -HASHER_HASH = re.compile('^(\w+)=([a-f0-9]+)') -CHARSET = re.compile(r';\s*charset\s*=\s*(.*)\s*$', re.I) -HTML_CONTENT_TYPE = re.compile('text/html|application/x(ht)?ml') -DEFAULT_INDEX = 'http://python.org/pypi' - -def get_all_distribution_names(url=None): - """ - Return all distribution names known by an index. - :param url: The URL of the index. - :return: A list of all known distribution names. - """ - if url is None: - url = DEFAULT_INDEX - client = ServerProxy(url, timeout=3.0) - return client.list_packages() - -class RedirectHandler(BaseRedirectHandler): - """ - A class to work around a bug in some Python 3.2.x releases. - """ - # There's a bug in the base version for some 3.2.x - # (e.g. 3.2.2 on Ubuntu Oneiric). If a Location header - # returns e.g. /abc, it bails because it says the scheme '' - # is bogus, when actually it should use the request's - # URL for the scheme. See Python issue #13696. - def http_error_302(self, req, fp, code, msg, headers): - # Some servers (incorrectly) return multiple Location headers - # (so probably same goes for URI). Use first header. - newurl = None - for key in ('location', 'uri'): - if key in headers: - newurl = headers[key] - break - if newurl is None: - return - urlparts = urlparse(newurl) - if urlparts.scheme == '': - newurl = urljoin(req.get_full_url(), newurl) - if hasattr(headers, 'replace_header'): - headers.replace_header(key, newurl) - else: - headers[key] = newurl - return BaseRedirectHandler.http_error_302(self, req, fp, code, msg, - headers) - - http_error_301 = http_error_303 = http_error_307 = http_error_302 - -class Locator(object): - """ - A base class for locators - things that locate distributions. - """ - source_extensions = ('.tar.gz', '.tar.bz2', '.tar', '.zip', '.tgz', '.tbz') - binary_extensions = ('.egg', '.exe', '.whl') - excluded_extensions = ('.pdf',) - - # A list of tags indicating which wheels you want to match. The default - # value of None matches against the tags compatible with the running - # Python. If you want to match other values, set wheel_tags on a locator - # instance to a list of tuples (pyver, abi, arch) which you want to match. - wheel_tags = None - - downloadable_extensions = source_extensions + ('.whl',) - - def __init__(self, scheme='default'): - """ - Initialise an instance. - :param scheme: Because locators look for most recent versions, they - need to know the version scheme to use. This specifies - the current PEP-recommended scheme - use ``'legacy'`` - if you need to support existing distributions on PyPI. - """ - self._cache = {} - self.scheme = scheme - # Because of bugs in some of the handlers on some of the platforms, - # we use our own opener rather than just using urlopen. - self.opener = build_opener(RedirectHandler()) - # If get_project() is called from locate(), the matcher instance - # is set from the requirement passed to locate(). See issue #18 for - # why this can be useful to know. - self.matcher = None - - def clear_cache(self): - self._cache.clear() - - def _get_scheme(self): - return self._scheme - - def _set_scheme(self, value): - self._scheme = value - - scheme = property(_get_scheme, _set_scheme) - - def _get_project(self, name): - """ - For a given project, get a dictionary mapping available versions to Distribution - instances. - - This should be implemented in subclasses. - - If called from a locate() request, self.matcher will be set to a - matcher for the requirement to satisfy, otherwise it will be None. - """ - raise NotImplementedError('Please implement in the subclass') - - def get_distribution_names(self): - """ - Return all the distribution names known to this locator. - """ - raise NotImplementedError('Please implement in the subclass') - - def get_project(self, name): - """ - For a given project, get a dictionary mapping available versions to Distribution - instances. - - This calls _get_project to do all the work, and just implements a caching layer on top. - """ - if self._cache is None: - result = self._get_project(name) - elif name in self._cache: - result = self._cache[name] - else: - result = self._get_project(name) - self._cache[name] = result - return result - - def score_url(self, url): - """ - Give an url a score which can be used to choose preferred URLs - for a given project release. - """ - t = urlparse(url) - return (t.scheme != 'https', 'pypi.python.org' in t.netloc, - posixpath.basename(t.path)) - - def prefer_url(self, url1, url2): - """ - Choose one of two URLs where both are candidates for distribution - archives for the same version of a distribution (for example, - .tar.gz vs. zip). - - The current implement favours http:// URLs over https://, archives - from PyPI over those from other locations and then the archive name. - """ - result = url2 - if url1: - s1 = self.score_url(url1) - s2 = self.score_url(url2) - if s1 > s2: - result = url1 - if result != url2: - logger.debug('Not replacing %r with %r', url1, url2) - else: - logger.debug('Replacing %r with %r', url1, url2) - return result - - def split_filename(self, filename, project_name): - """ - Attempt to split a filename in project name, version and Python version. - """ - return split_filename(filename, project_name) - - def convert_url_to_download_info(self, url, project_name): - """ - See if a URL is a candidate for a download URL for a project (the URL - has typically been scraped from an HTML page). - - If it is, a dictionary is returned with keys "name", "version", - "filename" and "url"; otherwise, None is returned. - """ - def same_project(name1, name2): - name1, name2 = name1.lower(), name2.lower() - if name1 == name2: - result = True - else: - # distribute replaces '-' by '_' in project names, so it - # can tell where the version starts in a filename. - result = name1.replace('_', '-') == name2.replace('_', '-') - return result - - result = None - scheme, netloc, path, params, query, frag = urlparse(url) - if frag.lower().startswith('egg='): - logger.debug('%s: version hint in fragment: %r', - project_name, frag) - m = HASHER_HASH.match(frag) - if m: - algo, digest = m.groups() - else: - algo, digest = None, None - origpath = path - if path and path[-1] == '/': - path = path[:-1] - if path.endswith('.whl'): - try: - wheel = Wheel(path) - if is_compatible(wheel, self.wheel_tags): - if project_name is None: - include = True - else: - include = same_project(wheel.name, project_name) - if include: - result = { - 'name': wheel.name, - 'version': wheel.version, - 'filename': wheel.filename, - 'url': urlunparse((scheme, netloc, origpath, - params, query, '')), - 'python-version': ', '.join( - ['.'.join(list(v[2:])) for v in wheel.pyver]), - } - except Exception as e: - logger.warning('invalid path for wheel: %s', path) - elif path.endswith(self.downloadable_extensions): - path = filename = posixpath.basename(path) - for ext in self.downloadable_extensions: - if path.endswith(ext): - path = path[:-len(ext)] - t = self.split_filename(path, project_name) - if not t: - logger.debug('No match for project/version: %s', path) - else: - name, version, pyver = t - if not project_name or same_project(project_name, name): - result = { - 'name': name, - 'version': version, - 'filename': filename, - 'url': urlunparse((scheme, netloc, origpath, - params, query, '')), - #'packagetype': 'sdist', - } - if pyver: - result['python-version'] = pyver - break - if result and algo: - result['%s_digest' % algo] = digest - return result - - def _get_digest(self, info): - """ - Get a digest from a dictionary by looking at keys of the form - 'algo_digest'. - - Returns a 2-tuple (algo, digest) if found, else None. Currently - looks only for SHA256, then MD5. - """ - result = None - for algo in ('sha256', 'md5'): - key = '%s_digest' % algo - if key in info: - result = (algo, info[key]) - break - return result - - def _update_version_data(self, result, info): - """ - Update a result dictionary (the final result from _get_project) with a dictionary for a - specific version, whih typically holds information gleaned from a filename or URL for an - archive for the distribution. - """ - name = info.pop('name') - version = info.pop('version') - if version in result: - dist = result[version] - md = dist.metadata - else: - dist = make_dist(name, version, scheme=self.scheme) - md = dist.metadata - dist.digest = self._get_digest(info) - if md.source_url != info['url']: - md.source_url = self.prefer_url(md.source_url, info['url']) - dist.locator = self - result[version] = dist - - def locate(self, requirement, prereleases=False): - """ - Find the most recent distribution which matches the given - requirement. - - :param requirement: A requirement of the form 'foo (1.0)' or perhaps - 'foo (>= 1.0, < 2.0, != 1.3)' - :param prereleases: If ``True``, allow pre-release versions - to be located. Otherwise, pre-release versions - are not returned. - :return: A :class:`Distribution` instance, or ``None`` if no such - distribution could be located. - """ - result = None - r = parse_requirement(requirement) - if r is None: - raise DistlibException('Not a valid requirement: %r' % requirement) - scheme = get_scheme(self.scheme) - self.matcher = matcher = scheme.matcher(r.requirement) - logger.debug('matcher: %s (%s)', matcher, type(matcher).__name__) - versions = self.get_project(r.name) - if versions: - # sometimes, versions are invalid - slist = [] - vcls = matcher.version_class - for k in versions: - try: - if not matcher.match(k): - logger.debug('%s did not match %r', matcher, k) - else: - if prereleases or not vcls(k).is_prerelease: - slist.append(k) - else: - logger.debug('skipping pre-release ' - 'version %s of %s', k, matcher.name) - except Exception: - logger.warning('error matching %s with %r', matcher, k) - pass # slist.append(k) - if len(slist) > 1: - slist = sorted(slist, key=scheme.key) - if slist: - logger.debug('sorted list: %s', slist) - result = versions[slist[-1]] - if result and r.extras: - result.extras = r.extras - self.matcher = None - return result - - -class PyPIRPCLocator(Locator): - """ - This locator uses XML-RPC to locate distributions. It therefore - cannot be used with simple mirrors (that only mirror file content). - """ - def __init__(self, url, **kwargs): - """ - Initialise an instance. - - :param url: The URL to use for XML-RPC. - :param kwargs: Passed to the superclass constructor. - """ - super(PyPIRPCLocator, self).__init__(**kwargs) - self.base_url = url - self.client = ServerProxy(url, timeout=3.0) - - def get_distribution_names(self): - """ - Return all the distribution names known to this locator. - """ - return set(self.client.list_packages()) - - def _get_project(self, name): - result = {} - versions = self.client.package_releases(name, True) - for v in versions: - urls = self.client.release_urls(name, v) - data = self.client.release_data(name, v) - metadata = Metadata(scheme=self.scheme) - metadata.name = data['name'] - metadata.version = data['version'] - metadata.license = data.get('license') - metadata.keywords = data.get('keywords', []) - metadata.summary = data.get('summary') - dist = Distribution(metadata) - if urls: - info = urls[0] - metadata.source_url = info['url'] - dist.digest = self._get_digest(info) - dist.locator = self - result[v] = dist - return result - -class PyPIJSONLocator(Locator): - """ - This locator uses PyPI's JSON interface. It's very limited in functionality - nad probably not worth using. - """ - def __init__(self, url, **kwargs): - super(PyPIJSONLocator, self).__init__(**kwargs) - self.base_url = ensure_slash(url) - - def get_distribution_names(self): - """ - Return all the distribution names known to this locator. - """ - raise NotImplementedError('Not available from this locator') - - def _get_project(self, name): - result = {} - url = urljoin(self.base_url, '%s/json' % quote(name)) - try: - resp = self.opener.open(url) - data = resp.read().decode() # for now - d = json.loads(data) - md = Metadata(scheme=self.scheme) - data = d['info'] - md.name = data['name'] - md.version = data['version'] - md.license = data.get('license') - md.keywords = data.get('keywords', []) - md.summary = data.get('summary') - dist = Distribution(md) - urls = d['urls'] - if urls: - info = urls[0] - md.source_url = info['url'] - dist.digest = self._get_digest(info) - dist.locator = self - result[md.version] = dist - except Exception as e: - logger.exception('JSON fetch failed: %s', e) - return result - - -class Page(object): - """ - This class represents a scraped HTML page. - """ - # The following slightly hairy-looking regex just looks for the contents of - # an anchor link, which has an attribute "href" either immediately preceded - # or immediately followed by a "rel" attribute. The attribute values can be - # declared with double quotes, single quotes or no quotes - which leads to - # the length of the expression. - _href = re.compile(""" -(rel\s*=\s*(?:"(?P[^"]*)"|'(?P[^']*)'|(?P[^>\s\n]*))\s+)? -href\s*=\s*(?:"(?P[^"]*)"|'(?P[^']*)'|(?P[^>\s\n]*)) -(\s+rel\s*=\s*(?:"(?P[^"]*)"|'(?P[^']*)'|(?P[^>\s\n]*)))? -""", re.I | re.S | re.X) - _base = re.compile(r"""]+)""", re.I | re.S) - - def __init__(self, data, url): - """ - Initialise an instance with the Unicode page contents and the URL they - came from. - """ - self.data = data - self.base_url = self.url = url - m = self._base.search(self.data) - if m: - self.base_url = m.group(1) - - _clean_re = re.compile(r'[^a-z0-9$&+,/:;=?@.#%_\\|-]', re.I) - - @cached_property - def links(self): - """ - Return the URLs of all the links on a page together with information - about their "rel" attribute, for determining which ones to treat as - downloads and which ones to queue for further scraping. - """ - def clean(url): - "Tidy up an URL." - scheme, netloc, path, params, query, frag = urlparse(url) - return urlunparse((scheme, netloc, quote(path), - params, query, frag)) - - result = set() - for match in self._href.finditer(self.data): - d = match.groupdict('') - rel = (d['rel1'] or d['rel2'] or d['rel3'] or - d['rel4'] or d['rel5'] or d['rel6']) - url = d['url1'] or d['url2'] or d['url3'] - url = urljoin(self.base_url, url) - url = unescape(url) - url = self._clean_re.sub(lambda m: '%%%2x' % ord(m.group(0)), url) - result.add((url, rel)) - # We sort the result, hoping to bring the most recent versions - # to the front - result = sorted(result, key=lambda t: t[0], reverse=True) - return result - - -class SimpleScrapingLocator(Locator): - """ - A locator which scrapes HTML pages to locate downloads for a distribution. - This runs multiple threads to do the I/O; performance is at least as good - as pip's PackageFinder, which works in an analogous fashion. - """ - - # These are used to deal with various Content-Encoding schemes. - decoders = { - 'deflate': zlib.decompress, - 'gzip': lambda b: gzip.GzipFile(fileobj=BytesIO(d)).read(), - 'none': lambda b: b, - } - - def __init__(self, url, timeout=None, num_workers=10, **kwargs): - """ - Initialise an instance. - :param url: The root URL to use for scraping. - :param timeout: The timeout, in seconds, to be applied to requests. - This defaults to ``None`` (no timeout specified). - :param num_workers: The number of worker threads you want to do I/O, - This defaults to 10. - :param kwargs: Passed to the superclass. - """ - super(SimpleScrapingLocator, self).__init__(**kwargs) - self.base_url = ensure_slash(url) - self.timeout = timeout - self._page_cache = {} - self._seen = set() - self._to_fetch = queue.Queue() - self._bad_hosts = set() - self.skip_externals = False - self.num_workers = num_workers - self._lock = threading.RLock() - - def _prepare_threads(self): - """ - Threads are created only when get_project is called, and terminate - before it returns. They are there primarily to parallelise I/O (i.e. - fetching web pages). - """ - self._threads = [] - for i in range(self.num_workers): - t = threading.Thread(target=self._fetch) - t.setDaemon(True) - t.start() - self._threads.append(t) - - def _wait_threads(self): - """ - Tell all the threads to terminate (by sending a sentinel value) and - wait for them to do so. - """ - # Note that you need two loops, since you can't say which - # thread will get each sentinel - for t in self._threads: - self._to_fetch.put(None) # sentinel - for t in self._threads: - t.join() - self._threads = [] - - def _get_project(self, name): - self.result = result = {} - self.project_name = name - url = urljoin(self.base_url, '%s/' % quote(name)) - self._seen.clear() - self._page_cache.clear() - self._prepare_threads() - try: - logger.debug('Queueing %s', url) - self._to_fetch.put(url) - self._to_fetch.join() - finally: - self._wait_threads() - del self.result - return result - - platform_dependent = re.compile(r'\b(linux-(i\d86|x86_64|arm\w+)|' - r'win(32|-amd64)|macosx-?\d+)\b', re.I) - - def _is_platform_dependent(self, url): - """ - Does an URL refer to a platform-specific download? - """ - return self.platform_dependent.search(url) - - def _process_download(self, url): - """ - See if an URL is a suitable download for a project. - - If it is, register information in the result dictionary (for - _get_project) about the specific version it's for. - - Note that the return value isn't actually used other than as a boolean - value. - """ - if self._is_platform_dependent(url): - info = None - else: - info = self.convert_url_to_download_info(url, self.project_name) - logger.debug('process_download: %s -> %s', url, info) - if info: - with self._lock: # needed because self.result is shared - self._update_version_data(self.result, info) - return info - - def _should_queue(self, link, referrer, rel): - """ - Determine whether a link URL from a referring page and with a - particular "rel" attribute should be queued for scraping. - """ - scheme, netloc, path, _, _, _ = urlparse(link) - if path.endswith(self.source_extensions + self.binary_extensions + - self.excluded_extensions): - result = False - elif self.skip_externals and not link.startswith(self.base_url): - result = False - elif not referrer.startswith(self.base_url): - result = False - elif rel not in ('homepage', 'download'): - result = False - elif scheme not in ('http', 'https', 'ftp'): - result = False - elif self._is_platform_dependent(link): - result = False - else: - host = netloc.split(':', 1)[0] - if host.lower() == 'localhost': - result = False - else: - result = True - logger.debug('should_queue: %s (%s) from %s -> %s', link, rel, - referrer, result) - return result - - def _fetch(self): - """ - Get a URL to fetch from the work queue, get the HTML page, examine its - links for download candidates and candidates for further scraping. - - This is a handy method to run in a thread. - """ - while True: - url = self._to_fetch.get() - try: - if url: - page = self.get_page(url) - if page is None: # e.g. after an error - continue - for link, rel in page.links: - if link not in self._seen: - self._seen.add(link) - if (not self._process_download(link) and - self._should_queue(link, url, rel)): - logger.debug('Queueing %s from %s', link, url) - self._to_fetch.put(link) - finally: - # always do this, to avoid hangs :-) - self._to_fetch.task_done() - if not url: - #logger.debug('Sentinel seen, quitting.') - break - - def get_page(self, url): - """ - Get the HTML for an URL, possibly from an in-memory cache. - - XXX TODO Note: this cache is never actually cleared. It's assumed that - the data won't get stale over the lifetime of a locator instance (not - necessarily true for the default_locator). - """ - # http://peak.telecommunity.com/DevCenter/EasyInstall#package-index-api - scheme, netloc, path, _, _, _ = urlparse(url) - if scheme == 'file' and os.path.isdir(url2pathname(path)): - url = urljoin(ensure_slash(url), 'index.html') - - if url in self._page_cache: - result = self._page_cache[url] - logger.debug('Returning %s from cache: %s', url, result) - else: - host = netloc.split(':', 1)[0] - result = None - if host in self._bad_hosts: - logger.debug('Skipping %s due to bad host %s', url, host) - else: - req = Request(url, headers={'Accept-encoding': 'identity'}) - try: - logger.debug('Fetching %s', url) - resp = self.opener.open(req, timeout=self.timeout) - logger.debug('Fetched %s', url) - headers = resp.info() - content_type = headers.get('Content-Type', '') - if HTML_CONTENT_TYPE.match(content_type): - final_url = resp.geturl() - data = resp.read() - encoding = headers.get('Content-Encoding') - if encoding: - decoder = self.decoders[encoding] # fail if not found - data = decoder(data) - encoding = 'utf-8' - m = CHARSET.search(content_type) - if m: - encoding = m.group(1) - try: - data = data.decode(encoding) - except UnicodeError: - data = data.decode('latin-1') # fallback - result = Page(data, final_url) - self._page_cache[final_url] = result - except HTTPError as e: - if e.code != 404: - logger.exception('Fetch failed: %s: %s', url, e) - except URLError as e: - logger.exception('Fetch failed: %s: %s', url, e) - with self._lock: - self._bad_hosts.add(host) - except Exception as e: - logger.exception('Fetch failed: %s: %s', url, e) - finally: - self._page_cache[url] = result # even if None (failure) - return result - - _distname_re = re.compile(']*>([^<]+)<') - - def get_distribution_names(self): - """ - Return all the distribution names known to this locator. - """ - result = set() - page = self.get_page(self.base_url) - if not page: - raise DistlibException('Unable to get %s' % self.base_url) - for match in self._distname_re.finditer(page.data): - result.add(match.group(1)) - return result - -class DirectoryLocator(Locator): - """ - This class locates distributions in a directory tree. - """ - - def __init__(self, path, **kwargs): - """ - Initialise an instance. - :param path: The root of the directory tree to search. - :param kwargs: Passed to the superclass constructor, - except for: - * recursive - if True (the default), subdirectories are - recursed into. If False, only the top-level directory - is searched, - """ - self.recursive = kwargs.pop('recursive', True) - super(DirectoryLocator, self).__init__(**kwargs) - path = os.path.abspath(path) - if not os.path.isdir(path): - raise DistlibException('Not a directory: %r' % path) - self.base_dir = path - - def should_include(self, filename, parent): - """ - Should a filename be considered as a candidate for a distribution - archive? As well as the filename, the directory which contains it - is provided, though not used by the current implementation. - """ - return filename.endswith(self.downloadable_extensions) - - def _get_project(self, name): - result = {} - for root, dirs, files in os.walk(self.base_dir): - for fn in files: - if self.should_include(fn, root): - fn = os.path.join(root, fn) - url = urlunparse(('file', '', - pathname2url(os.path.abspath(fn)), - '', '', '')) - info = self.convert_url_to_download_info(url, name) - if info: - self._update_version_data(result, info) - if not self.recursive: - break - return result - - def get_distribution_names(self): - """ - Return all the distribution names known to this locator. - """ - result = set() - for root, dirs, files in os.walk(self.base_dir): - for fn in files: - if self.should_include(fn, root): - fn = os.path.join(root, fn) - url = urlunparse(('file', '', - pathname2url(os.path.abspath(fn)), - '', '', '')) - info = self.convert_url_to_download_info(url, None) - if info: - result.add(info['name']) - if not self.recursive: - break - return result - -class JSONLocator(Locator): - """ - This locator uses special extended metadata (not available on PyPI) and is - the basis of performant dependency resolution in distlib. Other locators - require archive downloads before dependencies can be determined! As you - might imagine, that can be slow. - """ - def get_distribution_names(self): - """ - Return all the distribution names known to this locator. - """ - raise NotImplementedError('Not available from this locator') - - def _get_project(self, name): - result = {} - data = get_project_data(name) - if data: - for info in data.get('files', []): - if info['ptype'] != 'sdist' or info['pyversion'] != 'source': - continue - # We don't store summary in project metadata as it makes - # the data bigger for no benefit during dependency - # resolution - dist = make_dist(data['name'], info['version'], - summary=data.get('summary', - 'Placeholder for summary'), - scheme=self.scheme) - md = dist.metadata - md.source_url = info['url'] - # TODO SHA256 digest - if 'digest' in info and info['digest']: - dist.digest = ('md5', info['digest']) - md.dependencies = info.get('requirements', {}) - dist.exports = info.get('exports', {}) - result[dist.version] = dist - return result - -class DistPathLocator(Locator): - """ - This locator finds installed distributions in a path. It can be useful for - adding to an :class:`AggregatingLocator`. - """ - def __init__(self, distpath, **kwargs): - """ - Initialise an instance. - - :param distpath: A :class:`DistributionPath` instance to search. - """ - super(DistPathLocator, self).__init__(**kwargs) - assert isinstance(distpath, DistributionPath) - self.distpath = distpath - - def _get_project(self, name): - dist = self.distpath.get_distribution(name) - if dist is None: - result = {} - else: - result = { dist.version: dist } - return result - - -class AggregatingLocator(Locator): - """ - This class allows you to chain and/or merge a list of locators. - """ - def __init__(self, *locators, **kwargs): - """ - Initialise an instance. - - :param locators: The list of locators to search. - :param kwargs: Passed to the superclass constructor, - except for: - * merge - if False (the default), the first successful - search from any of the locators is returned. If True, - the results from all locators are merged (this can be - slow). - """ - self.merge = kwargs.pop('merge', False) - self.locators = locators - super(AggregatingLocator, self).__init__(**kwargs) - - def clear_cache(self): - super(AggregatingLocator, self).clear_cache() - for locator in self.locators: - locator.clear_cache() - - def _set_scheme(self, value): - self._scheme = value - for locator in self.locators: - locator.scheme = value - - scheme = property(Locator.scheme.fget, _set_scheme) - - def _get_project(self, name): - result = {} - for locator in self.locators: - d = locator.get_project(name) - if d: - if self.merge: - result.update(d) - else: - # See issue #18. If any dists are found and we're looking - # for specific constraints, we only return something if - # a match is found. For example, if a DirectoryLocator - # returns just foo (1.0) while we're looking for - # foo (>= 2.0), we'll pretend there was nothing there so - # that subsequent locators can be queried. Otherwise we - # would just return foo (1.0) which would then lead to a - # failure to find foo (>= 2.0), because other locators - # weren't searched. Note that this only matters when - # merge=False. - if self.matcher is None: - found = True - else: - found = False - for k in d: - if self.matcher.match(k): - found = True - break - if found: - result = d - break - return result - - def get_distribution_names(self): - """ - Return all the distribution names known to this locator. - """ - result = set() - for locator in self.locators: - try: - result |= locator.get_distribution_names() - except NotImplementedError: - pass - return result - - -# We use a legacy scheme simply because most of the dists on PyPI use legacy -# versions which don't conform to PEP 426 / PEP 440. -default_locator = AggregatingLocator( - JSONLocator(), - SimpleScrapingLocator('https://pypi.python.org/simple/', - timeout=3.0), - scheme='legacy') - -locate = default_locator.locate - -NAME_VERSION_RE = re.compile(r'(?P[\w-]+)\s*' - r'\(\s*(==\s*)?(?P[^)]+)\)$') - -class DependencyFinder(object): - """ - Locate dependencies for distributions. - """ - - def __init__(self, locator=None): - """ - Initialise an instance, using the specified locator - to locate distributions. - """ - self.locator = locator or default_locator - self.scheme = get_scheme(self.locator.scheme) - - def add_distribution(self, dist): - """ - Add a distribution to the finder. This will update internal information - about who provides what. - :param dist: The distribution to add. - """ - logger.debug('adding distribution %s', dist) - name = dist.key - self.dists_by_name[name] = dist - self.dists[(name, dist.version)] = dist - for p in dist.provides: - name, version = parse_name_and_version(p) - logger.debug('Add to provided: %s, %s, %s', name, version, dist) - self.provided.setdefault(name, set()).add((version, dist)) - - def remove_distribution(self, dist): - """ - Remove a distribution from the finder. This will update internal - information about who provides what. - :param dist: The distribution to remove. - """ - logger.debug('removing distribution %s', dist) - name = dist.key - del self.dists_by_name[name] - del self.dists[(name, dist.version)] - for p in dist.provides: - name, version = parse_name_and_version(p) - logger.debug('Remove from provided: %s, %s, %s', name, version, dist) - s = self.provided[name] - s.remove((version, dist)) - if not s: - del self.provided[name] - - def get_matcher(self, reqt): - """ - Get a version matcher for a requirement. - :param reqt: The requirement - :type reqt: str - :return: A version matcher (an instance of - :class:`distlib.version.Matcher`). - """ - try: - matcher = self.scheme.matcher(reqt) - except UnsupportedVersionError: - # XXX compat-mode if cannot read the version - name = reqt.split()[0] - matcher = self.scheme.matcher(name) - return matcher - - def find_providers(self, reqt): - """ - Find the distributions which can fulfill a requirement. - - :param reqt: The requirement. - :type reqt: str - :return: A set of distribution which can fulfill the requirement. - """ - matcher = self.get_matcher(reqt) - name = matcher.key # case-insensitive - result = set() - provided = self.provided - if name in provided: - for version, provider in provided[name]: - try: - match = matcher.match(version) - except UnsupportedVersionError: - match = False - - if match: - result.add(provider) - break - return result - - def try_to_replace(self, provider, other, problems): - """ - Attempt to replace one provider with another. This is typically used - when resolving dependencies from multiple sources, e.g. A requires - (B >= 1.0) while C requires (B >= 1.1). - - For successful replacement, ``provider`` must meet all the requirements - which ``other`` fulfills. - - :param provider: The provider we are trying to replace with. - :param other: The provider we're trying to replace. - :param problems: If False is returned, this will contain what - problems prevented replacement. This is currently - a tuple of the literal string 'cantreplace', - ``provider``, ``other`` and the set of requirements - that ``provider`` couldn't fulfill. - :return: True if we can replace ``other`` with ``provider``, else - False. - """ - rlist = self.reqts[other] - unmatched = set() - for s in rlist: - matcher = self.get_matcher(s) - if not matcher.match(provider.version): - unmatched.add(s) - if unmatched: - # can't replace other with provider - problems.add(('cantreplace', provider, other, unmatched)) - result = False - else: - # can replace other with provider - self.remove_distribution(other) - del self.reqts[other] - for s in rlist: - self.reqts.setdefault(provider, set()).add(s) - self.add_distribution(provider) - result = True - return result - - def find(self, requirement, meta_extras=None, prereleases=False): - """ - Find a distribution and all distributions it depends on. - - :param requirement: The requirement specifying the distribution to - find, or a Distribution instance. - :param meta_extras: A list of meta extras such as :test:, :build: and - so on. - :param prereleases: If ``True``, allow pre-release versions to be - returned - otherwise, don't return prereleases - unless they're all that's available. - - Return a set of :class:`Distribution` instances and a set of - problems. - - The distributions returned should be such that they have the - :attr:`required` attribute set to ``True`` if they were - from the ``requirement`` passed to ``find()``, and they have the - :attr:`build_time_dependency` attribute set to ``True`` unless they - are post-installation dependencies of the ``requirement``. - - The problems should be a tuple consisting of the string - ``'unsatisfied'`` and the requirement which couldn't be satisfied - by any distribution known to the locator. - """ - - self.provided = {} - self.dists = {} - self.dists_by_name = {} - self.reqts = {} - - meta_extras = set(meta_extras or []) - if ':*:' in meta_extras: - meta_extras.remove(':*:') - # :meta: and :run: are implicitly included - meta_extras |= set([':test:', ':build:', ':dev:']) - - if isinstance(requirement, Distribution): - dist = odist = requirement - logger.debug('passed %s as requirement', odist) - else: - dist = odist = self.locator.locate(requirement, - prereleases=prereleases) - if dist is None: - raise DistlibException('Unable to locate %r' % requirement) - logger.debug('located %s', odist) - dist.requested = True - problems = set() - todo = set([dist]) - install_dists = set([odist]) - while todo: - dist = todo.pop() - name = dist.key # case-insensitive - if name not in self.dists_by_name: - self.add_distribution(dist) - else: - #import pdb; pdb.set_trace() - other = self.dists_by_name[name] - if other != dist: - self.try_to_replace(dist, other, problems) - - ireqts = dist.run_requires | dist.meta_requires - sreqts = dist.build_requires - ereqts = set() - if dist in install_dists: - for key in ('test', 'build', 'dev'): - e = ':%s:' % key - if e in meta_extras: - ereqts |= getattr(dist, '%s_requires' % key) - all_reqts = ireqts | sreqts | ereqts - for r in all_reqts: - providers = self.find_providers(r) - if not providers: - logger.debug('No providers found for %r', r) - provider = self.locator.locate(r, prereleases=prereleases) - # If no provider is found and we didn't consider - # prereleases, consider them now. - if provider is None and not prereleases: - provider = self.locator.locate(r, prereleases=True) - if provider is None: - logger.debug('Cannot satisfy %r', r) - problems.add(('unsatisfied', r)) - else: - n, v = provider.key, provider.version - if (n, v) not in self.dists: - todo.add(provider) - providers.add(provider) - if r in ireqts and dist in install_dists: - install_dists.add(provider) - logger.debug('Adding %s to install_dists', - provider.name_and_version) - for p in providers: - name = p.key - if name not in self.dists_by_name: - self.reqts.setdefault(p, set()).add(r) - else: - other = self.dists_by_name[name] - if other != p: - # see if other can be replaced by p - self.try_to_replace(p, other, problems) - - dists = set(self.dists.values()) - for dist in dists: - dist.build_time_dependency = dist not in install_dists - if dist.build_time_dependency: - logger.debug('%s is a build-time dependency only.', - dist.name_and_version) - logger.debug('find done for %s', odist) - return dists, problems diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/manifest.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/manifest.py deleted file mode 100644 index c6b98c5..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/manifest.py +++ /dev/null @@ -1,364 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2012-2013 Python Software Foundation. -# See LICENSE.txt and CONTRIBUTORS.txt. -# -""" -Class representing the list of files in a distribution. - -Equivalent to distutils.filelist, but fixes some problems. -""" -import fnmatch -import logging -import os -import re - -from . import DistlibException -from .compat import fsdecode -from .util import convert_path - - -__all__ = ['Manifest'] - -logger = logging.getLogger(__name__) - -# a \ followed by some spaces + EOL -_COLLAPSE_PATTERN = re.compile('\\\w*\n', re.M) -_COMMENTED_LINE = re.compile('#.*?(?=\n)|\n(?=$)', re.M | re.S) - - -class Manifest(object): - """A list of files built by on exploring the filesystem and filtered by - applying various patterns to what we find there. - """ - - def __init__(self, base=None): - """ - Initialise an instance. - - :param base: The base directory to explore under. - """ - self.base = os.path.abspath(os.path.normpath(base or os.getcwd())) - self.prefix = self.base + os.sep - self.allfiles = None - self.files = set() - - # - # Public API - # - - def findall(self): - """Find all files under the base and set ``allfiles`` to the absolute - pathnames of files found. - """ - from stat import S_ISREG, S_ISDIR, S_ISLNK - - self.allfiles = allfiles = [] - root = self.base - stack = [root] - pop = stack.pop - push = stack.append - - while stack: - root = pop() - names = os.listdir(root) - - for name in names: - fullname = os.path.join(root, name) - - # Avoid excess stat calls -- just one will do, thank you! - stat = os.stat(fullname) - mode = stat.st_mode - if S_ISREG(mode): - allfiles.append(fsdecode(fullname)) - elif S_ISDIR(mode) and not S_ISLNK(mode): - push(fullname) - - def add(self, item): - """ - Add a file to the manifest. - - :param item: The pathname to add. This can be relative to the base. - """ - if not item.startswith(self.prefix): - item = os.path.join(self.base, item) - self.files.add(os.path.normpath(item)) - - def add_many(self, items): - """ - Add a list of files to the manifest. - - :param items: The pathnames to add. These can be relative to the base. - """ - for item in items: - self.add(item) - - def sorted(self, wantdirs=False): - """ - Return sorted files in directory order - """ - - def add_dir(dirs, d): - dirs.add(d) - logger.debug('add_dir added %s', d) - if d != self.base: - parent, _ = os.path.split(d) - assert parent not in ('', '/') - add_dir(dirs, parent) - - result = set(self.files) # make a copy! - if wantdirs: - dirs = set() - for f in result: - add_dir(dirs, os.path.dirname(f)) - result |= dirs - return [os.path.join(*path_tuple) for path_tuple in - sorted(os.path.split(path) for path in result)] - - def clear(self): - """Clear all collected files.""" - self.files = set() - self.allfiles = [] - - def process_directive(self, directive): - """ - Process a directive which either adds some files from ``allfiles`` to - ``files``, or removes some files from ``files``. - - :param directive: The directive to process. This should be in a format - compatible with distutils ``MANIFEST.in`` files: - - http://docs.python.org/distutils/sourcedist.html#commands - """ - # Parse the line: split it up, make sure the right number of words - # is there, and return the relevant words. 'action' is always - # defined: it's the first word of the line. Which of the other - # three are defined depends on the action; it'll be either - # patterns, (dir and patterns), or (dirpattern). - action, patterns, thedir, dirpattern = self._parse_directive(directive) - - # OK, now we know that the action is valid and we have the - # right number of words on the line for that action -- so we - # can proceed with minimal error-checking. - if action == 'include': - for pattern in patterns: - if not self._include_pattern(pattern, anchor=True): - logger.warning('no files found matching %r', pattern) - - elif action == 'exclude': - for pattern in patterns: - if not self._exclude_pattern(pattern, anchor=True): - logger.warning('no previously-included files ' - 'found matching %r', pattern) - - elif action == 'global-include': - for pattern in patterns: - if not self._include_pattern(pattern, anchor=False): - logger.warning('no files found matching %r ' - 'anywhere in distribution', pattern) - - elif action == 'global-exclude': - for pattern in patterns: - if not self._exclude_pattern(pattern, anchor=False): - logger.warning('no previously-included files ' - 'matching %r found anywhere in ' - 'distribution', pattern) - - elif action == 'recursive-include': - for pattern in patterns: - if not self._include_pattern(pattern, prefix=thedir): - logger.warning('no files found matching %r ' - 'under directory %r', pattern, thedir) - - elif action == 'recursive-exclude': - for pattern in patterns: - if not self._exclude_pattern(pattern, prefix=thedir): - logger.warning('no previously-included files ' - 'matching %r found under directory %r', - pattern, thedir) - - elif action == 'graft': - if not self._include_pattern(None, prefix=dirpattern): - logger.warning('no directories found matching %r', - dirpattern) - - elif action == 'prune': - if not self._exclude_pattern(None, prefix=dirpattern): - logger.warning('no previously-included directories found ' - 'matching %r', dirpattern) - else: # pragma: no cover - # This should never happen, as it should be caught in - # _parse_template_line - raise DistlibException( - 'invalid action %r' % action) - - # - # Private API - # - - def _parse_directive(self, directive): - """ - Validate a directive. - :param directive: The directive to validate. - :return: A tuple of action, patterns, thedir, dir_patterns - """ - words = directive.split() - if len(words) == 1 and words[0] not in ('include', 'exclude', - 'global-include', - 'global-exclude', - 'recursive-include', - 'recursive-exclude', - 'graft', 'prune'): - # no action given, let's use the default 'include' - words.insert(0, 'include') - - action = words[0] - patterns = thedir = dir_pattern = None - - if action in ('include', 'exclude', - 'global-include', 'global-exclude'): - if len(words) < 2: - raise DistlibException( - '%r expects ...' % action) - - patterns = [convert_path(word) for word in words[1:]] - - elif action in ('recursive-include', 'recursive-exclude'): - if len(words) < 3: - raise DistlibException( - '%r expects ...' % action) - - thedir = convert_path(words[1]) - patterns = [convert_path(word) for word in words[2:]] - - elif action in ('graft', 'prune'): - if len(words) != 2: - raise DistlibException( - '%r expects a single ' % action) - - dir_pattern = convert_path(words[1]) - - else: - raise DistlibException('unknown action %r' % action) - - return action, patterns, thedir, dir_pattern - - def _include_pattern(self, pattern, anchor=True, prefix=None, - is_regex=False): - """Select strings (presumably filenames) from 'self.files' that - match 'pattern', a Unix-style wildcard (glob) pattern. - - Patterns are not quite the same as implemented by the 'fnmatch' - module: '*' and '?' match non-special characters, where "special" - is platform-dependent: slash on Unix; colon, slash, and backslash on - DOS/Windows; and colon on Mac OS. - - If 'anchor' is true (the default), then the pattern match is more - stringent: "*.py" will match "foo.py" but not "foo/bar.py". If - 'anchor' is false, both of these will match. - - If 'prefix' is supplied, then only filenames starting with 'prefix' - (itself a pattern) and ending with 'pattern', with anything in between - them, will match. 'anchor' is ignored in this case. - - If 'is_regex' is true, 'anchor' and 'prefix' are ignored, and - 'pattern' is assumed to be either a string containing a regex or a - regex object -- no translation is done, the regex is just compiled - and used as-is. - - Selected strings will be added to self.files. - - Return True if files are found. - """ - # XXX docstring lying about what the special chars are? - found = False - pattern_re = self._translate_pattern(pattern, anchor, prefix, is_regex) - - # delayed loading of allfiles list - if self.allfiles is None: - self.findall() - - for name in self.allfiles: - if pattern_re.search(name): - self.files.add(name) - found = True - return found - - def _exclude_pattern(self, pattern, anchor=True, prefix=None, - is_regex=False): - """Remove strings (presumably filenames) from 'files' that match - 'pattern'. - - Other parameters are the same as for 'include_pattern()', above. - The list 'self.files' is modified in place. Return True if files are - found. - - This API is public to allow e.g. exclusion of SCM subdirs, e.g. when - packaging source distributions - """ - found = False - pattern_re = self._translate_pattern(pattern, anchor, prefix, is_regex) - for f in list(self.files): - if pattern_re.search(f): - self.files.remove(f) - found = True - return found - - def _translate_pattern(self, pattern, anchor=True, prefix=None, - is_regex=False): - """Translate a shell-like wildcard pattern to a compiled regular - expression. - - Return the compiled regex. If 'is_regex' true, - then 'pattern' is directly compiled to a regex (if it's a string) - or just returned as-is (assumes it's a regex object). - """ - if is_regex: - if isinstance(pattern, str): - return re.compile(pattern) - else: - return pattern - - if pattern: - pattern_re = self._glob_to_re(pattern) - else: - pattern_re = '' - - base = re.escape(os.path.join(self.base, '')) - if prefix is not None: - # ditch end of pattern character - empty_pattern = self._glob_to_re('') - prefix_re = self._glob_to_re(prefix)[:-len(empty_pattern)] - sep = os.sep - if os.sep == '\\': - sep = r'\\' - pattern_re = '^' + base + sep.join((prefix_re, - '.*' + pattern_re)) - else: # no prefix -- respect anchor flag - if anchor: - pattern_re = '^' + base + pattern_re - - return re.compile(pattern_re) - - def _glob_to_re(self, pattern): - """Translate a shell-like glob pattern to a regular expression. - - Return a string containing the regex. Differs from - 'fnmatch.translate()' in that '*' does not match "special characters" - (which are platform-specific). - """ - pattern_re = fnmatch.translate(pattern) - - # '?' and '*' in the glob pattern become '.' and '.*' in the RE, which - # IMHO is wrong -- '?' and '*' aren't supposed to match slash in Unix, - # and by extension they shouldn't match such "special characters" under - # any OS. So change all non-escaped dots in the RE to match any - # character except the special characters (currently: just os.sep). - sep = os.sep - if os.sep == '\\': - # we're using a regex to manipulate a regex, so we need - # to escape the backslash twice - sep = r'\\\\' - escaped = r'\1[^%s]' % sep - pattern_re = re.sub(r'((? y, - 'gte': lambda x, y: x >= y, - 'in': lambda x, y: x in y, - 'lt': lambda x, y: x < y, - 'lte': lambda x, y: x <= y, - 'not': lambda x: not x, - 'noteq': lambda x, y: x != y, - 'notin': lambda x, y: x not in y, - } - - allowed_values = { - 'sys_platform': sys.platform, - 'python_version': '%s.%s' % sys.version_info[:2], - # parsing sys.platform is not reliable, but there is no other - # way to get e.g. 2.7.2+, and the PEP is defined with sys.version - 'python_full_version': sys.version.split(' ', 1)[0], - 'os_name': os.name, - 'platform_in_venv': str(in_venv()), - 'platform_release': platform.release(), - 'platform_version': platform.version(), - 'platform_machine': platform.machine(), - 'platform_python_implementation': python_implementation(), - } - - def __init__(self, context=None): - """ - Initialise an instance. - - :param context: If specified, names are looked up in this mapping. - """ - self.context = context or {} - self.source = None - - def get_fragment(self, offset): - """ - Get the part of the source which is causing a problem. - """ - fragment_len = 10 - s = '%r' % (self.source[offset:offset + fragment_len]) - if offset + fragment_len < len(self.source): - s += '...' - return s - - def get_handler(self, node_type): - """ - Get a handler for the specified AST node type. - """ - return getattr(self, 'do_%s' % node_type, None) - - def evaluate(self, node, filename=None): - """ - Evaluate a source string or node, using ``filename`` when - displaying errors. - """ - if isinstance(node, string_types): - self.source = node - kwargs = {'mode': 'eval'} - if filename: - kwargs['filename'] = filename - try: - node = ast.parse(node, **kwargs) - except SyntaxError as e: - s = self.get_fragment(e.offset) - raise SyntaxError('syntax error %s' % s) - node_type = node.__class__.__name__.lower() - handler = self.get_handler(node_type) - if handler is None: - if self.source is None: - s = '(source not available)' - else: - s = self.get_fragment(node.col_offset) - raise SyntaxError("don't know how to evaluate %r %s" % ( - node_type, s)) - return handler(node) - - def get_attr_key(self, node): - assert isinstance(node, ast.Attribute), 'attribute node expected' - return '%s.%s' % (node.value.id, node.attr) - - def do_attribute(self, node): - if not isinstance(node.value, ast.Name): - valid = False - else: - key = self.get_attr_key(node) - valid = key in self.context or key in self.allowed_values - if not valid: - raise SyntaxError('invalid expression: %s' % key) - if key in self.context: - result = self.context[key] - else: - result = self.allowed_values[key] - return result - - def do_boolop(self, node): - result = self.evaluate(node.values[0]) - is_or = node.op.__class__ is ast.Or - is_and = node.op.__class__ is ast.And - assert is_or or is_and - if (is_and and result) or (is_or and not result): - for n in node.values[1:]: - result = self.evaluate(n) - if (is_or and result) or (is_and and not result): - break - return result - - def do_compare(self, node): - def sanity_check(lhsnode, rhsnode): - valid = True - if isinstance(lhsnode, ast.Str) and isinstance(rhsnode, ast.Str): - valid = False - #elif (isinstance(lhsnode, ast.Attribute) - # and isinstance(rhsnode, ast.Attribute)): - # klhs = self.get_attr_key(lhsnode) - # krhs = self.get_attr_key(rhsnode) - # valid = klhs != krhs - if not valid: - s = self.get_fragment(node.col_offset) - raise SyntaxError('Invalid comparison: %s' % s) - - lhsnode = node.left - lhs = self.evaluate(lhsnode) - result = True - for op, rhsnode in zip(node.ops, node.comparators): - sanity_check(lhsnode, rhsnode) - op = op.__class__.__name__.lower() - if op not in self.operators: - raise SyntaxError('unsupported operation: %r' % op) - rhs = self.evaluate(rhsnode) - result = self.operators[op](lhs, rhs) - if not result: - break - lhs = rhs - lhsnode = rhsnode - return result - - def do_expression(self, node): - return self.evaluate(node.body) - - def do_name(self, node): - valid = False - if node.id in self.context: - valid = True - result = self.context[node.id] - elif node.id in self.allowed_values: - valid = True - result = self.allowed_values[node.id] - if not valid: - raise SyntaxError('invalid expression: %s' % node.id) - return result - - def do_str(self, node): - return node.s - - -def interpret(marker, execution_context=None): - """ - Interpret a marker and return a result depending on environment. - - :param marker: The marker to interpret. - :type marker: str - :param execution_context: The context used for name lookup. - :type execution_context: mapping - """ - return Evaluator(execution_context).evaluate(marker.strip()) diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/metadata.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/metadata.py deleted file mode 100644 index ef3b1d6..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/metadata.py +++ /dev/null @@ -1,1015 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2012 The Python Software Foundation. -# See LICENSE.txt and CONTRIBUTORS.txt. -# -"""Implementation of the Metadata for Python packages PEPs. - -Supports all metadata formats (1.0, 1.1, 1.2, and 2.0 experimental). -""" -from __future__ import unicode_literals - -import codecs -from email import message_from_file -import json -import logging -import re - - -from . import DistlibException, __version__ -from .compat import StringIO, string_types, text_type -from .markers import interpret -from .util import extract_by_key, get_extras -from .version import get_scheme, PEP426_VERSION_RE - -logger = logging.getLogger(__name__) - - -class MetadataMissingError(DistlibException): - """A required metadata is missing""" - - -class MetadataConflictError(DistlibException): - """Attempt to read or write metadata fields that are conflictual.""" - - -class MetadataUnrecognizedVersionError(DistlibException): - """Unknown metadata version number.""" - - -class MetadataInvalidError(DistlibException): - """A metadata value is invalid""" - -# public API of this module -__all__ = ['Metadata', 'PKG_INFO_ENCODING', 'PKG_INFO_PREFERRED_VERSION'] - -# Encoding used for the PKG-INFO files -PKG_INFO_ENCODING = 'utf-8' - -# preferred version. Hopefully will be changed -# to 1.2 once PEP 345 is supported everywhere -PKG_INFO_PREFERRED_VERSION = '1.1' - -_LINE_PREFIX = re.compile('\n \|') -_241_FIELDS = ('Metadata-Version', 'Name', 'Version', 'Platform', - 'Summary', 'Description', - 'Keywords', 'Home-page', 'Author', 'Author-email', - 'License') - -_314_FIELDS = ('Metadata-Version', 'Name', 'Version', 'Platform', - 'Supported-Platform', 'Summary', 'Description', - 'Keywords', 'Home-page', 'Author', 'Author-email', - 'License', 'Classifier', 'Download-URL', 'Obsoletes', - 'Provides', 'Requires') - -_314_MARKERS = ('Obsoletes', 'Provides', 'Requires', 'Classifier', - 'Download-URL') - -_345_FIELDS = ('Metadata-Version', 'Name', 'Version', 'Platform', - 'Supported-Platform', 'Summary', 'Description', - 'Keywords', 'Home-page', 'Author', 'Author-email', - 'Maintainer', 'Maintainer-email', 'License', - 'Classifier', 'Download-URL', 'Obsoletes-Dist', - 'Project-URL', 'Provides-Dist', 'Requires-Dist', - 'Requires-Python', 'Requires-External') - -_345_MARKERS = ('Provides-Dist', 'Requires-Dist', 'Requires-Python', - 'Obsoletes-Dist', 'Requires-External', 'Maintainer', - 'Maintainer-email', 'Project-URL') - -_426_FIELDS = ('Metadata-Version', 'Name', 'Version', 'Platform', - 'Supported-Platform', 'Summary', 'Description', - 'Keywords', 'Home-page', 'Author', 'Author-email', - 'Maintainer', 'Maintainer-email', 'License', - 'Classifier', 'Download-URL', 'Obsoletes-Dist', - 'Project-URL', 'Provides-Dist', 'Requires-Dist', - 'Requires-Python', 'Requires-External', 'Private-Version', - 'Obsoleted-By', 'Setup-Requires-Dist', 'Extension', - 'Provides-Extra') - -_426_MARKERS = ('Private-Version', 'Provides-Extra', 'Obsoleted-By', - 'Setup-Requires-Dist', 'Extension') - -_ALL_FIELDS = set() -_ALL_FIELDS.update(_241_FIELDS) -_ALL_FIELDS.update(_314_FIELDS) -_ALL_FIELDS.update(_345_FIELDS) -_ALL_FIELDS.update(_426_FIELDS) - -EXTRA_RE = re.compile(r'''extra\s*==\s*("([^"]+)"|'([^']+)')''') - - -def _version2fieldlist(version): - if version == '1.0': - return _241_FIELDS - elif version == '1.1': - return _314_FIELDS - elif version == '1.2': - return _345_FIELDS - elif version == '2.0': - return _426_FIELDS - raise MetadataUnrecognizedVersionError(version) - - -def _best_version(fields): - """Detect the best version depending on the fields used.""" - def _has_marker(keys, markers): - for marker in markers: - if marker in keys: - return True - return False - - keys = [] - for key, value in fields.items(): - if value in ([], 'UNKNOWN', None): - continue - keys.append(key) - - possible_versions = ['1.0', '1.1', '1.2', '2.0'] - - # first let's try to see if a field is not part of one of the version - for key in keys: - if key not in _241_FIELDS and '1.0' in possible_versions: - possible_versions.remove('1.0') - if key not in _314_FIELDS and '1.1' in possible_versions: - possible_versions.remove('1.1') - if key not in _345_FIELDS and '1.2' in possible_versions: - possible_versions.remove('1.2') - if key not in _426_FIELDS and '2.0' in possible_versions: - possible_versions.remove('2.0') - - # possible_version contains qualified versions - if len(possible_versions) == 1: - return possible_versions[0] # found ! - elif len(possible_versions) == 0: - raise MetadataConflictError('Unknown metadata set') - - # let's see if one unique marker is found - is_1_1 = '1.1' in possible_versions and _has_marker(keys, _314_MARKERS) - is_1_2 = '1.2' in possible_versions and _has_marker(keys, _345_MARKERS) - is_2_0 = '2.0' in possible_versions and _has_marker(keys, _426_MARKERS) - if int(is_1_1) + int(is_1_2) + int(is_2_0) > 1: - raise MetadataConflictError('You used incompatible 1.1/1.2/2.0 fields') - - # we have the choice, 1.0, or 1.2, or 2.0 - # - 1.0 has a broken Summary field but works with all tools - # - 1.1 is to avoid - # - 1.2 fixes Summary but has little adoption - # - 2.0 adds more features and is very new - if not is_1_1 and not is_1_2 and not is_2_0: - # we couldn't find any specific marker - if PKG_INFO_PREFERRED_VERSION in possible_versions: - return PKG_INFO_PREFERRED_VERSION - if is_1_1: - return '1.1' - if is_1_2: - return '1.2' - - return '2.0' - -_ATTR2FIELD = { - 'metadata_version': 'Metadata-Version', - 'name': 'Name', - 'version': 'Version', - 'platform': 'Platform', - 'supported_platform': 'Supported-Platform', - 'summary': 'Summary', - 'description': 'Description', - 'keywords': 'Keywords', - 'home_page': 'Home-page', - 'author': 'Author', - 'author_email': 'Author-email', - 'maintainer': 'Maintainer', - 'maintainer_email': 'Maintainer-email', - 'license': 'License', - 'classifier': 'Classifier', - 'download_url': 'Download-URL', - 'obsoletes_dist': 'Obsoletes-Dist', - 'provides_dist': 'Provides-Dist', - 'requires_dist': 'Requires-Dist', - 'setup_requires_dist': 'Setup-Requires-Dist', - 'requires_python': 'Requires-Python', - 'requires_external': 'Requires-External', - 'requires': 'Requires', - 'provides': 'Provides', - 'obsoletes': 'Obsoletes', - 'project_url': 'Project-URL', - 'private_version': 'Private-Version', - 'obsoleted_by': 'Obsoleted-By', - 'extension': 'Extension', - 'provides_extra': 'Provides-Extra', -} - -_PREDICATE_FIELDS = ('Requires-Dist', 'Obsoletes-Dist', 'Provides-Dist') -_VERSIONS_FIELDS = ('Requires-Python',) -_VERSION_FIELDS = ('Version',) -_LISTFIELDS = ('Platform', 'Classifier', 'Obsoletes', - 'Requires', 'Provides', 'Obsoletes-Dist', - 'Provides-Dist', 'Requires-Dist', 'Requires-External', - 'Project-URL', 'Supported-Platform', 'Setup-Requires-Dist', - 'Provides-Extra', 'Extension') -_LISTTUPLEFIELDS = ('Project-URL',) - -_ELEMENTSFIELD = ('Keywords',) - -_UNICODEFIELDS = ('Author', 'Maintainer', 'Summary', 'Description') - -_MISSING = object() - -_FILESAFE = re.compile('[^A-Za-z0-9.]+') - - -def _get_name_and_version(name, version, for_filename=False): - """Return the distribution name with version. - - If for_filename is true, return a filename-escaped form.""" - if for_filename: - # For both name and version any runs of non-alphanumeric or '.' - # characters are replaced with a single '-'. Additionally any - # spaces in the version string become '.' - name = _FILESAFE.sub('-', name) - version = _FILESAFE.sub('-', version.replace(' ', '.')) - return '%s-%s' % (name, version) - - -class LegacyMetadata(object): - """The legacy metadata of a release. - - Supports versions 1.0, 1.1 and 1.2 (auto-detected). You can - instantiate the class with one of these arguments (or none): - - *path*, the path to a metadata file - - *fileobj* give a file-like object with metadata as content - - *mapping* is a dict-like object - - *scheme* is a version scheme name - """ - # TODO document the mapping API and UNKNOWN default key - - def __init__(self, path=None, fileobj=None, mapping=None, - scheme='default'): - if [path, fileobj, mapping].count(None) < 2: - raise TypeError('path, fileobj and mapping are exclusive') - self._fields = {} - self.requires_files = [] - self._dependencies = None - self.scheme = scheme - if path is not None: - self.read(path) - elif fileobj is not None: - self.read_file(fileobj) - elif mapping is not None: - self.update(mapping) - self.set_metadata_version() - - def set_metadata_version(self): - self._fields['Metadata-Version'] = _best_version(self._fields) - - def _write_field(self, fileobj, name, value): - fileobj.write('%s: %s\n' % (name, value)) - - def __getitem__(self, name): - return self.get(name) - - def __setitem__(self, name, value): - return self.set(name, value) - - def __delitem__(self, name): - field_name = self._convert_name(name) - try: - del self._fields[field_name] - except KeyError: - raise KeyError(name) - - def __contains__(self, name): - return (name in self._fields or - self._convert_name(name) in self._fields) - - def _convert_name(self, name): - if name in _ALL_FIELDS: - return name - name = name.replace('-', '_').lower() - return _ATTR2FIELD.get(name, name) - - def _default_value(self, name): - if name in _LISTFIELDS or name in _ELEMENTSFIELD: - return [] - return 'UNKNOWN' - - def _remove_line_prefix(self, value): - return _LINE_PREFIX.sub('\n', value) - - def __getattr__(self, name): - if name in _ATTR2FIELD: - return self[name] - raise AttributeError(name) - - # - # Public API - # - -# dependencies = property(_get_dependencies, _set_dependencies) - - def get_fullname(self, filesafe=False): - """Return the distribution name with version. - - If filesafe is true, return a filename-escaped form.""" - return _get_name_and_version(self['Name'], self['Version'], filesafe) - - def is_field(self, name): - """return True if name is a valid metadata key""" - name = self._convert_name(name) - return name in _ALL_FIELDS - - def is_multi_field(self, name): - name = self._convert_name(name) - return name in _LISTFIELDS - - def read(self, filepath): - """Read the metadata values from a file path.""" - fp = codecs.open(filepath, 'r', encoding='utf-8') - try: - self.read_file(fp) - finally: - fp.close() - - def read_file(self, fileob): - """Read the metadata values from a file object.""" - msg = message_from_file(fileob) - self._fields['Metadata-Version'] = msg['metadata-version'] - - # When reading, get all the fields we can - for field in _ALL_FIELDS: - if field not in msg: - continue - if field in _LISTFIELDS: - # we can have multiple lines - values = msg.get_all(field) - if field in _LISTTUPLEFIELDS and values is not None: - values = [tuple(value.split(',')) for value in values] - self.set(field, values) - else: - # single line - value = msg[field] - if value is not None and value != 'UNKNOWN': - self.set(field, value) - self.set_metadata_version() - - def write(self, filepath, skip_unknown=False): - """Write the metadata fields to filepath.""" - fp = codecs.open(filepath, 'w', encoding='utf-8') - try: - self.write_file(fp, skip_unknown) - finally: - fp.close() - - def write_file(self, fileobject, skip_unknown=False): - """Write the PKG-INFO format data to a file object.""" - self.set_metadata_version() - - for field in _version2fieldlist(self['Metadata-Version']): - values = self.get(field) - if skip_unknown and values in ('UNKNOWN', [], ['UNKNOWN']): - continue - if field in _ELEMENTSFIELD: - self._write_field(fileobject, field, ','.join(values)) - continue - if field not in _LISTFIELDS: - if field == 'Description': - values = values.replace('\n', '\n |') - values = [values] - - if field in _LISTTUPLEFIELDS: - values = [','.join(value) for value in values] - - for value in values: - self._write_field(fileobject, field, value) - - def update(self, other=None, **kwargs): - """Set metadata values from the given iterable `other` and kwargs. - - Behavior is like `dict.update`: If `other` has a ``keys`` method, - they are looped over and ``self[key]`` is assigned ``other[key]``. - Else, ``other`` is an iterable of ``(key, value)`` iterables. - - Keys that don't match a metadata field or that have an empty value are - dropped. - """ - def _set(key, value): - if key in _ATTR2FIELD and value: - self.set(self._convert_name(key), value) - - if not other: - # other is None or empty container - pass - elif hasattr(other, 'keys'): - for k in other.keys(): - _set(k, other[k]) - else: - for k, v in other: - _set(k, v) - - if kwargs: - for k, v in kwargs.items(): - _set(k, v) - - def set(self, name, value): - """Control then set a metadata field.""" - name = self._convert_name(name) - - if ((name in _ELEMENTSFIELD or name == 'Platform') and - not isinstance(value, (list, tuple))): - if isinstance(value, string_types): - value = [v.strip() for v in value.split(',')] - else: - value = [] - elif (name in _LISTFIELDS and - not isinstance(value, (list, tuple))): - if isinstance(value, string_types): - value = [value] - else: - value = [] - - if logger.isEnabledFor(logging.WARNING): - project_name = self['Name'] - - scheme = get_scheme(self.scheme) - if name in _PREDICATE_FIELDS and value is not None: - for v in value: - # check that the values are valid - if not scheme.is_valid_matcher(v.split(';')[0]): - logger.warning( - '%r: %r is not valid (field %r)', - project_name, v, name) - # FIXME this rejects UNKNOWN, is that right? - elif name in _VERSIONS_FIELDS and value is not None: - if not scheme.is_valid_constraint_list(value): - logger.warning('%r: %r is not a valid version (field %r)', - project_name, value, name) - elif name in _VERSION_FIELDS and value is not None: - if not scheme.is_valid_version(value): - logger.warning('%r: %r is not a valid version (field %r)', - project_name, value, name) - - if name in _UNICODEFIELDS: - if name == 'Description': - value = self._remove_line_prefix(value) - - self._fields[name] = value - - def get(self, name, default=_MISSING): - """Get a metadata field.""" - name = self._convert_name(name) - if name not in self._fields: - if default is _MISSING: - default = self._default_value(name) - return default - if name in _UNICODEFIELDS: - value = self._fields[name] - return value - elif name in _LISTFIELDS: - value = self._fields[name] - if value is None: - return [] - res = [] - for val in value: - if name not in _LISTTUPLEFIELDS: - res.append(val) - else: - # That's for Project-URL - res.append((val[0], val[1])) - return res - - elif name in _ELEMENTSFIELD: - value = self._fields[name] - if isinstance(value, string_types): - return value.split(',') - return self._fields[name] - - def check(self, strict=False): - """Check if the metadata is compliant. If strict is True then raise if - no Name or Version are provided""" - self.set_metadata_version() - - # XXX should check the versions (if the file was loaded) - missing, warnings = [], [] - - for attr in ('Name', 'Version'): # required by PEP 345 - if attr not in self: - missing.append(attr) - - if strict and missing != []: - msg = 'missing required metadata: %s' % ', '.join(missing) - raise MetadataMissingError(msg) - - for attr in ('Home-page', 'Author'): - if attr not in self: - missing.append(attr) - - # checking metadata 1.2 (XXX needs to check 1.1, 1.0) - if self['Metadata-Version'] != '1.2': - return missing, warnings - - scheme = get_scheme(self.scheme) - - def are_valid_constraints(value): - for v in value: - if not scheme.is_valid_matcher(v.split(';')[0]): - return False - return True - - for fields, controller in ((_PREDICATE_FIELDS, are_valid_constraints), - (_VERSIONS_FIELDS, - scheme.is_valid_constraint_list), - (_VERSION_FIELDS, - scheme.is_valid_version)): - for field in fields: - value = self.get(field, None) - if value is not None and not controller(value): - warnings.append('Wrong value for %r: %s' % (field, value)) - - return missing, warnings - - def todict(self, skip_missing=False): - """Return fields as a dict. - - Field names will be converted to use the underscore-lowercase style - instead of hyphen-mixed case (i.e. home_page instead of Home-page). - """ - self.set_metadata_version() - - mapping_1_0 = ( - ('metadata_version', 'Metadata-Version'), - ('name', 'Name'), - ('version', 'Version'), - ('summary', 'Summary'), - ('home_page', 'Home-page'), - ('author', 'Author'), - ('author_email', 'Author-email'), - ('license', 'License'), - ('description', 'Description'), - ('keywords', 'Keywords'), - ('platform', 'Platform'), - ('classifier', 'Classifier'), - ('download_url', 'Download-URL'), - ) - - data = {} - for key, field_name in mapping_1_0: - if not skip_missing or field_name in self._fields: - data[key] = self[field_name] - - if self['Metadata-Version'] == '1.2': - mapping_1_2 = ( - ('requires_dist', 'Requires-Dist'), - ('requires_python', 'Requires-Python'), - ('requires_external', 'Requires-External'), - ('provides_dist', 'Provides-Dist'), - ('obsoletes_dist', 'Obsoletes-Dist'), - ('project_url', 'Project-URL'), - ('maintainer', 'Maintainer'), - ('maintainer_email', 'Maintainer-email'), - ) - for key, field_name in mapping_1_2: - if not skip_missing or field_name in self._fields: - if key != 'project_url': - data[key] = self[field_name] - else: - data[key] = [','.join(u) for u in self[field_name]] - - elif self['Metadata-Version'] == '1.1': - mapping_1_1 = ( - ('provides', 'Provides'), - ('requires', 'Requires'), - ('obsoletes', 'Obsoletes'), - ) - for key, field_name in mapping_1_1: - if not skip_missing or field_name in self._fields: - data[key] = self[field_name] - - return data - - def add_requirements(self, requirements): - if self['Metadata-Version'] == '1.1': - # we can't have 1.1 metadata *and* Setuptools requires - for field in ('Obsoletes', 'Requires', 'Provides'): - if field in self: - del self[field] - self['Requires-Dist'] += requirements - - # Mapping API - # TODO could add iter* variants - - def keys(self): - return list(_version2fieldlist(self['Metadata-Version'])) - - def __iter__(self): - for key in self.keys(): - yield key - - def values(self): - return [self[key] for key in self.keys()] - - def items(self): - return [(key, self[key]) for key in self.keys()] - - def __repr__(self): - return '<%s %s %s>' % (self.__class__.__name__, self.name, - self.version) - - -METADATA_FILENAME = 'pydist.json' - - -class Metadata(object): - """ - The metadata of a release. This implementation uses 2.0 (JSON) - metadata where possible. If not possible, it wraps a LegacyMetadata - instance which handles the key-value metadata format. - """ - - METADATA_VERSION_MATCHER = re.compile('^\d+(\.\d+)*$') - - NAME_MATCHER = re.compile('^[0-9A-Z]([0-9A-Z_.-]*[0-9A-Z])?$', re.I) - - VERSION_MATCHER = PEP426_VERSION_RE - - SUMMARY_MATCHER = re.compile('.{1,2047}') - - METADATA_VERSION = '2.0' - - GENERATOR = 'distlib (%s)' % __version__ - - MANDATORY_KEYS = { - 'name': (), - 'version': (), - 'summary': ('legacy',), - } - - INDEX_KEYS = ('name version license summary description author ' - 'author_email keywords platform home_page classifiers ' - 'download_url') - - DEPENDENCY_KEYS = ('extras run_requires test_requires build_requires ' - 'dev_requires provides meta_requires obsoleted_by ' - 'supports_environments') - - SYNTAX_VALIDATORS = { - 'metadata_version': (METADATA_VERSION_MATCHER, ()), - 'name': (NAME_MATCHER, ('legacy',)), - 'version': (VERSION_MATCHER, ('legacy',)), - 'summary': (SUMMARY_MATCHER, ('legacy',)), - } - - __slots__ = ('_legacy', '_data', 'scheme') - - def __init__(self, path=None, fileobj=None, mapping=None, - scheme='default'): - if [path, fileobj, mapping].count(None) < 2: - raise TypeError('path, fileobj and mapping are exclusive') - self._legacy = None - self._data = None - self.scheme = scheme - #import pdb; pdb.set_trace() - if mapping is not None: - try: - self._validate_mapping(mapping, scheme) - self._data = mapping - except MetadataUnrecognizedVersionError: - self._legacy = LegacyMetadata(mapping=mapping, scheme=scheme) - self.validate() - else: - data = None - if path: - with open(path, 'rb') as f: - data = f.read() - elif fileobj: - data = fileobj.read() - if data is None: - # Initialised with no args - to be added - self._data = { - 'metadata_version': self.METADATA_VERSION, - 'generator': self.GENERATOR, - } - else: - if not isinstance(data, text_type): - data = data.decode('utf-8') - try: - self._data = json.loads(data) - self._validate_mapping(self._data, scheme) - except ValueError: - # Note: MetadataUnrecognizedVersionError does not - # inherit from ValueError (it's a DistlibException, - # which should not inherit from ValueError). - # The ValueError comes from the json.load - if that - # succeeds and we get a validation error, we want - # that to propagate - self._legacy = LegacyMetadata(fileobj=StringIO(data), - scheme=scheme) - self.validate() - - common_keys = set(('name', 'version', 'license', 'keywords', 'summary')) - - none_list = (None, list) - none_dict = (None, dict) - - mapped_keys = { - 'run_requires': ('Requires-Dist', list), - 'build_requires': ('Setup-Requires-Dist', list), - 'dev_requires': none_list, - 'test_requires': none_list, - 'meta_requires': none_list, - 'extras': ('Provides-Extra', list), - 'modules': none_list, - 'namespaces': none_list, - 'exports': none_dict, - 'commands': none_dict, - 'classifiers': ('Classifier', list), - 'source_url': ('Download-URL', None), - 'metadata_version': ('Metadata-Version', None), - } - - del none_list, none_dict - - def __getattribute__(self, key): - common = object.__getattribute__(self, 'common_keys') - mapped = object.__getattribute__(self, 'mapped_keys') - if key in mapped: - lk, maker = mapped[key] - if self._legacy: - if lk is None: - result = None if maker is None else maker() - else: - result = self._legacy.get(lk) - else: - value = None if maker is None else maker() - result = self._data.get(key, value) - elif key not in common: - result = object.__getattribute__(self, key) - elif self._legacy: - result = self._legacy.get(key) - else: - result = self._data.get(key) - return result - - def _validate_value(self, key, value, scheme=None): - if key in self.SYNTAX_VALIDATORS: - pattern, exclusions = self.SYNTAX_VALIDATORS[key] - if (scheme or self.scheme) not in exclusions: - m = pattern.match(value) - if not m: - raise MetadataInvalidError('%r is an invalid value for ' - 'the %r property' % (value, - key)) - - def __setattr__(self, key, value): - self._validate_value(key, value) - common = object.__getattribute__(self, 'common_keys') - mapped = object.__getattribute__(self, 'mapped_keys') - if key in mapped: - lk, _ = mapped[key] - if self._legacy: - if lk is None: - raise NotImplementedError - self._legacy[lk] = value - else: - self._data[key] = value - elif key not in common: - object.__setattr__(self, key, value) - else: - if key == 'keywords': - if isinstance(value, string_types): - value = value.strip() - if value: - value = value.split() - else: - value = [] - if self._legacy: - self._legacy[key] = value - else: - self._data[key] = value - - @property - def name_and_version(self): - return _get_name_and_version(self.name, self.version, True) - - @property - def provides(self): - if self._legacy: - result = self._legacy['Provides-Dist'] - else: - result = self._data.setdefault('provides', []) - s = '%s (%s)' % (self.name, self.version) - if s not in result: - result.append(s) - return result - - @provides.setter - def provides(self, value): - if self._legacy: - self._legacy['Provides-Dist'] = value - else: - self._data['provides'] = value - - def get_requirements(self, reqts, extras=None, env=None): - """ - Base method to get dependencies, given a set of extras - to satisfy and an optional environment context. - :param reqts: A list of sometimes-wanted dependencies, - perhaps dependent on extras and environment. - :param extras: A list of optional components being requested. - :param env: An optional environment for marker evaluation. - """ - if self._legacy: - result = reqts - else: - result = [] - extras = get_extras(extras or [], self.extras) - for d in reqts: - if 'extra' not in d and 'environment' not in d: - # unconditional - include = True - else: - if 'extra' not in d: - # Not extra-dependent - only environment-dependent - include = True - else: - include = d.get('extra') in extras - if include: - # Not excluded because of extras, check environment - marker = d.get('environment') - if marker: - include = interpret(marker, env) - if include: - result.extend(d['requires']) - for key in ('build', 'dev', 'test'): - e = ':%s:' % key - if e in extras: - extras.remove(e) - # A recursive call, but it should terminate since 'test' - # has been removed from the extras - reqts = self._data.get('%s_requires' % key, []) - result.extend(self.get_requirements(reqts, extras=extras, - env=env)) - return result - - @property - def dictionary(self): - if self._legacy: - return self._from_legacy() - return self._data - - @property - def dependencies(self): - if self._legacy: - raise NotImplementedError - else: - return extract_by_key(self._data, self.DEPENDENCY_KEYS) - - @dependencies.setter - def dependencies(self, value): - if self._legacy: - raise NotImplementedError - else: - self._data.update(value) - - def _validate_mapping(self, mapping, scheme): - if mapping.get('metadata_version') != self.METADATA_VERSION: - raise MetadataUnrecognizedVersionError() - missing = [] - for key, exclusions in self.MANDATORY_KEYS.items(): - if key not in mapping: - if scheme not in exclusions: - missing.append(key) - if missing: - msg = 'Missing metadata items: %s' % ', '.join(missing) - raise MetadataMissingError(msg) - for k, v in mapping.items(): - self._validate_value(k, v, scheme) - - def validate(self): - if self._legacy: - missing, warnings = self._legacy.check(True) - if missing or warnings: - logger.warning('Metadata: missing: %s, warnings: %s', - missing, warnings) - else: - self._validate_mapping(self._data, self.scheme) - - def todict(self): - if self._legacy: - return self._legacy.todict(True) - else: - result = extract_by_key(self._data, self.INDEX_KEYS) - return result - - def _from_legacy(self): - assert self._legacy and not self._data - result = { - 'metadata_version': self.METADATA_VERSION, - 'generator': self.GENERATOR, - } - lmd = self._legacy.todict(True) # skip missing ones - for k in ('name', 'version', 'license', 'summary', 'description', - 'classifier'): - if k in lmd: - if k == 'classifier': - nk = 'classifiers' - else: - nk = k - result[nk] = lmd[k] - kw = lmd.get('Keywords', []) - if kw == ['']: - kw = [] - result['keywords'] = kw - keys = (('requires_dist', 'run_requires'), - ('setup_requires_dist', 'build_requires')) - for ok, nk in keys: - if ok in lmd and lmd[ok]: - result[nk] = [{'requires': lmd[ok]}] - result['provides'] = self.provides - author = {} - maintainer = {} - return result - - LEGACY_MAPPING = { - 'name': 'Name', - 'version': 'Version', - 'license': 'License', - 'summary': 'Summary', - 'description': 'Description', - 'classifiers': 'Classifier', - } - - def _to_legacy(self): - def process_entries(entries): - reqts = set() - for e in entries: - extra = e.get('extra') - env = e.get('environment') - rlist = e['requires'] - for r in rlist: - if not env and not extra: - reqts.add(r) - else: - marker = '' - if extra: - marker = 'extra == "%s"' % extra - if env: - if marker: - marker = '(%s) and %s' % (env, marker) - else: - marker = env - reqts.add(';'.join((r, marker))) - return reqts - - assert self._data and not self._legacy - result = LegacyMetadata() - nmd = self._data - for nk, ok in self.LEGACY_MAPPING.items(): - if nk in nmd: - result[ok] = nmd[nk] - r1 = process_entries(self.run_requires + self.meta_requires) - r2 = process_entries(self.build_requires + self.dev_requires) - if self.extras: - result['Provides-Extra'] = sorted(self.extras) - result['Requires-Dist'] = sorted(r1) - result['Setup-Requires-Dist'] = sorted(r2) - # TODO: other fields such as contacts - return result - - def write(self, path=None, fileobj=None, legacy=False, skip_unknown=True): - if [path, fileobj].count(None) != 1: - raise ValueError('Exactly one of path and fileobj is needed') - self.validate() - if legacy: - if self._legacy: - legacy_md = self._legacy - else: - legacy_md = self._to_legacy() - if path: - legacy_md.write(path, skip_unknown=skip_unknown) - else: - legacy_md.write_file(fileobj, skip_unknown=skip_unknown) - else: - if self._legacy: - d = self._from_legacy() - else: - d = self._data - if fileobj: - json.dump(d, fileobj, ensure_ascii=True, indent=2, - sort_keys=True) - else: - with codecs.open(path, 'w', 'utf-8') as f: - json.dump(d, f, ensure_ascii=True, indent=2, - sort_keys=True) - - def add_requirements(self, requirements): - if self._legacy: - self._legacy.add_requirements(requirements) - else: - self._data.setdefault('run_requires', []).extend(requirements) - - def __repr__(self): - name = self.name or '(no name)' - version = self.version or 'no version' - return '<%s %s %s (%s)>' % (self.__class__.__name__, - self.metadata_version, name, version) diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/resources.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/resources.py deleted file mode 100644 index 7c26737..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/resources.py +++ /dev/null @@ -1,351 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2013 Vinay Sajip. -# Licensed to the Python Software Foundation under a contributor agreement. -# See LICENSE.txt and CONTRIBUTORS.txt. -# -from __future__ import unicode_literals - -import bisect -import io -import logging -import os -import pkgutil -import shutil -import sys -import types -import zipimport - -from . import DistlibException -from .util import cached_property, get_cache_base, path_to_cache_dir - -logger = logging.getLogger(__name__) - - -class Cache(object): - """ - A class implementing a cache for resources that need to live in the file system - e.g. shared libraries. - """ - - def __init__(self, base=None): - """ - Initialise an instance. - - :param base: The base directory where the cache should be located. If - not specified, this will be the ``resource-cache`` - directory under whatever :func:`get_cache_base` returns. - """ - if base is None: - # Use native string to avoid issues on 2.x: see Python #20140. - base = os.path.join(get_cache_base(), str('resource-cache')) - # we use 'isdir' instead of 'exists', because we want to - # fail if there's a file with that name - if not os.path.isdir(base): - os.makedirs(base) - self.base = os.path.abspath(os.path.normpath(base)) - - def prefix_to_dir(self, prefix): - """ - Converts a resource prefix to a directory name in the cache. - """ - return path_to_cache_dir(prefix) - - def is_stale(self, resource, path): - """ - Is the cache stale for the given resource? - - :param resource: The :class:`Resource` being cached. - :param path: The path of the resource in the cache. - :return: True if the cache is stale. - """ - # Cache invalidation is a hard problem :-) - return True - - def get(self, resource): - """ - Get a resource into the cache, - - :param resource: A :class:`Resource` instance. - :return: The pathname of the resource in the cache. - """ - prefix, path = resource.finder.get_cache_info(resource) - if prefix is None: - result = path - else: - result = os.path.join(self.base, self.prefix_to_dir(prefix), path) - dirname = os.path.dirname(result) - if not os.path.isdir(dirname): - os.makedirs(dirname) - if not os.path.exists(result): - stale = True - else: - stale = self.is_stale(resource, path) - if stale: - # write the bytes of the resource to the cache location - with open(result, 'wb') as f: - f.write(resource.bytes) - return result - - def clear(self): - """ - Clear the cache. - """ - not_removed = [] - for fn in os.listdir(self.base): - fn = os.path.join(self.base, fn) - try: - if os.path.islink(fn) or os.path.isfile(fn): - os.remove(fn) - elif os.path.isdir(fn): - shutil.rmtree(fn) - except Exception: - not_removed.append(fn) - return not_removed - -cache = Cache() - - -class ResourceBase(object): - def __init__(self, finder, name): - self.finder = finder - self.name = name - - -class Resource(ResourceBase): - """ - A class representing an in-package resource, such as a data file. This is - not normally instantiated by user code, but rather by a - :class:`ResourceFinder` which manages the resource. - """ - is_container = False # Backwards compatibility - - def as_stream(self): - """ - Get the resource as a stream. - - This is not a property to make it obvious that it returns a new stream - each time. - """ - return self.finder.get_stream(self) - - @cached_property - def file_path(self): - return cache.get(self) - - @cached_property - def bytes(self): - return self.finder.get_bytes(self) - - @cached_property - def size(self): - return self.finder.get_size(self) - - -class ResourceContainer(ResourceBase): - is_container = True # Backwards compatibility - - @cached_property - def resources(self): - return self.finder.get_resources(self) - - -class ResourceFinder(object): - """ - Resource finder for file system resources. - """ - def __init__(self, module): - self.module = module - self.loader = getattr(module, '__loader__', None) - self.base = os.path.dirname(getattr(module, '__file__', '')) - - def _adjust_path(self, path): - return os.path.realpath(path) - - def _make_path(self, resource_name): - parts = resource_name.split('/') - parts.insert(0, self.base) - result = os.path.join(*parts) - return self._adjust_path(result) - - def _find(self, path): - return os.path.exists(path) - - def get_cache_info(self, resource): - return None, resource.path - - def find(self, resource_name): - path = self._make_path(resource_name) - if not self._find(path): - result = None - else: - if self._is_directory(path): - result = ResourceContainer(self, resource_name) - else: - result = Resource(self, resource_name) - result.path = path - return result - - def get_stream(self, resource): - return open(resource.path, 'rb') - - def get_bytes(self, resource): - with open(resource.path, 'rb') as f: - return f.read() - - def get_size(self, resource): - return os.path.getsize(resource.path) - - def get_resources(self, resource): - def allowed(f): - return f != '__pycache__' and not f.endswith(('.pyc', '.pyo')) - return set([f for f in os.listdir(resource.path) if allowed(f)]) - - def is_container(self, resource): - return self._is_directory(resource.path) - - _is_directory = staticmethod(os.path.isdir) - - -class ZipResourceFinder(ResourceFinder): - """ - Resource finder for resources in .zip files. - """ - def __init__(self, module): - super(ZipResourceFinder, self).__init__(module) - archive = self.loader.archive - self.prefix_len = 1 + len(archive) - # PyPy doesn't have a _files attr on zipimporter, and you can't set one - if hasattr(self.loader, '_files'): - self._files = self.loader._files - else: - self._files = zipimport._zip_directory_cache[archive] - self.index = sorted(self._files) - - def _adjust_path(self, path): - return path - - def _find(self, path): - path = path[self.prefix_len:] - if path in self._files: - result = True - else: - if path and path[-1] != os.sep: - path = path + os.sep - i = bisect.bisect(self.index, path) - try: - result = self.index[i].startswith(path) - except IndexError: - result = False - if not result: - logger.debug('_find failed: %r %r', path, self.loader.prefix) - else: - logger.debug('_find worked: %r %r', path, self.loader.prefix) - return result - - def get_cache_info(self, resource): - prefix = self.loader.archive - path = resource.path[1 + len(prefix):] - return prefix, path - - def get_bytes(self, resource): - return self.loader.get_data(resource.path) - - def get_stream(self, resource): - return io.BytesIO(self.get_bytes(resource)) - - def get_size(self, resource): - path = resource.path[self.prefix_len:] - return self._files[path][3] - - def get_resources(self, resource): - path = resource.path[self.prefix_len:] - if path and path[-1] != os.sep: - path += os.sep - plen = len(path) - result = set() - i = bisect.bisect(self.index, path) - while i < len(self.index): - if not self.index[i].startswith(path): - break - s = self.index[i][plen:] - result.add(s.split(os.sep, 1)[0]) # only immediate children - i += 1 - return result - - def _is_directory(self, path): - path = path[self.prefix_len:] - if path and path[-1] != os.sep: - path += os.sep - i = bisect.bisect(self.index, path) - try: - result = self.index[i].startswith(path) - except IndexError: - result = False - return result - -_finder_registry = { - type(None): ResourceFinder, - zipimport.zipimporter: ZipResourceFinder -} - -try: - import _frozen_importlib - _finder_registry[_frozen_importlib.SourceFileLoader] = ResourceFinder - _finder_registry[_frozen_importlib.FileFinder] = ResourceFinder -except (ImportError, AttributeError): - pass - - -def register_finder(loader, finder_maker): - _finder_registry[type(loader)] = finder_maker - -_finder_cache = {} - - -def finder(package): - """ - Return a resource finder for a package. - :param package: The name of the package. - :return: A :class:`ResourceFinder` instance for the package. - """ - if package in _finder_cache: - result = _finder_cache[package] - else: - if package not in sys.modules: - __import__(package) - module = sys.modules[package] - path = getattr(module, '__path__', None) - if path is None: - raise DistlibException('You cannot get a finder for a module, ' - 'only for a package') - loader = getattr(module, '__loader__', None) - finder_maker = _finder_registry.get(type(loader)) - if finder_maker is None: - raise DistlibException('Unable to locate finder for %r' % package) - result = finder_maker(module) - _finder_cache[package] = result - return result - - -_dummy_module = types.ModuleType(str('__dummy__')) - - -def finder_for_path(path): - """ - Return a resource finder for a path, which should represent a container. - - :param path: The path. - :return: A :class:`ResourceFinder` instance for the path. - """ - result = None - # calls any path hooks, gets importer into cache - pkgutil.get_importer(path) - loader = sys.path_importer_cache.get(path) - finder = _finder_registry.get(type(loader)) - if finder: - module = _dummy_module - module.__file__ = os.path.join(path, '') - module.__loader__ = loader - result = finder(module) - return result diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/scripts.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/scripts.py deleted file mode 100644 index 0c051ce..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/scripts.py +++ /dev/null @@ -1,343 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2013 Vinay Sajip. -# Licensed to the Python Software Foundation under a contributor agreement. -# See LICENSE.txt and CONTRIBUTORS.txt. -# -from io import BytesIO -import logging -import os -import re -import struct -import sys - -from .compat import sysconfig, fsencode, detect_encoding, ZipFile -from .resources import finder -from .util import (FileOperator, get_export_entry, convert_path, - get_executable, in_venv) - -logger = logging.getLogger(__name__) - -is_posix = os.name == 'posix' or (os.name == 'java' and os._name == 'posix') -is_windows = os.name == "nt" or (os.name == "java" and os._name == "nt") - -_DEFAULT_MANIFEST = ''' - - - - - - - - - - - - -'''.strip() - -# check if Python is called on the first line with this expression -FIRST_LINE_RE = re.compile(b'^#!.*pythonw?[0-9.]*([ \t].*)?$') -SCRIPT_TEMPLATE = '''# -*- coding: utf-8 -*- -if __name__ == '__main__': - import sys, re - - def _resolve(module, func): - __import__(module) - mod = sys.modules[module] - parts = func.split('.') - result = getattr(mod, parts.pop(0)) - for p in parts: - result = getattr(result, p) - return result - - try: - sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) - - func = _resolve('%(module)s', '%(func)s') - rc = func() # None interpreted as 0 - except Exception as e: # only supporting Python >= 2.6 - sys.stderr.write('%%s\\n' %% e) - rc = 1 - sys.exit(rc) -''' - - -class ScriptMaker(object): - """ - A class to copy or create scripts from source scripts or callable - specifications. - """ - script_template = SCRIPT_TEMPLATE - - executable = None # for shebangs - - def __init__(self, source_dir, target_dir, add_launchers=True, - dry_run=False, fileop=None): - self.source_dir = source_dir - self.target_dir = target_dir - self.add_launchers = add_launchers - self.force = False - self.clobber = False - # It only makes sense to set mode bits on POSIX. - self.set_mode = is_posix - self.variants = set(('', 'X.Y')) - self._fileop = fileop or FileOperator(dry_run) - - def _get_alternate_executable(self, executable, options): - if options.get('gui', False) and is_windows: - dn, fn = os.path.split(executable) - fn = fn.replace('python', 'pythonw') - executable = os.path.join(dn, fn) - return executable - - def _is_shell(self, executable): - """Determine if the specified executable is a .sh (contains a #! line)""" - try: - with open(executable) as fp: - return fp.read(2) == '#!' - except (OSError, IOError): - return False # FIXME log - - def _fix_jython_executable(self, executable): - if sys.platform.startswith('java'): - if self._is_shell(executable): - # Workaround for Jython is not needed on Linux systems. - import java - - if java.lang.System.getProperty("os.name") == "Linux": - return executable - elif executable.endswith('jython.exe'): - # Use wrapper exe for Jython on Windows - return executable - - return '/usr/bin/env %s' % executable - - def _get_shebang(self, encoding, post_interp=b'', options=None): - if self.executable: - executable = self.executable - elif not sysconfig.is_python_build(): - executable = get_executable() - elif in_venv(): - executable = os.path.join(sysconfig.get_path('scripts'), - 'python%s' % sysconfig.get_config_var('EXE')) - else: - executable = os.path.join( - sysconfig.get_config_var('BINDIR'), - 'python%s%s' % (sysconfig.get_config_var('VERSION'), - sysconfig.get_config_var('EXE'))) - if options: - executable = self._get_alternate_executable(executable, options) - - executable = self._fix_jython_executable(executable) - executable = fsencode(executable) - shebang = b'#!' + executable + post_interp + b'\n' - # Python parser starts to read a script using UTF-8 until - # it gets a #coding:xxx cookie. The shebang has to be the - # first line of a file, the #coding:xxx cookie cannot be - # written before. So the shebang has to be decodable from - # UTF-8. - try: - shebang.decode('utf-8') - except UnicodeDecodeError: - raise ValueError( - 'The shebang (%r) is not decodable from utf-8' % shebang) - # If the script is encoded to a custom encoding (use a - # #coding:xxx cookie), the shebang has to be decodable from - # the script encoding too. - if encoding != 'utf-8': - try: - shebang.decode(encoding) - except UnicodeDecodeError: - raise ValueError( - 'The shebang (%r) is not decodable ' - 'from the script encoding (%r)' % (shebang, encoding)) - return shebang - - def _get_script_text(self, entry): - return self.script_template % dict(module=entry.prefix, - func=entry.suffix) - - manifest = _DEFAULT_MANIFEST - - def get_manifest(self, exename): - base = os.path.basename(exename) - return self.manifest % base - - def _write_script(self, names, shebang, script_bytes, filenames, ext): - use_launcher = self.add_launchers and is_windows - linesep = os.linesep.encode('utf-8') - if not use_launcher: - script_bytes = shebang + linesep + script_bytes - else: - if ext == 'py': - launcher = self._get_launcher('t') - else: - launcher = self._get_launcher('w') - stream = BytesIO() - with ZipFile(stream, 'w') as zf: - zf.writestr('__main__.py', script_bytes) - zip_data = stream.getvalue() - script_bytes = launcher + shebang + linesep + zip_data - for name in names: - outname = os.path.join(self.target_dir, name) - if use_launcher: - n, e = os.path.splitext(outname) - if e.startswith('.py'): - outname = n - outname = '%s.exe' % outname - try: - self._fileop.write_binary_file(outname, script_bytes) - except Exception: - # Failed writing an executable - it might be in use. - logger.warning('Failed to write executable - trying to ' - 'use .deleteme logic') - dfname = '%s.deleteme' % outname - if os.path.exists(dfname): - os.remove(dfname) # Not allowed to fail here - os.rename(outname, dfname) # nor here - self._fileop.write_binary_file(outname, script_bytes) - logger.debug('Able to replace executable using ' - '.deleteme logic') - try: - os.remove(dfname) - except Exception: - pass # still in use - ignore error - else: - if is_windows and not outname.endswith('.' + ext): - outname = '%s.%s' % (outname, ext) - if os.path.exists(outname) and not self.clobber: - logger.warning('Skipping existing file %s', outname) - continue - self._fileop.write_binary_file(outname, script_bytes) - if self.set_mode: - self._fileop.set_executable_mode([outname]) - filenames.append(outname) - - def _make_script(self, entry, filenames, options=None): - shebang = self._get_shebang('utf-8', options=options) - script = self._get_script_text(entry).encode('utf-8') - name = entry.name - scriptnames = set() - if '' in self.variants: - scriptnames.add(name) - if 'X' in self.variants: - scriptnames.add('%s%s' % (name, sys.version[0])) - if 'X.Y' in self.variants: - scriptnames.add('%s-%s' % (name, sys.version[:3])) - if options and options.get('gui', False): - ext = 'pyw' - else: - ext = 'py' - self._write_script(scriptnames, shebang, script, filenames, ext) - - def _copy_script(self, script, filenames): - adjust = False - script = os.path.join(self.source_dir, convert_path(script)) - outname = os.path.join(self.target_dir, os.path.basename(script)) - if not self.force and not self._fileop.newer(script, outname): - logger.debug('not copying %s (up-to-date)', script) - return - - # Always open the file, but ignore failures in dry-run mode -- - # that way, we'll get accurate feedback if we can read the - # script. - try: - f = open(script, 'rb') - except IOError: - if not self.dry_run: - raise - f = None - else: - encoding, lines = detect_encoding(f.readline) - f.seek(0) - first_line = f.readline() - if not first_line: - logger.warning('%s: %s is an empty file (skipping)', - self.get_command_name(), script) - return - - match = FIRST_LINE_RE.match(first_line.replace(b'\r\n', b'\n')) - if match: - adjust = True - post_interp = match.group(1) or b'' - - if not adjust: - if f: - f.close() - self._fileop.copy_file(script, outname) - if self.set_mode: - self._fileop.set_executable_mode([outname]) - filenames.append(outname) - else: - logger.info('copying and adjusting %s -> %s', script, - self.target_dir) - if not self._fileop.dry_run: - shebang = self._get_shebang(encoding, post_interp) - if b'pythonw' in first_line: - ext = 'pyw' - else: - ext = 'py' - n = os.path.basename(outname) - self._write_script([n], shebang, f.read(), filenames, ext) - if f: - f.close() - - @property - def dry_run(self): - return self._fileop.dry_run - - @dry_run.setter - def dry_run(self, value): - self._fileop.dry_run = value - - if is_windows: - # Executable launcher support. - # Launchers are from https://bitbucket.org/vinay.sajip/simple_launcher/ - - def _get_launcher(self, kind): - if struct.calcsize('P') == 8: # 64-bit - bits = '64' - else: - bits = '32' - name = '%s%s.exe' % (kind, bits) - # Issue 31: don't hardcode an absolute package name, but - # determine it relative to the current package - distlib_package = __name__.rsplit('.', 1)[0] - result = finder(distlib_package).find(name).bytes - return result - - # Public API follows - - def make(self, specification, options=None): - """ - Make a script. - - :param specification: The specification, which is either a valid export - entry specification (to make a script from a - callable) or a filename (to make a script by - copying from a source location). - :param options: A dictionary of options controlling script generation. - :return: A list of all absolute pathnames written to. - """ - filenames = [] - entry = get_export_entry(specification) - if entry is None: - self._copy_script(specification, filenames) - else: - self._make_script(entry, filenames, options=options) - return filenames - - def make_multiple(self, specifications, options=None): - """ - Take a list of specifications and make scripts from them, - :param specifications: A list of specifications. - :return: A list of all absolute pathnames written to, - """ - filenames = [] - for specification in specifications: - filenames.extend(self.make(specification, options)) - return filenames diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/util.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/util.py deleted file mode 100644 index e8e0ff2..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/util.py +++ /dev/null @@ -1,1532 +0,0 @@ -# -# Copyright (C) 2012-2013 The Python Software Foundation. -# See LICENSE.txt and CONTRIBUTORS.txt. -# -import codecs -from collections import deque -import contextlib -import csv -from glob import iglob as std_iglob -import io -import json -import logging -import os -import py_compile -import re -import shutil -import socket -import ssl -import subprocess -import sys -import tarfile -import tempfile -try: - import threading -except ImportError: - import dummy_threading as threading -import time - -from . import DistlibException -from .compat import (string_types, text_type, shutil, raw_input, StringIO, - cache_from_source, urlopen, httplib, xmlrpclib, splittype, - HTTPHandler, HTTPSHandler as BaseHTTPSHandler, - BaseConfigurator, valid_ident, Container, configparser, - URLError, match_hostname, CertificateError, ZipFile) - -logger = logging.getLogger(__name__) - -# -# Requirement parsing code for name + optional constraints + optional extras -# -# e.g. 'foo >= 1.2, < 2.0 [bar, baz]' -# -# The regex can seem a bit hairy, so we build it up out of smaller pieces -# which are manageable. -# - -COMMA = r'\s*,\s*' -COMMA_RE = re.compile(COMMA) - -IDENT = r'(\w|[.-])+' -EXTRA_IDENT = r'(\*|:(\*|\w+):|' + IDENT + ')' -VERSPEC = IDENT + r'\*?' - -RELOP = '([<>=!~]=)|[<>]' - -# -# The first relop is optional - if absent, will be taken as '~=' -# -BARE_CONSTRAINTS = ('(' + RELOP + r')?\s*(' + VERSPEC + ')(' + COMMA + '(' + - RELOP + r')\s*(' + VERSPEC + '))*') - -DIRECT_REF = '(from\s+(?P.*))' - -# -# Either the bare constraints or the bare constraints in parentheses -# -CONSTRAINTS = (r'\(\s*(?P' + BARE_CONSTRAINTS + '|' + DIRECT_REF + - r')\s*\)|(?P' + BARE_CONSTRAINTS + '\s*)') - -EXTRA_LIST = EXTRA_IDENT + '(' + COMMA + EXTRA_IDENT + ')*' -EXTRAS = r'\[\s*(?P' + EXTRA_LIST + r')?\s*\]' -REQUIREMENT = ('(?P' + IDENT + r')\s*(' + EXTRAS + r'\s*)?(\s*' + - CONSTRAINTS + ')?$') -REQUIREMENT_RE = re.compile(REQUIREMENT) - -# -# Used to scan through the constraints -# -RELOP_IDENT = '(?P' + RELOP + r')\s*(?P' + VERSPEC + ')' -RELOP_IDENT_RE = re.compile(RELOP_IDENT) - -def parse_requirement(s): - - def get_constraint(m): - d = m.groupdict() - return d['op'], d['vn'] - - result = None - m = REQUIREMENT_RE.match(s) - if m: - d = m.groupdict() - name = d['dn'] - cons = d['c1'] or d['c2'] - if not d['diref']: - url = None - else: - # direct reference - cons = None - url = d['diref'].strip() - if not cons: - cons = None - constr = '' - rs = d['dn'] - else: - if cons[0] not in '<>!=': - cons = '~=' + cons - iterator = RELOP_IDENT_RE.finditer(cons) - cons = [get_constraint(m) for m in iterator] - rs = '%s (%s)' % (name, ', '.join(['%s %s' % con for con in cons])) - if not d['ex']: - extras = None - else: - extras = COMMA_RE.split(d['ex']) - result = Container(name=name, constraints=cons, extras=extras, - requirement=rs, source=s, url=url) - return result - - -def get_resources_dests(resources_root, rules): - """Find destinations for resources files""" - - def get_rel_path(base, path): - # normalizes and returns a lstripped-/-separated path - base = base.replace(os.path.sep, '/') - path = path.replace(os.path.sep, '/') - assert path.startswith(base) - return path[len(base):].lstrip('/') - - - destinations = {} - for base, suffix, dest in rules: - prefix = os.path.join(resources_root, base) - for abs_base in iglob(prefix): - abs_glob = os.path.join(abs_base, suffix) - for abs_path in iglob(abs_glob): - resource_file = get_rel_path(resources_root, abs_path) - if dest is None: # remove the entry if it was here - destinations.pop(resource_file, None) - else: - rel_path = get_rel_path(abs_base, abs_path) - rel_dest = dest.replace(os.path.sep, '/').rstrip('/') - destinations[resource_file] = rel_dest + '/' + rel_path - return destinations - - -def in_venv(): - if hasattr(sys, 'real_prefix'): - # virtualenv venvs - result = True - else: - # PEP 405 venvs - result = sys.prefix != getattr(sys, 'base_prefix', sys.prefix) - return result - - -def get_executable(): - if sys.platform == 'darwin' and ('__VENV_LAUNCHER__' - in os.environ): - result = os.environ['__VENV_LAUNCHER__'] - else: - result = sys.executable - return result - - -def proceed(prompt, allowed_chars, error_prompt=None, default=None): - p = prompt - while True: - s = raw_input(p) - p = prompt - if not s and default: - s = default - if s: - c = s[0].lower() - if c in allowed_chars: - break - if error_prompt: - p = '%c: %s\n%s' % (c, error_prompt, prompt) - return c - - -def extract_by_key(d, keys): - if isinstance(keys, string_types): - keys = keys.split() - result = {} - for key in keys: - if key in d: - result[key] = d[key] - return result - -def read_exports(stream): - if sys.version_info[0] >= 3: - # needs to be a text stream - stream = codecs.getreader('utf-8')(stream) - # Try to load as JSON, falling back on legacy format - data = stream.read() - stream = StringIO(data) - try: - data = json.load(stream) - result = data['exports'] - for group, entries in result.items(): - for k, v in entries.items(): - s = '%s = %s' % (k, v) - entry = get_export_entry(s) - assert entry is not None - entries[k] = entry - return result - except Exception: - stream.seek(0, 0) - cp = configparser.ConfigParser() - if hasattr(cp, 'read_file'): - cp.read_file(stream) - else: - cp.readfp(stream) - result = {} - for key in cp.sections(): - result[key] = entries = {} - for name, value in cp.items(key): - s = '%s = %s' % (name, value) - entry = get_export_entry(s) - assert entry is not None - #entry.dist = self - entries[name] = entry - return result - - -def write_exports(exports, stream): - if sys.version_info[0] >= 3: - # needs to be a text stream - stream = codecs.getwriter('utf-8')(stream) - cp = configparser.ConfigParser() - for k, v in exports.items(): - # TODO check k, v for valid values - cp.add_section(k) - for entry in v.values(): - if entry.suffix is None: - s = entry.prefix - else: - s = '%s:%s' % (entry.prefix, entry.suffix) - if entry.flags: - s = '%s [%s]' % (s, ', '.join(entry.flags)) - cp.set(k, entry.name, s) - cp.write(stream) - - -@contextlib.contextmanager -def tempdir(): - td = tempfile.mkdtemp() - try: - yield td - finally: - shutil.rmtree(td) - -@contextlib.contextmanager -def chdir(d): - cwd = os.getcwd() - try: - os.chdir(d) - yield - finally: - os.chdir(cwd) - - -@contextlib.contextmanager -def socket_timeout(seconds=15): - cto = socket.getdefaulttimeout() - try: - socket.setdefaulttimeout(seconds) - yield - finally: - socket.setdefaulttimeout(cto) - - -class cached_property(object): - def __init__(self, func): - self.func = func - #for attr in ('__name__', '__module__', '__doc__'): - # setattr(self, attr, getattr(func, attr, None)) - - def __get__(self, obj, cls=None): - if obj is None: - return self - value = self.func(obj) - object.__setattr__(obj, self.func.__name__, value) - #obj.__dict__[self.func.__name__] = value = self.func(obj) - return value - -def convert_path(pathname): - """Return 'pathname' as a name that will work on the native filesystem. - - The path is split on '/' and put back together again using the current - directory separator. Needed because filenames in the setup script are - always supplied in Unix style, and have to be converted to the local - convention before we can actually use them in the filesystem. Raises - ValueError on non-Unix-ish systems if 'pathname' either starts or - ends with a slash. - """ - if os.sep == '/': - return pathname - if not pathname: - return pathname - if pathname[0] == '/': - raise ValueError("path '%s' cannot be absolute" % pathname) - if pathname[-1] == '/': - raise ValueError("path '%s' cannot end with '/'" % pathname) - - paths = pathname.split('/') - while os.curdir in paths: - paths.remove(os.curdir) - if not paths: - return os.curdir - return os.path.join(*paths) - - -class FileOperator(object): - def __init__(self, dry_run=False): - self.dry_run = dry_run - self.ensured = set() - self._init_record() - - def _init_record(self): - self.record = False - self.files_written = set() - self.dirs_created = set() - - def record_as_written(self, path): - if self.record: - self.files_written.add(path) - - def newer(self, source, target): - """Tell if the target is newer than the source. - - Returns true if 'source' exists and is more recently modified than - 'target', or if 'source' exists and 'target' doesn't. - - Returns false if both exist and 'target' is the same age or younger - than 'source'. Raise PackagingFileError if 'source' does not exist. - - Note that this test is not very accurate: files created in the same - second will have the same "age". - """ - if not os.path.exists(source): - raise DistlibException("file '%r' does not exist" % - os.path.abspath(source)) - if not os.path.exists(target): - return True - - return os.stat(source).st_mtime > os.stat(target).st_mtime - - def copy_file(self, infile, outfile, check=True): - """Copy a file respecting dry-run and force flags. - """ - self.ensure_dir(os.path.dirname(outfile)) - logger.info('Copying %s to %s', infile, outfile) - if not self.dry_run: - msg = None - if check: - if os.path.islink(outfile): - msg = '%s is a symlink' % outfile - elif os.path.exists(outfile) and not os.path.isfile(outfile): - msg = '%s is a non-regular file' % outfile - if msg: - raise ValueError(msg + ' which would be overwritten') - shutil.copyfile(infile, outfile) - self.record_as_written(outfile) - - def copy_stream(self, instream, outfile, encoding=None): - assert not os.path.isdir(outfile) - self.ensure_dir(os.path.dirname(outfile)) - logger.info('Copying stream %s to %s', instream, outfile) - if not self.dry_run: - if encoding is None: - outstream = open(outfile, 'wb') - else: - outstream = codecs.open(outfile, 'w', encoding=encoding) - try: - shutil.copyfileobj(instream, outstream) - finally: - outstream.close() - self.record_as_written(outfile) - - def write_binary_file(self, path, data): - self.ensure_dir(os.path.dirname(path)) - if not self.dry_run: - with open(path, 'wb') as f: - f.write(data) - self.record_as_written(path) - - def write_text_file(self, path, data, encoding): - self.ensure_dir(os.path.dirname(path)) - if not self.dry_run: - with open(path, 'wb') as f: - f.write(data.encode(encoding)) - self.record_as_written(path) - - def set_mode(self, bits, mask, files): - if os.name == 'posix' or (os.name == 'java' and os._name == 'posix'): - # Set the executable bits (owner, group, and world) on - # all the files specified. - for f in files: - if self.dry_run: - logger.info("changing mode of %s", f) - else: - mode = (os.stat(f).st_mode | bits) & mask - logger.info("changing mode of %s to %o", f, mode) - os.chmod(f, mode) - - set_executable_mode = lambda s, f: s.set_mode(0o555, 0o7777, f) - - def ensure_dir(self, path): - path = os.path.abspath(path) - if path not in self.ensured and not os.path.exists(path): - self.ensured.add(path) - d, f = os.path.split(path) - self.ensure_dir(d) - logger.info('Creating %s' % path) - if not self.dry_run: - os.mkdir(path) - if self.record: - self.dirs_created.add(path) - - def byte_compile(self, path, optimize=False, force=False, prefix=None): - dpath = cache_from_source(path, not optimize) - logger.info('Byte-compiling %s to %s', path, dpath) - if not self.dry_run: - if force or self.newer(path, dpath): - if not prefix: - diagpath = None - else: - assert path.startswith(prefix) - diagpath = path[len(prefix):] - py_compile.compile(path, dpath, diagpath, True) # raise error - self.record_as_written(dpath) - return dpath - - def ensure_removed(self, path): - if os.path.exists(path): - if os.path.isdir(path) and not os.path.islink(path): - logger.debug('Removing directory tree at %s', path) - if not self.dry_run: - shutil.rmtree(path) - if self.record: - if path in self.dirs_created: - self.dirs_created.remove(path) - else: - if os.path.islink(path): - s = 'link' - else: - s = 'file' - logger.debug('Removing %s %s', s, path) - if not self.dry_run: - os.remove(path) - if self.record: - if path in self.files_written: - self.files_written.remove(path) - - def is_writable(self, path): - result = False - while not result: - if os.path.exists(path): - result = os.access(path, os.W_OK) - break - parent = os.path.dirname(path) - if parent == path: - break - path = parent - return result - - def commit(self): - """ - Commit recorded changes, turn off recording, return - changes. - """ - assert self.record - result = self.files_written, self.dirs_created - self._init_record() - return result - - def rollback(self): - if not self.dry_run: - for f in list(self.files_written): - if os.path.exists(f): - os.remove(f) - # dirs should all be empty now, except perhaps for - # __pycache__ subdirs - # reverse so that subdirs appear before their parents - dirs = sorted(self.dirs_created, reverse=True) - for d in dirs: - flist = os.listdir(d) - if flist: - assert flist == ['__pycache__'] - sd = os.path.join(d, flist[0]) - os.rmdir(sd) - os.rmdir(d) # should fail if non-empty - self._init_record() - -def resolve(module_name, dotted_path): - if module_name in sys.modules: - mod = sys.modules[module_name] - else: - mod = __import__(module_name) - if dotted_path is None: - result = mod - else: - parts = dotted_path.split('.') - result = getattr(mod, parts.pop(0)) - for p in parts: - result = getattr(result, p) - return result - - -class ExportEntry(object): - def __init__(self, name, prefix, suffix, flags): - self.name = name - self.prefix = prefix - self.suffix = suffix - self.flags = flags - - @cached_property - def value(self): - return resolve(self.prefix, self.suffix) - - def __repr__(self): - return '' % (self.name, self.prefix, - self.suffix, self.flags) - - def __eq__(self, other): - if not isinstance(other, ExportEntry): - result = False - else: - result = (self.name == other.name and - self.prefix == other.prefix and - self.suffix == other.suffix and - self.flags == other.flags) - return result - - __hash__ = object.__hash__ - - -ENTRY_RE = re.compile(r'''(?P(\w|[-.])+) - \s*=\s*(?P(\w+)([:\.]\w+)*) - \s*(\[\s*(?P\w+(=\w+)?(,\s*\w+(=\w+)?)*)\s*\])? - ''', re.VERBOSE) - - -def get_export_entry(specification): - m = ENTRY_RE.search(specification) - if not m: - result = None - if '[' in specification or ']' in specification: - raise DistlibException('Invalid specification ' - '%r' % specification) - else: - d = m.groupdict() - name = d['name'] - path = d['callable'] - colons = path.count(':') - if colons == 0: - prefix, suffix = path, None - else: - if colons != 1: - raise DistlibException('Invalid specification ' - '%r' % specification) - prefix, suffix = path.split(':') - flags = d['flags'] - if flags is None: - if '[' in specification or ']' in specification: - raise DistlibException('Invalid specification ' - '%r' % specification) - flags = [] - else: - flags = [f.strip() for f in flags.split(',')] - result = ExportEntry(name, prefix, suffix, flags) - return result - - -def get_cache_base(suffix=None): - """ - Return the default base location for distlib caches. If the directory does - not exist, it is created. Use the suffix provided for the base directory, - and default to '.distlib' if it isn't provided. - - On Windows, if LOCALAPPDATA is defined in the environment, then it is - assumed to be a directory, and will be the parent directory of the result. - On POSIX, and on Windows if LOCALAPPDATA is not defined, the user's home - directory - using os.expanduser('~') - will be the parent directory of - the result. - - The result is just the directory '.distlib' in the parent directory as - determined above, or with the name specified with ``suffix``. - """ - if suffix is None: - suffix = '.distlib' - if os.name == 'nt' and 'LOCALAPPDATA' in os.environ: - result = os.path.expandvars('$localappdata') - else: - # Assume posix, or old Windows - result = os.path.expanduser('~') - result = os.path.join(result, suffix) - # we use 'isdir' instead of 'exists', because we want to - # fail if there's a file with that name - if os.path.isdir(result): - usable = os.access(result, os.W_OK) - if not usable: - logger.warning('Directory exists but is not writable: %s', result) - else: - try: - os.makedirs(result) - usable = True - except OSError: - logger.warning('Unable to create %s', result, exc_info=True) - usable = False - if not usable: - result = tempfile.mkdtemp() - logger.warning('Default location unusable, using %s', result) - return result - - -def path_to_cache_dir(path): - """ - Convert an absolute path to a directory name for use in a cache. - - The algorithm used is: - - #. On Windows, any ``':'`` in the drive is replaced with ``'---'``. - #. Any occurrence of ``os.sep`` is replaced with ``'--'``. - #. ``'.cache'`` is appended. - """ - d, p = os.path.splitdrive(os.path.abspath(path)) - if d: - d = d.replace(':', '---') - p = p.replace(os.sep, '--') - return d + p + '.cache' - - -def ensure_slash(s): - if not s.endswith('/'): - return s + '/' - return s - - -def parse_credentials(netloc): - username = password = None - if '@' in netloc: - prefix, netloc = netloc.split('@', 1) - if ':' not in prefix: - username = prefix - else: - username, password = prefix.split(':', 1) - return username, password, netloc - - -def get_process_umask(): - result = os.umask(0o22) - os.umask(result) - return result - -def is_string_sequence(seq): - result = True - i = None - for i, s in enumerate(seq): - if not isinstance(s, string_types): - result = False - break - assert i is not None - return result - -PROJECT_NAME_AND_VERSION = re.compile('([a-z0-9_]+([.-][a-z_][a-z0-9_]*)*)-' - '([a-z0-9_.+-]+)', re.I) -PYTHON_VERSION = re.compile(r'-py(\d\.?\d?)') - - -def split_filename(filename, project_name=None): - """ - Extract name, version, python version from a filename (no extension) - - Return name, version, pyver or None - """ - result = None - pyver = None - m = PYTHON_VERSION.search(filename) - if m: - pyver = m.group(1) - filename = filename[:m.start()] - if project_name and len(filename) > len(project_name) + 1: - m = re.match(re.escape(project_name) + r'\b', filename) - if m: - n = m.end() - result = filename[:n], filename[n + 1:], pyver - if result is None: - m = PROJECT_NAME_AND_VERSION.match(filename) - if m: - result = m.group(1), m.group(3), pyver - return result - -# Allow spaces in name because of legacy dists like "Twisted Core" -NAME_VERSION_RE = re.compile(r'(?P[\w .-]+)\s*' - r'\(\s*(?P[^\s)]+)\)$') - -def parse_name_and_version(p): - """ - A utility method used to get name and version from a string. - - From e.g. a Provides-Dist value. - - :param p: A value in a form 'foo (1.0)' - :return: The name and version as a tuple. - """ - m = NAME_VERSION_RE.match(p) - if not m: - raise DistlibException('Ill-formed name/version string: \'%s\'' % p) - d = m.groupdict() - return d['name'].strip().lower(), d['ver'] - -def get_extras(requested, available): - result = set() - requested = set(requested or []) - available = set(available or []) - if '*' in requested: - requested.remove('*') - result |= available - for r in requested: - if r == '-': - result.add(r) - elif r.startswith('-'): - unwanted = r[1:] - if unwanted not in available: - logger.warning('undeclared extra: %s' % unwanted) - if unwanted in result: - result.remove(unwanted) - else: - if r not in available: - logger.warning('undeclared extra: %s' % r) - result.add(r) - return result -# -# Extended metadata functionality -# - -def _get_external_data(url): - result = {} - try: - # urlopen might fail if it runs into redirections, - # because of Python issue #13696. Fixed in locators - # using a custom redirect handler. - resp = urlopen(url) - headers = resp.info() - if headers.get('Content-Type') != 'application/json': - logger.debug('Unexpected response for JSON request') - else: - reader = codecs.getreader('utf-8')(resp) - #data = reader.read().decode('utf-8') - #result = json.loads(data) - result = json.load(reader) - except Exception as e: - logger.exception('Failed to get external data for %s: %s', url, e) - return result - - -def get_project_data(name): - url = ('https://www.red-dove.com/pypi/projects/' - '%s/%s/project.json' % (name[0].upper(), name)) - result = _get_external_data(url) - return result - -def get_package_data(name, version): - url = ('https://www.red-dove.com/pypi/projects/' - '%s/%s/package-%s.json' % (name[0].upper(), name, version)) - return _get_external_data(url) - - -class EventMixin(object): - """ - A very simple publish/subscribe system. - """ - def __init__(self): - self._subscribers = {} - - def add(self, event, subscriber, append=True): - """ - Add a subscriber for an event. - - :param event: The name of an event. - :param subscriber: The subscriber to be added (and called when the - event is published). - :param append: Whether to append or prepend the subscriber to an - existing subscriber list for the event. - """ - subs = self._subscribers - if event not in subs: - subs[event] = deque([subscriber]) - else: - sq = subs[event] - if append: - sq.append(subscriber) - else: - sq.appendleft(subscriber) - - def remove(self, event, subscriber): - """ - Remove a subscriber for an event. - - :param event: The name of an event. - :param subscriber: The subscriber to be removed. - """ - subs = self._subscribers - if event not in subs: - raise ValueError('No subscribers: %r' % event) - subs[event].remove(subscriber) - - def get_subscribers(self, event): - """ - Return an iterator for the subscribers for an event. - :param event: The event to return subscribers for. - """ - return iter(self._subscribers.get(event, ())) - - def publish(self, event, *args, **kwargs): - """ - Publish a event and return a list of values returned by its - subscribers. - - :param event: The event to publish. - :param args: The positional arguments to pass to the event's - subscribers. - :param kwargs: The keyword arguments to pass to the event's - subscribers. - """ - result = [] - for subscriber in self.get_subscribers(event): - try: - value = subscriber(event, *args, **kwargs) - except Exception: - logger.exception('Exception during event publication') - value = None - result.append(value) - logger.debug('publish %s: args = %s, kwargs = %s, result = %s', - event, args, kwargs, result) - return result - -# -# Simple sequencing -# -class Sequencer(object): - def __init__(self): - self._preds = {} - self._succs = {} - self._nodes = set() # nodes with no preds/succs - - def add_node(self, node): - self._nodes.add(node) - - def remove_node(self, node, edges=False): - if node in self._nodes: - self._nodes.remove(node) - if edges: - for p in set(self._preds.get(node, ())): - self.remove(p, node) - for s in set(self._succs.get(node, ())): - self.remove(node, s) - # Remove empties - for k, v in list(self._preds.items()): - if not v: - del self._preds[k] - for k, v in list(self._succs.items()): - if not v: - del self._succs[k] - - def add(self, pred, succ): - assert pred != succ - self._preds.setdefault(succ, set()).add(pred) - self._succs.setdefault(pred, set()).add(succ) - - def remove(self, pred, succ): - assert pred != succ - try: - preds = self._preds[succ] - succs = self._succs[pred] - except KeyError: - raise ValueError('%r not a successor of anything' % succ) - try: - preds.remove(pred) - succs.remove(succ) - except KeyError: - raise ValueError('%r not a successor of %r' % (succ, pred)) - - def is_step(self, step): - return (step in self._preds or step in self._succs or - step in self._nodes) - - def get_steps(self, final): - if not self.is_step(final): - raise ValueError('Unknown: %r' % final) - result = [] - todo = [] - seen = set() - todo.append(final) - while todo: - step = todo.pop(0) - if step in seen: - # if a step was already seen, - # move it to the end (so it will appear earlier - # when reversed on return) ... but not for the - # final step, as that would be confusing for - # users - if step != final: - result.remove(step) - result.append(step) - else: - seen.add(step) - result.append(step) - preds = self._preds.get(step, ()) - todo.extend(preds) - return reversed(result) - - @property - def strong_connections(self): - #http://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm - index_counter = [0] - stack = [] - lowlinks = {} - index = {} - result = [] - - graph = self._succs - - def strongconnect(node): - # set the depth index for this node to the smallest unused index - index[node] = index_counter[0] - lowlinks[node] = index_counter[0] - index_counter[0] += 1 - stack.append(node) - - # Consider successors - try: - successors = graph[node] - except Exception: - successors = [] - for successor in successors: - if successor not in lowlinks: - # Successor has not yet been visited - strongconnect(successor) - lowlinks[node] = min(lowlinks[node],lowlinks[successor]) - elif successor in stack: - # the successor is in the stack and hence in the current - # strongly connected component (SCC) - lowlinks[node] = min(lowlinks[node],index[successor]) - - # If `node` is a root node, pop the stack and generate an SCC - if lowlinks[node] == index[node]: - connected_component = [] - - while True: - successor = stack.pop() - connected_component.append(successor) - if successor == node: break - component = tuple(connected_component) - # storing the result - result.append(component) - - for node in graph: - if node not in lowlinks: - strongconnect(node) - - return result - - @property - def dot(self): - result = ['digraph G {'] - for succ in self._preds: - preds = self._preds[succ] - for pred in preds: - result.append(' %s -> %s;' % (pred, succ)) - for node in self._nodes: - result.append(' %s;' % node) - result.append('}') - return '\n'.join(result) - -# -# Unarchiving functionality for zip, tar, tgz, tbz, whl -# - -ARCHIVE_EXTENSIONS = ('.tar.gz', '.tar.bz2', '.tar', '.zip', - '.tgz', '.tbz', '.whl') - -def unarchive(archive_filename, dest_dir, format=None, check=True): - - def check_path(path): - if not isinstance(path, text_type): - path = path.decode('utf-8') - p = os.path.abspath(os.path.join(dest_dir, path)) - if not p.startswith(dest_dir) or p[plen] != os.sep: - raise ValueError('path outside destination: %r' % p) - - dest_dir = os.path.abspath(dest_dir) - plen = len(dest_dir) - archive = None - if format is None: - if archive_filename.endswith(('.zip', '.whl')): - format = 'zip' - elif archive_filename.endswith(('.tar.gz', '.tgz')): - format = 'tgz' - mode = 'r:gz' - elif archive_filename.endswith(('.tar.bz2', '.tbz')): - format = 'tbz' - mode = 'r:bz2' - elif archive_filename.endswith('.tar'): - format = 'tar' - mode = 'r' - else: - raise ValueError('Unknown format for %r' % archive_filename) - try: - if format == 'zip': - archive = ZipFile(archive_filename, 'r') - if check: - names = archive.namelist() - for name in names: - check_path(name) - else: - archive = tarfile.open(archive_filename, mode) - if check: - names = archive.getnames() - for name in names: - check_path(name) - if format != 'zip' and sys.version_info[0] < 3: - # See Python issue 17153. If the dest path contains Unicode, - # tarfile extraction fails on Python 2.x if a member path name - # contains non-ASCII characters - it leads to an implicit - # bytes -> unicode conversion using ASCII to decode. - for tarinfo in archive.getmembers(): - if not isinstance(tarinfo.name, text_type): - tarinfo.name = tarinfo.name.decode('utf-8') - archive.extractall(dest_dir) - - finally: - if archive: - archive.close() - - -def zip_dir(directory): - """zip a directory tree into a BytesIO object""" - result = io.BytesIO() - dlen = len(directory) - with ZipFile(result, "w") as zf: - for root, dirs, files in os.walk(directory): - for name in files: - full = os.path.join(root, name) - rel = root[dlen:] - dest = os.path.join(rel, name) - zf.write(full, dest) - return result - -# -# Simple progress bar -# - -UNITS = ('', 'K', 'M', 'G','T','P') - - -class Progress(object): - unknown = 'UNKNOWN' - - def __init__(self, minval=0, maxval=100): - assert maxval is None or maxval >= minval - self.min = self.cur = minval - self.max = maxval - self.started = None - self.elapsed = 0 - self.done = False - - def update(self, curval): - assert self.min <= curval - assert self.max is None or curval <= self.max - self.cur = curval - now = time.time() - if self.started is None: - self.started = now - else: - self.elapsed = now - self.started - - def increment(self, incr): - assert incr >= 0 - self.update(self.cur + incr) - - def start(self): - self.update(self.min) - return self - - def stop(self): - if self.max is not None: - self.update(self.max) - self.done = True - - @property - def maximum(self): - return self.unknown if self.max is None else self.max - - @property - def percentage(self): - if self.done: - result = '100 %' - elif self.max is None: - result = ' ?? %' - else: - v = 100.0 * (self.cur - self.min) / (self.max - self.min) - result = '%3d %%' % v - return result - - def format_duration(self, duration): - if (duration <= 0) and self.max is None or self.cur == self.min: - result = '??:??:??' - #elif duration < 1: - # result = '--:--:--' - else: - result = time.strftime('%H:%M:%S', time.gmtime(duration)) - return result - - @property - def ETA(self): - if self.done: - prefix = 'Done' - t = self.elapsed - #import pdb; pdb.set_trace() - else: - prefix = 'ETA ' - if self.max is None: - t = -1 - elif self.elapsed == 0 or (self.cur == self.min): - t = 0 - else: - #import pdb; pdb.set_trace() - t = float(self.max - self.min) - t /= self.cur - self.min - t = (t - 1) * self.elapsed - return '%s: %s' % (prefix, self.format_duration(t)) - - @property - def speed(self): - if self.elapsed == 0: - result = 0.0 - else: - result = (self.cur - self.min) / self.elapsed - for unit in UNITS: - if result < 1000: - break - result /= 1000.0 - return '%d %sB/s' % (result, unit) - -# -# Glob functionality -# - -RICH_GLOB = re.compile(r'\{([^}]*)\}') -_CHECK_RECURSIVE_GLOB = re.compile(r'[^/\\,{]\*\*|\*\*[^/\\,}]') -_CHECK_MISMATCH_SET = re.compile(r'^[^{]*\}|\{[^}]*$') - - -def iglob(path_glob): - """Extended globbing function that supports ** and {opt1,opt2,opt3}.""" - if _CHECK_RECURSIVE_GLOB.search(path_glob): - msg = """invalid glob %r: recursive glob "**" must be used alone""" - raise ValueError(msg % path_glob) - if _CHECK_MISMATCH_SET.search(path_glob): - msg = """invalid glob %r: mismatching set marker '{' or '}'""" - raise ValueError(msg % path_glob) - return _iglob(path_glob) - - -def _iglob(path_glob): - rich_path_glob = RICH_GLOB.split(path_glob, 1) - if len(rich_path_glob) > 1: - assert len(rich_path_glob) == 3, rich_path_glob - prefix, set, suffix = rich_path_glob - for item in set.split(','): - for path in _iglob(''.join((prefix, item, suffix))): - yield path - else: - if '**' not in path_glob: - for item in std_iglob(path_glob): - yield item - else: - prefix, radical = path_glob.split('**', 1) - if prefix == '': - prefix = '.' - if radical == '': - radical = '*' - else: - # we support both - radical = radical.lstrip('/') - radical = radical.lstrip('\\') - for path, dir, files in os.walk(prefix): - path = os.path.normpath(path) - for fn in _iglob(os.path.join(path, radical)): - yield fn - - - -# -# HTTPSConnection which verifies certificates/matches domains -# - -class HTTPSConnection(httplib.HTTPSConnection): - ca_certs = None # set this to the path to the certs file (.pem) - check_domain = True # only used if ca_certs is not None - - # noinspection PyPropertyAccess - def connect(self): - sock = socket.create_connection((self.host, self.port), self.timeout) - if getattr(self, '_tunnel_host', False): - self.sock = sock - self._tunnel() - - if not hasattr(ssl, 'SSLContext'): - # For 2.x - if self.ca_certs: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file, - cert_reqs=cert_reqs, - ssl_version=ssl.PROTOCOL_SSLv23, - ca_certs=self.ca_certs) - else: - context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) - context.options |= ssl.OP_NO_SSLv2 - if self.cert_file: - context.load_cert_chain(self.cert_file, self.key_file) - kwargs = {} - if self.ca_certs: - context.verify_mode = ssl.CERT_REQUIRED - context.load_verify_locations(cafile=self.ca_certs) - if getattr(ssl, 'HAS_SNI', False): - kwargs['server_hostname'] = self.host - self.sock = context.wrap_socket(sock, **kwargs) - if self.ca_certs and self.check_domain: - try: - match_hostname(self.sock.getpeercert(), self.host) - logger.debug('Host verified: %s', self.host) - except CertificateError: - self.sock.shutdown(socket.SHUT_RDWR) - self.sock.close() - raise - -class HTTPSHandler(BaseHTTPSHandler): - def __init__(self, ca_certs, check_domain=True): - BaseHTTPSHandler.__init__(self) - self.ca_certs = ca_certs - self.check_domain = check_domain - - def _conn_maker(self, *args, **kwargs): - """ - This is called to create a connection instance. Normally you'd - pass a connection class to do_open, but it doesn't actually check for - a class, and just expects a callable. As long as we behave just as a - constructor would have, we should be OK. If it ever changes so that - we *must* pass a class, we'll create an UnsafeHTTPSConnection class - which just sets check_domain to False in the class definition, and - choose which one to pass to do_open. - """ - result = HTTPSConnection(*args, **kwargs) - if self.ca_certs: - result.ca_certs = self.ca_certs - result.check_domain = self.check_domain - return result - - def https_open(self, req): - try: - return self.do_open(self._conn_maker, req) - except URLError as e: - if 'certificate verify failed' in str(e.reason): - raise CertificateError('Unable to verify server certificate ' - 'for %s' % req.host) - else: - raise - -# -# To prevent against mixing HTTP traffic with HTTPS (examples: A Man-In-The- -# Middle proxy using HTTP listens on port 443, or an index mistakenly serves -# HTML containing a http://xyz link when it should be https://xyz), -# you can use the following handler class, which does not allow HTTP traffic. -# -# It works by inheriting from HTTPHandler - so build_opener won't add a -# handler for HTTP itself. -# -class HTTPSOnlyHandler(HTTPSHandler, HTTPHandler): - def http_open(self, req): - raise URLError('Unexpected HTTP request on what should be a secure ' - 'connection: %s' % req) - -# -# XML-RPC with timeouts -# - -_ver_info = sys.version_info[:2] - -if _ver_info == (2, 6): - class HTTP(httplib.HTTP): - def __init__(self, host='', port=None, **kwargs): - if port == 0: # 0 means use port 0, not the default port - port = None - self._setup(self._connection_class(host, port, **kwargs)) - - - class HTTPS(httplib.HTTPS): - def __init__(self, host='', port=None, **kwargs): - if port == 0: # 0 means use port 0, not the default port - port = None - self._setup(self._connection_class(host, port, **kwargs)) - - -class Transport(xmlrpclib.Transport): - def __init__(self, timeout, use_datetime=0): - self.timeout = timeout - xmlrpclib.Transport.__init__(self, use_datetime) - - def make_connection(self, host): - h, eh, x509 = self.get_host_info(host) - if _ver_info == (2, 6): - result = HTTP(h, timeout=self.timeout) - else: - if not self._connection or host != self._connection[0]: - self._extra_headers = eh - self._connection = host, httplib.HTTPConnection(h) - result = self._connection[1] - return result - -class SafeTransport(xmlrpclib.SafeTransport): - def __init__(self, timeout, use_datetime=0): - self.timeout = timeout - xmlrpclib.SafeTransport.__init__(self, use_datetime) - - def make_connection(self, host): - h, eh, kwargs = self.get_host_info(host) - if not kwargs: - kwargs = {} - kwargs['timeout'] = self.timeout - if _ver_info == (2, 6): - result = HTTPS(host, None, **kwargs) - else: - if not self._connection or host != self._connection[0]: - self._extra_headers = eh - self._connection = host, httplib.HTTPSConnection(h, None, - **kwargs) - result = self._connection[1] - return result - - -class ServerProxy(xmlrpclib.ServerProxy): - def __init__(self, uri, **kwargs): - self.timeout = timeout = kwargs.pop('timeout', None) - # The above classes only come into play if a timeout - # is specified - if timeout is not None: - scheme, _ = splittype(uri) - use_datetime = kwargs.get('use_datetime', 0) - if scheme == 'https': - tcls = SafeTransport - else: - tcls = Transport - kwargs['transport'] = t = tcls(timeout, use_datetime=use_datetime) - self.transport = t - xmlrpclib.ServerProxy.__init__(self, uri, **kwargs) - -# -# CSV functionality. This is provided because on 2.x, the csv module can't -# handle Unicode. However, we need to deal with Unicode in e.g. RECORD files. -# - -def _csv_open(fn, mode, **kwargs): - if sys.version_info[0] < 3: - mode += 'b' - else: - kwargs['newline'] = '' - return open(fn, mode, **kwargs) - - -class CSVBase(object): - defaults = { - 'delimiter': str(','), # The strs are used because we need native - 'quotechar': str('"'), # str in the csv API (2.x won't take - 'lineterminator': str('\n') # Unicode) - } - - def __enter__(self): - return self - - def __exit__(self, *exc_info): - self.stream.close() - - -class CSVReader(CSVBase): - def __init__(self, **kwargs): - if 'stream' in kwargs: - stream = kwargs['stream'] - if sys.version_info[0] >= 3: - # needs to be a text stream - stream = codecs.getreader('utf-8')(stream) - self.stream = stream - else: - self.stream = _csv_open(kwargs['path'], 'r') - self.reader = csv.reader(self.stream, **self.defaults) - - def __iter__(self): - return self - - def next(self): - result = next(self.reader) - if sys.version_info[0] < 3: - for i, item in enumerate(result): - if not isinstance(item, text_type): - result[i] = item.decode('utf-8') - return result - - __next__ = next - -class CSVWriter(CSVBase): - def __init__(self, fn, **kwargs): - self.stream = _csv_open(fn, 'w') - self.writer = csv.writer(self.stream, **self.defaults) - - def writerow(self, row): - if sys.version_info[0] < 3: - r = [] - for item in row: - if isinstance(item, text_type): - item = item.encode('utf-8') - r.append(item) - row = r - self.writer.writerow(row) - -# -# Configurator functionality -# - -class Configurator(BaseConfigurator): - - value_converters = dict(BaseConfigurator.value_converters) - value_converters['inc'] = 'inc_convert' - - def __init__(self, config, base=None): - super(Configurator, self).__init__(config) - self.base = base or os.getcwd() - - def configure_custom(self, config): - def convert(o): - if isinstance(o, (list, tuple)): - result = type(o)([convert(i) for i in o]) - elif isinstance(o, dict): - if '()' in o: - result = self.configure_custom(o) - else: - result = {} - for k in o: - result[k] = convert(o[k]) - else: - result = self.convert(o) - return result - - c = config.pop('()') - if not callable(c): - c = self.resolve(c) - props = config.pop('.', None) - # Check for valid identifiers - args = config.pop('[]', ()) - if args: - args = tuple([convert(o) for o in args]) - items = [(k, convert(config[k])) for k in config if valid_ident(k)] - kwargs = dict(items) - result = c(*args, **kwargs) - if props: - for n, v in props.items(): - setattr(result, n, convert(v)) - return result - - def __getitem__(self, key): - result = self.config[key] - if isinstance(result, dict) and '()' in result: - self.config[key] = result = self.configure_custom(result) - return result - - def inc_convert(self, value): - """Default converter for the inc:// protocol.""" - if not os.path.isabs(value): - value = os.path.join(self.base, value) - with codecs.open(value, 'r', encoding='utf-8') as f: - result = json.load(f) - return result - -# -# Mixin for running subprocesses and capturing their output -# - -class SubprocessMixin(object): - def __init__(self, verbose=False, progress=None): - self.verbose = verbose - self.progress = progress - - def reader(self, stream, context): - """ - Read lines from a subprocess' output stream and either pass to a progress - callable (if specified) or write progress information to sys.stderr. - """ - progress = self.progress - verbose = self.verbose - while True: - s = stream.readline() - if not s: - break - if progress is not None: - progress(s, context) - else: - if not verbose: - sys.stderr.write('.') - else: - sys.stderr.write(s.decode('utf-8')) - sys.stderr.flush() - stream.close() - - def run_command(self, cmd, **kwargs): - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, - stderr=subprocess.PIPE, **kwargs) - t1 = threading.Thread(target=self.reader, args=(p.stdout, 'stdout')) - t1.start() - t2 = threading.Thread(target=self.reader, args=(p.stderr, 'stderr')) - t2.start() - p.wait() - t1.join() - t2.join() - if self.progress is not None: - self.progress('done.', 'main') - elif self.verbose: - sys.stderr.write('done.\n') - return p diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/version.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/version.py deleted file mode 100644 index a219227..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/version.py +++ /dev/null @@ -1,698 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2012-2013 The Python Software Foundation. -# See LICENSE.txt and CONTRIBUTORS.txt. -# -""" -Implementation of a flexible versioning scheme providing support for PEP-386, -distribute-compatible and semantic versioning. -""" - -import logging -import re - -from .compat import string_types - -__all__ = ['NormalizedVersion', 'NormalizedMatcher', - 'LegacyVersion', 'LegacyMatcher', - 'SemanticVersion', 'SemanticMatcher', - 'UnsupportedVersionError', 'get_scheme'] - -logger = logging.getLogger(__name__) - - -class UnsupportedVersionError(ValueError): - """This is an unsupported version.""" - pass - - -class Version(object): - def __init__(self, s): - self._string = s = s.strip() - self._parts = parts = self.parse(s) - assert isinstance(parts, tuple) - assert len(parts) > 0 - - def parse(self, s): - raise NotImplementedError('please implement in a subclass') - - def _check_compatible(self, other): - if type(self) != type(other): - raise TypeError('cannot compare %r and %r' % (self, other)) - - def __eq__(self, other): - self._check_compatible(other) - return self._parts == other._parts - - def __ne__(self, other): - return not self.__eq__(other) - - def __lt__(self, other): - self._check_compatible(other) - return self._parts < other._parts - - def __gt__(self, other): - return not (self.__lt__(other) or self.__eq__(other)) - - def __le__(self, other): - return self.__lt__(other) or self.__eq__(other) - - def __ge__(self, other): - return self.__gt__(other) or self.__eq__(other) - - # See http://docs.python.org/reference/datamodel#object.__hash__ - def __hash__(self): - return hash(self._parts) - - def __repr__(self): - return "%s('%s')" % (self.__class__.__name__, self._string) - - def __str__(self): - return self._string - - @property - def is_prerelease(self): - raise NotImplementedError('Please implement in subclasses.') - - -class Matcher(object): - version_class = None - - dist_re = re.compile(r"^(\w[\s\w'.-]*)(\((.*)\))?") - comp_re = re.compile(r'^(<=|>=|<|>|!=|==|~=)?\s*([^\s,]+)$') - num_re = re.compile(r'^\d+(\.\d+)*$') - - # value is either a callable or the name of a method - _operators = { - '<': lambda v, c, p: v < c, - '>': lambda v, c, p: v > c, - '<=': lambda v, c, p: v == c or v < c, - '>=': lambda v, c, p: v == c or v > c, - '==': lambda v, c, p: v == c, - # by default, compatible => >=. - '~=': lambda v, c, p: v == c or v > c, - '!=': lambda v, c, p: v != c, - } - - def __init__(self, s): - if self.version_class is None: - raise ValueError('Please specify a version class') - self._string = s = s.strip() - m = self.dist_re.match(s) - if not m: - raise ValueError('Not valid: %r' % s) - groups = m.groups('') - self.name = groups[0].strip() - self.key = self.name.lower() # for case-insensitive comparisons - clist = [] - if groups[2]: - constraints = [c.strip() for c in groups[2].split(',')] - for c in constraints: - m = self.comp_re.match(c) - if not m: - raise ValueError('Invalid %r in %r' % (c, s)) - groups = m.groups() - op = groups[0] or '~=' - s = groups[1] - if s.endswith('.*'): - if op not in ('==', '!='): - raise ValueError('\'.*\' not allowed for ' - '%r constraints' % op) - # Could be a partial version (e.g. for '2.*') which - # won't parse as a version, so keep it as a string - vn, prefix = s[:-2], True - if not self.num_re.match(vn): - # Just to check that vn is a valid version - self.version_class(vn) - else: - # Should parse as a version, so we can create an - # instance for the comparison - vn, prefix = self.version_class(s), False - clist.append((op, vn, prefix)) - self._parts = tuple(clist) - - def match(self, version): - """ - Check if the provided version matches the constraints. - - :param version: The version to match against this instance. - :type version: Strring or :class:`Version` instance. - """ - if isinstance(version, string_types): - version = self.version_class(version) - for operator, constraint, prefix in self._parts: - f = self._operators.get(operator) - if isinstance(f, string_types): - f = getattr(self, f) - if not f: - msg = ('%r not implemented ' - 'for %s' % (operator, self.__class__.__name__)) - raise NotImplementedError(msg) - if not f(version, constraint, prefix): - return False - return True - - @property - def exact_version(self): - result = None - if len(self._parts) == 1 and self._parts[0][0] == '==': - result = self._parts[0][1] - return result - - def _check_compatible(self, other): - if type(self) != type(other) or self.name != other.name: - raise TypeError('cannot compare %s and %s' % (self, other)) - - def __eq__(self, other): - self._check_compatible(other) - return self.key == other.key and self._parts == other._parts - - def __ne__(self, other): - return not self.__eq__(other) - - # See http://docs.python.org/reference/datamodel#object.__hash__ - def __hash__(self): - return hash(self.key) + hash(self._parts) - - def __repr__(self): - return "%s(%r)" % (self.__class__.__name__, self._string) - - def __str__(self): - return self._string - - -PEP426_VERSION_RE = re.compile(r'^(\d+\.\d+(\.\d+)*)((a|b|c|rc)(\d+))?' - r'(\.(post)(\d+))?(\.(dev)(\d+))?' - r'(-(\d+(\.\d+)?))?$') - - -def _pep426_key(s): - s = s.strip() - m = PEP426_VERSION_RE.match(s) - if not m: - raise UnsupportedVersionError('Not a valid version: %s' % s) - groups = m.groups() - nums = tuple(int(v) for v in groups[0].split('.')) - while len(nums) > 1 and nums[-1] == 0: - nums = nums[:-1] - - pre = groups[3:5] - post = groups[6:8] - dev = groups[9:11] - local = groups[12] - if pre == (None, None): - pre = () - else: - pre = pre[0], int(pre[1]) - if post == (None, None): - post = () - else: - post = post[0], int(post[1]) - if dev == (None, None): - dev = () - else: - dev = dev[0], int(dev[1]) - if local is None: - local = () - else: - local = tuple([int(s) for s in local.split('.')]) - if not pre: - # either before pre-release, or final release and after - if not post and dev: - # before pre-release - pre = ('a', -1) # to sort before a0 - else: - pre = ('z',) # to sort after all pre-releases - # now look at the state of post and dev. - if not post: - post = ('_',) # sort before 'a' - if not dev: - dev = ('final',) - - #print('%s -> %s' % (s, m.groups())) - return nums, pre, post, dev, local - - -_normalized_key = _pep426_key - - -class NormalizedVersion(Version): - """A rational version. - - Good: - 1.2 # equivalent to "1.2.0" - 1.2.0 - 1.2a1 - 1.2.3a2 - 1.2.3b1 - 1.2.3c1 - 1.2.3.4 - TODO: fill this out - - Bad: - 1 # mininum two numbers - 1.2a # release level must have a release serial - 1.2.3b - """ - def parse(self, s): - result = _normalized_key(s) - # _normalized_key loses trailing zeroes in the release - # clause, since that's needed to ensure that X.Y == X.Y.0 == X.Y.0.0 - # However, PEP 440 prefix matching needs it: for example, - # (~= 1.4.5.0) matches differently to (~= 1.4.5.0.0). - m = PEP426_VERSION_RE.match(s) # must succeed - groups = m.groups() - self._release_clause = tuple(int(v) for v in groups[0].split('.')) - return result - - PREREL_TAGS = set(['a', 'b', 'c', 'rc', 'dev']) - - @property - def is_prerelease(self): - return any(t[0] in self.PREREL_TAGS for t in self._parts if t) - - -def _match_prefix(x, y): - x = str(x) - y = str(y) - if x == y: - return True - if not x.startswith(y): - return False - n = len(y) - return x[n] == '.' - - -class NormalizedMatcher(Matcher): - version_class = NormalizedVersion - - # value is either a callable or the name of a method - _operators = { - '~=': '_match_compatible', - '<': '_match_lt', - '>': '_match_gt', - '<=': '_match_le', - '>=': '_match_ge', - '==': '_match_eq', - '!=': '_match_ne', - } - - def _match_lt(self, version, constraint, prefix): - if version >= constraint: - return False - release_clause = constraint._release_clause - pfx = '.'.join([str(i) for i in release_clause]) - return not _match_prefix(version, pfx) - - def _match_gt(self, version, constraint, prefix): - if version <= constraint: - return False - release_clause = constraint._release_clause - pfx = '.'.join([str(i) for i in release_clause]) - return not _match_prefix(version, pfx) - - def _match_le(self, version, constraint, prefix): - return version <= constraint - - def _match_ge(self, version, constraint, prefix): - return version >= constraint - - def _match_eq(self, version, constraint, prefix): - if not prefix: - result = (version == constraint) - else: - result = _match_prefix(version, constraint) - return result - - def _match_ne(self, version, constraint, prefix): - if not prefix: - result = (version != constraint) - else: - result = not _match_prefix(version, constraint) - return result - - def _match_compatible(self, version, constraint, prefix): - if version == constraint: - return True - if version < constraint: - return False - release_clause = constraint._release_clause - if len(release_clause) > 1: - release_clause = release_clause[:-1] - pfx = '.'.join([str(i) for i in release_clause]) - return _match_prefix(version, pfx) - -_REPLACEMENTS = ( - (re.compile('[.+-]$'), ''), # remove trailing puncts - (re.compile(r'^[.](\d)'), r'0.\1'), # .N -> 0.N at start - (re.compile('^[.-]'), ''), # remove leading puncts - (re.compile(r'^\((.*)\)$'), r'\1'), # remove parentheses - (re.compile(r'^v(ersion)?\s*(\d+)'), r'\2'), # remove leading v(ersion) - (re.compile(r'^r(ev)?\s*(\d+)'), r'\2'), # remove leading v(ersion) - (re.compile('[.]{2,}'), '.'), # multiple runs of '.' - (re.compile(r'\b(alfa|apha)\b'), 'alpha'), # misspelt alpha - (re.compile(r'\b(pre-alpha|prealpha)\b'), - 'pre.alpha'), # standardise - (re.compile(r'\(beta\)$'), 'beta'), # remove parentheses -) - -_SUFFIX_REPLACEMENTS = ( - (re.compile('^[:~._+-]+'), ''), # remove leading puncts - (re.compile('[,*")([\]]'), ''), # remove unwanted chars - (re.compile('[~:+_ -]'), '.'), # replace illegal chars - (re.compile('[.]{2,}'), '.'), # multiple runs of '.' - (re.compile(r'\.$'), ''), # trailing '.' -) - -_NUMERIC_PREFIX = re.compile(r'(\d+(\.\d+)*)') - - -def _suggest_semantic_version(s): - """ - Try to suggest a semantic form for a version for which - _suggest_normalized_version couldn't come up with anything. - """ - result = s.strip().lower() - for pat, repl in _REPLACEMENTS: - result = pat.sub(repl, result) - if not result: - result = '0.0.0' - - # Now look for numeric prefix, and separate it out from - # the rest. - #import pdb; pdb.set_trace() - m = _NUMERIC_PREFIX.match(result) - if not m: - prefix = '0.0.0' - suffix = result - else: - prefix = m.groups()[0].split('.') - prefix = [int(i) for i in prefix] - while len(prefix) < 3: - prefix.append(0) - if len(prefix) == 3: - suffix = result[m.end():] - else: - suffix = '.'.join([str(i) for i in prefix[3:]]) + result[m.end():] - prefix = prefix[:3] - prefix = '.'.join([str(i) for i in prefix]) - suffix = suffix.strip() - if suffix: - #import pdb; pdb.set_trace() - # massage the suffix. - for pat, repl in _SUFFIX_REPLACEMENTS: - suffix = pat.sub(repl, suffix) - - if not suffix: - result = prefix - else: - sep = '-' if 'dev' in suffix else '+' - result = prefix + sep + suffix - if not is_semver(result): - result = None - return result - - -def _suggest_normalized_version(s): - """Suggest a normalized version close to the given version string. - - If you have a version string that isn't rational (i.e. NormalizedVersion - doesn't like it) then you might be able to get an equivalent (or close) - rational version from this function. - - This does a number of simple normalizations to the given string, based - on observation of versions currently in use on PyPI. Given a dump of - those version during PyCon 2009, 4287 of them: - - 2312 (53.93%) match NormalizedVersion without change - with the automatic suggestion - - 3474 (81.04%) match when using this suggestion method - - @param s {str} An irrational version string. - @returns A rational version string, or None, if couldn't determine one. - """ - try: - _normalized_key(s) - return s # already rational - except UnsupportedVersionError: - pass - - rs = s.lower() - - # part of this could use maketrans - for orig, repl in (('-alpha', 'a'), ('-beta', 'b'), ('alpha', 'a'), - ('beta', 'b'), ('rc', 'c'), ('-final', ''), - ('-pre', 'c'), - ('-release', ''), ('.release', ''), ('-stable', ''), - ('+', '.'), ('_', '.'), (' ', ''), ('.final', ''), - ('final', '')): - rs = rs.replace(orig, repl) - - # if something ends with dev or pre, we add a 0 - rs = re.sub(r"pre$", r"pre0", rs) - rs = re.sub(r"dev$", r"dev0", rs) - - # if we have something like "b-2" or "a.2" at the end of the - # version, that is pobably beta, alpha, etc - # let's remove the dash or dot - rs = re.sub(r"([abc]|rc)[\-\.](\d+)$", r"\1\2", rs) - - # 1.0-dev-r371 -> 1.0.dev371 - # 0.1-dev-r79 -> 0.1.dev79 - rs = re.sub(r"[\-\.](dev)[\-\.]?r?(\d+)$", r".\1\2", rs) - - # Clean: 2.0.a.3, 2.0.b1, 0.9.0~c1 - rs = re.sub(r"[.~]?([abc])\.?", r"\1", rs) - - # Clean: v0.3, v1.0 - if rs.startswith('v'): - rs = rs[1:] - - # Clean leading '0's on numbers. - #TODO: unintended side-effect on, e.g., "2003.05.09" - # PyPI stats: 77 (~2%) better - rs = re.sub(r"\b0+(\d+)(?!\d)", r"\1", rs) - - # Clean a/b/c with no version. E.g. "1.0a" -> "1.0a0". Setuptools infers - # zero. - # PyPI stats: 245 (7.56%) better - rs = re.sub(r"(\d+[abc])$", r"\g<1>0", rs) - - # the 'dev-rNNN' tag is a dev tag - rs = re.sub(r"\.?(dev-r|dev\.r)\.?(\d+)$", r".dev\2", rs) - - # clean the - when used as a pre delimiter - rs = re.sub(r"-(a|b|c)(\d+)$", r"\1\2", rs) - - # a terminal "dev" or "devel" can be changed into ".dev0" - rs = re.sub(r"[\.\-](dev|devel)$", r".dev0", rs) - - # a terminal "dev" can be changed into ".dev0" - rs = re.sub(r"(?![\.\-])dev$", r".dev0", rs) - - # a terminal "final" or "stable" can be removed - rs = re.sub(r"(final|stable)$", "", rs) - - # The 'r' and the '-' tags are post release tags - # 0.4a1.r10 -> 0.4a1.post10 - # 0.9.33-17222 -> 0.9.33.post17222 - # 0.9.33-r17222 -> 0.9.33.post17222 - rs = re.sub(r"\.?(r|-|-r)\.?(\d+)$", r".post\2", rs) - - # Clean 'r' instead of 'dev' usage: - # 0.9.33+r17222 -> 0.9.33.dev17222 - # 1.0dev123 -> 1.0.dev123 - # 1.0.git123 -> 1.0.dev123 - # 1.0.bzr123 -> 1.0.dev123 - # 0.1a0dev.123 -> 0.1a0.dev123 - # PyPI stats: ~150 (~4%) better - rs = re.sub(r"\.?(dev|git|bzr)\.?(\d+)$", r".dev\2", rs) - - # Clean '.pre' (normalized from '-pre' above) instead of 'c' usage: - # 0.2.pre1 -> 0.2c1 - # 0.2-c1 -> 0.2c1 - # 1.0preview123 -> 1.0c123 - # PyPI stats: ~21 (0.62%) better - rs = re.sub(r"\.?(pre|preview|-c)(\d+)$", r"c\g<2>", rs) - - # Tcl/Tk uses "px" for their post release markers - rs = re.sub(r"p(\d+)$", r".post\1", rs) - - try: - _normalized_key(rs) - except UnsupportedVersionError: - rs = None - return rs - -# -# Legacy version processing (distribute-compatible) -# - -_VERSION_PART = re.compile(r'([a-z]+|\d+|[\.-])', re.I) -_VERSION_REPLACE = { - 'pre': 'c', - 'preview': 'c', - '-': 'final-', - 'rc': 'c', - 'dev': '@', - '': None, - '.': None, -} - - -def _legacy_key(s): - def get_parts(s): - result = [] - for p in _VERSION_PART.split(s.lower()): - p = _VERSION_REPLACE.get(p, p) - if p: - if '0' <= p[:1] <= '9': - p = p.zfill(8) - else: - p = '*' + p - result.append(p) - result.append('*final') - return result - - result = [] - for p in get_parts(s): - if p.startswith('*'): - if p < '*final': - while result and result[-1] == '*final-': - result.pop() - while result and result[-1] == '00000000': - result.pop() - result.append(p) - return tuple(result) - - -class LegacyVersion(Version): - def parse(self, s): - return _legacy_key(s) - - PREREL_TAGS = set( - ['*a', '*alpha', '*b', '*beta', '*c', '*rc', '*r', '*@', '*pre'] - ) - - @property - def is_prerelease(self): - return any(x in self.PREREL_TAGS for x in self._parts) - - -class LegacyMatcher(Matcher): - version_class = LegacyVersion - - _operators = dict(Matcher._operators) - _operators['~='] = '_match_compatible' - - numeric_re = re.compile('^(\d+(\.\d+)*)') - - def _match_compatible(self, version, constraint, prefix): - if version < constraint: - return False - m = self.numeric_re.match(str(constraint)) - if not m: - logger.warning('Cannot compute compatible match for version %s ' - ' and constraint %s', version, constraint) - return True - s = m.groups()[0] - if '.' in s: - s = s.rsplit('.', 1)[0] - return _match_prefix(version, s) - -# -# Semantic versioning -# - -_SEMVER_RE = re.compile(r'^(\d+)\.(\d+)\.(\d+)' - r'(-[a-z0-9]+(\.[a-z0-9-]+)*)?' - r'(\+[a-z0-9]+(\.[a-z0-9-]+)*)?$', re.I) - - -def is_semver(s): - return _SEMVER_RE.match(s) - - -def _semantic_key(s): - def make_tuple(s, absent): - if s is None: - result = (absent,) - else: - parts = s[1:].split('.') - # We can't compare ints and strings on Python 3, so fudge it - # by zero-filling numeric values so simulate a numeric comparison - result = tuple([p.zfill(8) if p.isdigit() else p for p in parts]) - return result - - m = is_semver(s) - if not m: - raise UnsupportedVersionError(s) - groups = m.groups() - major, minor, patch = [int(i) for i in groups[:3]] - # choose the '|' and '*' so that versions sort correctly - pre, build = make_tuple(groups[3], '|'), make_tuple(groups[5], '*') - return (major, minor, patch), pre, build - - -class SemanticVersion(Version): - def parse(self, s): - return _semantic_key(s) - - @property - def is_prerelease(self): - return self._parts[1][0] != '|' - - -class SemanticMatcher(Matcher): - version_class = SemanticVersion - - -class VersionScheme(object): - def __init__(self, key, matcher, suggester=None): - self.key = key - self.matcher = matcher - self.suggester = suggester - - def is_valid_version(self, s): - try: - self.matcher.version_class(s) - result = True - except UnsupportedVersionError: - result = False - return result - - def is_valid_matcher(self, s): - try: - self.matcher(s) - result = True - except UnsupportedVersionError: - result = False - return result - - def is_valid_constraint_list(self, s): - """ - Used for processing some metadata fields - """ - return self.is_valid_matcher('dummy_name (%s)' % s) - - def suggest(self, s): - if self.suggester is None: - result = None - else: - result = self.suggester(s) - return result - -_SCHEMES = { - 'normalized': VersionScheme(_normalized_key, NormalizedMatcher, - _suggest_normalized_version), - 'legacy': VersionScheme(_legacy_key, LegacyMatcher, lambda self, s: s), - 'semantic': VersionScheme(_semantic_key, SemanticMatcher, - _suggest_semantic_version), -} - -_SCHEMES['default'] = _SCHEMES['normalized'] - - -def get_scheme(name): - if name not in _SCHEMES: - raise ValueError('unknown scheme name: %r' % name) - return _SCHEMES[name] diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/wheel.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/wheel.py deleted file mode 100644 index 6dbca81..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/distlib/wheel.py +++ /dev/null @@ -1,723 +0,0 @@ -# -*- coding: utf-8 -*- -# -# Copyright (C) 2013 Vinay Sajip. -# Licensed to the Python Software Foundation under a contributor agreement. -# See LICENSE.txt and CONTRIBUTORS.txt. -# -from __future__ import unicode_literals - -import base64 -import codecs -import datetime -import distutils.util -from email import message_from_file -import hashlib -import imp -import json -import logging -import os -import posixpath -import re -import shutil -import sys -import tempfile -import zipfile - -from . import __version__, DistlibException -from .compat import sysconfig, ZipFile, fsdecode, text_type, filter -from .database import InstalledDistribution -from .metadata import Metadata, METADATA_FILENAME -from .util import (FileOperator, convert_path, CSVReader, CSVWriter, - cached_property, get_cache_base, read_exports) - - -logger = logging.getLogger(__name__) - - -if hasattr(sys, 'pypy_version_info'): - IMP_PREFIX = 'pp' -elif sys.platform.startswith('java'): - IMP_PREFIX = 'jy' -elif sys.platform == 'cli': - IMP_PREFIX = 'ip' -else: - IMP_PREFIX = 'cp' - -VER_SUFFIX = sysconfig.get_config_var('py_version_nodot') -if not VER_SUFFIX: # pragma: no cover - VER_SUFFIX = '%s%s' % sys.version_info[:2] -PYVER = 'py' + VER_SUFFIX -IMPVER = IMP_PREFIX + VER_SUFFIX - -ARCH = distutils.util.get_platform().replace('-', '_').replace('.', '_') - -ABI = sysconfig.get_config_var('SOABI') -if ABI and ABI.startswith('cpython-'): - ABI = ABI.replace('cpython-', 'cp') -else: - ABI = 'none' - -FILENAME_RE = re.compile(r''' -(?P[^-]+) --(?P\d+[^-]*) -(-(?P\d+[^-]*))? --(?P\w+\d+(\.\w+\d+)*) --(?P\w+) --(?P\w+) -\.whl$ -''', re.IGNORECASE | re.VERBOSE) - -NAME_VERSION_RE = re.compile(r''' -(?P[^-]+) --(?P\d+[^-]*) -(-(?P\d+[^-]*))?$ -''', re.IGNORECASE | re.VERBOSE) - -SHEBANG_RE = re.compile(br'\s*#![^\r\n]*') - -if os.sep == '/': - to_posix = lambda o: o -else: - to_posix = lambda o: o.replace(os.sep, '/') - - -class Mounter(object): - def __init__(self): - self.impure_wheels = {} - self.libs = {} - - def add(self, pathname, extensions): - self.impure_wheels[pathname] = extensions - self.libs.update(extensions) - - def remove(self, pathname): - extensions = self.impure_wheels.pop(pathname) - for k, v in extensions: - if k in self.libs: - del self.libs[k] - - def find_module(self, fullname, path=None): - if fullname in self.libs: - result = self - else: - result = None - return result - - def load_module(self, fullname): - if fullname in sys.modules: - result = sys.modules[fullname] - else: - if fullname not in self.libs: - raise ImportError('unable to find extension for %s' % fullname) - result = imp.load_dynamic(fullname, self.libs[fullname]) - result.__loader__ = self - parts = fullname.rsplit('.', 1) - if len(parts) > 1: - result.__package__ = parts[0] - return result - -_hook = Mounter() - - -class Wheel(object): - """ - Class to build and install from Wheel files (PEP 427). - """ - - wheel_version = (1, 1) - hash_kind = 'sha256' - - def __init__(self, filename=None, sign=False, verify=False): - """ - Initialise an instance using a (valid) filename. - """ - self.sign = sign - self.verify = verify - self.buildver = '' - self.pyver = [PYVER] - self.abi = ['none'] - self.arch = ['any'] - self.dirname = os.getcwd() - if filename is None: - self.name = 'dummy' - self.version = '0.1' - self._filename = self.filename - else: - m = NAME_VERSION_RE.match(filename) - if m: - info = m.groupdict('') - self.name = info['nm'] - self.version = info['vn'] - self.buildver = info['bn'] - self._filename = self.filename - else: - dirname, filename = os.path.split(filename) - m = FILENAME_RE.match(filename) - if not m: - raise DistlibException('Invalid name or ' - 'filename: %r' % filename) - if dirname: - self.dirname = os.path.abspath(dirname) - self._filename = filename - info = m.groupdict('') - self.name = info['nm'] - self.version = info['vn'] - self.buildver = info['bn'] - self.pyver = info['py'].split('.') - self.abi = info['bi'].split('.') - self.arch = info['ar'].split('.') - - @property - def filename(self): - """ - Build and return a filename from the various components. - """ - if self.buildver: - buildver = '-' + self.buildver - else: - buildver = '' - pyver = '.'.join(self.pyver) - abi = '.'.join(self.abi) - arch = '.'.join(self.arch) - return '%s-%s%s-%s-%s-%s.whl' % (self.name, self.version, buildver, - pyver, abi, arch) - - @property - def tags(self): - for pyver in self.pyver: - for abi in self.abi: - for arch in self.arch: - yield pyver, abi, arch - - @cached_property - def metadata(self): - pathname = os.path.join(self.dirname, self.filename) - name_ver = '%s-%s' % (self.name, self.version) - info_dir = '%s.dist-info' % name_ver - wrapper = codecs.getreader('utf-8') - metadata_filename = posixpath.join(info_dir, METADATA_FILENAME) - with ZipFile(pathname, 'r') as zf: - try: - with zf.open(metadata_filename) as bf: - wf = wrapper(bf) - result = Metadata(fileobj=wf) - except KeyError: - raise ValueError('Invalid wheel, because %s is ' - 'missing' % METADATA_FILENAME) - return result - - @cached_property - def info(self): - pathname = os.path.join(self.dirname, self.filename) - name_ver = '%s-%s' % (self.name, self.version) - info_dir = '%s.dist-info' % name_ver - metadata_filename = posixpath.join(info_dir, 'WHEEL') - wrapper = codecs.getreader('utf-8') - with ZipFile(pathname, 'r') as zf: - with zf.open(metadata_filename) as bf: - wf = wrapper(bf) - message = message_from_file(wf) - result = dict(message) - return result - - def process_shebang(self, data): - m = SHEBANG_RE.match(data) - if m: - data = b'#!python' + data[m.end():] - else: - cr = data.find(b'\r') - lf = data.find(b'\n') - if cr < 0 or cr > lf: - term = b'\n' - else: - if data[cr:cr + 2] == b'\r\n': - term = b'\r\n' - else: - term = b'\r' - data = b'#!python' + term + data - return data - - def get_hash(self, data, hash_kind=None): - if hash_kind is None: - hash_kind = self.hash_kind - try: - hasher = getattr(hashlib, hash_kind) - except AttributeError: - raise DistlibException('Unsupported hash algorithm: %r' % hash_kind) - result = hasher(data).digest() - result = base64.urlsafe_b64encode(result).rstrip(b'=').decode('ascii') - return hash_kind, result - - def write_record(self, records, record_path, base): - with CSVWriter(record_path) as writer: - for row in records: - writer.writerow(row) - p = to_posix(os.path.relpath(record_path, base)) - writer.writerow((p, '', '')) - - def build(self, paths, tags=None, wheel_version=None): - """ - Build a wheel from files in specified paths, and use any specified tags - when determining the name of the wheel. - """ - if tags is None: - tags = {} - - libkey = list(filter(lambda o: o in paths, ('purelib', 'platlib')))[0] - if libkey == 'platlib': - is_pure = 'false' - default_pyver = [IMPVER] - default_abi = [ABI] - default_arch = [ARCH] - else: - is_pure = 'true' - default_pyver = [PYVER] - default_abi = ['none'] - default_arch = ['any'] - - self.pyver = tags.get('pyver', default_pyver) - self.abi = tags.get('abi', default_abi) - self.arch = tags.get('arch', default_arch) - - libdir = paths[libkey] - - name_ver = '%s-%s' % (self.name, self.version) - data_dir = '%s.data' % name_ver - info_dir = '%s.dist-info' % name_ver - - archive_paths = [] - - # First, stuff which is not in site-packages - for key in ('data', 'headers', 'scripts'): - if key not in paths: - continue - path = paths[key] - if os.path.isdir(path): - for root, dirs, files in os.walk(path): - for fn in files: - p = fsdecode(os.path.join(root, fn)) - rp = os.path.relpath(p, path) - ap = to_posix(os.path.join(data_dir, key, rp)) - archive_paths.append((ap, p)) - if key == 'scripts' and not p.endswith('.exe'): - with open(p, 'rb') as f: - data = f.read() - data = self.process_shebang(data) - with open(p, 'wb') as f: - f.write(data) - - # Now, stuff which is in site-packages, other than the - # distinfo stuff. - path = libdir - distinfo = None - for root, dirs, files in os.walk(path): - if root == path: - # At the top level only, save distinfo for later - # and skip it for now - for i, dn in enumerate(dirs): - dn = fsdecode(dn) - if dn.endswith('.dist-info'): - distinfo = os.path.join(root, dn) - del dirs[i] - break - assert distinfo, '.dist-info directory expected, not found' - - for fn in files: - # comment out next suite to leave .pyc files in - if fsdecode(fn).endswith(('.pyc', '.pyo')): - continue - p = os.path.join(root, fn) - rp = to_posix(os.path.relpath(p, path)) - archive_paths.append((rp, p)) - - # Now distinfo. Assumed to be flat, i.e. os.listdir is enough. - files = os.listdir(distinfo) - for fn in files: - if fn not in ('RECORD', 'INSTALLER', 'SHARED'): - p = fsdecode(os.path.join(distinfo, fn)) - ap = to_posix(os.path.join(info_dir, fn)) - archive_paths.append((ap, p)) - - wheel_metadata = [ - 'Wheel-Version: %d.%d' % (wheel_version or self.wheel_version), - 'Generator: distlib %s' % __version__, - 'Root-Is-Purelib: %s' % is_pure, - ] - for pyver, abi, arch in self.tags: - wheel_metadata.append('Tag: %s-%s-%s' % (pyver, abi, arch)) - p = os.path.join(distinfo, 'WHEEL') - with open(p, 'w') as f: - f.write('\n'.join(wheel_metadata)) - ap = to_posix(os.path.join(info_dir, 'WHEEL')) - archive_paths.append((ap, p)) - - # Now, at last, RECORD. - # Paths in here are archive paths - nothing else makes sense. - records = [] - hasher = getattr(hashlib, self.hash_kind) - for ap, p in archive_paths: - with open(p, 'rb') as f: - data = f.read() - digest = '%s=%s' % self.get_hash(data) - size = os.path.getsize(p) - records.append((ap, digest, size)) - - p = os.path.join(distinfo, 'RECORD') - self.write_record(records, p, libdir) - ap = to_posix(os.path.join(info_dir, 'RECORD')) - archive_paths.append((ap, p)) - # Now, ready to build the zip file - pathname = os.path.join(self.dirname, self.filename) - with ZipFile(pathname, 'w', zipfile.ZIP_DEFLATED) as zf: - for ap, p in archive_paths: - logger.debug('Wrote %s to %s in wheel', p, ap) - zf.write(p, ap) - return pathname - - def install(self, paths, maker, **kwargs): - """ - Install a wheel to the specified paths. If kwarg ``warner`` is - specified, it should be a callable, which will be called with two - tuples indicating the wheel version of this software and the wheel - version in the file, if there is a discrepancy in the versions. - This can be used to issue any warnings to raise any exceptions. - If kwarg ``lib_only`` is True, only the purelib/platlib files are - installed, and the headers, scripts, data and dist-info metadata are - not written. - - The return value is a :class:`InstalledDistribution` instance unless - ``options.lib_only`` is True, in which case the return value is ``None``. - """ - - dry_run = maker.dry_run - warner = kwargs.get('warner') - lib_only = kwargs.get('lib_only', False) - - pathname = os.path.join(self.dirname, self.filename) - name_ver = '%s-%s' % (self.name, self.version) - data_dir = '%s.data' % name_ver - info_dir = '%s.dist-info' % name_ver - - metadata_name = posixpath.join(info_dir, METADATA_FILENAME) - wheel_metadata_name = posixpath.join(info_dir, 'WHEEL') - record_name = posixpath.join(info_dir, 'RECORD') - - wrapper = codecs.getreader('utf-8') - - with ZipFile(pathname, 'r') as zf: - with zf.open(wheel_metadata_name) as bwf: - wf = wrapper(bwf) - message = message_from_file(wf) - wv = message['Wheel-Version'].split('.', 1) - file_version = tuple([int(i) for i in wv]) - if (file_version != self.wheel_version) and warner: - warner(self.wheel_version, file_version) - - if message['Root-Is-Purelib'] == 'true': - libdir = paths['purelib'] - else: - libdir = paths['platlib'] - - records = {} - with zf.open(record_name) as bf: - with CSVReader(stream=bf) as reader: - for row in reader: - p = row[0] - records[p] = row - - data_pfx = posixpath.join(data_dir, '') - info_pfx = posixpath.join(info_dir, '') - script_pfx = posixpath.join(data_dir, 'scripts', '') - - # make a new instance rather than a copy of maker's, - # as we mutate it - fileop = FileOperator(dry_run=dry_run) - fileop.record = True # so we can rollback if needed - - bc = not sys.dont_write_bytecode # Double negatives. Lovely! - - outfiles = [] # for RECORD writing - - # for script copying/shebang processing - workdir = tempfile.mkdtemp() - # set target dir later - # we default add_launchers to False, as the - # Python Launcher should be used instead - maker.source_dir = workdir - maker.target_dir = None - try: - for zinfo in zf.infolist(): - arcname = zinfo.filename - if isinstance(arcname, text_type): - u_arcname = arcname - else: - u_arcname = arcname.decode('utf-8') - # The signature file won't be in RECORD, - # and we don't currently don't do anything with it - if u_arcname.endswith('/RECORD.jws'): - continue - row = records[u_arcname] - if row[2] and str(zinfo.file_size) != row[2]: - raise DistlibException('size mismatch for ' - '%s' % u_arcname) - if row[1]: - kind, value = row[1].split('=', 1) - with zf.open(arcname) as bf: - data = bf.read() - _, digest = self.get_hash(data, kind) - if digest != value: - raise DistlibException('digest mismatch for ' - '%s' % arcname) - - if lib_only and u_arcname.startswith((info_pfx, data_pfx)): - logger.debug('lib_only: skipping %s', u_arcname) - continue - is_script = (u_arcname.startswith(script_pfx) - and not u_arcname.endswith('.exe')) - - if u_arcname.startswith(data_pfx): - _, where, rp = u_arcname.split('/', 2) - outfile = os.path.join(paths[where], convert_path(rp)) - else: - # meant for site-packages. - if u_arcname in (wheel_metadata_name, record_name): - continue - outfile = os.path.join(libdir, convert_path(u_arcname)) - if not is_script: - with zf.open(arcname) as bf: - fileop.copy_stream(bf, outfile) - outfiles.append(outfile) - # Double check the digest of the written file - if not dry_run and row[1]: - with open(outfile, 'rb') as bf: - data = bf.read() - _, newdigest = self.get_hash(data, kind) - if newdigest != digest: - raise DistlibException('digest mismatch ' - 'on write for ' - '%s' % outfile) - if bc and outfile.endswith('.py'): - try: - pyc = fileop.byte_compile(outfile) - outfiles.append(pyc) - except Exception: - # Don't give up if byte-compilation fails, - # but log it and perhaps warn the user - logger.warning('Byte-compilation failed', - exc_info=True) - else: - fn = os.path.basename(convert_path(arcname)) - workname = os.path.join(workdir, fn) - with zf.open(arcname) as bf: - fileop.copy_stream(bf, workname) - - dn, fn = os.path.split(outfile) - maker.target_dir = dn - filenames = maker.make(fn) - fileop.set_executable_mode(filenames) - outfiles.extend(filenames) - - if lib_only: - logger.debug('lib_only: returning None') - dist = None - else: - # Generate scripts - - # Try to get pydist.json so we can see if there are - # any commands to generate. If this fails (e.g. because - # of a legacy wheel), log a warning but don't give up. - commands = None - file_version = self.info['Wheel-Version'] - if file_version == '1.0': - # Use legacy info - ep = posixpath.join(info_dir, 'entry_points.txt') - try: - with zf.open(ep) as bwf: - epdata = read_exports(bwf) - commands = {} - for key in ('console', 'gui'): - k = '%s_scripts' % key - if k in epdata: - commands['wrap_%s' % key] = d = {} - for v in epdata[k].values(): - s = '%s:%s' % (v.prefix, v.suffix) - if v.flags: - s += ' %s' % v.flags - d[v.name] = s - except Exception: - logger.warning('Unable to read legacy script ' - 'metadata, so cannot generate ' - 'scripts') - else: - try: - with zf.open(metadata_name) as bwf: - wf = wrapper(bwf) - commands = json.load(wf).get('commands') - except Exception: - logger.warning('Unable to read JSON metadata, so ' - 'cannot generate scripts') - if commands: - console_scripts = commands.get('wrap_console', {}) - gui_scripts = commands.get('wrap_gui', {}) - if console_scripts or gui_scripts: - script_dir = paths.get('scripts', '') - if not os.path.isdir(script_dir): - raise ValueError('Valid script path not ' - 'specified') - maker.target_dir = script_dir - for k, v in console_scripts.items(): - script = '%s = %s' % (k, v) - filenames = maker.make(script) - fileop.set_executable_mode(filenames) - - if gui_scripts: - options = {'gui': True } - for k, v in gui_scripts.items(): - script = '%s = %s' % (k, v) - filenames = maker.make(script, options) - fileop.set_executable_mode(filenames) - - p = os.path.join(libdir, info_dir) - dist = InstalledDistribution(p) - - # Write SHARED - paths = dict(paths) # don't change passed in dict - del paths['purelib'] - del paths['platlib'] - paths['lib'] = libdir - p = dist.write_shared_locations(paths, dry_run) - if p: - outfiles.append(p) - - # Write RECORD - dist.write_installed_files(outfiles, paths['prefix'], - dry_run) - return dist - except Exception: # pragma: no cover - logger.exception('installation failed.') - fileop.rollback() - raise - finally: - shutil.rmtree(workdir) - - def _get_dylib_cache(self): - # Use native string to avoid issues on 2.x: see Python #20140. - result = os.path.join(get_cache_base(), str('dylib-cache'), sys.version[:3]) - if not os.path.isdir(result): - os.makedirs(result) - return result - - def _get_extensions(self): - pathname = os.path.join(self.dirname, self.filename) - name_ver = '%s-%s' % (self.name, self.version) - info_dir = '%s.dist-info' % name_ver - arcname = posixpath.join(info_dir, 'EXTENSIONS') - wrapper = codecs.getreader('utf-8') - result = [] - with ZipFile(pathname, 'r') as zf: - try: - with zf.open(arcname) as bf: - wf = wrapper(bf) - extensions = json.load(wf) - cache_base = self._get_dylib_cache() - for name, relpath in extensions.items(): - dest = os.path.join(cache_base, convert_path(relpath)) - if not os.path.exists(dest): - extract = True - else: - file_time = os.stat(dest).st_mtime - file_time = datetime.datetime.fromtimestamp(file_time) - info = zf.getinfo(relpath) - wheel_time = datetime.datetime(*info.date_time) - extract = wheel_time > file_time - if extract: - zf.extract(relpath, cache_base) - result.append((name, dest)) - except KeyError: - pass - return result - - def mount(self, append=False): - pathname = os.path.abspath(os.path.join(self.dirname, self.filename)) - if not is_compatible(self): - msg = 'Wheel %s not mountable in this Python.' % pathname - raise DistlibException(msg) - if pathname in sys.path: - logger.debug('%s already in path', pathname) - else: - if append: - sys.path.append(pathname) - else: - sys.path.insert(0, pathname) - extensions = self._get_extensions() - if extensions: - if _hook not in sys.meta_path: - sys.meta_path.append(_hook) - _hook.add(pathname, extensions) - - def unmount(self): - pathname = os.path.abspath(os.path.join(self.dirname, self.filename)) - if pathname not in sys.path: - logger.debug('%s not in path', pathname) - else: - sys.path.remove(pathname) - if pathname in _hook.impure_wheels: - _hook.remove(pathname) - if not _hook.impure_wheels: - if _hook in sys.meta_path: - sys.meta_path.remove(_hook) - - -def compatible_tags(): - """ - Return (pyver, abi, arch) tuples compatible with this Python. - """ - versions = [VER_SUFFIX] - major = VER_SUFFIX[0] - for minor in range(sys.version_info[1] - 1, - 1, -1): - versions.append(''.join([major, str(minor)])) - - abis = [] - for suffix, _, _ in imp.get_suffixes(): - if suffix.startswith('.abi'): - abis.append(suffix.split('.', 2)[1]) - abis.sort() - if ABI != 'none': - abis.insert(0, ABI) - abis.append('none') - result = [] - - # Most specific - our Python version, ABI and arch - for abi in abis: - result.append((''.join((IMP_PREFIX, versions[0])), abi, ARCH)) - - # where no ABI / arch dependency, but IMP_PREFIX dependency - for i, version in enumerate(versions): - result.append((''.join((IMP_PREFIX, version)), 'none', 'any')) - if i == 0: - result.append((''.join((IMP_PREFIX, version[0])), 'none', 'any')) - - # no IMP_PREFIX, ABI or arch dependency - for i, version in enumerate(versions): - result.append((''.join(('py', version)), 'none', 'any')) - if i == 0: - result.append((''.join(('py', version[0])), 'none', 'any')) - return result - - -COMPATIBLE_TAGS = compatible_tags() - -del compatible_tags - - -def is_compatible(wheel, tags=None): - if not isinstance(wheel, Wheel): - wheel = Wheel(wheel) # assume it's a filename - result = False - if tags is None: - tags = COMPATIBLE_TAGS - for ver, abi, arch in tags: - if ver in wheel.pyver and abi in wheel.abi and arch in wheel.arch: - result = True - break - return result diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/__init__.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/__init__.py deleted file mode 100644 index 10e2b74..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -""" -HTML parsing library based on the WHATWG "HTML5" -specification. The parser is designed to be compatible with existing -HTML found in the wild and implements well-defined error recovery that -is largely compatible with modern desktop web browsers. - -Example usage: - -import html5lib -f = open("my_document.html") -tree = html5lib.parse(f) -""" - -from __future__ import absolute_import, division, unicode_literals - -from .html5parser import HTMLParser, parse, parseFragment -from .treebuilders import getTreeBuilder -from .treewalkers import getTreeWalker -from .serializer import serialize - -__all__ = ["HTMLParser", "parse", "parseFragment", "getTreeBuilder", - "getTreeWalker", "serialize"] -__version__ = "1.0b1" diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/constants.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/constants.py deleted file mode 100644 index 1866dd7..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/constants.py +++ /dev/null @@ -1,3086 +0,0 @@ -from __future__ import absolute_import, division, unicode_literals - -import string -import gettext -_ = gettext.gettext - -EOF = None - -E = { - "null-character": - _("Null character in input stream, replaced with U+FFFD."), - "invalid-codepoint": - _("Invalid codepoint in stream."), - "incorrectly-placed-solidus": - _("Solidus (/) incorrectly placed in tag."), - "incorrect-cr-newline-entity": - _("Incorrect CR newline entity, replaced with LF."), - "illegal-windows-1252-entity": - _("Entity used with illegal number (windows-1252 reference)."), - "cant-convert-numeric-entity": - _("Numeric entity couldn't be converted to character " - "(codepoint U+%(charAsInt)08x)."), - "illegal-codepoint-for-numeric-entity": - _("Numeric entity represents an illegal codepoint: " - "U+%(charAsInt)08x."), - "numeric-entity-without-semicolon": - _("Numeric entity didn't end with ';'."), - "expected-numeric-entity-but-got-eof": - _("Numeric entity expected. Got end of file instead."), - "expected-numeric-entity": - _("Numeric entity expected but none found."), - "named-entity-without-semicolon": - _("Named entity didn't end with ';'."), - "expected-named-entity": - _("Named entity expected. Got none."), - "attributes-in-end-tag": - _("End tag contains unexpected attributes."), - 'self-closing-flag-on-end-tag': - _("End tag contains unexpected self-closing flag."), - "expected-tag-name-but-got-right-bracket": - _("Expected tag name. Got '>' instead."), - "expected-tag-name-but-got-question-mark": - _("Expected tag name. Got '?' instead. (HTML doesn't " - "support processing instructions.)"), - "expected-tag-name": - _("Expected tag name. Got something else instead"), - "expected-closing-tag-but-got-right-bracket": - _("Expected closing tag. Got '>' instead. Ignoring ''."), - "expected-closing-tag-but-got-eof": - _("Expected closing tag. Unexpected end of file."), - "expected-closing-tag-but-got-char": - _("Expected closing tag. Unexpected character '%(data)s' found."), - "eof-in-tag-name": - _("Unexpected end of file in the tag name."), - "expected-attribute-name-but-got-eof": - _("Unexpected end of file. Expected attribute name instead."), - "eof-in-attribute-name": - _("Unexpected end of file in attribute name."), - "invalid-character-in-attribute-name": - _("Invalid character in attribute name"), - "duplicate-attribute": - _("Dropped duplicate attribute on tag."), - "expected-end-of-tag-name-but-got-eof": - _("Unexpected end of file. Expected = or end of tag."), - "expected-attribute-value-but-got-eof": - _("Unexpected end of file. Expected attribute value."), - "expected-attribute-value-but-got-right-bracket": - _("Expected attribute value. Got '>' instead."), - 'equals-in-unquoted-attribute-value': - _("Unexpected = in unquoted attribute"), - 'unexpected-character-in-unquoted-attribute-value': - _("Unexpected character in unquoted attribute"), - "invalid-character-after-attribute-name": - _("Unexpected character after attribute name."), - "unexpected-character-after-attribute-value": - _("Unexpected character after attribute value."), - "eof-in-attribute-value-double-quote": - _("Unexpected end of file in attribute value (\")."), - "eof-in-attribute-value-single-quote": - _("Unexpected end of file in attribute value (')."), - "eof-in-attribute-value-no-quotes": - _("Unexpected end of file in attribute value."), - "unexpected-EOF-after-solidus-in-tag": - _("Unexpected end of file in tag. Expected >"), - "unexpected-character-after-solidus-in-tag": - _("Unexpected character after / in tag. Expected >"), - "expected-dashes-or-doctype": - _("Expected '--' or 'DOCTYPE'. Not found."), - "unexpected-bang-after-double-dash-in-comment": - _("Unexpected ! after -- in comment"), - "unexpected-space-after-double-dash-in-comment": - _("Unexpected space after -- in comment"), - "incorrect-comment": - _("Incorrect comment."), - "eof-in-comment": - _("Unexpected end of file in comment."), - "eof-in-comment-end-dash": - _("Unexpected end of file in comment (-)"), - "unexpected-dash-after-double-dash-in-comment": - _("Unexpected '-' after '--' found in comment."), - "eof-in-comment-double-dash": - _("Unexpected end of file in comment (--)."), - "eof-in-comment-end-space-state": - _("Unexpected end of file in comment."), - "eof-in-comment-end-bang-state": - _("Unexpected end of file in comment."), - "unexpected-char-in-comment": - _("Unexpected character in comment found."), - "need-space-after-doctype": - _("No space after literal string 'DOCTYPE'."), - "expected-doctype-name-but-got-right-bracket": - _("Unexpected > character. Expected DOCTYPE name."), - "expected-doctype-name-but-got-eof": - _("Unexpected end of file. Expected DOCTYPE name."), - "eof-in-doctype-name": - _("Unexpected end of file in DOCTYPE name."), - "eof-in-doctype": - _("Unexpected end of file in DOCTYPE."), - "expected-space-or-right-bracket-in-doctype": - _("Expected space or '>'. Got '%(data)s'"), - "unexpected-end-of-doctype": - _("Unexpected end of DOCTYPE."), - "unexpected-char-in-doctype": - _("Unexpected character in DOCTYPE."), - "eof-in-innerhtml": - _("XXX innerHTML EOF"), - "unexpected-doctype": - _("Unexpected DOCTYPE. Ignored."), - "non-html-root": - _("html needs to be the first start tag."), - "expected-doctype-but-got-eof": - _("Unexpected End of file. Expected DOCTYPE."), - "unknown-doctype": - _("Erroneous DOCTYPE."), - "expected-doctype-but-got-chars": - _("Unexpected non-space characters. Expected DOCTYPE."), - "expected-doctype-but-got-start-tag": - _("Unexpected start tag (%(name)s). Expected DOCTYPE."), - "expected-doctype-but-got-end-tag": - _("Unexpected end tag (%(name)s). Expected DOCTYPE."), - "end-tag-after-implied-root": - _("Unexpected end tag (%(name)s) after the (implied) root element."), - "expected-named-closing-tag-but-got-eof": - _("Unexpected end of file. Expected end tag (%(name)s)."), - "two-heads-are-not-better-than-one": - _("Unexpected start tag head in existing head. Ignored."), - "unexpected-end-tag": - _("Unexpected end tag (%(name)s). Ignored."), - "unexpected-start-tag-out-of-my-head": - _("Unexpected start tag (%(name)s) that can be in head. Moved."), - "unexpected-start-tag": - _("Unexpected start tag (%(name)s)."), - "missing-end-tag": - _("Missing end tag (%(name)s)."), - "missing-end-tags": - _("Missing end tags (%(name)s)."), - "unexpected-start-tag-implies-end-tag": - _("Unexpected start tag (%(startName)s) " - "implies end tag (%(endName)s)."), - "unexpected-start-tag-treated-as": - _("Unexpected start tag (%(originalName)s). Treated as %(newName)s."), - "deprecated-tag": - _("Unexpected start tag %(name)s. Don't use it!"), - "unexpected-start-tag-ignored": - _("Unexpected start tag %(name)s. Ignored."), - "expected-one-end-tag-but-got-another": - _("Unexpected end tag (%(gotName)s). " - "Missing end tag (%(expectedName)s)."), - "end-tag-too-early": - _("End tag (%(name)s) seen too early. Expected other end tag."), - "end-tag-too-early-named": - _("Unexpected end tag (%(gotName)s). Expected end tag (%(expectedName)s)."), - "end-tag-too-early-ignored": - _("End tag (%(name)s) seen too early. Ignored."), - "adoption-agency-1.1": - _("End tag (%(name)s) violates step 1, " - "paragraph 1 of the adoption agency algorithm."), - "adoption-agency-1.2": - _("End tag (%(name)s) violates step 1, " - "paragraph 2 of the adoption agency algorithm."), - "adoption-agency-1.3": - _("End tag (%(name)s) violates step 1, " - "paragraph 3 of the adoption agency algorithm."), - "adoption-agency-4.4": - _("End tag (%(name)s) violates step 4, " - "paragraph 4 of the adoption agency algorithm."), - "unexpected-end-tag-treated-as": - _("Unexpected end tag (%(originalName)s). Treated as %(newName)s."), - "no-end-tag": - _("This element (%(name)s) has no end tag."), - "unexpected-implied-end-tag-in-table": - _("Unexpected implied end tag (%(name)s) in the table phase."), - "unexpected-implied-end-tag-in-table-body": - _("Unexpected implied end tag (%(name)s) in the table body phase."), - "unexpected-char-implies-table-voodoo": - _("Unexpected non-space characters in " - "table context caused voodoo mode."), - "unexpected-hidden-input-in-table": - _("Unexpected input with type hidden in table context."), - "unexpected-form-in-table": - _("Unexpected form in table context."), - "unexpected-start-tag-implies-table-voodoo": - _("Unexpected start tag (%(name)s) in " - "table context caused voodoo mode."), - "unexpected-end-tag-implies-table-voodoo": - _("Unexpected end tag (%(name)s) in " - "table context caused voodoo mode."), - "unexpected-cell-in-table-body": - _("Unexpected table cell start tag (%(name)s) " - "in the table body phase."), - "unexpected-cell-end-tag": - _("Got table cell end tag (%(name)s) " - "while required end tags are missing."), - "unexpected-end-tag-in-table-body": - _("Unexpected end tag (%(name)s) in the table body phase. Ignored."), - "unexpected-implied-end-tag-in-table-row": - _("Unexpected implied end tag (%(name)s) in the table row phase."), - "unexpected-end-tag-in-table-row": - _("Unexpected end tag (%(name)s) in the table row phase. Ignored."), - "unexpected-select-in-select": - _("Unexpected select start tag in the select phase " - "treated as select end tag."), - "unexpected-input-in-select": - _("Unexpected input start tag in the select phase."), - "unexpected-start-tag-in-select": - _("Unexpected start tag token (%(name)s in the select phase. " - "Ignored."), - "unexpected-end-tag-in-select": - _("Unexpected end tag (%(name)s) in the select phase. Ignored."), - "unexpected-table-element-start-tag-in-select-in-table": - _("Unexpected table element start tag (%(name)s) in the select in table phase."), - "unexpected-table-element-end-tag-in-select-in-table": - _("Unexpected table element end tag (%(name)s) in the select in table phase."), - "unexpected-char-after-body": - _("Unexpected non-space characters in the after body phase."), - "unexpected-start-tag-after-body": - _("Unexpected start tag token (%(name)s)" - " in the after body phase."), - "unexpected-end-tag-after-body": - _("Unexpected end tag token (%(name)s)" - " in the after body phase."), - "unexpected-char-in-frameset": - _("Unexpected characters in the frameset phase. Characters ignored."), - "unexpected-start-tag-in-frameset": - _("Unexpected start tag token (%(name)s)" - " in the frameset phase. Ignored."), - "unexpected-frameset-in-frameset-innerhtml": - _("Unexpected end tag token (frameset) " - "in the frameset phase (innerHTML)."), - "unexpected-end-tag-in-frameset": - _("Unexpected end tag token (%(name)s)" - " in the frameset phase. Ignored."), - "unexpected-char-after-frameset": - _("Unexpected non-space characters in the " - "after frameset phase. Ignored."), - "unexpected-start-tag-after-frameset": - _("Unexpected start tag (%(name)s)" - " in the after frameset phase. Ignored."), - "unexpected-end-tag-after-frameset": - _("Unexpected end tag (%(name)s)" - " in the after frameset phase. Ignored."), - "unexpected-end-tag-after-body-innerhtml": - _("Unexpected end tag after body(innerHtml)"), - "expected-eof-but-got-char": - _("Unexpected non-space characters. Expected end of file."), - "expected-eof-but-got-start-tag": - _("Unexpected start tag (%(name)s)" - ". Expected end of file."), - "expected-eof-but-got-end-tag": - _("Unexpected end tag (%(name)s)" - ". Expected end of file."), - "eof-in-table": - _("Unexpected end of file. Expected table content."), - "eof-in-select": - _("Unexpected end of file. Expected select content."), - "eof-in-frameset": - _("Unexpected end of file. Expected frameset content."), - "eof-in-script-in-script": - _("Unexpected end of file. Expected script content."), - "eof-in-foreign-lands": - _("Unexpected end of file. Expected foreign content"), - "non-void-element-with-trailing-solidus": - _("Trailing solidus not allowed on element %(name)s"), - "unexpected-html-element-in-foreign-content": - _("Element %(name)s not allowed in a non-html context"), - "unexpected-end-tag-before-html": - _("Unexpected end tag (%(name)s) before html."), - "XXX-undefined-error": - _("Undefined error (this sucks and should be fixed)"), -} - -namespaces = { - "html": "http://www.w3.org/1999/xhtml", - "mathml": "http://www.w3.org/1998/Math/MathML", - "svg": "http://www.w3.org/2000/svg", - "xlink": "http://www.w3.org/1999/xlink", - "xml": "http://www.w3.org/XML/1998/namespace", - "xmlns": "http://www.w3.org/2000/xmlns/" -} - -scopingElements = frozenset(( - (namespaces["html"], "applet"), - (namespaces["html"], "caption"), - (namespaces["html"], "html"), - (namespaces["html"], "marquee"), - (namespaces["html"], "object"), - (namespaces["html"], "table"), - (namespaces["html"], "td"), - (namespaces["html"], "th"), - (namespaces["mathml"], "mi"), - (namespaces["mathml"], "mo"), - (namespaces["mathml"], "mn"), - (namespaces["mathml"], "ms"), - (namespaces["mathml"], "mtext"), - (namespaces["mathml"], "annotation-xml"), - (namespaces["svg"], "foreignObject"), - (namespaces["svg"], "desc"), - (namespaces["svg"], "title"), -)) - -formattingElements = frozenset(( - (namespaces["html"], "a"), - (namespaces["html"], "b"), - (namespaces["html"], "big"), - (namespaces["html"], "code"), - (namespaces["html"], "em"), - (namespaces["html"], "font"), - (namespaces["html"], "i"), - (namespaces["html"], "nobr"), - (namespaces["html"], "s"), - (namespaces["html"], "small"), - (namespaces["html"], "strike"), - (namespaces["html"], "strong"), - (namespaces["html"], "tt"), - (namespaces["html"], "u") -)) - -specialElements = frozenset(( - (namespaces["html"], "address"), - (namespaces["html"], "applet"), - (namespaces["html"], "area"), - (namespaces["html"], "article"), - (namespaces["html"], "aside"), - (namespaces["html"], "base"), - (namespaces["html"], "basefont"), - (namespaces["html"], "bgsound"), - (namespaces["html"], "blockquote"), - (namespaces["html"], "body"), - (namespaces["html"], "br"), - (namespaces["html"], "button"), - (namespaces["html"], "caption"), - (namespaces["html"], "center"), - (namespaces["html"], "col"), - (namespaces["html"], "colgroup"), - (namespaces["html"], "command"), - (namespaces["html"], "dd"), - (namespaces["html"], "details"), - (namespaces["html"], "dir"), - (namespaces["html"], "div"), - (namespaces["html"], "dl"), - (namespaces["html"], "dt"), - (namespaces["html"], "embed"), - (namespaces["html"], "fieldset"), - (namespaces["html"], "figure"), - (namespaces["html"], "footer"), - (namespaces["html"], "form"), - (namespaces["html"], "frame"), - (namespaces["html"], "frameset"), - (namespaces["html"], "h1"), - (namespaces["html"], "h2"), - (namespaces["html"], "h3"), - (namespaces["html"], "h4"), - (namespaces["html"], "h5"), - (namespaces["html"], "h6"), - (namespaces["html"], "head"), - (namespaces["html"], "header"), - (namespaces["html"], "hr"), - (namespaces["html"], "html"), - (namespaces["html"], "iframe"), - # Note that image is commented out in the spec as "this isn't an - # element that can end up on the stack, so it doesn't matter," - (namespaces["html"], "image"), - (namespaces["html"], "img"), - (namespaces["html"], "input"), - (namespaces["html"], "isindex"), - (namespaces["html"], "li"), - (namespaces["html"], "link"), - (namespaces["html"], "listing"), - (namespaces["html"], "marquee"), - (namespaces["html"], "menu"), - (namespaces["html"], "meta"), - (namespaces["html"], "nav"), - (namespaces["html"], "noembed"), - (namespaces["html"], "noframes"), - (namespaces["html"], "noscript"), - (namespaces["html"], "object"), - (namespaces["html"], "ol"), - (namespaces["html"], "p"), - (namespaces["html"], "param"), - (namespaces["html"], "plaintext"), - (namespaces["html"], "pre"), - (namespaces["html"], "script"), - (namespaces["html"], "section"), - (namespaces["html"], "select"), - (namespaces["html"], "style"), - (namespaces["html"], "table"), - (namespaces["html"], "tbody"), - (namespaces["html"], "td"), - (namespaces["html"], "textarea"), - (namespaces["html"], "tfoot"), - (namespaces["html"], "th"), - (namespaces["html"], "thead"), - (namespaces["html"], "title"), - (namespaces["html"], "tr"), - (namespaces["html"], "ul"), - (namespaces["html"], "wbr"), - (namespaces["html"], "xmp"), - (namespaces["svg"], "foreignObject") -)) - -htmlIntegrationPointElements = frozenset(( - (namespaces["mathml"], "annotaion-xml"), - (namespaces["svg"], "foreignObject"), - (namespaces["svg"], "desc"), - (namespaces["svg"], "title") -)) - -mathmlTextIntegrationPointElements = frozenset(( - (namespaces["mathml"], "mi"), - (namespaces["mathml"], "mo"), - (namespaces["mathml"], "mn"), - (namespaces["mathml"], "ms"), - (namespaces["mathml"], "mtext") -)) - -spaceCharacters = frozenset(( - "\t", - "\n", - "\u000C", - " ", - "\r" -)) - -tableInsertModeElements = frozenset(( - "table", - "tbody", - "tfoot", - "thead", - "tr" -)) - -asciiLowercase = frozenset(string.ascii_lowercase) -asciiUppercase = frozenset(string.ascii_uppercase) -asciiLetters = frozenset(string.ascii_letters) -digits = frozenset(string.digits) -hexDigits = frozenset(string.hexdigits) - -asciiUpper2Lower = dict([(ord(c), ord(c.lower())) - for c in string.ascii_uppercase]) - -# Heading elements need to be ordered -headingElements = ( - "h1", - "h2", - "h3", - "h4", - "h5", - "h6" -) - -voidElements = frozenset(( - "base", - "command", - "event-source", - "link", - "meta", - "hr", - "br", - "img", - "embed", - "param", - "area", - "col", - "input", - "source", - "track" -)) - -cdataElements = frozenset(('title', 'textarea')) - -rcdataElements = frozenset(( - 'style', - 'script', - 'xmp', - 'iframe', - 'noembed', - 'noframes', - 'noscript' -)) - -booleanAttributes = { - "": frozenset(("irrelevant",)), - "style": frozenset(("scoped",)), - "img": frozenset(("ismap",)), - "audio": frozenset(("autoplay", "controls")), - "video": frozenset(("autoplay", "controls")), - "script": frozenset(("defer", "async")), - "details": frozenset(("open",)), - "datagrid": frozenset(("multiple", "disabled")), - "command": frozenset(("hidden", "disabled", "checked", "default")), - "hr": frozenset(("noshade")), - "menu": frozenset(("autosubmit",)), - "fieldset": frozenset(("disabled", "readonly")), - "option": frozenset(("disabled", "readonly", "selected")), - "optgroup": frozenset(("disabled", "readonly")), - "button": frozenset(("disabled", "autofocus")), - "input": frozenset(("disabled", "readonly", "required", "autofocus", "checked", "ismap")), - "select": frozenset(("disabled", "readonly", "autofocus", "multiple")), - "output": frozenset(("disabled", "readonly")), -} - -# entitiesWindows1252 has to be _ordered_ and needs to have an index. It -# therefore can't be a frozenset. -entitiesWindows1252 = ( - 8364, # 0x80 0x20AC EURO SIGN - 65533, # 0x81 UNDEFINED - 8218, # 0x82 0x201A SINGLE LOW-9 QUOTATION MARK - 402, # 0x83 0x0192 LATIN SMALL LETTER F WITH HOOK - 8222, # 0x84 0x201E DOUBLE LOW-9 QUOTATION MARK - 8230, # 0x85 0x2026 HORIZONTAL ELLIPSIS - 8224, # 0x86 0x2020 DAGGER - 8225, # 0x87 0x2021 DOUBLE DAGGER - 710, # 0x88 0x02C6 MODIFIER LETTER CIRCUMFLEX ACCENT - 8240, # 0x89 0x2030 PER MILLE SIGN - 352, # 0x8A 0x0160 LATIN CAPITAL LETTER S WITH CARON - 8249, # 0x8B 0x2039 SINGLE LEFT-POINTING ANGLE QUOTATION MARK - 338, # 0x8C 0x0152 LATIN CAPITAL LIGATURE OE - 65533, # 0x8D UNDEFINED - 381, # 0x8E 0x017D LATIN CAPITAL LETTER Z WITH CARON - 65533, # 0x8F UNDEFINED - 65533, # 0x90 UNDEFINED - 8216, # 0x91 0x2018 LEFT SINGLE QUOTATION MARK - 8217, # 0x92 0x2019 RIGHT SINGLE QUOTATION MARK - 8220, # 0x93 0x201C LEFT DOUBLE QUOTATION MARK - 8221, # 0x94 0x201D RIGHT DOUBLE QUOTATION MARK - 8226, # 0x95 0x2022 BULLET - 8211, # 0x96 0x2013 EN DASH - 8212, # 0x97 0x2014 EM DASH - 732, # 0x98 0x02DC SMALL TILDE - 8482, # 0x99 0x2122 TRADE MARK SIGN - 353, # 0x9A 0x0161 LATIN SMALL LETTER S WITH CARON - 8250, # 0x9B 0x203A SINGLE RIGHT-POINTING ANGLE QUOTATION MARK - 339, # 0x9C 0x0153 LATIN SMALL LIGATURE OE - 65533, # 0x9D UNDEFINED - 382, # 0x9E 0x017E LATIN SMALL LETTER Z WITH CARON - 376 # 0x9F 0x0178 LATIN CAPITAL LETTER Y WITH DIAERESIS -) - -xmlEntities = frozenset(('lt;', 'gt;', 'amp;', 'apos;', 'quot;')) - -entities = { - "AElig": "\xc6", - "AElig;": "\xc6", - "AMP": "&", - "AMP;": "&", - "Aacute": "\xc1", - "Aacute;": "\xc1", - "Abreve;": "\u0102", - "Acirc": "\xc2", - "Acirc;": "\xc2", - "Acy;": "\u0410", - "Afr;": "\U0001d504", - "Agrave": "\xc0", - "Agrave;": "\xc0", - "Alpha;": "\u0391", - "Amacr;": "\u0100", - "And;": "\u2a53", - "Aogon;": "\u0104", - "Aopf;": "\U0001d538", - "ApplyFunction;": "\u2061", - "Aring": "\xc5", - "Aring;": "\xc5", - "Ascr;": "\U0001d49c", - "Assign;": "\u2254", - "Atilde": "\xc3", - "Atilde;": "\xc3", - "Auml": "\xc4", - "Auml;": "\xc4", - "Backslash;": "\u2216", - "Barv;": "\u2ae7", - "Barwed;": "\u2306", - "Bcy;": "\u0411", - "Because;": "\u2235", - "Bernoullis;": "\u212c", - "Beta;": "\u0392", - "Bfr;": "\U0001d505", - "Bopf;": "\U0001d539", - "Breve;": "\u02d8", - "Bscr;": "\u212c", - "Bumpeq;": "\u224e", - "CHcy;": "\u0427", - "COPY": "\xa9", - "COPY;": "\xa9", - "Cacute;": "\u0106", - "Cap;": "\u22d2", - "CapitalDifferentialD;": "\u2145", - "Cayleys;": "\u212d", - "Ccaron;": "\u010c", - "Ccedil": "\xc7", - "Ccedil;": "\xc7", - "Ccirc;": "\u0108", - "Cconint;": "\u2230", - "Cdot;": "\u010a", - "Cedilla;": "\xb8", - "CenterDot;": "\xb7", - "Cfr;": "\u212d", - "Chi;": "\u03a7", - "CircleDot;": "\u2299", - "CircleMinus;": "\u2296", - "CirclePlus;": "\u2295", - "CircleTimes;": "\u2297", - "ClockwiseContourIntegral;": "\u2232", - "CloseCurlyDoubleQuote;": "\u201d", - "CloseCurlyQuote;": "\u2019", - "Colon;": "\u2237", - "Colone;": "\u2a74", - "Congruent;": "\u2261", - "Conint;": "\u222f", - "ContourIntegral;": "\u222e", - "Copf;": "\u2102", - "Coproduct;": "\u2210", - "CounterClockwiseContourIntegral;": "\u2233", - "Cross;": "\u2a2f", - "Cscr;": "\U0001d49e", - "Cup;": "\u22d3", - "CupCap;": "\u224d", - "DD;": "\u2145", - "DDotrahd;": "\u2911", - "DJcy;": "\u0402", - "DScy;": "\u0405", - "DZcy;": "\u040f", - "Dagger;": "\u2021", - "Darr;": "\u21a1", - "Dashv;": "\u2ae4", - "Dcaron;": "\u010e", - "Dcy;": "\u0414", - "Del;": "\u2207", - "Delta;": "\u0394", - "Dfr;": "\U0001d507", - "DiacriticalAcute;": "\xb4", - "DiacriticalDot;": "\u02d9", - "DiacriticalDoubleAcute;": "\u02dd", - "DiacriticalGrave;": "`", - "DiacriticalTilde;": "\u02dc", - "Diamond;": "\u22c4", - "DifferentialD;": "\u2146", - "Dopf;": "\U0001d53b", - "Dot;": "\xa8", - "DotDot;": "\u20dc", - "DotEqual;": "\u2250", - "DoubleContourIntegral;": "\u222f", - "DoubleDot;": "\xa8", - "DoubleDownArrow;": "\u21d3", - "DoubleLeftArrow;": "\u21d0", - "DoubleLeftRightArrow;": "\u21d4", - "DoubleLeftTee;": "\u2ae4", - "DoubleLongLeftArrow;": "\u27f8", - "DoubleLongLeftRightArrow;": "\u27fa", - "DoubleLongRightArrow;": "\u27f9", - "DoubleRightArrow;": "\u21d2", - "DoubleRightTee;": "\u22a8", - "DoubleUpArrow;": "\u21d1", - "DoubleUpDownArrow;": "\u21d5", - "DoubleVerticalBar;": "\u2225", - "DownArrow;": "\u2193", - "DownArrowBar;": "\u2913", - "DownArrowUpArrow;": "\u21f5", - "DownBreve;": "\u0311", - "DownLeftRightVector;": "\u2950", - "DownLeftTeeVector;": "\u295e", - "DownLeftVector;": "\u21bd", - "DownLeftVectorBar;": "\u2956", - "DownRightTeeVector;": "\u295f", - "DownRightVector;": "\u21c1", - "DownRightVectorBar;": "\u2957", - "DownTee;": "\u22a4", - "DownTeeArrow;": "\u21a7", - "Downarrow;": "\u21d3", - "Dscr;": "\U0001d49f", - "Dstrok;": "\u0110", - "ENG;": "\u014a", - "ETH": "\xd0", - "ETH;": "\xd0", - "Eacute": "\xc9", - "Eacute;": "\xc9", - "Ecaron;": "\u011a", - "Ecirc": "\xca", - "Ecirc;": "\xca", - "Ecy;": "\u042d", - "Edot;": "\u0116", - "Efr;": "\U0001d508", - "Egrave": "\xc8", - "Egrave;": "\xc8", - "Element;": "\u2208", - "Emacr;": "\u0112", - "EmptySmallSquare;": "\u25fb", - "EmptyVerySmallSquare;": "\u25ab", - "Eogon;": "\u0118", - "Eopf;": "\U0001d53c", - "Epsilon;": "\u0395", - "Equal;": "\u2a75", - "EqualTilde;": "\u2242", - "Equilibrium;": "\u21cc", - "Escr;": "\u2130", - "Esim;": "\u2a73", - "Eta;": "\u0397", - "Euml": "\xcb", - "Euml;": "\xcb", - "Exists;": "\u2203", - "ExponentialE;": "\u2147", - "Fcy;": "\u0424", - "Ffr;": "\U0001d509", - "FilledSmallSquare;": "\u25fc", - "FilledVerySmallSquare;": "\u25aa", - "Fopf;": "\U0001d53d", - "ForAll;": "\u2200", - "Fouriertrf;": "\u2131", - "Fscr;": "\u2131", - "GJcy;": "\u0403", - "GT": ">", - "GT;": ">", - "Gamma;": "\u0393", - "Gammad;": "\u03dc", - "Gbreve;": "\u011e", - "Gcedil;": "\u0122", - "Gcirc;": "\u011c", - "Gcy;": "\u0413", - "Gdot;": "\u0120", - "Gfr;": "\U0001d50a", - "Gg;": "\u22d9", - "Gopf;": "\U0001d53e", - "GreaterEqual;": "\u2265", - "GreaterEqualLess;": "\u22db", - "GreaterFullEqual;": "\u2267", - "GreaterGreater;": "\u2aa2", - "GreaterLess;": "\u2277", - "GreaterSlantEqual;": "\u2a7e", - "GreaterTilde;": "\u2273", - "Gscr;": "\U0001d4a2", - "Gt;": "\u226b", - "HARDcy;": "\u042a", - "Hacek;": "\u02c7", - "Hat;": "^", - "Hcirc;": "\u0124", - "Hfr;": "\u210c", - "HilbertSpace;": "\u210b", - "Hopf;": "\u210d", - "HorizontalLine;": "\u2500", - "Hscr;": "\u210b", - "Hstrok;": "\u0126", - "HumpDownHump;": "\u224e", - "HumpEqual;": "\u224f", - "IEcy;": "\u0415", - "IJlig;": "\u0132", - "IOcy;": "\u0401", - "Iacute": "\xcd", - "Iacute;": "\xcd", - "Icirc": "\xce", - "Icirc;": "\xce", - "Icy;": "\u0418", - "Idot;": "\u0130", - "Ifr;": "\u2111", - "Igrave": "\xcc", - "Igrave;": "\xcc", - "Im;": "\u2111", - "Imacr;": "\u012a", - "ImaginaryI;": "\u2148", - "Implies;": "\u21d2", - "Int;": "\u222c", - "Integral;": "\u222b", - "Intersection;": "\u22c2", - "InvisibleComma;": "\u2063", - "InvisibleTimes;": "\u2062", - "Iogon;": "\u012e", - "Iopf;": "\U0001d540", - "Iota;": "\u0399", - "Iscr;": "\u2110", - "Itilde;": "\u0128", - "Iukcy;": "\u0406", - "Iuml": "\xcf", - "Iuml;": "\xcf", - "Jcirc;": "\u0134", - "Jcy;": "\u0419", - "Jfr;": "\U0001d50d", - "Jopf;": "\U0001d541", - "Jscr;": "\U0001d4a5", - "Jsercy;": "\u0408", - "Jukcy;": "\u0404", - "KHcy;": "\u0425", - "KJcy;": "\u040c", - "Kappa;": "\u039a", - "Kcedil;": "\u0136", - "Kcy;": "\u041a", - "Kfr;": "\U0001d50e", - "Kopf;": "\U0001d542", - "Kscr;": "\U0001d4a6", - "LJcy;": "\u0409", - "LT": "<", - "LT;": "<", - "Lacute;": "\u0139", - "Lambda;": "\u039b", - "Lang;": "\u27ea", - "Laplacetrf;": "\u2112", - "Larr;": "\u219e", - "Lcaron;": "\u013d", - "Lcedil;": "\u013b", - "Lcy;": "\u041b", - "LeftAngleBracket;": "\u27e8", - "LeftArrow;": "\u2190", - "LeftArrowBar;": "\u21e4", - "LeftArrowRightArrow;": "\u21c6", - "LeftCeiling;": "\u2308", - "LeftDoubleBracket;": "\u27e6", - "LeftDownTeeVector;": "\u2961", - "LeftDownVector;": "\u21c3", - "LeftDownVectorBar;": "\u2959", - "LeftFloor;": "\u230a", - "LeftRightArrow;": "\u2194", - "LeftRightVector;": "\u294e", - "LeftTee;": "\u22a3", - "LeftTeeArrow;": "\u21a4", - "LeftTeeVector;": "\u295a", - "LeftTriangle;": "\u22b2", - "LeftTriangleBar;": "\u29cf", - "LeftTriangleEqual;": "\u22b4", - "LeftUpDownVector;": "\u2951", - "LeftUpTeeVector;": "\u2960", - "LeftUpVector;": "\u21bf", - "LeftUpVectorBar;": "\u2958", - "LeftVector;": "\u21bc", - "LeftVectorBar;": "\u2952", - "Leftarrow;": "\u21d0", - "Leftrightarrow;": "\u21d4", - "LessEqualGreater;": "\u22da", - "LessFullEqual;": "\u2266", - "LessGreater;": "\u2276", - "LessLess;": "\u2aa1", - "LessSlantEqual;": "\u2a7d", - "LessTilde;": "\u2272", - "Lfr;": "\U0001d50f", - "Ll;": "\u22d8", - "Lleftarrow;": "\u21da", - "Lmidot;": "\u013f", - "LongLeftArrow;": "\u27f5", - "LongLeftRightArrow;": "\u27f7", - "LongRightArrow;": "\u27f6", - "Longleftarrow;": "\u27f8", - "Longleftrightarrow;": "\u27fa", - "Longrightarrow;": "\u27f9", - "Lopf;": "\U0001d543", - "LowerLeftArrow;": "\u2199", - "LowerRightArrow;": "\u2198", - "Lscr;": "\u2112", - "Lsh;": "\u21b0", - "Lstrok;": "\u0141", - "Lt;": "\u226a", - "Map;": "\u2905", - "Mcy;": "\u041c", - "MediumSpace;": "\u205f", - "Mellintrf;": "\u2133", - "Mfr;": "\U0001d510", - "MinusPlus;": "\u2213", - "Mopf;": "\U0001d544", - "Mscr;": "\u2133", - "Mu;": "\u039c", - "NJcy;": "\u040a", - "Nacute;": "\u0143", - "Ncaron;": "\u0147", - "Ncedil;": "\u0145", - "Ncy;": "\u041d", - "NegativeMediumSpace;": "\u200b", - "NegativeThickSpace;": "\u200b", - "NegativeThinSpace;": "\u200b", - "NegativeVeryThinSpace;": "\u200b", - "NestedGreaterGreater;": "\u226b", - "NestedLessLess;": "\u226a", - "NewLine;": "\n", - "Nfr;": "\U0001d511", - "NoBreak;": "\u2060", - "NonBreakingSpace;": "\xa0", - "Nopf;": "\u2115", - "Not;": "\u2aec", - "NotCongruent;": "\u2262", - "NotCupCap;": "\u226d", - "NotDoubleVerticalBar;": "\u2226", - "NotElement;": "\u2209", - "NotEqual;": "\u2260", - "NotEqualTilde;": "\u2242\u0338", - "NotExists;": "\u2204", - "NotGreater;": "\u226f", - "NotGreaterEqual;": "\u2271", - "NotGreaterFullEqual;": "\u2267\u0338", - "NotGreaterGreater;": "\u226b\u0338", - "NotGreaterLess;": "\u2279", - "NotGreaterSlantEqual;": "\u2a7e\u0338", - "NotGreaterTilde;": "\u2275", - "NotHumpDownHump;": "\u224e\u0338", - "NotHumpEqual;": "\u224f\u0338", - "NotLeftTriangle;": "\u22ea", - "NotLeftTriangleBar;": "\u29cf\u0338", - "NotLeftTriangleEqual;": "\u22ec", - "NotLess;": "\u226e", - "NotLessEqual;": "\u2270", - "NotLessGreater;": "\u2278", - "NotLessLess;": "\u226a\u0338", - "NotLessSlantEqual;": "\u2a7d\u0338", - "NotLessTilde;": "\u2274", - "NotNestedGreaterGreater;": "\u2aa2\u0338", - "NotNestedLessLess;": "\u2aa1\u0338", - "NotPrecedes;": "\u2280", - "NotPrecedesEqual;": "\u2aaf\u0338", - "NotPrecedesSlantEqual;": "\u22e0", - "NotReverseElement;": "\u220c", - "NotRightTriangle;": "\u22eb", - "NotRightTriangleBar;": "\u29d0\u0338", - "NotRightTriangleEqual;": "\u22ed", - "NotSquareSubset;": "\u228f\u0338", - "NotSquareSubsetEqual;": "\u22e2", - "NotSquareSuperset;": "\u2290\u0338", - "NotSquareSupersetEqual;": "\u22e3", - "NotSubset;": "\u2282\u20d2", - "NotSubsetEqual;": "\u2288", - "NotSucceeds;": "\u2281", - "NotSucceedsEqual;": "\u2ab0\u0338", - "NotSucceedsSlantEqual;": "\u22e1", - "NotSucceedsTilde;": "\u227f\u0338", - "NotSuperset;": "\u2283\u20d2", - "NotSupersetEqual;": "\u2289", - "NotTilde;": "\u2241", - "NotTildeEqual;": "\u2244", - "NotTildeFullEqual;": "\u2247", - "NotTildeTilde;": "\u2249", - "NotVerticalBar;": "\u2224", - "Nscr;": "\U0001d4a9", - "Ntilde": "\xd1", - "Ntilde;": "\xd1", - "Nu;": "\u039d", - "OElig;": "\u0152", - "Oacute": "\xd3", - "Oacute;": "\xd3", - "Ocirc": "\xd4", - "Ocirc;": "\xd4", - "Ocy;": "\u041e", - "Odblac;": "\u0150", - "Ofr;": "\U0001d512", - "Ograve": "\xd2", - "Ograve;": "\xd2", - "Omacr;": "\u014c", - "Omega;": "\u03a9", - "Omicron;": "\u039f", - "Oopf;": "\U0001d546", - "OpenCurlyDoubleQuote;": "\u201c", - "OpenCurlyQuote;": "\u2018", - "Or;": "\u2a54", - "Oscr;": "\U0001d4aa", - "Oslash": "\xd8", - "Oslash;": "\xd8", - "Otilde": "\xd5", - "Otilde;": "\xd5", - "Otimes;": "\u2a37", - "Ouml": "\xd6", - "Ouml;": "\xd6", - "OverBar;": "\u203e", - "OverBrace;": "\u23de", - "OverBracket;": "\u23b4", - "OverParenthesis;": "\u23dc", - "PartialD;": "\u2202", - "Pcy;": "\u041f", - "Pfr;": "\U0001d513", - "Phi;": "\u03a6", - "Pi;": "\u03a0", - "PlusMinus;": "\xb1", - "Poincareplane;": "\u210c", - "Popf;": "\u2119", - "Pr;": "\u2abb", - "Precedes;": "\u227a", - "PrecedesEqual;": "\u2aaf", - "PrecedesSlantEqual;": "\u227c", - "PrecedesTilde;": "\u227e", - "Prime;": "\u2033", - "Product;": "\u220f", - "Proportion;": "\u2237", - "Proportional;": "\u221d", - "Pscr;": "\U0001d4ab", - "Psi;": "\u03a8", - "QUOT": "\"", - "QUOT;": "\"", - "Qfr;": "\U0001d514", - "Qopf;": "\u211a", - "Qscr;": "\U0001d4ac", - "RBarr;": "\u2910", - "REG": "\xae", - "REG;": "\xae", - "Racute;": "\u0154", - "Rang;": "\u27eb", - "Rarr;": "\u21a0", - "Rarrtl;": "\u2916", - "Rcaron;": "\u0158", - "Rcedil;": "\u0156", - "Rcy;": "\u0420", - "Re;": "\u211c", - "ReverseElement;": "\u220b", - "ReverseEquilibrium;": "\u21cb", - "ReverseUpEquilibrium;": "\u296f", - "Rfr;": "\u211c", - "Rho;": "\u03a1", - "RightAngleBracket;": "\u27e9", - "RightArrow;": "\u2192", - "RightArrowBar;": "\u21e5", - "RightArrowLeftArrow;": "\u21c4", - "RightCeiling;": "\u2309", - "RightDoubleBracket;": "\u27e7", - "RightDownTeeVector;": "\u295d", - "RightDownVector;": "\u21c2", - "RightDownVectorBar;": "\u2955", - "RightFloor;": "\u230b", - "RightTee;": "\u22a2", - "RightTeeArrow;": "\u21a6", - "RightTeeVector;": "\u295b", - "RightTriangle;": "\u22b3", - "RightTriangleBar;": "\u29d0", - "RightTriangleEqual;": "\u22b5", - "RightUpDownVector;": "\u294f", - "RightUpTeeVector;": "\u295c", - "RightUpVector;": "\u21be", - "RightUpVectorBar;": "\u2954", - "RightVector;": "\u21c0", - "RightVectorBar;": "\u2953", - "Rightarrow;": "\u21d2", - "Ropf;": "\u211d", - "RoundImplies;": "\u2970", - "Rrightarrow;": "\u21db", - "Rscr;": "\u211b", - "Rsh;": "\u21b1", - "RuleDelayed;": "\u29f4", - "SHCHcy;": "\u0429", - "SHcy;": "\u0428", - "SOFTcy;": "\u042c", - "Sacute;": "\u015a", - "Sc;": "\u2abc", - "Scaron;": "\u0160", - "Scedil;": "\u015e", - "Scirc;": "\u015c", - "Scy;": "\u0421", - "Sfr;": "\U0001d516", - "ShortDownArrow;": "\u2193", - "ShortLeftArrow;": "\u2190", - "ShortRightArrow;": "\u2192", - "ShortUpArrow;": "\u2191", - "Sigma;": "\u03a3", - "SmallCircle;": "\u2218", - "Sopf;": "\U0001d54a", - "Sqrt;": "\u221a", - "Square;": "\u25a1", - "SquareIntersection;": "\u2293", - "SquareSubset;": "\u228f", - "SquareSubsetEqual;": "\u2291", - "SquareSuperset;": "\u2290", - "SquareSupersetEqual;": "\u2292", - "SquareUnion;": "\u2294", - "Sscr;": "\U0001d4ae", - "Star;": "\u22c6", - "Sub;": "\u22d0", - "Subset;": "\u22d0", - "SubsetEqual;": "\u2286", - "Succeeds;": "\u227b", - "SucceedsEqual;": "\u2ab0", - "SucceedsSlantEqual;": "\u227d", - "SucceedsTilde;": "\u227f", - "SuchThat;": "\u220b", - "Sum;": "\u2211", - "Sup;": "\u22d1", - "Superset;": "\u2283", - "SupersetEqual;": "\u2287", - "Supset;": "\u22d1", - "THORN": "\xde", - "THORN;": "\xde", - "TRADE;": "\u2122", - "TSHcy;": "\u040b", - "TScy;": "\u0426", - "Tab;": "\t", - "Tau;": "\u03a4", - "Tcaron;": "\u0164", - "Tcedil;": "\u0162", - "Tcy;": "\u0422", - "Tfr;": "\U0001d517", - "Therefore;": "\u2234", - "Theta;": "\u0398", - "ThickSpace;": "\u205f\u200a", - "ThinSpace;": "\u2009", - "Tilde;": "\u223c", - "TildeEqual;": "\u2243", - "TildeFullEqual;": "\u2245", - "TildeTilde;": "\u2248", - "Topf;": "\U0001d54b", - "TripleDot;": "\u20db", - "Tscr;": "\U0001d4af", - "Tstrok;": "\u0166", - "Uacute": "\xda", - "Uacute;": "\xda", - "Uarr;": "\u219f", - "Uarrocir;": "\u2949", - "Ubrcy;": "\u040e", - "Ubreve;": "\u016c", - "Ucirc": "\xdb", - "Ucirc;": "\xdb", - "Ucy;": "\u0423", - "Udblac;": "\u0170", - "Ufr;": "\U0001d518", - "Ugrave": "\xd9", - "Ugrave;": "\xd9", - "Umacr;": "\u016a", - "UnderBar;": "_", - "UnderBrace;": "\u23df", - "UnderBracket;": "\u23b5", - "UnderParenthesis;": "\u23dd", - "Union;": "\u22c3", - "UnionPlus;": "\u228e", - "Uogon;": "\u0172", - "Uopf;": "\U0001d54c", - "UpArrow;": "\u2191", - "UpArrowBar;": "\u2912", - "UpArrowDownArrow;": "\u21c5", - "UpDownArrow;": "\u2195", - "UpEquilibrium;": "\u296e", - "UpTee;": "\u22a5", - "UpTeeArrow;": "\u21a5", - "Uparrow;": "\u21d1", - "Updownarrow;": "\u21d5", - "UpperLeftArrow;": "\u2196", - "UpperRightArrow;": "\u2197", - "Upsi;": "\u03d2", - "Upsilon;": "\u03a5", - "Uring;": "\u016e", - "Uscr;": "\U0001d4b0", - "Utilde;": "\u0168", - "Uuml": "\xdc", - "Uuml;": "\xdc", - "VDash;": "\u22ab", - "Vbar;": "\u2aeb", - "Vcy;": "\u0412", - "Vdash;": "\u22a9", - "Vdashl;": "\u2ae6", - "Vee;": "\u22c1", - "Verbar;": "\u2016", - "Vert;": "\u2016", - "VerticalBar;": "\u2223", - "VerticalLine;": "|", - "VerticalSeparator;": "\u2758", - "VerticalTilde;": "\u2240", - "VeryThinSpace;": "\u200a", - "Vfr;": "\U0001d519", - "Vopf;": "\U0001d54d", - "Vscr;": "\U0001d4b1", - "Vvdash;": "\u22aa", - "Wcirc;": "\u0174", - "Wedge;": "\u22c0", - "Wfr;": "\U0001d51a", - "Wopf;": "\U0001d54e", - "Wscr;": "\U0001d4b2", - "Xfr;": "\U0001d51b", - "Xi;": "\u039e", - "Xopf;": "\U0001d54f", - "Xscr;": "\U0001d4b3", - "YAcy;": "\u042f", - "YIcy;": "\u0407", - "YUcy;": "\u042e", - "Yacute": "\xdd", - "Yacute;": "\xdd", - "Ycirc;": "\u0176", - "Ycy;": "\u042b", - "Yfr;": "\U0001d51c", - "Yopf;": "\U0001d550", - "Yscr;": "\U0001d4b4", - "Yuml;": "\u0178", - "ZHcy;": "\u0416", - "Zacute;": "\u0179", - "Zcaron;": "\u017d", - "Zcy;": "\u0417", - "Zdot;": "\u017b", - "ZeroWidthSpace;": "\u200b", - "Zeta;": "\u0396", - "Zfr;": "\u2128", - "Zopf;": "\u2124", - "Zscr;": "\U0001d4b5", - "aacute": "\xe1", - "aacute;": "\xe1", - "abreve;": "\u0103", - "ac;": "\u223e", - "acE;": "\u223e\u0333", - "acd;": "\u223f", - "acirc": "\xe2", - "acirc;": "\xe2", - "acute": "\xb4", - "acute;": "\xb4", - "acy;": "\u0430", - "aelig": "\xe6", - "aelig;": "\xe6", - "af;": "\u2061", - "afr;": "\U0001d51e", - "agrave": "\xe0", - "agrave;": "\xe0", - "alefsym;": "\u2135", - "aleph;": "\u2135", - "alpha;": "\u03b1", - "amacr;": "\u0101", - "amalg;": "\u2a3f", - "amp": "&", - "amp;": "&", - "and;": "\u2227", - "andand;": "\u2a55", - "andd;": "\u2a5c", - "andslope;": "\u2a58", - "andv;": "\u2a5a", - "ang;": "\u2220", - "ange;": "\u29a4", - "angle;": "\u2220", - "angmsd;": "\u2221", - "angmsdaa;": "\u29a8", - "angmsdab;": "\u29a9", - "angmsdac;": "\u29aa", - "angmsdad;": "\u29ab", - "angmsdae;": "\u29ac", - "angmsdaf;": "\u29ad", - "angmsdag;": "\u29ae", - "angmsdah;": "\u29af", - "angrt;": "\u221f", - "angrtvb;": "\u22be", - "angrtvbd;": "\u299d", - "angsph;": "\u2222", - "angst;": "\xc5", - "angzarr;": "\u237c", - "aogon;": "\u0105", - "aopf;": "\U0001d552", - "ap;": "\u2248", - "apE;": "\u2a70", - "apacir;": "\u2a6f", - "ape;": "\u224a", - "apid;": "\u224b", - "apos;": "'", - "approx;": "\u2248", - "approxeq;": "\u224a", - "aring": "\xe5", - "aring;": "\xe5", - "ascr;": "\U0001d4b6", - "ast;": "*", - "asymp;": "\u2248", - "asympeq;": "\u224d", - "atilde": "\xe3", - "atilde;": "\xe3", - "auml": "\xe4", - "auml;": "\xe4", - "awconint;": "\u2233", - "awint;": "\u2a11", - "bNot;": "\u2aed", - "backcong;": "\u224c", - "backepsilon;": "\u03f6", - "backprime;": "\u2035", - "backsim;": "\u223d", - "backsimeq;": "\u22cd", - "barvee;": "\u22bd", - "barwed;": "\u2305", - "barwedge;": "\u2305", - "bbrk;": "\u23b5", - "bbrktbrk;": "\u23b6", - "bcong;": "\u224c", - "bcy;": "\u0431", - "bdquo;": "\u201e", - "becaus;": "\u2235", - "because;": "\u2235", - "bemptyv;": "\u29b0", - "bepsi;": "\u03f6", - "bernou;": "\u212c", - "beta;": "\u03b2", - "beth;": "\u2136", - "between;": "\u226c", - "bfr;": "\U0001d51f", - "bigcap;": "\u22c2", - "bigcirc;": "\u25ef", - "bigcup;": "\u22c3", - "bigodot;": "\u2a00", - "bigoplus;": "\u2a01", - "bigotimes;": "\u2a02", - "bigsqcup;": "\u2a06", - "bigstar;": "\u2605", - "bigtriangledown;": "\u25bd", - "bigtriangleup;": "\u25b3", - "biguplus;": "\u2a04", - "bigvee;": "\u22c1", - "bigwedge;": "\u22c0", - "bkarow;": "\u290d", - "blacklozenge;": "\u29eb", - "blacksquare;": "\u25aa", - "blacktriangle;": "\u25b4", - "blacktriangledown;": "\u25be", - "blacktriangleleft;": "\u25c2", - "blacktriangleright;": "\u25b8", - "blank;": "\u2423", - "blk12;": "\u2592", - "blk14;": "\u2591", - "blk34;": "\u2593", - "block;": "\u2588", - "bne;": "=\u20e5", - "bnequiv;": "\u2261\u20e5", - "bnot;": "\u2310", - "bopf;": "\U0001d553", - "bot;": "\u22a5", - "bottom;": "\u22a5", - "bowtie;": "\u22c8", - "boxDL;": "\u2557", - "boxDR;": "\u2554", - "boxDl;": "\u2556", - "boxDr;": "\u2553", - "boxH;": "\u2550", - "boxHD;": "\u2566", - "boxHU;": "\u2569", - "boxHd;": "\u2564", - "boxHu;": "\u2567", - "boxUL;": "\u255d", - "boxUR;": "\u255a", - "boxUl;": "\u255c", - "boxUr;": "\u2559", - "boxV;": "\u2551", - "boxVH;": "\u256c", - "boxVL;": "\u2563", - "boxVR;": "\u2560", - "boxVh;": "\u256b", - "boxVl;": "\u2562", - "boxVr;": "\u255f", - "boxbox;": "\u29c9", - "boxdL;": "\u2555", - "boxdR;": "\u2552", - "boxdl;": "\u2510", - "boxdr;": "\u250c", - "boxh;": "\u2500", - "boxhD;": "\u2565", - "boxhU;": "\u2568", - "boxhd;": "\u252c", - "boxhu;": "\u2534", - "boxminus;": "\u229f", - "boxplus;": "\u229e", - "boxtimes;": "\u22a0", - "boxuL;": "\u255b", - "boxuR;": "\u2558", - "boxul;": "\u2518", - "boxur;": "\u2514", - "boxv;": "\u2502", - "boxvH;": "\u256a", - "boxvL;": "\u2561", - "boxvR;": "\u255e", - "boxvh;": "\u253c", - "boxvl;": "\u2524", - "boxvr;": "\u251c", - "bprime;": "\u2035", - "breve;": "\u02d8", - "brvbar": "\xa6", - "brvbar;": "\xa6", - "bscr;": "\U0001d4b7", - "bsemi;": "\u204f", - "bsim;": "\u223d", - "bsime;": "\u22cd", - "bsol;": "\\", - "bsolb;": "\u29c5", - "bsolhsub;": "\u27c8", - "bull;": "\u2022", - "bullet;": "\u2022", - "bump;": "\u224e", - "bumpE;": "\u2aae", - "bumpe;": "\u224f", - "bumpeq;": "\u224f", - "cacute;": "\u0107", - "cap;": "\u2229", - "capand;": "\u2a44", - "capbrcup;": "\u2a49", - "capcap;": "\u2a4b", - "capcup;": "\u2a47", - "capdot;": "\u2a40", - "caps;": "\u2229\ufe00", - "caret;": "\u2041", - "caron;": "\u02c7", - "ccaps;": "\u2a4d", - "ccaron;": "\u010d", - "ccedil": "\xe7", - "ccedil;": "\xe7", - "ccirc;": "\u0109", - "ccups;": "\u2a4c", - "ccupssm;": "\u2a50", - "cdot;": "\u010b", - "cedil": "\xb8", - "cedil;": "\xb8", - "cemptyv;": "\u29b2", - "cent": "\xa2", - "cent;": "\xa2", - "centerdot;": "\xb7", - "cfr;": "\U0001d520", - "chcy;": "\u0447", - "check;": "\u2713", - "checkmark;": "\u2713", - "chi;": "\u03c7", - "cir;": "\u25cb", - "cirE;": "\u29c3", - "circ;": "\u02c6", - "circeq;": "\u2257", - "circlearrowleft;": "\u21ba", - "circlearrowright;": "\u21bb", - "circledR;": "\xae", - "circledS;": "\u24c8", - "circledast;": "\u229b", - "circledcirc;": "\u229a", - "circleddash;": "\u229d", - "cire;": "\u2257", - "cirfnint;": "\u2a10", - "cirmid;": "\u2aef", - "cirscir;": "\u29c2", - "clubs;": "\u2663", - "clubsuit;": "\u2663", - "colon;": ":", - "colone;": "\u2254", - "coloneq;": "\u2254", - "comma;": ",", - "commat;": "@", - "comp;": "\u2201", - "compfn;": "\u2218", - "complement;": "\u2201", - "complexes;": "\u2102", - "cong;": "\u2245", - "congdot;": "\u2a6d", - "conint;": "\u222e", - "copf;": "\U0001d554", - "coprod;": "\u2210", - "copy": "\xa9", - "copy;": "\xa9", - "copysr;": "\u2117", - "crarr;": "\u21b5", - "cross;": "\u2717", - "cscr;": "\U0001d4b8", - "csub;": "\u2acf", - "csube;": "\u2ad1", - "csup;": "\u2ad0", - "csupe;": "\u2ad2", - "ctdot;": "\u22ef", - "cudarrl;": "\u2938", - "cudarrr;": "\u2935", - "cuepr;": "\u22de", - "cuesc;": "\u22df", - "cularr;": "\u21b6", - "cularrp;": "\u293d", - "cup;": "\u222a", - "cupbrcap;": "\u2a48", - "cupcap;": "\u2a46", - "cupcup;": "\u2a4a", - "cupdot;": "\u228d", - "cupor;": "\u2a45", - "cups;": "\u222a\ufe00", - "curarr;": "\u21b7", - "curarrm;": "\u293c", - "curlyeqprec;": "\u22de", - "curlyeqsucc;": "\u22df", - "curlyvee;": "\u22ce", - "curlywedge;": "\u22cf", - "curren": "\xa4", - "curren;": "\xa4", - "curvearrowleft;": "\u21b6", - "curvearrowright;": "\u21b7", - "cuvee;": "\u22ce", - "cuwed;": "\u22cf", - "cwconint;": "\u2232", - "cwint;": "\u2231", - "cylcty;": "\u232d", - "dArr;": "\u21d3", - "dHar;": "\u2965", - "dagger;": "\u2020", - "daleth;": "\u2138", - "darr;": "\u2193", - "dash;": "\u2010", - "dashv;": "\u22a3", - "dbkarow;": "\u290f", - "dblac;": "\u02dd", - "dcaron;": "\u010f", - "dcy;": "\u0434", - "dd;": "\u2146", - "ddagger;": "\u2021", - "ddarr;": "\u21ca", - "ddotseq;": "\u2a77", - "deg": "\xb0", - "deg;": "\xb0", - "delta;": "\u03b4", - "demptyv;": "\u29b1", - "dfisht;": "\u297f", - "dfr;": "\U0001d521", - "dharl;": "\u21c3", - "dharr;": "\u21c2", - "diam;": "\u22c4", - "diamond;": "\u22c4", - "diamondsuit;": "\u2666", - "diams;": "\u2666", - "die;": "\xa8", - "digamma;": "\u03dd", - "disin;": "\u22f2", - "div;": "\xf7", - "divide": "\xf7", - "divide;": "\xf7", - "divideontimes;": "\u22c7", - "divonx;": "\u22c7", - "djcy;": "\u0452", - "dlcorn;": "\u231e", - "dlcrop;": "\u230d", - "dollar;": "$", - "dopf;": "\U0001d555", - "dot;": "\u02d9", - "doteq;": "\u2250", - "doteqdot;": "\u2251", - "dotminus;": "\u2238", - "dotplus;": "\u2214", - "dotsquare;": "\u22a1", - "doublebarwedge;": "\u2306", - "downarrow;": "\u2193", - "downdownarrows;": "\u21ca", - "downharpoonleft;": "\u21c3", - "downharpoonright;": "\u21c2", - "drbkarow;": "\u2910", - "drcorn;": "\u231f", - "drcrop;": "\u230c", - "dscr;": "\U0001d4b9", - "dscy;": "\u0455", - "dsol;": "\u29f6", - "dstrok;": "\u0111", - "dtdot;": "\u22f1", - "dtri;": "\u25bf", - "dtrif;": "\u25be", - "duarr;": "\u21f5", - "duhar;": "\u296f", - "dwangle;": "\u29a6", - "dzcy;": "\u045f", - "dzigrarr;": "\u27ff", - "eDDot;": "\u2a77", - "eDot;": "\u2251", - "eacute": "\xe9", - "eacute;": "\xe9", - "easter;": "\u2a6e", - "ecaron;": "\u011b", - "ecir;": "\u2256", - "ecirc": "\xea", - "ecirc;": "\xea", - "ecolon;": "\u2255", - "ecy;": "\u044d", - "edot;": "\u0117", - "ee;": "\u2147", - "efDot;": "\u2252", - "efr;": "\U0001d522", - "eg;": "\u2a9a", - "egrave": "\xe8", - "egrave;": "\xe8", - "egs;": "\u2a96", - "egsdot;": "\u2a98", - "el;": "\u2a99", - "elinters;": "\u23e7", - "ell;": "\u2113", - "els;": "\u2a95", - "elsdot;": "\u2a97", - "emacr;": "\u0113", - "empty;": "\u2205", - "emptyset;": "\u2205", - "emptyv;": "\u2205", - "emsp13;": "\u2004", - "emsp14;": "\u2005", - "emsp;": "\u2003", - "eng;": "\u014b", - "ensp;": "\u2002", - "eogon;": "\u0119", - "eopf;": "\U0001d556", - "epar;": "\u22d5", - "eparsl;": "\u29e3", - "eplus;": "\u2a71", - "epsi;": "\u03b5", - "epsilon;": "\u03b5", - "epsiv;": "\u03f5", - "eqcirc;": "\u2256", - "eqcolon;": "\u2255", - "eqsim;": "\u2242", - "eqslantgtr;": "\u2a96", - "eqslantless;": "\u2a95", - "equals;": "=", - "equest;": "\u225f", - "equiv;": "\u2261", - "equivDD;": "\u2a78", - "eqvparsl;": "\u29e5", - "erDot;": "\u2253", - "erarr;": "\u2971", - "escr;": "\u212f", - "esdot;": "\u2250", - "esim;": "\u2242", - "eta;": "\u03b7", - "eth": "\xf0", - "eth;": "\xf0", - "euml": "\xeb", - "euml;": "\xeb", - "euro;": "\u20ac", - "excl;": "!", - "exist;": "\u2203", - "expectation;": "\u2130", - "exponentiale;": "\u2147", - "fallingdotseq;": "\u2252", - "fcy;": "\u0444", - "female;": "\u2640", - "ffilig;": "\ufb03", - "fflig;": "\ufb00", - "ffllig;": "\ufb04", - "ffr;": "\U0001d523", - "filig;": "\ufb01", - "fjlig;": "fj", - "flat;": "\u266d", - "fllig;": "\ufb02", - "fltns;": "\u25b1", - "fnof;": "\u0192", - "fopf;": "\U0001d557", - "forall;": "\u2200", - "fork;": "\u22d4", - "forkv;": "\u2ad9", - "fpartint;": "\u2a0d", - "frac12": "\xbd", - "frac12;": "\xbd", - "frac13;": "\u2153", - "frac14": "\xbc", - "frac14;": "\xbc", - "frac15;": "\u2155", - "frac16;": "\u2159", - "frac18;": "\u215b", - "frac23;": "\u2154", - "frac25;": "\u2156", - "frac34": "\xbe", - "frac34;": "\xbe", - "frac35;": "\u2157", - "frac38;": "\u215c", - "frac45;": "\u2158", - "frac56;": "\u215a", - "frac58;": "\u215d", - "frac78;": "\u215e", - "frasl;": "\u2044", - "frown;": "\u2322", - "fscr;": "\U0001d4bb", - "gE;": "\u2267", - "gEl;": "\u2a8c", - "gacute;": "\u01f5", - "gamma;": "\u03b3", - "gammad;": "\u03dd", - "gap;": "\u2a86", - "gbreve;": "\u011f", - "gcirc;": "\u011d", - "gcy;": "\u0433", - "gdot;": "\u0121", - "ge;": "\u2265", - "gel;": "\u22db", - "geq;": "\u2265", - "geqq;": "\u2267", - "geqslant;": "\u2a7e", - "ges;": "\u2a7e", - "gescc;": "\u2aa9", - "gesdot;": "\u2a80", - "gesdoto;": "\u2a82", - "gesdotol;": "\u2a84", - "gesl;": "\u22db\ufe00", - "gesles;": "\u2a94", - "gfr;": "\U0001d524", - "gg;": "\u226b", - "ggg;": "\u22d9", - "gimel;": "\u2137", - "gjcy;": "\u0453", - "gl;": "\u2277", - "glE;": "\u2a92", - "gla;": "\u2aa5", - "glj;": "\u2aa4", - "gnE;": "\u2269", - "gnap;": "\u2a8a", - "gnapprox;": "\u2a8a", - "gne;": "\u2a88", - "gneq;": "\u2a88", - "gneqq;": "\u2269", - "gnsim;": "\u22e7", - "gopf;": "\U0001d558", - "grave;": "`", - "gscr;": "\u210a", - "gsim;": "\u2273", - "gsime;": "\u2a8e", - "gsiml;": "\u2a90", - "gt": ">", - "gt;": ">", - "gtcc;": "\u2aa7", - "gtcir;": "\u2a7a", - "gtdot;": "\u22d7", - "gtlPar;": "\u2995", - "gtquest;": "\u2a7c", - "gtrapprox;": "\u2a86", - "gtrarr;": "\u2978", - "gtrdot;": "\u22d7", - "gtreqless;": "\u22db", - "gtreqqless;": "\u2a8c", - "gtrless;": "\u2277", - "gtrsim;": "\u2273", - "gvertneqq;": "\u2269\ufe00", - "gvnE;": "\u2269\ufe00", - "hArr;": "\u21d4", - "hairsp;": "\u200a", - "half;": "\xbd", - "hamilt;": "\u210b", - "hardcy;": "\u044a", - "harr;": "\u2194", - "harrcir;": "\u2948", - "harrw;": "\u21ad", - "hbar;": "\u210f", - "hcirc;": "\u0125", - "hearts;": "\u2665", - "heartsuit;": "\u2665", - "hellip;": "\u2026", - "hercon;": "\u22b9", - "hfr;": "\U0001d525", - "hksearow;": "\u2925", - "hkswarow;": "\u2926", - "hoarr;": "\u21ff", - "homtht;": "\u223b", - "hookleftarrow;": "\u21a9", - "hookrightarrow;": "\u21aa", - "hopf;": "\U0001d559", - "horbar;": "\u2015", - "hscr;": "\U0001d4bd", - "hslash;": "\u210f", - "hstrok;": "\u0127", - "hybull;": "\u2043", - "hyphen;": "\u2010", - "iacute": "\xed", - "iacute;": "\xed", - "ic;": "\u2063", - "icirc": "\xee", - "icirc;": "\xee", - "icy;": "\u0438", - "iecy;": "\u0435", - "iexcl": "\xa1", - "iexcl;": "\xa1", - "iff;": "\u21d4", - "ifr;": "\U0001d526", - "igrave": "\xec", - "igrave;": "\xec", - "ii;": "\u2148", - "iiiint;": "\u2a0c", - "iiint;": "\u222d", - "iinfin;": "\u29dc", - "iiota;": "\u2129", - "ijlig;": "\u0133", - "imacr;": "\u012b", - "image;": "\u2111", - "imagline;": "\u2110", - "imagpart;": "\u2111", - "imath;": "\u0131", - "imof;": "\u22b7", - "imped;": "\u01b5", - "in;": "\u2208", - "incare;": "\u2105", - "infin;": "\u221e", - "infintie;": "\u29dd", - "inodot;": "\u0131", - "int;": "\u222b", - "intcal;": "\u22ba", - "integers;": "\u2124", - "intercal;": "\u22ba", - "intlarhk;": "\u2a17", - "intprod;": "\u2a3c", - "iocy;": "\u0451", - "iogon;": "\u012f", - "iopf;": "\U0001d55a", - "iota;": "\u03b9", - "iprod;": "\u2a3c", - "iquest": "\xbf", - "iquest;": "\xbf", - "iscr;": "\U0001d4be", - "isin;": "\u2208", - "isinE;": "\u22f9", - "isindot;": "\u22f5", - "isins;": "\u22f4", - "isinsv;": "\u22f3", - "isinv;": "\u2208", - "it;": "\u2062", - "itilde;": "\u0129", - "iukcy;": "\u0456", - "iuml": "\xef", - "iuml;": "\xef", - "jcirc;": "\u0135", - "jcy;": "\u0439", - "jfr;": "\U0001d527", - "jmath;": "\u0237", - "jopf;": "\U0001d55b", - "jscr;": "\U0001d4bf", - "jsercy;": "\u0458", - "jukcy;": "\u0454", - "kappa;": "\u03ba", - "kappav;": "\u03f0", - "kcedil;": "\u0137", - "kcy;": "\u043a", - "kfr;": "\U0001d528", - "kgreen;": "\u0138", - "khcy;": "\u0445", - "kjcy;": "\u045c", - "kopf;": "\U0001d55c", - "kscr;": "\U0001d4c0", - "lAarr;": "\u21da", - "lArr;": "\u21d0", - "lAtail;": "\u291b", - "lBarr;": "\u290e", - "lE;": "\u2266", - "lEg;": "\u2a8b", - "lHar;": "\u2962", - "lacute;": "\u013a", - "laemptyv;": "\u29b4", - "lagran;": "\u2112", - "lambda;": "\u03bb", - "lang;": "\u27e8", - "langd;": "\u2991", - "langle;": "\u27e8", - "lap;": "\u2a85", - "laquo": "\xab", - "laquo;": "\xab", - "larr;": "\u2190", - "larrb;": "\u21e4", - "larrbfs;": "\u291f", - "larrfs;": "\u291d", - "larrhk;": "\u21a9", - "larrlp;": "\u21ab", - "larrpl;": "\u2939", - "larrsim;": "\u2973", - "larrtl;": "\u21a2", - "lat;": "\u2aab", - "latail;": "\u2919", - "late;": "\u2aad", - "lates;": "\u2aad\ufe00", - "lbarr;": "\u290c", - "lbbrk;": "\u2772", - "lbrace;": "{", - "lbrack;": "[", - "lbrke;": "\u298b", - "lbrksld;": "\u298f", - "lbrkslu;": "\u298d", - "lcaron;": "\u013e", - "lcedil;": "\u013c", - "lceil;": "\u2308", - "lcub;": "{", - "lcy;": "\u043b", - "ldca;": "\u2936", - "ldquo;": "\u201c", - "ldquor;": "\u201e", - "ldrdhar;": "\u2967", - "ldrushar;": "\u294b", - "ldsh;": "\u21b2", - "le;": "\u2264", - "leftarrow;": "\u2190", - "leftarrowtail;": "\u21a2", - "leftharpoondown;": "\u21bd", - "leftharpoonup;": "\u21bc", - "leftleftarrows;": "\u21c7", - "leftrightarrow;": "\u2194", - "leftrightarrows;": "\u21c6", - "leftrightharpoons;": "\u21cb", - "leftrightsquigarrow;": "\u21ad", - "leftthreetimes;": "\u22cb", - "leg;": "\u22da", - "leq;": "\u2264", - "leqq;": "\u2266", - "leqslant;": "\u2a7d", - "les;": "\u2a7d", - "lescc;": "\u2aa8", - "lesdot;": "\u2a7f", - "lesdoto;": "\u2a81", - "lesdotor;": "\u2a83", - "lesg;": "\u22da\ufe00", - "lesges;": "\u2a93", - "lessapprox;": "\u2a85", - "lessdot;": "\u22d6", - "lesseqgtr;": "\u22da", - "lesseqqgtr;": "\u2a8b", - "lessgtr;": "\u2276", - "lesssim;": "\u2272", - "lfisht;": "\u297c", - "lfloor;": "\u230a", - "lfr;": "\U0001d529", - "lg;": "\u2276", - "lgE;": "\u2a91", - "lhard;": "\u21bd", - "lharu;": "\u21bc", - "lharul;": "\u296a", - "lhblk;": "\u2584", - "ljcy;": "\u0459", - "ll;": "\u226a", - "llarr;": "\u21c7", - "llcorner;": "\u231e", - "llhard;": "\u296b", - "lltri;": "\u25fa", - "lmidot;": "\u0140", - "lmoust;": "\u23b0", - "lmoustache;": "\u23b0", - "lnE;": "\u2268", - "lnap;": "\u2a89", - "lnapprox;": "\u2a89", - "lne;": "\u2a87", - "lneq;": "\u2a87", - "lneqq;": "\u2268", - "lnsim;": "\u22e6", - "loang;": "\u27ec", - "loarr;": "\u21fd", - "lobrk;": "\u27e6", - "longleftarrow;": "\u27f5", - "longleftrightarrow;": "\u27f7", - "longmapsto;": "\u27fc", - "longrightarrow;": "\u27f6", - "looparrowleft;": "\u21ab", - "looparrowright;": "\u21ac", - "lopar;": "\u2985", - "lopf;": "\U0001d55d", - "loplus;": "\u2a2d", - "lotimes;": "\u2a34", - "lowast;": "\u2217", - "lowbar;": "_", - "loz;": "\u25ca", - "lozenge;": "\u25ca", - "lozf;": "\u29eb", - "lpar;": "(", - "lparlt;": "\u2993", - "lrarr;": "\u21c6", - "lrcorner;": "\u231f", - "lrhar;": "\u21cb", - "lrhard;": "\u296d", - "lrm;": "\u200e", - "lrtri;": "\u22bf", - "lsaquo;": "\u2039", - "lscr;": "\U0001d4c1", - "lsh;": "\u21b0", - "lsim;": "\u2272", - "lsime;": "\u2a8d", - "lsimg;": "\u2a8f", - "lsqb;": "[", - "lsquo;": "\u2018", - "lsquor;": "\u201a", - "lstrok;": "\u0142", - "lt": "<", - "lt;": "<", - "ltcc;": "\u2aa6", - "ltcir;": "\u2a79", - "ltdot;": "\u22d6", - "lthree;": "\u22cb", - "ltimes;": "\u22c9", - "ltlarr;": "\u2976", - "ltquest;": "\u2a7b", - "ltrPar;": "\u2996", - "ltri;": "\u25c3", - "ltrie;": "\u22b4", - "ltrif;": "\u25c2", - "lurdshar;": "\u294a", - "luruhar;": "\u2966", - "lvertneqq;": "\u2268\ufe00", - "lvnE;": "\u2268\ufe00", - "mDDot;": "\u223a", - "macr": "\xaf", - "macr;": "\xaf", - "male;": "\u2642", - "malt;": "\u2720", - "maltese;": "\u2720", - "map;": "\u21a6", - "mapsto;": "\u21a6", - "mapstodown;": "\u21a7", - "mapstoleft;": "\u21a4", - "mapstoup;": "\u21a5", - "marker;": "\u25ae", - "mcomma;": "\u2a29", - "mcy;": "\u043c", - "mdash;": "\u2014", - "measuredangle;": "\u2221", - "mfr;": "\U0001d52a", - "mho;": "\u2127", - "micro": "\xb5", - "micro;": "\xb5", - "mid;": "\u2223", - "midast;": "*", - "midcir;": "\u2af0", - "middot": "\xb7", - "middot;": "\xb7", - "minus;": "\u2212", - "minusb;": "\u229f", - "minusd;": "\u2238", - "minusdu;": "\u2a2a", - "mlcp;": "\u2adb", - "mldr;": "\u2026", - "mnplus;": "\u2213", - "models;": "\u22a7", - "mopf;": "\U0001d55e", - "mp;": "\u2213", - "mscr;": "\U0001d4c2", - "mstpos;": "\u223e", - "mu;": "\u03bc", - "multimap;": "\u22b8", - "mumap;": "\u22b8", - "nGg;": "\u22d9\u0338", - "nGt;": "\u226b\u20d2", - "nGtv;": "\u226b\u0338", - "nLeftarrow;": "\u21cd", - "nLeftrightarrow;": "\u21ce", - "nLl;": "\u22d8\u0338", - "nLt;": "\u226a\u20d2", - "nLtv;": "\u226a\u0338", - "nRightarrow;": "\u21cf", - "nVDash;": "\u22af", - "nVdash;": "\u22ae", - "nabla;": "\u2207", - "nacute;": "\u0144", - "nang;": "\u2220\u20d2", - "nap;": "\u2249", - "napE;": "\u2a70\u0338", - "napid;": "\u224b\u0338", - "napos;": "\u0149", - "napprox;": "\u2249", - "natur;": "\u266e", - "natural;": "\u266e", - "naturals;": "\u2115", - "nbsp": "\xa0", - "nbsp;": "\xa0", - "nbump;": "\u224e\u0338", - "nbumpe;": "\u224f\u0338", - "ncap;": "\u2a43", - "ncaron;": "\u0148", - "ncedil;": "\u0146", - "ncong;": "\u2247", - "ncongdot;": "\u2a6d\u0338", - "ncup;": "\u2a42", - "ncy;": "\u043d", - "ndash;": "\u2013", - "ne;": "\u2260", - "neArr;": "\u21d7", - "nearhk;": "\u2924", - "nearr;": "\u2197", - "nearrow;": "\u2197", - "nedot;": "\u2250\u0338", - "nequiv;": "\u2262", - "nesear;": "\u2928", - "nesim;": "\u2242\u0338", - "nexist;": "\u2204", - "nexists;": "\u2204", - "nfr;": "\U0001d52b", - "ngE;": "\u2267\u0338", - "nge;": "\u2271", - "ngeq;": "\u2271", - "ngeqq;": "\u2267\u0338", - "ngeqslant;": "\u2a7e\u0338", - "nges;": "\u2a7e\u0338", - "ngsim;": "\u2275", - "ngt;": "\u226f", - "ngtr;": "\u226f", - "nhArr;": "\u21ce", - "nharr;": "\u21ae", - "nhpar;": "\u2af2", - "ni;": "\u220b", - "nis;": "\u22fc", - "nisd;": "\u22fa", - "niv;": "\u220b", - "njcy;": "\u045a", - "nlArr;": "\u21cd", - "nlE;": "\u2266\u0338", - "nlarr;": "\u219a", - "nldr;": "\u2025", - "nle;": "\u2270", - "nleftarrow;": "\u219a", - "nleftrightarrow;": "\u21ae", - "nleq;": "\u2270", - "nleqq;": "\u2266\u0338", - "nleqslant;": "\u2a7d\u0338", - "nles;": "\u2a7d\u0338", - "nless;": "\u226e", - "nlsim;": "\u2274", - "nlt;": "\u226e", - "nltri;": "\u22ea", - "nltrie;": "\u22ec", - "nmid;": "\u2224", - "nopf;": "\U0001d55f", - "not": "\xac", - "not;": "\xac", - "notin;": "\u2209", - "notinE;": "\u22f9\u0338", - "notindot;": "\u22f5\u0338", - "notinva;": "\u2209", - "notinvb;": "\u22f7", - "notinvc;": "\u22f6", - "notni;": "\u220c", - "notniva;": "\u220c", - "notnivb;": "\u22fe", - "notnivc;": "\u22fd", - "npar;": "\u2226", - "nparallel;": "\u2226", - "nparsl;": "\u2afd\u20e5", - "npart;": "\u2202\u0338", - "npolint;": "\u2a14", - "npr;": "\u2280", - "nprcue;": "\u22e0", - "npre;": "\u2aaf\u0338", - "nprec;": "\u2280", - "npreceq;": "\u2aaf\u0338", - "nrArr;": "\u21cf", - "nrarr;": "\u219b", - "nrarrc;": "\u2933\u0338", - "nrarrw;": "\u219d\u0338", - "nrightarrow;": "\u219b", - "nrtri;": "\u22eb", - "nrtrie;": "\u22ed", - "nsc;": "\u2281", - "nsccue;": "\u22e1", - "nsce;": "\u2ab0\u0338", - "nscr;": "\U0001d4c3", - "nshortmid;": "\u2224", - "nshortparallel;": "\u2226", - "nsim;": "\u2241", - "nsime;": "\u2244", - "nsimeq;": "\u2244", - "nsmid;": "\u2224", - "nspar;": "\u2226", - "nsqsube;": "\u22e2", - "nsqsupe;": "\u22e3", - "nsub;": "\u2284", - "nsubE;": "\u2ac5\u0338", - "nsube;": "\u2288", - "nsubset;": "\u2282\u20d2", - "nsubseteq;": "\u2288", - "nsubseteqq;": "\u2ac5\u0338", - "nsucc;": "\u2281", - "nsucceq;": "\u2ab0\u0338", - "nsup;": "\u2285", - "nsupE;": "\u2ac6\u0338", - "nsupe;": "\u2289", - "nsupset;": "\u2283\u20d2", - "nsupseteq;": "\u2289", - "nsupseteqq;": "\u2ac6\u0338", - "ntgl;": "\u2279", - "ntilde": "\xf1", - "ntilde;": "\xf1", - "ntlg;": "\u2278", - "ntriangleleft;": "\u22ea", - "ntrianglelefteq;": "\u22ec", - "ntriangleright;": "\u22eb", - "ntrianglerighteq;": "\u22ed", - "nu;": "\u03bd", - "num;": "#", - "numero;": "\u2116", - "numsp;": "\u2007", - "nvDash;": "\u22ad", - "nvHarr;": "\u2904", - "nvap;": "\u224d\u20d2", - "nvdash;": "\u22ac", - "nvge;": "\u2265\u20d2", - "nvgt;": ">\u20d2", - "nvinfin;": "\u29de", - "nvlArr;": "\u2902", - "nvle;": "\u2264\u20d2", - "nvlt;": "<\u20d2", - "nvltrie;": "\u22b4\u20d2", - "nvrArr;": "\u2903", - "nvrtrie;": "\u22b5\u20d2", - "nvsim;": "\u223c\u20d2", - "nwArr;": "\u21d6", - "nwarhk;": "\u2923", - "nwarr;": "\u2196", - "nwarrow;": "\u2196", - "nwnear;": "\u2927", - "oS;": "\u24c8", - "oacute": "\xf3", - "oacute;": "\xf3", - "oast;": "\u229b", - "ocir;": "\u229a", - "ocirc": "\xf4", - "ocirc;": "\xf4", - "ocy;": "\u043e", - "odash;": "\u229d", - "odblac;": "\u0151", - "odiv;": "\u2a38", - "odot;": "\u2299", - "odsold;": "\u29bc", - "oelig;": "\u0153", - "ofcir;": "\u29bf", - "ofr;": "\U0001d52c", - "ogon;": "\u02db", - "ograve": "\xf2", - "ograve;": "\xf2", - "ogt;": "\u29c1", - "ohbar;": "\u29b5", - "ohm;": "\u03a9", - "oint;": "\u222e", - "olarr;": "\u21ba", - "olcir;": "\u29be", - "olcross;": "\u29bb", - "oline;": "\u203e", - "olt;": "\u29c0", - "omacr;": "\u014d", - "omega;": "\u03c9", - "omicron;": "\u03bf", - "omid;": "\u29b6", - "ominus;": "\u2296", - "oopf;": "\U0001d560", - "opar;": "\u29b7", - "operp;": "\u29b9", - "oplus;": "\u2295", - "or;": "\u2228", - "orarr;": "\u21bb", - "ord;": "\u2a5d", - "order;": "\u2134", - "orderof;": "\u2134", - "ordf": "\xaa", - "ordf;": "\xaa", - "ordm": "\xba", - "ordm;": "\xba", - "origof;": "\u22b6", - "oror;": "\u2a56", - "orslope;": "\u2a57", - "orv;": "\u2a5b", - "oscr;": "\u2134", - "oslash": "\xf8", - "oslash;": "\xf8", - "osol;": "\u2298", - "otilde": "\xf5", - "otilde;": "\xf5", - "otimes;": "\u2297", - "otimesas;": "\u2a36", - "ouml": "\xf6", - "ouml;": "\xf6", - "ovbar;": "\u233d", - "par;": "\u2225", - "para": "\xb6", - "para;": "\xb6", - "parallel;": "\u2225", - "parsim;": "\u2af3", - "parsl;": "\u2afd", - "part;": "\u2202", - "pcy;": "\u043f", - "percnt;": "%", - "period;": ".", - "permil;": "\u2030", - "perp;": "\u22a5", - "pertenk;": "\u2031", - "pfr;": "\U0001d52d", - "phi;": "\u03c6", - "phiv;": "\u03d5", - "phmmat;": "\u2133", - "phone;": "\u260e", - "pi;": "\u03c0", - "pitchfork;": "\u22d4", - "piv;": "\u03d6", - "planck;": "\u210f", - "planckh;": "\u210e", - "plankv;": "\u210f", - "plus;": "+", - "plusacir;": "\u2a23", - "plusb;": "\u229e", - "pluscir;": "\u2a22", - "plusdo;": "\u2214", - "plusdu;": "\u2a25", - "pluse;": "\u2a72", - "plusmn": "\xb1", - "plusmn;": "\xb1", - "plussim;": "\u2a26", - "plustwo;": "\u2a27", - "pm;": "\xb1", - "pointint;": "\u2a15", - "popf;": "\U0001d561", - "pound": "\xa3", - "pound;": "\xa3", - "pr;": "\u227a", - "prE;": "\u2ab3", - "prap;": "\u2ab7", - "prcue;": "\u227c", - "pre;": "\u2aaf", - "prec;": "\u227a", - "precapprox;": "\u2ab7", - "preccurlyeq;": "\u227c", - "preceq;": "\u2aaf", - "precnapprox;": "\u2ab9", - "precneqq;": "\u2ab5", - "precnsim;": "\u22e8", - "precsim;": "\u227e", - "prime;": "\u2032", - "primes;": "\u2119", - "prnE;": "\u2ab5", - "prnap;": "\u2ab9", - "prnsim;": "\u22e8", - "prod;": "\u220f", - "profalar;": "\u232e", - "profline;": "\u2312", - "profsurf;": "\u2313", - "prop;": "\u221d", - "propto;": "\u221d", - "prsim;": "\u227e", - "prurel;": "\u22b0", - "pscr;": "\U0001d4c5", - "psi;": "\u03c8", - "puncsp;": "\u2008", - "qfr;": "\U0001d52e", - "qint;": "\u2a0c", - "qopf;": "\U0001d562", - "qprime;": "\u2057", - "qscr;": "\U0001d4c6", - "quaternions;": "\u210d", - "quatint;": "\u2a16", - "quest;": "?", - "questeq;": "\u225f", - "quot": "\"", - "quot;": "\"", - "rAarr;": "\u21db", - "rArr;": "\u21d2", - "rAtail;": "\u291c", - "rBarr;": "\u290f", - "rHar;": "\u2964", - "race;": "\u223d\u0331", - "racute;": "\u0155", - "radic;": "\u221a", - "raemptyv;": "\u29b3", - "rang;": "\u27e9", - "rangd;": "\u2992", - "range;": "\u29a5", - "rangle;": "\u27e9", - "raquo": "\xbb", - "raquo;": "\xbb", - "rarr;": "\u2192", - "rarrap;": "\u2975", - "rarrb;": "\u21e5", - "rarrbfs;": "\u2920", - "rarrc;": "\u2933", - "rarrfs;": "\u291e", - "rarrhk;": "\u21aa", - "rarrlp;": "\u21ac", - "rarrpl;": "\u2945", - "rarrsim;": "\u2974", - "rarrtl;": "\u21a3", - "rarrw;": "\u219d", - "ratail;": "\u291a", - "ratio;": "\u2236", - "rationals;": "\u211a", - "rbarr;": "\u290d", - "rbbrk;": "\u2773", - "rbrace;": "}", - "rbrack;": "]", - "rbrke;": "\u298c", - "rbrksld;": "\u298e", - "rbrkslu;": "\u2990", - "rcaron;": "\u0159", - "rcedil;": "\u0157", - "rceil;": "\u2309", - "rcub;": "}", - "rcy;": "\u0440", - "rdca;": "\u2937", - "rdldhar;": "\u2969", - "rdquo;": "\u201d", - "rdquor;": "\u201d", - "rdsh;": "\u21b3", - "real;": "\u211c", - "realine;": "\u211b", - "realpart;": "\u211c", - "reals;": "\u211d", - "rect;": "\u25ad", - "reg": "\xae", - "reg;": "\xae", - "rfisht;": "\u297d", - "rfloor;": "\u230b", - "rfr;": "\U0001d52f", - "rhard;": "\u21c1", - "rharu;": "\u21c0", - "rharul;": "\u296c", - "rho;": "\u03c1", - "rhov;": "\u03f1", - "rightarrow;": "\u2192", - "rightarrowtail;": "\u21a3", - "rightharpoondown;": "\u21c1", - "rightharpoonup;": "\u21c0", - "rightleftarrows;": "\u21c4", - "rightleftharpoons;": "\u21cc", - "rightrightarrows;": "\u21c9", - "rightsquigarrow;": "\u219d", - "rightthreetimes;": "\u22cc", - "ring;": "\u02da", - "risingdotseq;": "\u2253", - "rlarr;": "\u21c4", - "rlhar;": "\u21cc", - "rlm;": "\u200f", - "rmoust;": "\u23b1", - "rmoustache;": "\u23b1", - "rnmid;": "\u2aee", - "roang;": "\u27ed", - "roarr;": "\u21fe", - "robrk;": "\u27e7", - "ropar;": "\u2986", - "ropf;": "\U0001d563", - "roplus;": "\u2a2e", - "rotimes;": "\u2a35", - "rpar;": ")", - "rpargt;": "\u2994", - "rppolint;": "\u2a12", - "rrarr;": "\u21c9", - "rsaquo;": "\u203a", - "rscr;": "\U0001d4c7", - "rsh;": "\u21b1", - "rsqb;": "]", - "rsquo;": "\u2019", - "rsquor;": "\u2019", - "rthree;": "\u22cc", - "rtimes;": "\u22ca", - "rtri;": "\u25b9", - "rtrie;": "\u22b5", - "rtrif;": "\u25b8", - "rtriltri;": "\u29ce", - "ruluhar;": "\u2968", - "rx;": "\u211e", - "sacute;": "\u015b", - "sbquo;": "\u201a", - "sc;": "\u227b", - "scE;": "\u2ab4", - "scap;": "\u2ab8", - "scaron;": "\u0161", - "sccue;": "\u227d", - "sce;": "\u2ab0", - "scedil;": "\u015f", - "scirc;": "\u015d", - "scnE;": "\u2ab6", - "scnap;": "\u2aba", - "scnsim;": "\u22e9", - "scpolint;": "\u2a13", - "scsim;": "\u227f", - "scy;": "\u0441", - "sdot;": "\u22c5", - "sdotb;": "\u22a1", - "sdote;": "\u2a66", - "seArr;": "\u21d8", - "searhk;": "\u2925", - "searr;": "\u2198", - "searrow;": "\u2198", - "sect": "\xa7", - "sect;": "\xa7", - "semi;": ";", - "seswar;": "\u2929", - "setminus;": "\u2216", - "setmn;": "\u2216", - "sext;": "\u2736", - "sfr;": "\U0001d530", - "sfrown;": "\u2322", - "sharp;": "\u266f", - "shchcy;": "\u0449", - "shcy;": "\u0448", - "shortmid;": "\u2223", - "shortparallel;": "\u2225", - "shy": "\xad", - "shy;": "\xad", - "sigma;": "\u03c3", - "sigmaf;": "\u03c2", - "sigmav;": "\u03c2", - "sim;": "\u223c", - "simdot;": "\u2a6a", - "sime;": "\u2243", - "simeq;": "\u2243", - "simg;": "\u2a9e", - "simgE;": "\u2aa0", - "siml;": "\u2a9d", - "simlE;": "\u2a9f", - "simne;": "\u2246", - "simplus;": "\u2a24", - "simrarr;": "\u2972", - "slarr;": "\u2190", - "smallsetminus;": "\u2216", - "smashp;": "\u2a33", - "smeparsl;": "\u29e4", - "smid;": "\u2223", - "smile;": "\u2323", - "smt;": "\u2aaa", - "smte;": "\u2aac", - "smtes;": "\u2aac\ufe00", - "softcy;": "\u044c", - "sol;": "/", - "solb;": "\u29c4", - "solbar;": "\u233f", - "sopf;": "\U0001d564", - "spades;": "\u2660", - "spadesuit;": "\u2660", - "spar;": "\u2225", - "sqcap;": "\u2293", - "sqcaps;": "\u2293\ufe00", - "sqcup;": "\u2294", - "sqcups;": "\u2294\ufe00", - "sqsub;": "\u228f", - "sqsube;": "\u2291", - "sqsubset;": "\u228f", - "sqsubseteq;": "\u2291", - "sqsup;": "\u2290", - "sqsupe;": "\u2292", - "sqsupset;": "\u2290", - "sqsupseteq;": "\u2292", - "squ;": "\u25a1", - "square;": "\u25a1", - "squarf;": "\u25aa", - "squf;": "\u25aa", - "srarr;": "\u2192", - "sscr;": "\U0001d4c8", - "ssetmn;": "\u2216", - "ssmile;": "\u2323", - "sstarf;": "\u22c6", - "star;": "\u2606", - "starf;": "\u2605", - "straightepsilon;": "\u03f5", - "straightphi;": "\u03d5", - "strns;": "\xaf", - "sub;": "\u2282", - "subE;": "\u2ac5", - "subdot;": "\u2abd", - "sube;": "\u2286", - "subedot;": "\u2ac3", - "submult;": "\u2ac1", - "subnE;": "\u2acb", - "subne;": "\u228a", - "subplus;": "\u2abf", - "subrarr;": "\u2979", - "subset;": "\u2282", - "subseteq;": "\u2286", - "subseteqq;": "\u2ac5", - "subsetneq;": "\u228a", - "subsetneqq;": "\u2acb", - "subsim;": "\u2ac7", - "subsub;": "\u2ad5", - "subsup;": "\u2ad3", - "succ;": "\u227b", - "succapprox;": "\u2ab8", - "succcurlyeq;": "\u227d", - "succeq;": "\u2ab0", - "succnapprox;": "\u2aba", - "succneqq;": "\u2ab6", - "succnsim;": "\u22e9", - "succsim;": "\u227f", - "sum;": "\u2211", - "sung;": "\u266a", - "sup1": "\xb9", - "sup1;": "\xb9", - "sup2": "\xb2", - "sup2;": "\xb2", - "sup3": "\xb3", - "sup3;": "\xb3", - "sup;": "\u2283", - "supE;": "\u2ac6", - "supdot;": "\u2abe", - "supdsub;": "\u2ad8", - "supe;": "\u2287", - "supedot;": "\u2ac4", - "suphsol;": "\u27c9", - "suphsub;": "\u2ad7", - "suplarr;": "\u297b", - "supmult;": "\u2ac2", - "supnE;": "\u2acc", - "supne;": "\u228b", - "supplus;": "\u2ac0", - "supset;": "\u2283", - "supseteq;": "\u2287", - "supseteqq;": "\u2ac6", - "supsetneq;": "\u228b", - "supsetneqq;": "\u2acc", - "supsim;": "\u2ac8", - "supsub;": "\u2ad4", - "supsup;": "\u2ad6", - "swArr;": "\u21d9", - "swarhk;": "\u2926", - "swarr;": "\u2199", - "swarrow;": "\u2199", - "swnwar;": "\u292a", - "szlig": "\xdf", - "szlig;": "\xdf", - "target;": "\u2316", - "tau;": "\u03c4", - "tbrk;": "\u23b4", - "tcaron;": "\u0165", - "tcedil;": "\u0163", - "tcy;": "\u0442", - "tdot;": "\u20db", - "telrec;": "\u2315", - "tfr;": "\U0001d531", - "there4;": "\u2234", - "therefore;": "\u2234", - "theta;": "\u03b8", - "thetasym;": "\u03d1", - "thetav;": "\u03d1", - "thickapprox;": "\u2248", - "thicksim;": "\u223c", - "thinsp;": "\u2009", - "thkap;": "\u2248", - "thksim;": "\u223c", - "thorn": "\xfe", - "thorn;": "\xfe", - "tilde;": "\u02dc", - "times": "\xd7", - "times;": "\xd7", - "timesb;": "\u22a0", - "timesbar;": "\u2a31", - "timesd;": "\u2a30", - "tint;": "\u222d", - "toea;": "\u2928", - "top;": "\u22a4", - "topbot;": "\u2336", - "topcir;": "\u2af1", - "topf;": "\U0001d565", - "topfork;": "\u2ada", - "tosa;": "\u2929", - "tprime;": "\u2034", - "trade;": "\u2122", - "triangle;": "\u25b5", - "triangledown;": "\u25bf", - "triangleleft;": "\u25c3", - "trianglelefteq;": "\u22b4", - "triangleq;": "\u225c", - "triangleright;": "\u25b9", - "trianglerighteq;": "\u22b5", - "tridot;": "\u25ec", - "trie;": "\u225c", - "triminus;": "\u2a3a", - "triplus;": "\u2a39", - "trisb;": "\u29cd", - "tritime;": "\u2a3b", - "trpezium;": "\u23e2", - "tscr;": "\U0001d4c9", - "tscy;": "\u0446", - "tshcy;": "\u045b", - "tstrok;": "\u0167", - "twixt;": "\u226c", - "twoheadleftarrow;": "\u219e", - "twoheadrightarrow;": "\u21a0", - "uArr;": "\u21d1", - "uHar;": "\u2963", - "uacute": "\xfa", - "uacute;": "\xfa", - "uarr;": "\u2191", - "ubrcy;": "\u045e", - "ubreve;": "\u016d", - "ucirc": "\xfb", - "ucirc;": "\xfb", - "ucy;": "\u0443", - "udarr;": "\u21c5", - "udblac;": "\u0171", - "udhar;": "\u296e", - "ufisht;": "\u297e", - "ufr;": "\U0001d532", - "ugrave": "\xf9", - "ugrave;": "\xf9", - "uharl;": "\u21bf", - "uharr;": "\u21be", - "uhblk;": "\u2580", - "ulcorn;": "\u231c", - "ulcorner;": "\u231c", - "ulcrop;": "\u230f", - "ultri;": "\u25f8", - "umacr;": "\u016b", - "uml": "\xa8", - "uml;": "\xa8", - "uogon;": "\u0173", - "uopf;": "\U0001d566", - "uparrow;": "\u2191", - "updownarrow;": "\u2195", - "upharpoonleft;": "\u21bf", - "upharpoonright;": "\u21be", - "uplus;": "\u228e", - "upsi;": "\u03c5", - "upsih;": "\u03d2", - "upsilon;": "\u03c5", - "upuparrows;": "\u21c8", - "urcorn;": "\u231d", - "urcorner;": "\u231d", - "urcrop;": "\u230e", - "uring;": "\u016f", - "urtri;": "\u25f9", - "uscr;": "\U0001d4ca", - "utdot;": "\u22f0", - "utilde;": "\u0169", - "utri;": "\u25b5", - "utrif;": "\u25b4", - "uuarr;": "\u21c8", - "uuml": "\xfc", - "uuml;": "\xfc", - "uwangle;": "\u29a7", - "vArr;": "\u21d5", - "vBar;": "\u2ae8", - "vBarv;": "\u2ae9", - "vDash;": "\u22a8", - "vangrt;": "\u299c", - "varepsilon;": "\u03f5", - "varkappa;": "\u03f0", - "varnothing;": "\u2205", - "varphi;": "\u03d5", - "varpi;": "\u03d6", - "varpropto;": "\u221d", - "varr;": "\u2195", - "varrho;": "\u03f1", - "varsigma;": "\u03c2", - "varsubsetneq;": "\u228a\ufe00", - "varsubsetneqq;": "\u2acb\ufe00", - "varsupsetneq;": "\u228b\ufe00", - "varsupsetneqq;": "\u2acc\ufe00", - "vartheta;": "\u03d1", - "vartriangleleft;": "\u22b2", - "vartriangleright;": "\u22b3", - "vcy;": "\u0432", - "vdash;": "\u22a2", - "vee;": "\u2228", - "veebar;": "\u22bb", - "veeeq;": "\u225a", - "vellip;": "\u22ee", - "verbar;": "|", - "vert;": "|", - "vfr;": "\U0001d533", - "vltri;": "\u22b2", - "vnsub;": "\u2282\u20d2", - "vnsup;": "\u2283\u20d2", - "vopf;": "\U0001d567", - "vprop;": "\u221d", - "vrtri;": "\u22b3", - "vscr;": "\U0001d4cb", - "vsubnE;": "\u2acb\ufe00", - "vsubne;": "\u228a\ufe00", - "vsupnE;": "\u2acc\ufe00", - "vsupne;": "\u228b\ufe00", - "vzigzag;": "\u299a", - "wcirc;": "\u0175", - "wedbar;": "\u2a5f", - "wedge;": "\u2227", - "wedgeq;": "\u2259", - "weierp;": "\u2118", - "wfr;": "\U0001d534", - "wopf;": "\U0001d568", - "wp;": "\u2118", - "wr;": "\u2240", - "wreath;": "\u2240", - "wscr;": "\U0001d4cc", - "xcap;": "\u22c2", - "xcirc;": "\u25ef", - "xcup;": "\u22c3", - "xdtri;": "\u25bd", - "xfr;": "\U0001d535", - "xhArr;": "\u27fa", - "xharr;": "\u27f7", - "xi;": "\u03be", - "xlArr;": "\u27f8", - "xlarr;": "\u27f5", - "xmap;": "\u27fc", - "xnis;": "\u22fb", - "xodot;": "\u2a00", - "xopf;": "\U0001d569", - "xoplus;": "\u2a01", - "xotime;": "\u2a02", - "xrArr;": "\u27f9", - "xrarr;": "\u27f6", - "xscr;": "\U0001d4cd", - "xsqcup;": "\u2a06", - "xuplus;": "\u2a04", - "xutri;": "\u25b3", - "xvee;": "\u22c1", - "xwedge;": "\u22c0", - "yacute": "\xfd", - "yacute;": "\xfd", - "yacy;": "\u044f", - "ycirc;": "\u0177", - "ycy;": "\u044b", - "yen": "\xa5", - "yen;": "\xa5", - "yfr;": "\U0001d536", - "yicy;": "\u0457", - "yopf;": "\U0001d56a", - "yscr;": "\U0001d4ce", - "yucy;": "\u044e", - "yuml": "\xff", - "yuml;": "\xff", - "zacute;": "\u017a", - "zcaron;": "\u017e", - "zcy;": "\u0437", - "zdot;": "\u017c", - "zeetrf;": "\u2128", - "zeta;": "\u03b6", - "zfr;": "\U0001d537", - "zhcy;": "\u0436", - "zigrarr;": "\u21dd", - "zopf;": "\U0001d56b", - "zscr;": "\U0001d4cf", - "zwj;": "\u200d", - "zwnj;": "\u200c", -} - -replacementCharacters = { - 0x0: "\uFFFD", - 0x0d: "\u000D", - 0x80: "\u20AC", - 0x81: "\u0081", - 0x81: "\u0081", - 0x82: "\u201A", - 0x83: "\u0192", - 0x84: "\u201E", - 0x85: "\u2026", - 0x86: "\u2020", - 0x87: "\u2021", - 0x88: "\u02C6", - 0x89: "\u2030", - 0x8A: "\u0160", - 0x8B: "\u2039", - 0x8C: "\u0152", - 0x8D: "\u008D", - 0x8E: "\u017D", - 0x8F: "\u008F", - 0x90: "\u0090", - 0x91: "\u2018", - 0x92: "\u2019", - 0x93: "\u201C", - 0x94: "\u201D", - 0x95: "\u2022", - 0x96: "\u2013", - 0x97: "\u2014", - 0x98: "\u02DC", - 0x99: "\u2122", - 0x9A: "\u0161", - 0x9B: "\u203A", - 0x9C: "\u0153", - 0x9D: "\u009D", - 0x9E: "\u017E", - 0x9F: "\u0178", -} - -encodings = { - '437': 'cp437', - '850': 'cp850', - '852': 'cp852', - '855': 'cp855', - '857': 'cp857', - '860': 'cp860', - '861': 'cp861', - '862': 'cp862', - '863': 'cp863', - '865': 'cp865', - '866': 'cp866', - '869': 'cp869', - 'ansix341968': 'ascii', - 'ansix341986': 'ascii', - 'arabic': 'iso8859-6', - 'ascii': 'ascii', - 'asmo708': 'iso8859-6', - 'big5': 'big5', - 'big5hkscs': 'big5hkscs', - 'chinese': 'gbk', - 'cp037': 'cp037', - 'cp1026': 'cp1026', - 'cp154': 'ptcp154', - 'cp367': 'ascii', - 'cp424': 'cp424', - 'cp437': 'cp437', - 'cp500': 'cp500', - 'cp775': 'cp775', - 'cp819': 'windows-1252', - 'cp850': 'cp850', - 'cp852': 'cp852', - 'cp855': 'cp855', - 'cp857': 'cp857', - 'cp860': 'cp860', - 'cp861': 'cp861', - 'cp862': 'cp862', - 'cp863': 'cp863', - 'cp864': 'cp864', - 'cp865': 'cp865', - 'cp866': 'cp866', - 'cp869': 'cp869', - 'cp936': 'gbk', - 'cpgr': 'cp869', - 'cpis': 'cp861', - 'csascii': 'ascii', - 'csbig5': 'big5', - 'cseuckr': 'cp949', - 'cseucpkdfmtjapanese': 'euc_jp', - 'csgb2312': 'gbk', - 'cshproman8': 'hp-roman8', - 'csibm037': 'cp037', - 'csibm1026': 'cp1026', - 'csibm424': 'cp424', - 'csibm500': 'cp500', - 'csibm855': 'cp855', - 'csibm857': 'cp857', - 'csibm860': 'cp860', - 'csibm861': 'cp861', - 'csibm863': 'cp863', - 'csibm864': 'cp864', - 'csibm865': 'cp865', - 'csibm866': 'cp866', - 'csibm869': 'cp869', - 'csiso2022jp': 'iso2022_jp', - 'csiso2022jp2': 'iso2022_jp_2', - 'csiso2022kr': 'iso2022_kr', - 'csiso58gb231280': 'gbk', - 'csisolatin1': 'windows-1252', - 'csisolatin2': 'iso8859-2', - 'csisolatin3': 'iso8859-3', - 'csisolatin4': 'iso8859-4', - 'csisolatin5': 'windows-1254', - 'csisolatin6': 'iso8859-10', - 'csisolatinarabic': 'iso8859-6', - 'csisolatincyrillic': 'iso8859-5', - 'csisolatingreek': 'iso8859-7', - 'csisolatinhebrew': 'iso8859-8', - 'cskoi8r': 'koi8-r', - 'csksc56011987': 'cp949', - 'cspc775baltic': 'cp775', - 'cspc850multilingual': 'cp850', - 'cspc862latinhebrew': 'cp862', - 'cspc8codepage437': 'cp437', - 'cspcp852': 'cp852', - 'csptcp154': 'ptcp154', - 'csshiftjis': 'shift_jis', - 'csunicode11utf7': 'utf-7', - 'cyrillic': 'iso8859-5', - 'cyrillicasian': 'ptcp154', - 'ebcdiccpbe': 'cp500', - 'ebcdiccpca': 'cp037', - 'ebcdiccpch': 'cp500', - 'ebcdiccphe': 'cp424', - 'ebcdiccpnl': 'cp037', - 'ebcdiccpus': 'cp037', - 'ebcdiccpwt': 'cp037', - 'ecma114': 'iso8859-6', - 'ecma118': 'iso8859-7', - 'elot928': 'iso8859-7', - 'eucjp': 'euc_jp', - 'euckr': 'cp949', - 'extendedunixcodepackedformatforjapanese': 'euc_jp', - 'gb18030': 'gb18030', - 'gb2312': 'gbk', - 'gb231280': 'gbk', - 'gbk': 'gbk', - 'greek': 'iso8859-7', - 'greek8': 'iso8859-7', - 'hebrew': 'iso8859-8', - 'hproman8': 'hp-roman8', - 'hzgb2312': 'hz', - 'ibm037': 'cp037', - 'ibm1026': 'cp1026', - 'ibm367': 'ascii', - 'ibm424': 'cp424', - 'ibm437': 'cp437', - 'ibm500': 'cp500', - 'ibm775': 'cp775', - 'ibm819': 'windows-1252', - 'ibm850': 'cp850', - 'ibm852': 'cp852', - 'ibm855': 'cp855', - 'ibm857': 'cp857', - 'ibm860': 'cp860', - 'ibm861': 'cp861', - 'ibm862': 'cp862', - 'ibm863': 'cp863', - 'ibm864': 'cp864', - 'ibm865': 'cp865', - 'ibm866': 'cp866', - 'ibm869': 'cp869', - 'iso2022jp': 'iso2022_jp', - 'iso2022jp2': 'iso2022_jp_2', - 'iso2022kr': 'iso2022_kr', - 'iso646irv1991': 'ascii', - 'iso646us': 'ascii', - 'iso88591': 'windows-1252', - 'iso885910': 'iso8859-10', - 'iso8859101992': 'iso8859-10', - 'iso885911987': 'windows-1252', - 'iso885913': 'iso8859-13', - 'iso885914': 'iso8859-14', - 'iso8859141998': 'iso8859-14', - 'iso885915': 'iso8859-15', - 'iso885916': 'iso8859-16', - 'iso8859162001': 'iso8859-16', - 'iso88592': 'iso8859-2', - 'iso885921987': 'iso8859-2', - 'iso88593': 'iso8859-3', - 'iso885931988': 'iso8859-3', - 'iso88594': 'iso8859-4', - 'iso885941988': 'iso8859-4', - 'iso88595': 'iso8859-5', - 'iso885951988': 'iso8859-5', - 'iso88596': 'iso8859-6', - 'iso885961987': 'iso8859-6', - 'iso88597': 'iso8859-7', - 'iso885971987': 'iso8859-7', - 'iso88598': 'iso8859-8', - 'iso885981988': 'iso8859-8', - 'iso88599': 'windows-1254', - 'iso885991989': 'windows-1254', - 'isoceltic': 'iso8859-14', - 'isoir100': 'windows-1252', - 'isoir101': 'iso8859-2', - 'isoir109': 'iso8859-3', - 'isoir110': 'iso8859-4', - 'isoir126': 'iso8859-7', - 'isoir127': 'iso8859-6', - 'isoir138': 'iso8859-8', - 'isoir144': 'iso8859-5', - 'isoir148': 'windows-1254', - 'isoir149': 'cp949', - 'isoir157': 'iso8859-10', - 'isoir199': 'iso8859-14', - 'isoir226': 'iso8859-16', - 'isoir58': 'gbk', - 'isoir6': 'ascii', - 'koi8r': 'koi8-r', - 'koi8u': 'koi8-u', - 'korean': 'cp949', - 'ksc5601': 'cp949', - 'ksc56011987': 'cp949', - 'ksc56011989': 'cp949', - 'l1': 'windows-1252', - 'l10': 'iso8859-16', - 'l2': 'iso8859-2', - 'l3': 'iso8859-3', - 'l4': 'iso8859-4', - 'l5': 'windows-1254', - 'l6': 'iso8859-10', - 'l8': 'iso8859-14', - 'latin1': 'windows-1252', - 'latin10': 'iso8859-16', - 'latin2': 'iso8859-2', - 'latin3': 'iso8859-3', - 'latin4': 'iso8859-4', - 'latin5': 'windows-1254', - 'latin6': 'iso8859-10', - 'latin8': 'iso8859-14', - 'latin9': 'iso8859-15', - 'ms936': 'gbk', - 'mskanji': 'shift_jis', - 'pt154': 'ptcp154', - 'ptcp154': 'ptcp154', - 'r8': 'hp-roman8', - 'roman8': 'hp-roman8', - 'shiftjis': 'shift_jis', - 'tis620': 'cp874', - 'unicode11utf7': 'utf-7', - 'us': 'ascii', - 'usascii': 'ascii', - 'utf16': 'utf-16', - 'utf16be': 'utf-16-be', - 'utf16le': 'utf-16-le', - 'utf8': 'utf-8', - 'windows1250': 'cp1250', - 'windows1251': 'cp1251', - 'windows1252': 'cp1252', - 'windows1253': 'cp1253', - 'windows1254': 'cp1254', - 'windows1255': 'cp1255', - 'windows1256': 'cp1256', - 'windows1257': 'cp1257', - 'windows1258': 'cp1258', - 'windows936': 'gbk', - 'x-x-big5': 'big5'} - -tokenTypes = { - "Doctype": 0, - "Characters": 1, - "SpaceCharacters": 2, - "StartTag": 3, - "EndTag": 4, - "EmptyTag": 5, - "Comment": 6, - "ParseError": 7 -} - -tagTokenTypes = frozenset((tokenTypes["StartTag"], tokenTypes["EndTag"], - tokenTypes["EmptyTag"])) - - -prefixes = dict([(v, k) for k, v in namespaces.items()]) -prefixes["http://www.w3.org/1998/Math/MathML"] = "math" - - -class DataLossWarning(UserWarning): - pass - - -class ReparseException(Exception): - pass diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/__init__.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/_base.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/_base.py deleted file mode 100644 index c7dbaed..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/_base.py +++ /dev/null @@ -1,12 +0,0 @@ -from __future__ import absolute_import, division, unicode_literals - - -class Filter(object): - def __init__(self, source): - self.source = source - - def __iter__(self): - return iter(self.source) - - def __getattr__(self, name): - return getattr(self.source, name) diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/alphabeticalattributes.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/alphabeticalattributes.py deleted file mode 100644 index fed6996..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/alphabeticalattributes.py +++ /dev/null @@ -1,20 +0,0 @@ -from __future__ import absolute_import, division, unicode_literals - -from . import _base - -try: - from collections import OrderedDict -except ImportError: - from ordereddict import OrderedDict - - -class Filter(_base.Filter): - def __iter__(self): - for token in _base.Filter.__iter__(self): - if token["type"] in ("StartTag", "EmptyTag"): - attrs = OrderedDict() - for name, value in sorted(token["data"].items(), - key=lambda x: x[0]): - attrs[name] = value - token["data"] = attrs - yield token diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/inject_meta_charset.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/inject_meta_charset.py deleted file mode 100644 index ca33b70..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/inject_meta_charset.py +++ /dev/null @@ -1,65 +0,0 @@ -from __future__ import absolute_import, division, unicode_literals - -from . import _base - - -class Filter(_base.Filter): - def __init__(self, source, encoding): - _base.Filter.__init__(self, source) - self.encoding = encoding - - def __iter__(self): - state = "pre_head" - meta_found = (self.encoding is None) - pending = [] - - for token in _base.Filter.__iter__(self): - type = token["type"] - if type == "StartTag": - if token["name"].lower() == "head": - state = "in_head" - - elif type == "EmptyTag": - if token["name"].lower() == "meta": - # replace charset with actual encoding - has_http_equiv_content_type = False - for (namespace, name), value in token["data"].items(): - if namespace is not None: - continue - elif name.lower() == 'charset': - token["data"][(namespace, name)] = self.encoding - meta_found = True - break - elif name == 'http-equiv' and value.lower() == 'content-type': - has_http_equiv_content_type = True - else: - if has_http_equiv_content_type and (None, "content") in token["data"]: - token["data"][(None, "content")] = 'text/html; charset=%s' % self.encoding - meta_found = True - - elif token["name"].lower() == "head" and not meta_found: - # insert meta into empty head - yield {"type": "StartTag", "name": "head", - "data": token["data"]} - yield {"type": "EmptyTag", "name": "meta", - "data": {(None, "charset"): self.encoding}} - yield {"type": "EndTag", "name": "head"} - meta_found = True - continue - - elif type == "EndTag": - if token["name"].lower() == "head" and pending: - # insert meta into head (if necessary) and flush pending queue - yield pending.pop(0) - if not meta_found: - yield {"type": "EmptyTag", "name": "meta", - "data": {(None, "charset"): self.encoding}} - while pending: - yield pending.pop(0) - meta_found = True - state = "post_head" - - if state == "in_head": - pending.append(token) - else: - yield token diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/lint.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/lint.py deleted file mode 100644 index 83ad639..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/lint.py +++ /dev/null @@ -1,93 +0,0 @@ -from __future__ import absolute_import, division, unicode_literals - -from gettext import gettext -_ = gettext - -from . import _base -from ..constants import cdataElements, rcdataElements, voidElements - -from ..constants import spaceCharacters -spaceCharacters = "".join(spaceCharacters) - - -class LintError(Exception): - pass - - -class Filter(_base.Filter): - def __iter__(self): - open_elements = [] - contentModelFlag = "PCDATA" - for token in _base.Filter.__iter__(self): - type = token["type"] - if type in ("StartTag", "EmptyTag"): - name = token["name"] - if contentModelFlag != "PCDATA": - raise LintError(_("StartTag not in PCDATA content model flag: %s") % name) - if not isinstance(name, str): - raise LintError(_("Tag name is not a string: %r") % name) - if not name: - raise LintError(_("Empty tag name")) - if type == "StartTag" and name in voidElements: - raise LintError(_("Void element reported as StartTag token: %s") % name) - elif type == "EmptyTag" and name not in voidElements: - raise LintError(_("Non-void element reported as EmptyTag token: %s") % token["name"]) - if type == "StartTag": - open_elements.append(name) - for name, value in token["data"]: - if not isinstance(name, str): - raise LintError(_("Attribute name is not a string: %r") % name) - if not name: - raise LintError(_("Empty attribute name")) - if not isinstance(value, str): - raise LintError(_("Attribute value is not a string: %r") % value) - if name in cdataElements: - contentModelFlag = "CDATA" - elif name in rcdataElements: - contentModelFlag = "RCDATA" - elif name == "plaintext": - contentModelFlag = "PLAINTEXT" - - elif type == "EndTag": - name = token["name"] - if not isinstance(name, str): - raise LintError(_("Tag name is not a string: %r") % name) - if not name: - raise LintError(_("Empty tag name")) - if name in voidElements: - raise LintError(_("Void element reported as EndTag token: %s") % name) - start_name = open_elements.pop() - if start_name != name: - raise LintError(_("EndTag (%s) does not match StartTag (%s)") % (name, start_name)) - contentModelFlag = "PCDATA" - - elif type == "Comment": - if contentModelFlag != "PCDATA": - raise LintError(_("Comment not in PCDATA content model flag")) - - elif type in ("Characters", "SpaceCharacters"): - data = token["data"] - if not isinstance(data, str): - raise LintError(_("Attribute name is not a string: %r") % data) - if not data: - raise LintError(_("%s token with empty data") % type) - if type == "SpaceCharacters": - data = data.strip(spaceCharacters) - if data: - raise LintError(_("Non-space character(s) found in SpaceCharacters token: ") % data) - - elif type == "Doctype": - name = token["name"] - if contentModelFlag != "PCDATA": - raise LintError(_("Doctype not in PCDATA content model flag: %s") % name) - if not isinstance(name, str): - raise LintError(_("Tag name is not a string: %r") % name) - # XXX: what to do with token["data"] ? - - elif type in ("ParseError", "SerializeError"): - pass - - else: - raise LintError(_("Unknown token type: %s") % type) - - yield token diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/optionaltags.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/optionaltags.py deleted file mode 100644 index fefe0b3..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/optionaltags.py +++ /dev/null @@ -1,205 +0,0 @@ -from __future__ import absolute_import, division, unicode_literals - -from . import _base - - -class Filter(_base.Filter): - def slider(self): - previous1 = previous2 = None - for token in self.source: - if previous1 is not None: - yield previous2, previous1, token - previous2 = previous1 - previous1 = token - yield previous2, previous1, None - - def __iter__(self): - for previous, token, next in self.slider(): - type = token["type"] - if type == "StartTag": - if (token["data"] or - not self.is_optional_start(token["name"], previous, next)): - yield token - elif type == "EndTag": - if not self.is_optional_end(token["name"], next): - yield token - else: - yield token - - def is_optional_start(self, tagname, previous, next): - type = next and next["type"] or None - if tagname in 'html': - # An html element's start tag may be omitted if the first thing - # inside the html element is not a space character or a comment. - return type not in ("Comment", "SpaceCharacters") - elif tagname == 'head': - # A head element's start tag may be omitted if the first thing - # inside the head element is an element. - # XXX: we also omit the start tag if the head element is empty - if type in ("StartTag", "EmptyTag"): - return True - elif type == "EndTag": - return next["name"] == "head" - elif tagname == 'body': - # A body element's start tag may be omitted if the first thing - # inside the body element is not a space character or a comment, - # except if the first thing inside the body element is a script - # or style element and the node immediately preceding the body - # element is a head element whose end tag has been omitted. - if type in ("Comment", "SpaceCharacters"): - return False - elif type == "StartTag": - # XXX: we do not look at the preceding event, so we never omit - # the body element's start tag if it's followed by a script or - # a style element. - return next["name"] not in ('script', 'style') - else: - return True - elif tagname == 'colgroup': - # A colgroup element's start tag may be omitted if the first thing - # inside the colgroup element is a col element, and if the element - # is not immediately preceeded by another colgroup element whose - # end tag has been omitted. - if type in ("StartTag", "EmptyTag"): - # XXX: we do not look at the preceding event, so instead we never - # omit the colgroup element's end tag when it is immediately - # followed by another colgroup element. See is_optional_end. - return next["name"] == "col" - else: - return False - elif tagname == 'tbody': - # A tbody element's start tag may be omitted if the first thing - # inside the tbody element is a tr element, and if the element is - # not immediately preceeded by a tbody, thead, or tfoot element - # whose end tag has been omitted. - if type == "StartTag": - # omit the thead and tfoot elements' end tag when they are - # immediately followed by a tbody element. See is_optional_end. - if previous and previous['type'] == 'EndTag' and \ - previous['name'] in ('tbody', 'thead', 'tfoot'): - return False - return next["name"] == 'tr' - else: - return False - return False - - def is_optional_end(self, tagname, next): - type = next and next["type"] or None - if tagname in ('html', 'head', 'body'): - # An html element's end tag may be omitted if the html element - # is not immediately followed by a space character or a comment. - return type not in ("Comment", "SpaceCharacters") - elif tagname in ('li', 'optgroup', 'tr'): - # A li element's end tag may be omitted if the li element is - # immediately followed by another li element or if there is - # no more content in the parent element. - # An optgroup element's end tag may be omitted if the optgroup - # element is immediately followed by another optgroup element, - # or if there is no more content in the parent element. - # A tr element's end tag may be omitted if the tr element is - # immediately followed by another tr element, or if there is - # no more content in the parent element. - if type == "StartTag": - return next["name"] == tagname - else: - return type == "EndTag" or type is None - elif tagname in ('dt', 'dd'): - # A dt element's end tag may be omitted if the dt element is - # immediately followed by another dt element or a dd element. - # A dd element's end tag may be omitted if the dd element is - # immediately followed by another dd element or a dt element, - # or if there is no more content in the parent element. - if type == "StartTag": - return next["name"] in ('dt', 'dd') - elif tagname == 'dd': - return type == "EndTag" or type is None - else: - return False - elif tagname == 'p': - # A p element's end tag may be omitted if the p element is - # immediately followed by an address, article, aside, - # blockquote, datagrid, dialog, dir, div, dl, fieldset, - # footer, form, h1, h2, h3, h4, h5, h6, header, hr, menu, - # nav, ol, p, pre, section, table, or ul, element, or if - # there is no more content in the parent element. - if type in ("StartTag", "EmptyTag"): - return next["name"] in ('address', 'article', 'aside', - 'blockquote', 'datagrid', 'dialog', - 'dir', 'div', 'dl', 'fieldset', 'footer', - 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', - 'header', 'hr', 'menu', 'nav', 'ol', - 'p', 'pre', 'section', 'table', 'ul') - else: - return type == "EndTag" or type is None - elif tagname == 'option': - # An option element's end tag may be omitted if the option - # element is immediately followed by another option element, - # or if it is immediately followed by an optgroup - # element, or if there is no more content in the parent - # element. - if type == "StartTag": - return next["name"] in ('option', 'optgroup') - else: - return type == "EndTag" or type is None - elif tagname in ('rt', 'rp'): - # An rt element's end tag may be omitted if the rt element is - # immediately followed by an rt or rp element, or if there is - # no more content in the parent element. - # An rp element's end tag may be omitted if the rp element is - # immediately followed by an rt or rp element, or if there is - # no more content in the parent element. - if type == "StartTag": - return next["name"] in ('rt', 'rp') - else: - return type == "EndTag" or type is None - elif tagname == 'colgroup': - # A colgroup element's end tag may be omitted if the colgroup - # element is not immediately followed by a space character or - # a comment. - if type in ("Comment", "SpaceCharacters"): - return False - elif type == "StartTag": - # XXX: we also look for an immediately following colgroup - # element. See is_optional_start. - return next["name"] != 'colgroup' - else: - return True - elif tagname in ('thead', 'tbody'): - # A thead element's end tag may be omitted if the thead element - # is immediately followed by a tbody or tfoot element. - # A tbody element's end tag may be omitted if the tbody element - # is immediately followed by a tbody or tfoot element, or if - # there is no more content in the parent element. - # A tfoot element's end tag may be omitted if the tfoot element - # is immediately followed by a tbody element, or if there is no - # more content in the parent element. - # XXX: we never omit the end tag when the following element is - # a tbody. See is_optional_start. - if type == "StartTag": - return next["name"] in ['tbody', 'tfoot'] - elif tagname == 'tbody': - return type == "EndTag" or type is None - else: - return False - elif tagname == 'tfoot': - # A tfoot element's end tag may be omitted if the tfoot element - # is immediately followed by a tbody element, or if there is no - # more content in the parent element. - # XXX: we never omit the end tag when the following element is - # a tbody. See is_optional_start. - if type == "StartTag": - return next["name"] == 'tbody' - else: - return type == "EndTag" or type is None - elif tagname in ('td', 'th'): - # A td element's end tag may be omitted if the td element is - # immediately followed by a td or th element, or if there is - # no more content in the parent element. - # A th element's end tag may be omitted if the th element is - # immediately followed by a td or th element, or if there is - # no more content in the parent element. - if type == "StartTag": - return next["name"] in ('td', 'th') - else: - return type == "EndTag" or type is None - return False diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/sanitizer.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/sanitizer.py deleted file mode 100644 index b206b54..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/sanitizer.py +++ /dev/null @@ -1,12 +0,0 @@ -from __future__ import absolute_import, division, unicode_literals - -from . import _base -from ..sanitizer import HTMLSanitizerMixin - - -class Filter(_base.Filter, HTMLSanitizerMixin): - def __iter__(self): - for token in _base.Filter.__iter__(self): - token = self.sanitize_token(token) - if token: - yield token diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/whitespace.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/whitespace.py deleted file mode 100644 index dfc60ee..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/filters/whitespace.py +++ /dev/null @@ -1,38 +0,0 @@ -from __future__ import absolute_import, division, unicode_literals - -import re - -from . import _base -from ..constants import rcdataElements, spaceCharacters -spaceCharacters = "".join(spaceCharacters) - -SPACES_REGEX = re.compile("[%s]+" % spaceCharacters) - - -class Filter(_base.Filter): - - spacePreserveElements = frozenset(["pre", "textarea"] + list(rcdataElements)) - - def __iter__(self): - preserve = 0 - for token in _base.Filter.__iter__(self): - type = token["type"] - if type == "StartTag" \ - and (preserve or token["name"] in self.spacePreserveElements): - preserve += 1 - - elif type == "EndTag" and preserve: - preserve -= 1 - - elif not preserve and type == "SpaceCharacters" and token["data"]: - # Test on token["data"] above to not introduce spaces where there were not - token["data"] = " " - - elif not preserve and type == "Characters": - token["data"] = collapse_spaces(token["data"]) - - yield token - - -def collapse_spaces(text): - return SPACES_REGEX.sub(' ', text) diff --git a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/html5parser.py b/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/html5parser.py deleted file mode 100644 index 8a5acfe..0000000 --- a/jython-tosca-parser/src/main/resources/Lib/site-packages/pip/_vendor/html5lib/html5parser.py +++ /dev/null @@ -1,2725 +0,0 @@ -from __future__ import absolute_import, division, unicode_literals -from pip._vendor.six import with_metaclass - -import types - -from . import inputstream -from . import tokenizer - -from . import treebuilders -from .treebuilders._base import Marker - -from . import utils -from . import constants -from .constants import spaceCharacters, asciiUpper2Lower -from .constants import specialElements -from .constants import headingElements -from .constants import cdataElements, rcdataElements -from .constants import tokenTypes, ReparseException, namespaces -from .constants import htmlIntegrationPointElements, mathmlTextIntegrationPointElements - - -def parse(doc, treebuilder="etree", encoding=None, - namespaceHTMLElements=True): - """Parse a string or file-like object into a tree""" - tb = treebuilders.getTreeBuilder(treebuilder) - p = HTMLParser(tb, namespaceHTMLElements=namespaceHTMLElements) - return p.parse(doc, encoding=encoding) - - -def parseFragment(doc, container="div", treebuilder="etree", encoding=None, - namespaceHTMLElements=True): - tb = treebuilders.getTreeBuilder(treebuilder) - p = HTMLParser(tb, namespaceHTMLElements=namespaceHTMLElements) - return p.parseFragment(doc, container=container, encoding=encoding) - - -def method_decorator_metaclass(function): - class Decorated(type): - def __new__(meta, classname, bases, classDict): - for attributeName, attribute in classDict.items(): - if isinstance(attribute, types.FunctionType): - attribute = function(attribute) - - classDict[attributeName] = attribute - return type.__new__(meta, classname, bases, classDict) - return Decorated - - -class HTMLParser(object): - """HTML parser. Generates a tree structure from a stream of (possibly - malformed) HTML""" - - def __init__(self, tree=None, tokenizer=tokenizer.HTMLTokenizer, - strict=False, namespaceHTMLElements=True, debug=False): - """ - strict - raise an exception when a parse error is encountered - - tree - a treebuilder class controlling the type of tree that will be - returned. Built in treebuilders can be accessed through - html5lib.treebuilders.getTreeBuilder(treeType) - - tokenizer - a class that provides a stream of tokens to the treebuilder. - This may be replaced for e.g. a sanitizer which converts some tags to - text - """ - - # Raise an exception on the first error encountered - self.strict = strict - - if tree is None: - tree = treebuilders.getTreeBuilder("etree") - self.tree = tree(namespaceHTMLElements) - self.tokenizer_class = tokenizer - self.errors = [] - - self.phases = dict([(name, cls(self, self.tree)) for name, cls in - getPhases(debug).items()]) - - def _parse(self, stream, innerHTML=False, container="div", - encoding=None, parseMeta=True, useChardet=True, **kwargs): - - self.innerHTMLMode = innerHTML - self.container = container - self.tokenizer = self.tokenizer_class(stream, encoding=encoding, - parseMeta=parseMeta, - useChardet=useChardet, - parser=self, **kwargs) - self.reset() - - while True: - try: - self.mainLoop() - break - except ReparseException: - self.reset() - - def reset(self): - self.tree.reset() - self.firstStartTag = False - self.errors = [] - self.log = [] # only used with debug mode - # "quirks" / "limited quirks" / "no quirks" - self.compatMode = "no quirks" - - if self.innerHTMLMode: - self.innerHTML = self.container.lower() - - if self.innerHTML in cdataElements: - self.tokenizer.state = self.tokenizer.rcdataState - elif self.innerHTML in rcdataElements: - self.tokenizer.state = self.tokenizer.rawtextState - elif self.innerHTML == 'plaintext': - self.tokenizer.state = self.tokenizer.plaintextState - else: - # state already is data state - # self.tokenizer.state = self.tokenizer.dataState - pass - self.phase = self.phases["beforeHtml"] - self.phase.insertHtmlElement() - self.resetInsertionMode() - else: - self.innerHTML = False - self.phase = self.phases["initial"] - - self.lastPhase = None - - self.beforeRCDataPhase = None - - self.framesetOK = True - - def isHTMLIntegrationPoint(self, element): - if (element.name == "annotation-xml" and - element.namespace == namespaces["mathml"]): - return ("encoding" in element.attributes and - element.attributes["encoding"].translate( - asciiUpper2Lower) in - ("text/html", "application/xhtml+xml")) - else: - return (element.namespace, element.name) in htmlIntegrationPointElements - - def isMathMLTextIntegrationPoint(self, element): - return (element.namespace, element.name) in mathmlTextIntegrationPointElements - - def mainLoop(self): - CharactersToken = tokenTypes["Characters"] - SpaceCharactersToken = tokenTypes["SpaceCharacters"] - StartTagToken = tokenTypes["StartTag"] - EndTagToken = tokenTypes["EndTag"] - CommentToken = tokenTypes["Comment"] - DoctypeToken = tokenTypes["Doctype"] - ParseErrorToken = tokenTypes["ParseError"] - - for token in self.normalizedTokens(): - new_token = token - while new_token is not None: - currentNode = self.tree.openElements[-1] if self.tree.openElements else None - currentNodeNamespace = currentNode.namespace if currentNode else None - currentNodeName = currentNode.name if currentNode else None - - type = new_token["type"] - - if type == ParseErrorToken: - self.parseError(new_token["data"], new_token.get("datavars", {})) - new_token = None - else: - if (len(self.tree.openElements) == 0 or - currentNodeNamespace == self.tree.defaultNamespace or - (self.isMathMLTextIntegrationPoint(currentNode) and - ((type == StartTagToken and - token["name"] not in frozenset(["mglyph", "malignmark"])) or - type in (CharactersToken, SpaceCharactersToken))) or - (currentNodeNamespace == namespaces["mathml"] and - currentNodeName == "annotation-xml" and - token["name"] == "svg") or - (self.isHTMLIntegrationPoint(currentNode) and - type in (StartTagToken, CharactersToken, SpaceCharactersToken))): - phase = self.phase - else: - phase = self.phases["inForeignContent"] - - if type == CharactersToken: - new_token = phase.processCharacters(new_token) - elif type == SpaceCharactersToken: - new_token = phase.processSpaceCharacters(new_token) - elif type == StartTagToken: - new_token = phase.processStartTag(new_token) - elif type == EndTagToken: - new_token = phase.processEndTag(new_token) - elif type == CommentToken: - new_token = phase.processComment(new_token) - elif type == DoctypeToken: - new_token = phase.processDoctype(new_token) - - if (type == StartTagToken and token["selfClosing"] - and not token["selfClosingAcknowledged"]): - self.parseError("non-void-element-with-trailing-solidus", - {"name": token["name"]}) - - # When the loop finishes it's EOF - reprocess = True - phases = [] - while reprocess: - phases.append(self.phase) - reprocess = self.phase.processEOF() - if reprocess: - assert self.phase not in phases - - def normalizedTokens(self): - for token in self.tokenizer: - yield self.normalizeToken(token) - - def parse(self, stream, encoding=None, parseMeta=True, useChardet=True): - """Parse a HTML document into a well-formed tree - - stream - a filelike object or string containing the HTML to be parsed - - The optional encoding parameter must be a string that indicates - the encoding. If specified, that encoding will be used, - regardless of any BOM or later declaration (such as in a meta - element) - """ - self._parse(stream, innerHTML=False, encoding=encoding, - parseMeta=parseMeta, useChardet=useChardet) - return self.tree.getDocument() - - def parseFragment(self, stream, container="div", encoding=None, - parseMeta=False, useChardet=True): - """Parse a HTML fragment into a well-formed tree fragment - - container - name of the element we're setting the innerHTML property - if set to None, default to 'div' - - stream - a filelike object or string containing the HTML to be parsed - - The optional encoding parameter must be a string that indicates - the encoding. If specified, that encoding will be used, - regardless of any BOM or later declaration (such as in a meta - element) - """ - self._parse(stream, True, container=container, encoding=encoding) - return self.tree.getFragment() - - def parseError(self, errorcode="XXX-undefined-error", datavars={}): - # XXX The idea is to make errorcode mandatory. - self.errors.append((self.tokenizer.stream.position(), errorcode, datavars)) - if self.strict: - raise ParseError - - def normalizeToken(self, token): - """ HTML5 specific normalizations to the token stream """ - - if token["type"] == tokenTypes["StartTag"]: - token["data"] = dict(token["data"][::-1]) - - return token - - def adjustMathMLAttributes(self, token): - replacements = {"definitionurl": "definitionURL"} - for k, v in replacements.items(): - if k in token["data"]: - token["data"][v] = token["data"][k] - del token["data"][k] - - def adjustSVGAttributes(self, token): - replacements = { - "attributename": "attributeName", - "attributetype": "attributeType", - "basefrequency": "baseFrequency", - "baseprofile": "baseProfile", - "calcmode": "calcMode", - "clippathunits": "clipPathUnits", - "contentscripttype": "contentScriptType", - "contentstyletype": "contentStyleType", - "diffuseconstant": "diffuseConstant", - "edgemode": "edgeMode", - "externalresourcesrequired": "externalResourcesRequired", - "filterres": "filterRes", - "filterunits": "filterUnits", - "glyphref": "glyphRef", - "gradienttransform": "gradientTransform", - "gradientunits": "gradientUnits", - "kernelmatrix": "kernelMatrix", - "kernelunitlength": "kernelUnitLength", - "keypoints": "keyPoints", - "keysplines": "keySplines", - "keytimes": "keyTimes", - "lengthadjust": "lengthAdjust", - "limitingconeangle": "limitingConeAngle", - "markerheight": "markerHeight", - "markerunits": "markerUnits", - "markerwidth": "markerWidth", - "maskcontentunits": "maskContentUnits", - "maskunits": "maskUnits", - "numoctaves": "numOctaves", - "pathlength": "pathLength", - "patterncontentunits": "patternContentUnits", - "patterntransform": "patternTransform", - "patternunits": "patternUnits", - "pointsatx": "pointsAtX", - "pointsaty": "pointsAtY", - "pointsatz": "pointsAtZ", - "preservealpha": "preserveAlpha", - "preserveaspectratio": "preserveAspectRatio", - "primitiveunits": "primitiveUnits", - "refx": "refX", - "refy": "refY", - "repeatcount": "repeatCount", - "repeatdur": "repeatDur", - "requiredextensions": "requiredExtensions", - "requiredfeatures": "requiredFeatures", - "specularconstant": "specularConstant", - "specularexponent": "specularExponent", - "spreadmethod": "spreadMethod", - "startoffset": "startOffset", - "stddeviation": "stdDeviation", - "stitchtiles": "stitchTiles", - "surfacescale": "surfaceScale", - "systemlanguage": "systemLanguage", - "tablevalues": "tableValues", - "targetx": "targetX", - "targety": "targetY", - "textlength": "textLength", - "viewbox": "viewBox", - "viewtarget": "viewTarget", - "xchannelselector": "xChannelSelector", - "ychannelselector": "yChannelSelector", - "zoomandpan": "zoomAndPan" - } - for originalName in list(token["data"].keys()): - if originalName in replacements: - svgName = replacements[originalName] - token["data"][svgName] = token["data"][originalName] - del token["data"][originalName] - - def adjustForeignAttributes(self, token): - replacements = { - "xlink:actuate": ("xlink", "actuate", namespaces["xlink"]), - "xlink:arcrole": ("xlink", "arcrole", namespaces["xlink"]), - "xlink:href": ("xlink", "href", namespaces["xlink"]), - "xlink:role": ("xlink", "role", namespaces["xlink"]), - "xlink:show": ("xlink", "show", namespaces["xlink"]), - "xlink:title": ("xlink", "title", namespaces["xlink"]), - "xlink:type": ("xlink", "type", namespaces["xlink"]), - "xml:base": ("xml", "base", namespaces["xml"]), - "xml:lang": ("xml", "lang", namespaces["xml"]), - "xml:space": ("xml", "space", namespaces["xml"]), - "xmlns": (None, "xmlns", namespaces["xmlns"]), - "xmlns:xlink": ("xmlns", "xlink", namespaces["xmlns"]) - } - - for originalName in token["data"].keys(): - if originalName in replacements: - foreignName = replacements[originalName] - token["data"][foreignName] = token["data"][originalName] - del token["data"][originalName] - - def reparseTokenNormal(self, token): - self.parser.phase() - - def resetInsertionMode(self): - # The name of this method is mostly historical. (It's also used in the - # specification.) - last = False - newModes = { - "select": "inSelect", - "td": "inCell", - "th": "inCell", - "tr": "inRow", - "tbody": "inTableBody", - "thead": "inTableBody", - "tfoot": "inTableBody", - "caption": "inCaption", - "colgroup": "inColumnGroup", - "table": "inTable", - "head": "inBody", - "body": "inBody", - "frameset": "inFrameset", - "html": "beforeHead" - } - for node in self.tree.openElements[::-1]: - nodeName = node.name - new_phase = None - if node == self.tree.openElements[0]: - assert self.innerHTML - last = True - nodeName = self.innerHTML - # Check for conditions that should only happen in the innerHTML - # case - if nodeName in ("select", "colgroup", "head", "html"): - assert self.innerHTML - - if not last and node.namespace != self.tree.defaultNamespace: - continue - - if nodeName in newModes: - new_phase = self.phases[newModes[nodeName]] - break - elif last: - new_phase = self.phases["inBody"] - break - - self.phase = new_phase - - def parseRCDataRawtext(self, token, contentType): - """Generic RCDATA/RAWTEXT Parsing algorithm - contentType - RCDATA or RAWTEXT - """ - assert contentType in ("RAWTEXT", "RCDATA") - - self.tree.insertElement(token) - - if contentType == "RAWTEXT": - self.tokenizer.state = self.tokenizer.rawtextState - else: - self.tokenizer.state = self.tokenizer.rcdataState - - self.originalPhase = self.phase - - self.phase = self.phases["text"] - - -def getPhases(debug): - def log(function): - """Logger that records which phase processes each token""" - type_names = dict((value, key) for key, value in - constants.tokenTypes.items()) - - def wrapped(self, *args, **kwargs): - if function.__name__.startswith("process") and len(args) > 0: - token = args[0] - try: - info = {"type": type_names[token['type']]} - except: - raise - if token['type'] in constants.tagTokenTypes: - info["name"] = token['name'] - - self.parser.log.append((self.parser.tokenizer.state.__name__, - self.parser.phase.__class__.__name__, - self.__class__.__name__, - function.__name__, - info)) - return function(self, *args, **kwargs) - else: - return function(self, *args, **kwargs) - return wrapped - - def getMetaclass(use_metaclass, metaclass_func): - if use_metaclass: - return method_decorator_metaclass(metaclass_func) - else: - return type - - class Phase(with_metaclass(getMetaclass(debug, log))): - """Base class for helper object that implements each phase of processing - """ - - def __init__(self, parser, tree): - self.parser = parser - self.tree = tree - - def processEOF(self): - raise NotImplementedError - - def processComment(self, token): - # For most phases the following is correct. Where it's not it will be - # overridden. - self.tree.insertComment(token, self.tree.openElements[-1]) - - def processDoctype(self, token): - self.parser.parseError("unexpected-doctype") - - def processCharacters(self, token): - self.tree.insertText(token["data"]) - - def processSpaceCharacters(self, token): - self.tree.insertText(token["data"]) - - def processStartTag(self, token): - return self.startTagHandler[token["name"]](token) - - def startTagHtml(self, token): - if not self.parser.firstStartTag and token["name"] == "html": - self.parser.parseError("non-html-root") - # XXX Need a check here to see if the first start tag token emitted is - # this token... If it's not, invoke self.parser.parseError(). - for attr, value in token["data"].items(): - if attr not in self.tree.openElements[0].attributes: - self.tree.openElements[0].attributes[attr] = value - self.parser.firstStartTag = False - - def processEndTag(self, token): - return self.endTagHandler[token["name"]](token) - - class InitialPhase(Phase): - def processSpaceCharacters(self, token): - pass - - def processComment(self, token): - self.tree.insertComment(token, self.tree.document) - - def processDoctype(self, token): - name = token["name"] - publicId = token["publicId"] - systemId = token["systemId"] - correct = token["correct"] - - if (name != "html" or publicId is not None or - systemId is not None and systemId != "about:legacy-compat"): - self.parser.parseError("unknown-doctype") - - if publicId is None: - publicId = "" - - self.tree.insertDoctype(token) - - if publicId != "": - publicId = publicId.translate(asciiUpper2Lower) - - if (not correct or token["name"] != "html" - or publicId.startswith( - ("+//silmaril//dtd html pro v0r11 19970101//", - "-//advasoft ltd//dtd html 3.0 aswedit + extensions//", - "-//as//dtd html 3.0 aswedit + extensions//", - "-//ietf//dtd html 2.0 level 1//", - "-//ietf//dtd html 2.0 level 2//", - "-//ietf//dtd html 2.0 strict level 1//", - "-//ietf//dtd html 2.0 strict level 2//", - "-//ietf//dtd html 2.0 strict//", - "-//ietf//dtd html 2.0//", - "-//ietf//dtd html 2.1e//", - "-//ietf//dtd html 3.0//", - "-//ietf//dtd html 3.2 final//", - "-//ietf//dtd html 3.2//", - "-//ietf//dtd html 3//", - "-//ietf//dtd html level 0//", - "-//ietf//dtd html level 1//", - "-//ietf//dtd html level 2//", - "-//ietf//dtd html level 3//", - "-//ietf//dtd html strict level 0//", - "-//ietf//dtd html strict level 1//", - "-//ietf//dtd html strict level 2//", - "-//ietf//dtd html strict level 3//", - "-//ietf//dtd html strict//", - "-//ietf//dtd html//", - "-//metrius//dtd metrius presentational//", - "-//microsoft//dtd internet explorer 2.0 html strict//", - "-//microsoft//dtd internet explorer 2.0 html//", - "-//microsoft//dtd internet explorer 2.0 tables//", - "-//microsoft//dtd internet explorer 3.0 html strict//", - "-//microsoft//dtd internet explorer 3.0 html//", - "-//microsoft//dtd internet explorer 3.0 tables//", - "-//netscape comm. corp.//dtd html//", - "-//netscape comm. corp.//dtd strict html//", - "-//o'reilly and associates//dtd html 2.0//", - "-//o'reilly and associates//dtd html extended 1.0//", - "-//o'reilly and associates//dtd html extended relaxed 1.0//", - "-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//", - "-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//", - "-//spyglass//dtd html 2.0 extended//", - "-//sq//dtd html 2.0 hotmetal + extensions//", - "-//sun microsystems corp.//dtd hotjava html//", - "-//sun microsystems corp.//dtd hotjava strict html//", - "-//w3c//dtd html 3 1995-03-24//", - "-//w3c//dtd html 3.2 draft//", - "-//w3c//dtd html 3.2 final//", - "-//w3c//dtd html 3.2//", - "-//w3c//dtd html 3.2s draft//", - "-//w3c//dtd html 4.0 frameset//", - "-//w3c//dtd html 4.0 transitional//", - "-//w3c//dtd html experimental 19960712//", - "-//w3c//dtd html experimental 970421//", - "-//w3c//dtd w3 html//", - "-//w3o//dtd w3 html 3.0//", - "-//webtechs//dtd mozilla html 2.0//", - "-//webtechs//dtd mozilla html//")) - or publicId in - ("-//w3o//dtd w3 html strict 3.0//en//", - "-/w3c/dtd html 4.0 transitional/en", - "html") - or publicId.startswith( - ("-//w3c//dtd html 4.01 frameset//", - "-//w3c//dtd html 4.01 transitional//")) and - systemId is None - or systemId and systemId.lower() == "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"): - self.parser.compatMode = "quirks" - elif (publicId.startswith( - ("-//w3c//dtd xhtml 1.0 frameset//", - "-//w3c//dtd xhtml 1.0 transitional//")) - or publicId.startswith( - ("-//w3c//dtd html 4.01 frameset//", - "-//w3c//dtd html 4.01 transitional//")) and - systemId is not None): - self.parser.compatMode = "limited quirks" - - self.parser.phase = self.parser.phases["beforeHtml"] - - def anythingElse(self): - self.parser.compatMode = "quirks" - self.parser.phase = self.parser.phases["beforeHtml"] - - def processCharacters(self, token): - self.parser.parseError("expected-doctype-but-got-chars") - self.anythingElse() - return token - - def processStartTag(self, token): - self.parser.parseError("expected-doctype-but-got-start-tag", - {"name": token["name"]}) - self.anythingElse() - return token - - def processEndTag(self, token): - self.parser.parseError("expected-doctype-but-got-end-tag", - {"name": token["name"]}) - self.anythingElse() - return token - - def processEOF(self): - self.parser.parseError("expected-doctype-but-got-eof") - self.anythingElse() - return True - - class BeforeHtmlPhase(Phase): - # helper methods - def insertHtmlElement(self): - self.tree.insertRoot(impliedTagToken("html", "StartTag")) - self.parser.phase = self.parser.phases["beforeHead"] - - # other - def processEOF(self): - self.insertHtmlElement() - return True - - def processComment(self, token): - self.tree.insertComment(token, self.tree.document) - - def processSpaceCharacters(self, token): - pass - - def processCharacters(self, token): - self.insertHtmlElement() - return token - - def processStartTag(self, token): - if token["name"] == "html": - self.parser.firstStartTag = True - self.insertHtmlElement() - return token - - def processEndTag(self, token): - if token["name"] not in ("head", "body", "html", "br"): - self.parser.parseError("unexpected-end-tag-before-html", - {"name": token["name"]}) - else: - self.insertHtmlElement() - return token - - class BeforeHeadPhase(Phase): - def __init__(self, parser, tree): - Phase.__init__(self, parser, tree) - - self.startTagHandler = utils.MethodDispatcher([ - ("html", self.startTagHtml), - ("head", self.startTagHead) - ]) - self.startTagHandler.default = self.startTagOther - - self.endTagHandler = utils.MethodDispatcher([ - (("head", "body", "html", "br"), self.endTagImplyHead) - ]) - self.endTagHandler.default = self.endTagOther - - def processEOF(self): - self.startTagHead(impliedTagToken("head", "StartTag")) - return True - - def processSpaceCharacters(self, token): - pass - - def processCharacters(self, token): - self.startTagHead(impliedTagToken("head", "StartTag")) - return token - - def startTagHtml(self, token): - return self.parser.phases["inBody"].processStartTag(token) - - def startTagHead(self, token): - self.tree.insertElement(token) - self.tree.headPointer = self.tree.openElements[-1] - self.parser.phase = self.parser.phases["inHead"] - - def startTagOther(self, token): - self.startTagHead(impliedTagToken("head", "StartTag")) - return token - - def endTagImplyHead(self, token): - self.startTagHead(impliedTagToken("head", "StartTag")) - return token - - def endTagOther(self, token): - self.parser.parseError("end-tag-after-implied-root", - {"name": token["name"]}) - - class InHeadPhase(Phase): - def __init__(self, parser, tree): - Phase.__init__(self, parser, tree) - - self.startTagHandler = utils.MethodDispatcher([ - ("html", self.startTagHtml), - ("title", self.startTagTitle), - (("noscript", "noframes", "style"), self.startTagNoScriptNoFramesStyle), - ("script", self.startTagScript), - (("base", "basefont", "bgsound", "command", "link"), - self.startTagBaseLinkCommand), - ("meta", self.startTagMeta), - ("head", self.startTagHead) - ]) - self.startTagHandler.default = self.startTagOther - - self. endTagHandler = utils.MethodDispatcher([ - ("head", self.endTagHead), - (("br", "html", "body"), self.endTagHtmlBodyBr) - ]) - self.endTagHandler.default = self.endTagOther - - # the real thing - def processEOF(self): - self.anythingElse() - return True - - def processCharacters(self, token): - self.anythingElse() - return token - - def startTagHtml(self, token): - return self.parser.phases["inBody"].processStartTag(token) - - def startTagHead(self, token): - self.parser.parseError("two-heads-are-not-better-than-one") - - def startTagBaseLinkCommand(self, token): - self.tree.insertElement(token) - self.tree.openElements.pop() - token["selfClosingAcknowledged"] = True - - def startTagMeta(self, token): - self.tree.insertElement(token) - self.tree.openElements.pop() - token["selfClosingAcknowledged"] = True - - attributes = token["data"] - if self.parser.tokenizer.stream.charEncoding[1] == "tentative": - if "charset" in attributes: - self.parser.tokenizer.stream.changeEncoding(attributes["charset"]) - elif ("content" in attributes and - "http-equiv" in attributes and - attributes["http-equiv"].lower() == "content-type"): - # Encoding it as UTF-8 here is a hack, as really we should pass - # the abstract Unicode string, and just use the - # ContentAttrParser on that, but using UTF-8 allows all chars - # to be encoded and as a ASCII-superset works. - data = inputstream.EncodingBytes(attributes["content"].encode("utf-8")) - parser = inputstream.ContentAttrParser(data) - codec = parser.parse() - self.parser.tokenizer.stream.changeEncoding(codec) - - def startTagTitle(self, token): - self.parser.parseRCDataRawtext(token, "RCDATA") - - def startTagNoScriptNoFramesStyle(self, token): - # Need to decide whether to implement the scripting-disabled case - self.parser.parseRCDataRawtext(token, "RAWTEXT") - - def startTagScript(self, token): - self.tree.insertElement(token) - self.parser.tokenizer.state = self.parser.tokenizer.scriptDataState - self.parser.originalPhase = self.parser.phase - self.parser.phase = self.parser.phases["text"] - - def startTagOther(self, token): - self.anythingElse() - return token - - def endTagHead(self, token): - node = self.parser.tree.openElements.pop() - assert node.name == "head", "Expected head got %s" % node.name - self.parser.phase = self.parser.phases["afterHead"] - - def endTagHtmlBodyBr(self, token): - self.anythingElse() - return token - - def endTagOther(self, token): - self.parser.parseError("unexpected-end-tag", {"name": token["name"]}) - - def anythingElse(self): - self.endTagHead(impliedTagToken("head")) - - # XXX If we implement a parser for which scripting is disabled we need to - # implement this phase. - # - # class InHeadNoScriptPhase(Phase): - class AfterHeadPhase(Phase): - def __init__(self, parser, tree): - Phase.__init__(self, parser, tree) - - self.startTagHandler = utils.MethodDispatcher([ - ("html", self.startTagHtml), - ("body", self.startTagBody), - ("frameset", self.startTagFrameset), - (("base", "basefont", "bgsound", "link", "meta", "noframes", "script", - "style", "title"), - self.startTagFromHead), - ("head", self.startTagHead) - ]) - self.startTagHandler.default = self.startTagOther - self.endTagHandler = utils.MethodDispatcher([(("body", "html", "br"), - self.endTagHtmlBodyBr)]) - self.endTagHandler.default = self.endTagOther - - def processEOF(self): - self.anythingElse() - return True - - def processCharacters(self, token): - self.anythingElse() - return token - - def startTagHtml(self, token): - return self.parser.phases["inBody"].processStartTag(token) - - def startTagBody(self, token): - self.parser.framesetOK = False - self.tree.insertElement(token) - self.parser.phase = self.parser.phases["inBody"] - - def startTagFrameset(self, token): - self.tree.insertElement(token) - self.parser.phase = self.parser.phases["inFrameset"] - - def startTagFromHead(self, token): - self.parser.parseError("unexpected-start-tag-out-of-my-head", - {"name": token["name"]}) - self.tree.openElements.append(self.tree.headPointer) - self.parser.phases["inHead"].processStartTag(token) - for node in self.tree.openElements[::-1]: - if node.name == "head": - self.tree.openElements.remove(node) - break - - def startTagHead(self, token): - self.parser.parseError("unexpected-start-tag", {"name": token["name"]}) - - def startTagOther(self, token): - self.anythingElse() - return token - - def endTagHtmlBodyBr(self, token): - self.anythingElse() - return token - - def endTagOther(self, token): - self.parser.parseError("unexpected-end-tag", {"name": token["name"]}) - - def anythingElse(self): - self.tree.insertElement(impliedTagToken("body", "StartTag")) - self.parser.phase = self.parser.phases["inBody"] - self.parser.framesetOK = True - - class InBodyPhase(Phase): - # http://www.whatwg.org/specs/web-apps/current-work/#parsing-main-inbody - # the really-really-really-very crazy mode - def __init__(self, parser, tree): - Phase.__init__(self, parser, tree) - - # Keep a ref to this for special handling of whitespace in
-            self.processSpaceCharactersNonPre = self.processSpaceCharacters
-
-            self.startTagHandler = utils.MethodDispatcher([
-                ("html", self.startTagHtml),
-                (("base", "basefont", "bgsound", "command", "link", "meta",
-                  "noframes", "script", "style", "title"),
-                 self.startTagProcessInHead),
-                ("body", self.startTagBody),
-                ("frameset", self.startTagFrameset),
-                (("address", "article", "aside", "blockquote", "center", "details",
-                  "details", "dir", "div", "dl", "fieldset", "figcaption", "figure",
-                  "footer", "header", "hgroup", "main", "menu", "nav", "ol", "p",
-                  "section", "summary", "ul"),
-                 self.startTagCloseP),
-                (headingElements, self.startTagHeading),
-                (("pre", "listing"), self.startTagPreListing),
-                ("form", self.startTagForm),
-                (("li", "dd", "dt"), self.startTagListItem),
-                ("plaintext", self.startTagPlaintext),
-                ("a", self.startTagA),
-                (("b", "big", "code", "em", "font", "i", "s", "small", "strike",
-                  "strong", "tt", "u"), self.startTagFormatting),
-                ("nobr", self.startTagNobr),
-                ("button", self.startTagButton),
-                (("applet", "marquee", "object"), self.startTagAppletMarqueeObject),
-                ("xmp", self.startTagXmp),
-                ("table", self.startTagTable),
-                (("area", "br", "embed", "img", "keygen", "wbr"),
-                 self.startTagVoidFormatting),
-                (("param", "source", "track"), self.startTagParamSource),
-                ("input", self.startTagInput),
-                ("hr", self.startTagHr),
-                ("image", self.startTagImage),
-                ("isindex", self.startTagIsIndex),
-                ("textarea", self.startTagTextarea),
-                ("iframe", self.startTagIFrame),
-                (("noembed", "noframes", "noscript"), self.startTagRawtext),
-                ("select", self.startTagSelect),
-                (("rp", "rt"), self.startTagRpRt),
-                (("option", "optgroup"), self.startTagOpt),
-                (("math"), self.startTagMath),
-                (("svg"), self.startTagSvg),
-                (("caption", "col", "colgroup", "frame", "head",
-                  "tbody", "td", "tfoot", "th", "thead",
-                  "tr"), self.startTagMisplaced)
-            ])
-            self.startTagHandler.default = self.startTagOther
-
-            self.endTagHandler = utils.MethodDispatcher([
-                ("body", self.endTagBody),
-                ("html", self.endTagHtml),
-                (("address", "article", "aside", "blockquote", "button", "center",
-                  "details", "dialog", "dir", "div", "dl", "fieldset", "figcaption", "figure",
-                  "footer", "header", "hgroup", "listing", "main", "menu", "nav", "ol", "pre",
-                  "section", "summary", "ul"), self.endTagBlock),
-                ("form", self.endTagForm),
-                ("p", self.endTagP),
-                (("dd", "dt", "li"), self.endTagListItem),
-                (headingElements, self.endTagHeading),
-                (("a", "b", "big", "code", "em", "font", "i", "nobr", "s", "small",
-                  "strike", "strong", "tt", "u"), self.endTagFormatting),
-                (("applet", "marquee", "object"), self.endTagAppletMarqueeObject),
-                ("br", self.endTagBr),
-            ])
-            self.endTagHandler.default = self.endTagOther
-
-        def isMatchingFormattingElement(self, node1, node2):
-            if node1.name != node2.name or node1.namespace != node2.namespace:
-                return False
-            elif len(node1.attributes) != len(node2.attributes):
-                return False
-            else:
-                attributes1 = sorted(node1.attributes.items())
-                attributes2 = sorted(node2.attributes.items())
-                for attr1, attr2 in zip(attributes1, attributes2):
-                    if attr1 != attr2:
-                        return False
-            return True
-
-        # helper
-        def addFormattingElement(self, token):
-            self.tree.insertElement(token)
-            element = self.tree.openElements[-1]
-
-            matchingElements = []
-            for node in self.tree.activeFormattingElements[::-1]:
-                if node is Marker:
-                    break
-                elif self.isMatchingFormattingElement(node, element):
-                    matchingElements.append(node)
-
-            assert len(matchingElements) <= 3
-            if len(matchingElements) == 3:
-                self.tree.activeFormattingElements.remove(matchingElements[-1])
-            self.tree.activeFormattingElements.append(element)
-
-        # the real deal
-        def processEOF(self):
-            allowed_elements = frozenset(("dd", "dt", "li", "p", "tbody", "td",
-                                          "tfoot", "th", "thead", "tr", "body",
-                                          "html"))
-            for node in self.tree.openElements[::-1]:
-                if node.name not in allowed_elements:
-                    self.parser.parseError("expected-closing-tag-but-got-eof")
-                    break
-            # Stop parsing
-
-        def processSpaceCharactersDropNewline(self, token):
-            # Sometimes (start of 
, , and