Hi,
i trying to make some automatisation scripts for some, let say stupid tasks.
as example I have created a script which one should modify the role capabilities, and it works fine, but only the first entry is aplyed everything else ist ignored, and i dont know why, could be some one can help my by this... here is my sourcecode:
my $add_role = NaElement->new("useradmin-role-modify");
my $add_role_sub = NaElement->new("useradmin-role");
my $add_role_sub_info = NaElement->new("useradmin-role-info");
my $add_role_sub_capa = NaElement->new("allowed-capabilities");
my $add_role_sub_capa_info = NaElement->new("useradmin-capability-info");
$add_role_sub_capa_info->child_add_string("name", 'api-disk-*');
$add_role_sub_capa_info->child_add_string("name", 'api-clock-get-clock');
$add_role_sub_capa_info->child_add_string("name", 'api-snapshot-list-info');
$add_role_sub_capa_info->child_add_string("name", 'api-snapmirror-get-status');
...
$add_role_sub_capa->child_add($add_role_sub_capa_info);
$add_role_sub_info->child_add($add_role_sub_capa);
$add_role_sub_info->child_add_string("name","test_role");
$add_role_sub->child_add($add_role_sub_info);
$add_role->child_add($add_role_sub);
print $add_role->sprintf(); # to check the request struktur a preoutput of the request string
my $role_results = $s->invoke_elem($add_role);
print $role_results->sprintf(); #
so far ok, but on the end it will only apply the green line
->child_add_string("name", 'api-disk-*');
all other redlines
->child_add_string("name",...
are simply ignored.
strange but the structure of this is rigth and looks ok when i do a sprintf()
so my question:
howe i can make this change with the perl API? it looks like a multiple substring with same name are simpy ignored, or what i'm doing wrong?
Thank you in advance!