[REVIEW v4] Storage mounting API
Jan Safranek
jsafrane at redhat.com
Mon Mar 25 09:20:38 UTC 2013
On 03/22/2013 09:24 AM, Jan Synacek wrote:
> On 03/21/2013 02:03 PM, Jan Safranek wrote:
>> On 03/20/2013 11:07 AM, Jan Synacek wrote:
> {Create,Modify,Delete}Mount() methods should only do what they say, meaning that
> CreateMount() shouldn't modify anything. I would say, that if
> CreateMount(Mode=1) is called and there already exists an fstab entry, only
> mount should be performed. The same with other methods. The mode, in my opinion,
> should reflect the state *after* the method call.
>
> On the other hand, if I attempt to mount something that is already mounted via
> the mount(8) command, an error is raised.
>
> What do you think?
Now the mof file looks good to me. As for create(), I'd rather return
error, when the mount already exists + add lot of examples to
documentation when/how to call Create and Modify.
Also a minor nitpicking:
> [ Description (
> "Class for representing mounted filesystems. Can be thought of as an entry "
> "in /etc/mtab." ) ]
> class MountedFileSystem : CIM_ManagedElement
...
> [ Key, Description (
> "Filesystem specification. Corresponds to the device field in "
> "/etc/fstab." ) ]
> string FileSystemSpec;
I would write that the MountedFileSystem can represent both /etc/mtab
and /etc/fstab entry, depending on its associated Settings.
Jan
More information about the openlmi-devel
mailing list