Gris Ge
2015-02-16 12:49:53 UTC
Hey Guys,
I am planning to utilize 'flags' argument of lsm.Client.disks() for
querying free disk only. But I might need some clarification on this.
All the plugins in current code tree simply __ignore__ 'flags'
parameter which means even we pass something to 'flags', unimplemented plugin
will still do the identical task like we set flags as 0(Client.FLAG_RSVD).
I think 'wrong data is worse than no data'.
To achieve that, all public methods of plugins should have codes like this:
if flags != Client.FLAG_RSVD:
raise LsmError(
ErrorNumber.NO_SUPPORT,
"Got unsupported flags from argument")
In this case, 'flags' is optional for client, but mandatory for plugin.
Any ideas?
Best regards.
I am planning to utilize 'flags' argument of lsm.Client.disks() for
querying free disk only. But I might need some clarification on this.
All the plugins in current code tree simply __ignore__ 'flags'
parameter which means even we pass something to 'flags', unimplemented plugin
will still do the identical task like we set flags as 0(Client.FLAG_RSVD).
I think 'wrong data is worse than no data'.
To achieve that, all public methods of plugins should have codes like this:
if flags != Client.FLAG_RSVD:
raise LsmError(
ErrorNumber.NO_SUPPORT,
"Got unsupported flags from argument")
In this case, 'flags' is optional for client, but mandatory for plugin.
Any ideas?
Best regards.
--
Gris Ge
Gris Ge