mon: osd crush rule create-erasure

Delegates the creation of the rule to the erasure code plugin associated
with the specified pool.

Signed-off-by: Loic Dachary <loic@dachary.org>
pybind: fix tests that do not fail as expected

A missing argument make the test fail indeed, but the intended test is
to demonstrate something else ( either character validation or excess of
arguments etc. ). The result is {} instead of None which is what should
have been expected in the first place.

Ideally there would be a more verbose way to check for syntactic errors
to make such mistakes less probable.

Signed-off-by: Loic Dachary <loic@dachary.org>
pybind: cosmetic changes to tests

* untabify
* re-indent
* 2014 to copyright notice

Signed-off-by: Loic Dachary <loic@dachary.org>
pybind: osd crush rule create-erasure tests

Signed-off-by: Loic Dachary <loic@dachary.org>
erasure-code: add crush ruleset creation API

Because only the erasure code plugin knows enough to create a ruleset
that is best suited for a given set of parameters.

Signed-off-by: Loic Dachary <loic@dachary.org>
erasure-code: implement example create_ruleset

And the associated unit tests.

Signed-off-by: Loic Dachary <loic@dachary.org>
erasure-code: implement ErasureCodeJerasure::create_ruleset

It is based on CrushWrapper::add_simple_ruleset, using a "default" root
and "host" failure domain by default. They can be overridden with
erasure-code parameters ( erasure-code-ruleset-root and
erasure-code-ruleset-failure-domain respectively ).

Signed-off-by: Loic Dachary <loic@dachary.org>
erasure-code: test ErasureCodeJerasure::create_ruleset

Signed-off-by: Loic Dachary <loic@dachary.org>