-
1. Re: Deep copy server-group via management API
nickarls Mar 4, 2013 1:56 AM (in response to alexont)Never tried it but according to the Javadocs, ModelNode has a clone() method, does it do anything clever?
-
2. Re: Deep copy server-group via management API
alexont Mar 4, 2013 7:03 AM (in response to nickarls)Hi,
Clone apparently does an exact copy of a node, but trying to add it fails with the same error.
It it possible that a part of the configuration read via the management API cannot be used for adding it under another name? Should it be processed somehow? Please advice.
Is anyone aware of some other method for achieving this?
Thanks,
Alex
-
3. Re: Deep copy server-group via management API
emuckenhuber Mar 4, 2013 7:08 AM (in response to alexont)You have to :add() the children of the server group (like jvm) separately. The server-group:add() only takes a reference to the jvm, not the whole submodel.
The :read-resource-description and :read-operation-description should give you more details on what attributes the operation requires.
-
4. Re: Deep copy server-group via management API
alexont Mar 4, 2013 7:28 AM (in response to emuckenhuber)Is there a general method for transforming the read ModelNode instance into a ModelNode which can be used for writing, without "knowing" its specific structure.
This could be used to make an exact copy of some configuration part. I think this could be useful in other cases as well (e.g. duplicate a datasource, and change only some relevant information, etc.)
Thanks,
Alex
-
5. Re: Deep copy server-group via management API
ctomc Mar 4, 2013 8:36 AM (in response to alexont)The closes to what you are looking for is :describe() operation on subsystem for instance /subsystem=mail:describe
but what you want makes a reasonable new feature we should have.
can you create jira for it
--
tomaz
-