Example #1
0
 def test_load_xml_defaults_with_type_and_locale(self):
     expected = [{
         'name': u'name1',
         'value': u'value1',
         'type': u'String',
         'description': 'descr1'
     }, {
         'name': u'name2',
         'value': u'value2',
         'type': u'',
         'description': 'descr2'
     }, {
         'name': u'name3',
         'value': '',
         'type': u'String',
         'description': 'descr3'
     }, {
         'name': u'name4',
         'value': '',
         'type': u'String',
         'description': 'descr4'
     }, {
         'name': u'name5',
         'value': u'value5',
         'type': u'String',
         'description': ''
     }]
     actual = x.load_hadoop_xml_defaults_with_type_and_locale(
         'tests/unit/resources/test-default-with-type-and-locale.xml')
     self.assertListEqual(expected, actual)
Example #2
0
 def test_load_xml_defaults_with_type_and_locale(self):
     expected = [
         {'name': u'name1', 'value': u'value1', 'type': u'String',
          'description': 'descr1'},
         {'name': u'name2', 'value': u'value2', 'type': u'',
          'description': 'descr2'},
         {'name': u'name3', 'value': '', 'type': u'String',
          'description': 'descr3'},
         {'name': u'name4', 'value': '', 'type': u'String',
          'description': 'descr4'},
         {'name': u'name5', 'value': u'value5', 'type': u'String',
          'description': ''}]
     actual = x.load_hadoop_xml_defaults_with_type_and_locale(
         'tests/unit/resources/test-default-with-type-and-locale.xml')
     self.assertListEqual(
         expected,
         actual)
Example #3
0
# 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 sahara.plugins import provisioning as p
from sahara.utils import xmlutils as x

CORE_DEFAULT = x.load_hadoop_xml_defaults_with_type_and_locale(
    'plugins/intel/v2_5_1/resources/hadoop-default.xml')

HDFS_DEFAULT = x.load_hadoop_xml_defaults_with_type_and_locale(
    'plugins/intel/v2_5_1/resources/hdfs-default.xml')

MAPRED_DEFAULT = x.load_hadoop_xml_defaults_with_type_and_locale(
    'plugins/intel/v2_5_1/resources/mapred-default.xml')

OOZIE_DEFAULT = x.load_hadoop_xml_defaults(
    'plugins/intel/v2_5_1/resources/oozie-default.xml')

XML_CONFS = {
    "Hadoop": [CORE_DEFAULT],
    "HDFS": [HDFS_DEFAULT],
    "MapReduce": [MAPRED_DEFAULT],
    "JobFlow": [OOZIE_DEFAULT]
Example #4
0
# 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 sahara.plugins import provisioning as p
from sahara.utils import xmlutils as x


CORE_DEFAULT = x.load_hadoop_xml_defaults_with_type_and_locale(
    'plugins/intel/v2_5_1/resources/hadoop-default.xml')

HDFS_DEFAULT = x.load_hadoop_xml_defaults_with_type_and_locale(
    'plugins/intel/v2_5_1/resources/hdfs-default.xml')

MAPRED_DEFAULT = x.load_hadoop_xml_defaults_with_type_and_locale(
    'plugins/intel/v2_5_1/resources/mapred-default.xml')

OOZIE_DEFAULT = x.load_hadoop_xml_defaults(
    'plugins/intel/v2_5_1/resources/oozie-default.xml')


XML_CONFS = {
    "Hadoop": [CORE_DEFAULT],
    "HDFS": [HDFS_DEFAULT],
    "MapReduce": [MAPRED_DEFAULT],