cli: Stop infinite recursion when expanding types
cli: Stop infinite recursion when expanding types

Currently the method that expands nested types doesn't take into account
that the types may be recursive, thus there is potential for an infinite
recursion. This actually happens with the "HostNIC" broker class which
constructor has the following declaration:

  def __init__(self, host, hostnic, context):

Currently when the CLI processes this method it will try to expand the
"host" and "hostnic" types, then it will find that the "hostnic"
parameter corresponds to the "HostNIC" broker, and will process it
again, recursively. To stop this infinite recursion this patch changes
the CLI so that it will check for this condition and stop the recursion.

Change-Id: I63c741f428eb7fdd266f067dbd662f217dcae431
Signed-off-by: Juan Hernandez <59e5b8140de97cc91c3fb6c5342dce948469af8c@redhat.com>

oVirt/ovirt-engine-cli,oVirt/ovirt-engine-cli