API Convetion confusions
Consider the following.
ltm = F5::IControl.new(ltm_name, username, password, ["LocalLB.VirtualServer"]).get_interfaces["LocalLB.VirtualServer"]
ltm.add_rule(["temp_vserver"], [[{:rule_name => "new_rule, :priority => 3}]])
The irule object/hash is imbedded in two arrays. The API is shown here.
in LocalLB__VirtualServer__VirtualServerRule [] [] rules
In referncing the API documentation how am I to know that the irule object should be imbedded in two arrays?
It makes sense to me that the irule object is in a hash corresponding with the struct defined in the API.
{:rule_name => "new_rule", :priority => 3}
It also makes sense to me that this object is inside of an array, since you may want to add multiple rules at the same time. [{:rule_name => "new_rule", :priority => 3}, {:rule_name => "other_new_rule", :priority => 4}]
What I don't get is why all of this is embedded in yet another array and I also don't see how I am supposed to tell this from the API. I figured this out by reading others code on the devcentral codeshare.