Module: OsCtl::Cli::Attributes
- Defined in:
- lib/osctl/cli/attributes.rb
Instance Method Summary collapse
Instance Method Details
#do_set_attr(cmd, opts, name, value) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/osctl/cli/attributes.rb', line 7 def do_set_attr(cmd, opts, name, value) if /^[^:]+:.+$/ !~ name raise GLI::BadCommandLine, "attribute name is not in the required format '<vendor>:<key>'" end osctld_fmt(cmd, cmd_opts: opts.merge(attrs: { name => value })) end |
#do_unset_attr(cmd, opts, name) ⇒ Object
19 20 21 |
# File 'lib/osctl/cli/attributes.rb', line 19 def do_unset_attr(cmd, opts, name) osctld_fmt(cmd, cmd_opts: opts.merge(attrs: [name])) end |