Hi all,
I have correct my last comment. It works, Bug ISO Layer 8 - read the manual.
It is very simple to request the attributes for models where the model-handles are known.
I have done it in PHP, - looks like "BASIC" *-).
This example is not the right answer to the question.
It is not possible to fetch the childmodels for a device and their attributes in one step.
To get the child-models we have to to fetch the models which have a relation or association to the device.
This is more compareable to the fetch for the Models in a global collection..
// static assigned to GC
// http://192.0.1.2:8080/spectrum/restful/associations/relation/0x0001003b/model/0xffe0046f?side=left
// dynamic assigned to GC
// http://192.0.1.2:8080/spectrum/restful/associations/relation/0x0001003a/model/0xffe0046f?side=left
The result is a association-response-list and not model-response-list. But this will provide the model-handles of the childs.
Then, in a second step, it would be possible to fetch the needed attributes per model.
In my case, I fetch attributes for given models, identified by model-handles.
$modelArr is an array out of Model-Handles, for example 0x1234a67 or 0x1234a68
$filter = "<rs:target-models>";
foreach ($modelArr as $modelEntry)
{
$filter = $filter . '<rs:model mh="'. trim($modelEntry) .'"/>';
}
$filter = $filter ."</rs:target-models>";
$data = '<?xml version="1.0" encoding="UTF-8"?><rs:model-request throttlesize="'.$throttlesize.'"
xmlns:rs="http://www.ca.com/spectrum/restful/schema/request"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ca.com/spectrum/restful/schema/request ../../../xsd/Request.xsd ">';
if ($filter <> "")
{
$data = $data . $filter ;
}
$data = $data .'
<rs:requested-attribute id="0x129fa" />
<rs:requested-attribute id="0x12d7f" />
<rs:requested-attribute id="0x129e7" />
<rs:requested-attribute id="0x1006e" />
<rs:requested-attribute id="0x12adb" />
</rs:model-request>';
Finally it looks like this for these two models 0x1234a67 and 0x1234a68:
<?xml version="1.0" encoding="UTF-8"?><rs:model-request throttlesize="1000"
xmlns:rs="http://www.ca.com/spectrum/restful/schema/request"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.ca.com/spectrum/restful/schema/request ../../../xsd/Request.xsd ">
<rs:target-models>
<rs:model mh="0x1234a67"/>
<rs:model mh="0x1234a68"/>
</rs:target-models>
<rs:requested-attribute id="0x129fa" />
<rs:requested-attribute id="0x12d7f" />
<rs:requested-attribute id="0x129e7" />
<rs:requested-attribute id="0x1006e" />
<rs:requested-attribute id="0x12adb" />
</rs:model-request>
Perhaps this helps *-)