/* * Copyright (C) 2013 Red Hat, Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Authors: Jan Synacek */ [ Description ( "Class for representing mount options. Basic boolean properties represent " "filesystem independent mount options (as listed in mount(8)). Options " "'auto' and 'user' are ommited, as they only make sense in /etc/fstab." ) ] class LMI_MountedFileSystemSetting : CIM_SettingData { [ Description ( "All I/O to the filesystem should be done synchronously. In case of " "media with limited number of write cycles (e.g. some flash drives), " "this option may cause life-cycle shortening. Corresponds to 'sync' " "mount option." ) ] boolean SynchronousIO; [ Description ( "All directory updates within the filesystem should be done " "synchronously. This affects the following system calls: creat, link, " "unlink, symlink, mkdir, rmdir, mknod and rename. Corresponds to " "'dirsync' mount option." ) ] boolean SynchronousDirectoryUpdates; [ Description ( "Update inode access times on this filesystem. Corresponds to 'atime' " "mount option." ) ] boolean UpdateAccessTimes; [ Description ( "Allows to explicitly requesting full atime updates. This makes it " "possible for kernel to defaults to relatime or noatime but still " "allow userspace to override it. Corresponds to 'strictatime' mount " "option." ) ] boolean UpdateFullAccessTimes; [ Description ( "Update inode access times relative to modify or change time. Access " "time is only updated if the previous access time was earlier than the " "current modify or change time. Corresponds to 'relatime' mount " "option." ) ] boolean UpdateRelativeAccessTimes; [ Description ( "Update directory inode access times on this filesystem. This is the " "default. Corresponds to 'diratime' mount option." ) ] boolean UpdateDirectoryAccessTimes; [ Description ( "Interpret character or block special devices on the filesystem." "Corresponds to 'dev' mount option." ) ] boolean InterpretDevices; [ Description ( "Allow mandatory locks on this filesystem. See fcntl(2). Corresponds " "to 'mand' mount option." ) ] boolean AllowMandatoryLock; [ Description ( "Permit execution of binaries. Corresponds to 'exec' mount option." ) ] boolean AllowExecution; [ Description ( "Allow set-user-identifier or set-group-identifier bits to take " "effect. Corresponds to 'suid' mount option." ) ] boolean AllowSUID; [ Description ( "Mount the filesystem read-write. If false, mount read-only." "Corresponds to 'rw' mount option." ) ] boolean AllowWrite; [ Description ( "Turn on the silent flag. Corresponds to 'silent' mount option." ) ] boolean Silent; [ Description ( "Other mount options that can be filesystem specific. This property is " "also used to specify options with values (e.g. uid=0 or gid=100). " "OtherOptions are appended (in the same order as they appear in the " "array) to the basic options." ), ArrayType ( "Indexed" ) ] string OtherOptions[]; [ Description ( "This field is used for these filesystems by the dump(8) command to " "determine which filesystems need to be dumped. If the field is " "not present, a value of zero is returned and dump will assume that " "the filesystem does not need to be dumped." ) ] boolean Dump; [ Description ( "Used by the fsck(8) program to determine the order in which " "filesystem checks are done at reboot time. The root filesystem should " "be specified with a 1, other filesystems with a 2. Filesystems within " "a drive are checked sequentially, but filesystems on different drives " "are checked in parallel." ) ] int FileSystemCheckOrder; }; [ Description ( "Class for representing mounted filesystems. Can be thought of as an entry " "in /etc/mtab." ) ] class MountedFileSystem : CIM_ManagedElement { [ Description ( "Filesystem type.") ] string FileSystemType; [ Key, Description ( "Filesystem specification. Corresponds to the device field in " "/etc/fstab." ) ] string FileSystemSpec; [ Key, Description ( "Path to a directory where the device is mounted." ) ] string MountPointPath; }; class LMI_MountedFileSystemCapabilities : CIM_Capabilities { [ Description ( "Method to create and populate an LMI_MountedFileSystemSetting instance. This " "removes the need to populate default settings and other settings " "in the context of each LMI_MountedFileSystemCapabilities (which could be " "numerous)." ), ValueMap { "0", "1", "2", "3", "4", "5", "..", "32768..65535" }, Values { "Success", "Not Supported", "Unspecified Error", "Timeout", "Failed", "Invalid Parameter", "DMTF Reserved", "Vendor Specific" } ] uint32 CreateSetting( [ IN(false), OUT, Description ( "Reference to the created setting instance." ) ] LMI_MountedFileSystemSetting REF MountSetting, ); [ ValueMap { "0", "1", "2" }, Values { "CreateMount", "ModifyMount", "DeleteMount" } ] uint16 SupportedAsynchronousMethods[]; }; class LMI_MountConfigurationService : CIM_Service { [ Description ( "Mounts the specified filesystem to a mountpoint." ), ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096", "4097", "4098..32767", "32768..65535" }, Values { "Job Completed with No Error", "Not Supported", "Unknown", "Timeout", "Failed", "Invalid Parameter", "In Use", "DMTF Reserved", "Method Parameters Checked - Job Started", "Size Not Supported", "Method Reserved", "Vendor Specific" } ] uint32 CreateMount( [ IN(false), OUT, Description ( "Reference to the created job." ) ] CIM_ConcreteJob REF Job, [ IN(false), OUT, Description ( "Reference to the created LMI_MountedFileSystem instance." ) ] LMI_MountedFileSystem REF Mount, [ IN, Description ( "Existing filesystem that should be mounted. If NULL, mount a " "non-local filesystem. If not NULL, mount a local filesystem. When " "mounting a local filesystem, the FileSystemType parameter has to " "agree with the type of FileSystem." ) ] CIM_FileSystem REF FileSystem, [ IN, Description ( "Directory where the mounted filesystem should be attached at." ) ] string MountPoint, [ IN, Description ( "Filesystem specification. Specifies the device that should be " "mounted." ) ] string FileSystemSpec, [ IN, Description ( "Filesystem type. If NULL, perform a binding mount. If binding a " "local filesystem, this parameter has to be in agreement with the " "FileSystem." ) ] string FileSystemType, [ IN, Description ( "Desired mount settings. If NULL, defaults will be used. Default " "mount options are 'rw, suid, dev, exec, auto, nouser, async'." ) ] LMI_MountedFileSystemSetting REF Goal, [ IN, Description ( "The mode in which the configuration is to be applied to the " "MountedFileSystem." "\nMode 0 - Not used." "\nMode 1 - IsNext = 1, IsCurrent = 1." "\nMode 2 - IsNext = 1, IsCurrent not affected." "\nMode 3 - Not used." "\nMode 4 - IsNext = 2, IsCurrent = 2." "\nMode 5 - IsNext = 2, IsCurrent not affected." "\nMode 6 - Not used." "\nMode 32768 - IsNext not affected, IsCurrent = 1." "\nMode 32769 - IsNext not affected, IsCurrent = 2." ), ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "32768", "32769" }, Values { "Mode 0", "Mode 1", "Mode 2", "Mode 3", "Mode 4", "Mode 5", "Mode 6", "DMTF Reserved", "Mode 32768", "Mode 32769" } ] uint16 Mode ); [ Description ( "Modifies (remounts) an existing mount." ), ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096", "4097", "4098..32767", "32768..65535" }, Values { "Job Completed with No Error", "Not Supported", "Unknown", "Timeout", "Failed", "Invalid Parameter", "In Use", "DMTF Reserved", "Method Parameters Checked - Job Started", "Size Not Supported", "Method Reserved", "Vendor Specific" } ] uint32 ModifyMount( [ IN(false), OUT, Description ( "Reference to the created job." ) ] CIM_ConcreteJob REF Job, [ IN, OUT, Description ( "Reference to the LMI_Mount instance that is being modified. " ) ] LMI_MountedFileSystem REF Mount, [ IN, Description ( "Desired mount settings. If NULL, defaults will be used. Default " "mount options are 'rw, suid, dev, exec, auto, nouser, async'." ) ] LMI_MountedFileSystemSetting REF Goal, [ IN, Description ( "The mode in which the configuration is to be applied to the " "MountedFileSystem." "\nMode 0 - Not used." "\nMode 1 - IsNext = 1, IsCurrent = 1." "\nMode 2 - IsNext = 1, IsCurrent not affected." "\nMode 3 - Not used." "\nMode 4 - IsNext = 2, IsCurrent = 2." "\nMode 5 - IsNext = 2, IsCurrent not affected." "\nMode 6 - Not used." "\nMode 32768 - IsNext not affected, IsCurrent = 1." "\nMode 32769 - IsNext not affected, IsCurrent = 2." ), ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "32768", "32769" }, Values { "Mode 0", "Mode 1", "Mode 2", "Mode 3", "Mode 4", "Mode 5", "Mode 6", "DMTF Reserved", "Mode 32768", "Mode 32769" } ] uint16 Mode ); [ Description ( "Unmounts an existing mount." ), ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096", "4097", "4098..32767", "32768..65535" }, Values { "Job Completed with No Error", "Not Supported", "Unknown", "Timeout", "Failed", "Invalid Parameter", "In Use", "DMTF Reserved", "Method Parameters Checked - Job Started", "Size Not Supported", "Method Reserved", "Vendor Specific" } ] uint32 DeleteMount( [ IN(false), OUT, Description ( "Reference to the created job." ) ] CIM_ConcreteJob REF Job, [ IN, Description ( "An existing mount." ) ] LMI_MountedFileSystem REF Mount, [ IN, Description ( "The mode in which the configuration is to be applied to the " "MountedFileSystem." "\nMode 0 - Not used." "\nMode 1 - IsNext = 1, IsCurrent = 1." "\nMode 2 - IsNext = 1, IsCurrent not affected." "\nMode 3 - Not used." "\nMode 4 - IsNext = 2, IsCurrent = 2." "\nMode 5 - IsNext = 2, IsCurrent not affected." "\nMode 6 - Not used." "\nMode 32768 - IsNext not affected, IsCurrent = 1." "\nMode 32769 - IsNext not affected, IsCurrent = 2." ), ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "32768", "32769" }, Values { "Mode 0", "Mode 1", "Mode 2", "Mode 3", "Mode 4", "Mode 5", "Mode 6", "DMTF Reserved", "Mode 32768", "Mode 32769" } ] uint16 Mode ); }; [ Association ] class LMI_HostedMount : CIM_Dependency { [ Override("Antecedent"), Description ( "CIM_ComputerSystem reference." ) ] CIM_System REF CIM_ComputerSystem; [ Override("Dependent"), Description ( "LMI_MountedFileSystem reference." ) ] CIM_ManagedElement REF LMI_MountedFileSystem; }; [ Association ] class LMI_MountedFileSystemElementSettingData : CIM_ElementSettingData { [ Override("ManagedElement"), Description ( "LMI_Mount reference." ) ] CIM_ManagedElement REF ManagedElement; [ Override("SettingData"), Description ( "LMI_MountSetting reference." ) ] CIM_SettingData REF SettingData; }; [ Association ] class LMI_MountElementCapabilities : CIM_ElementCapabilities { [ Override("Capabilities"), Description ( "LMI_MountedFileSystemCapabilities reference." ) ] CIM_Capabilities REF Capabilities; [ Override("ManagedElement"), Description ( "LMI_MountConfigurationService reference." ) ] CIM_ManagedElement REF ManagedElement; }; [ Association ] class MountPoint: CIM_Dependency { [ Override("Antecedent"), Description ( "CIM_Directory reference." ) ] CIM_ManagedElement REF Antecedent; [ Override("Dependent"), Description ( "LMI_MountedFileSystem reference." ) ] CIM_Directory REF Dependent; }; [ Association ] class AttachedFileSystem: CIM_Dependency { [ Override("Antecedent"), Description ( "LMI_FileSystem reference." ) ] CIM_ManagedElement REF Antecedent; [ Override("Dependent"), Description ( "MountedFileSystem reference." ) ] CIM_ManageElement REF Dependent; }; /* vi: set et: */