Fix retrieval of number of instances of a node
Fix retrieval of number of instances of a node

This patch fixes a FIXME to make the retrieval of the
number of primary and secondary instances share more
common code.

Signed-off-by: Helga Velroyen <2d0126b1ec6f9ec5cbec4a7012aa14faeaef10f5@google.com>
Reviewed-by: Klaus Aehlig <4ce51de36d9068cd7db2eec1151e0f3f95419008@google.com>

yiannist/ganeti,yiannist/ganeti,leshchevds/ganeti,ganeti-github-testing/ganeti-test-1,leshchevds/ganeti,onponomarev/ganeti,apyrgio/ganeti,grnet/snf-ganeti,mbakke/ganeti,ganeti-github-testing/ganeti-test-1,dimara/ganeti,ganeti/ganeti,grnet/snf-ganeti,ganeti/ganeti,yiannist/ganeti,apyrgio/ganeti,andir/ganeti,andir/ganeti,mbakke/ganeti,bitemyapp/ganeti,onponomarev/ganeti,mbakke/ganeti,ganeti/ganeti,andir/ganeti,bitemyapp/ganeti,dimara/ganeti,leshchevds/ganeti