I can confirm this works, though in testing it I found what seems likely to be a bug in mgmt_cli's processing of session files. I'll open a ticket about that.
The "ignore-warnings" key doesn't appear in any of the API documentation I've checked, though I haven't checked exhaustively.
[Expert@MyMDS:0]# mgmt_cli -f json -d "MDS" -r true login >session.txt
[Expert@MyMDS:0]# mgmt_cli -f json -s session.txt show hosts limit 2 domains-to-process.1 ALL_DOMAINS_ON_THIS_SERVER ignore-warnings true
{
"objects" : [ {
"uid" : "08f0e998-b092-49ef-83cb-f56b367e4c5c",
"name" : "SomeHost",
"type" : "host",
"domain" : {
"uid" : "f538d6a9-dd21-40cc-b400-c758b2a05882",
"name" : "CMA_1",
"domain-type" : "domain"
},
"ipv4-address" : "2.3.4.5",
"icon" : "Objects/host",
"color" : "black"
}, {
"uid" : "ccb0a948-c5ed-43e3-9e2f-f8aa331b3bcb",
"name" : "SomeHost_2",
"type" : "host",
"domain" : {
"uid" : "11415233-c3d4-4c3b-bc8b-6413ba75f64d",
"name" : "CMA_2",
"domain-type" : "domain"
},
"ipv4-address" : "3.4.5.6",
"icon" : "Objects/host",
"color" : "black"
} ],
"from" : 1,
"to" : 2,
"total" : 55184
}
Note that this only makes sense on an MDS, and the "System Domain" is named "MDS".
It technically works on SmartCenters when you log in to the "System Data" domain, but a SmartCenter can only contain one domain, so there's no real point to doing it. You may as well log in to the functional domain directly.