Class: OsCtl::ExportFS::Cli::Export
- Defined in:
- lib/osctl/exportfs/cli/export.rb
Instance Attribute Summary
Attributes inherited from Command
Instance Method Summary collapse
Methods inherited from Command
#initialize, #require_args!, run
Constructor Details
This class inherits a constructor from OsCtl::ExportFS::Cli::Command
Instance Method Details
#add ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/osctl/exportfs/cli/export.rb', line 19 def add require_args!('server') ex = OsCtl::ExportFS::Export.new( dir: opts[:directory], as: opts[:as], host: opts[:host], options: opts[:options], ) OsCtl::ExportFS::Operations::Export::Add.run( OsCtl::ExportFS::Server.new(args[0]), ex ) end |
#list ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/osctl/exportfs/cli/export.rb', line 5 def list servers.each do |s| cfg = s.open_config cfg.exports.each do |ex| puts "server = #{s.name}" puts "dir = #{ex.dir}" puts "as = #{ex.as}" puts "host = #{ex.host}" puts "options = #{ex.}" puts end end end |