示例#1
0
    def test_create_forest(self):
        host = Host.list(self.connection)[0]

        forest = Forest("test-forest-simple-create", host=host)

        forest.set_large_data_directory("")
        forest.set_fast_data_directory("")

        forest.create(self.connection)

        forest = Forest.lookup(self.connection, "test-forest-simple-create")

        try:
            assert forest is not None
            assert "test-forest-simple-create" == forest.forest_name()
            assert host == forest.host()
            assert "" == forest.large_data_directory()
            assert "" == forest.fast_data_directory()
        finally:
            forest.delete(connection=self.connection)
示例#2
0
    def test_create_forest(self):
        conn = Connection(tc.hostname, HTTPDigestAuth(tc.admin, tc.password))

        host = Host.list(conn)[0]

        forest = Forest("test-forest-simple-create", host=host)

        forest.set_large_data_directory(ds.large_data_directory)
        forest.set_fast_data_directory(ds.fast_data_directory)

        forest.create(conn)

        forest = Forest.lookup(conn, "test-forest-simple-create")

        try:
            self.assertIsNotNone(forest)
            self.assertEqual("test-forest-simple-create", forest.forest_name())
            self.assertEqual(host, forest.host())
            self.assertEqual(ds.large_data_directory, forest.large_data_directory())
            self.assertEqual(ds.fast_data_directory, forest.fast_data_directory())
        finally:
            forest.delete(connection=conn)