LogicalFile provider usability

Jan Synacek jsynacek at redhat.com
Thu Sep 5 13:25:05 UTC 2013


All LogicalFile classes as well as LMI_UnixFile require information about the
filesystem (its CreationClassName and UUID/partition name) and the type of the
file (is it a directory/symlink/blockdevice/...?) to be known before it's
possible to call GetInstance() on them.

Now on the client side, if I want show information about a file, I only want to
specify its path, nothing else. And that's a problem, because I usually have no
idea what the file's type and the partition it lies on is, that's why I want to
ask the provider in the first place.

Currently, the provider checks for all those key properties and returns an error
if they are not present, or they are incorrect. So, on the client side, I have
to provide information that I don't know, and on the server side, it requires
those pieces of information, otherwise an error is raised. Which leads me to a
few questions.

1) What is the purpose of FSCreationClassName, FSName and LFCreationClassName in
the LMI_UnixFile class? If my understanding is correct, in the linux
environment, it should be safe to ignore those, because it is impossible for any
two files on the filesystem to have different paths and actually be the same
file (following symlinks doesn't count here). In other words, file's path should
be enough to unambiguously identify that file. Please, correct me if I'm wrong.

2) Is there a way how to find out what the aforementioned key properties are?

As for the solution, I'm for simply ignoring FSCreationClassName, FSName and
LFCreationClassName in the provider.

Comments appreciated.

Cheers,
-- 
Jan Synacek
Software Engineer, Red Hat


More information about the openlmi-devel mailing list