def execute(self, ns, all=None): """ Implementation of 'mount list' command. """ if all is False: transients = [mnt.Name for mnt in ns.LMI_TransientFileSystem.instances()] for mnt in mount.get_mounts(ns): # treat root specially (can be mounted twice - as a rootfs and with # a device) if mnt.FileSystemSpec == 'rootfs': continue if all is False and mnt.MountPointPath != '/': # do not list nodevice filesystems name = 'PATH=' + mnt.MountPointPath if name in transients: continue opts_str = mount.build_opts_str(mnt) yield(mnt.FileSystemSpec, mnt.FileSystemType, mnt.MountPointPath, opts_str[0], opts_str[1])
def execute(self, ns, all=None): """ Implementation of 'mount list' command. """ if all is False: transients = [ mnt.Name for mnt in ns.LMI_TransientFileSystem.instances() ] for mnt in mount.get_mounts(ns): # treat root specially (can be mounted twice - as a rootfs and with # a device) if mnt.FileSystemSpec == 'rootfs': continue if all is False and mnt.MountPointPath != '/': # do not list nodevice filesystems name = 'PATH=' + mnt.MountPointPath if name in transients: continue opts_str = mount.build_opts_str(mnt) yield (mnt.FileSystemSpec, mnt.FileSystemType, mnt.MountPointPath, opts_str[0], opts_str[1])
def execute(self, ns, all=None): """ Implementation of 'mount show' command. """ if all is False: transients = [mnt.Name for mnt in ns.LMI_TransientFileSystem.instances()] yield formatter.NewTableCommand('Mounted filesystems') for mnt in mount.get_mounts(ns): # treat root specially (can be mounted twice - as a rootfs and with # a device) if mnt.FileSystemSpec == 'rootfs': continue if all is False and mnt.MountPointPath != '/': # do not list nodevice filesystems name = 'PATH=' + mnt.MountPointPath if name in transients: continue opts_str = mount.build_opts_str(mnt) yield('Filesystem', '%s (%s)' % (mnt.FileSystemSpec, mnt.FileSystemType)) yield('Mountpoint', mnt.MountPointPath) yield('Options', opts_str[0]) yield('OtherOptions', opts_str[1]) yield ''
def execute(self, ns, all=None): """ Implementation of 'mount show' command. """ if all is False: transients = [ mnt.Name for mnt in ns.LMI_TransientFileSystem.instances() ] yield formatter.NewTableCommand('Mounted filesystems') for mnt in mount.get_mounts(ns): # treat root specially (can be mounted twice - as a rootfs and with # a device) if mnt.FileSystemSpec == 'rootfs': continue if all is False and mnt.MountPointPath != '/': # do not list nodevice filesystems name = 'PATH=' + mnt.MountPointPath if name in transients: continue opts_str = mount.build_opts_str(mnt) yield ('Filesystem', '%s (%s)' % (mnt.FileSystemSpec, mnt.FileSystemType)) yield ('Mountpoint', mnt.MountPointPath) yield ('Options', opts_str[0]) yield ('OtherOptions', opts_str[1]) yield ''