Add the get_profile method to the interface and make it a pure virtual.
Each plugin is expected to return the profile currently in use. Although
the profile is also stored in the OSDMap, it provides a convenient
introspection method to validate that the profile being set is indeed
the profile being used.
Signed-off-by: Loic Dachary <ldachary@redhat.com>
*/
virtual int init(ErasureCodeProfile &profile, ostream *ss) = 0;
+ /**
+ * Return the profile that was used to initialize the instance
+ * with the **init** method.
+ *
+ * @return the profile in use by the instance
+ */
+ virtual const ErasureCodeProfile &get_profile() const = 0;
+
/**
* Create a new ruleset in **crush** under the name **name**,
* unless it already exists.