lib/conjur/command/variables.rb in conjur-cli-5.3.0 vs lib/conjur/command/variables.rb in conjur-cli-5.4.0
- old
+ new
@@ -19,11 +19,11 @@
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
class Conjur::Command::Variables < Conjur::Command
desc "Manage variables"
command :variable do |var|
- var.desc "Create and store a variable"
+ var.desc "Create and store a variable [DEPRECATED]"
var.arg_name "NAME VALUE"
var.command :create do |c|
c.arg_name "MIME-TYPE"
c.flag [:m, :"mime-type"], default_value: 'text/plain'
@@ -39,10 +39,12 @@
annotate_option c
interactive_option c
c.action do |global_options,options, args|
+ notify_deprecated
+
@default_mime_type = c.flags[:m].default_value
@default_kind = c.flags[:k].default_value
id = args.shift unless args.empty?
value = args.shift unless args.empty?
@@ -97,15 +99,17 @@
id = require_arg(args, 'VARIABLE')
display(api.variable(id), options)
end
end
- var.desc "Decommission a variable"
+ var.desc "Decommission a variable [DEPRECATED]"
var.arg_name "VARIABLE"
var.command :retire do |c|
retire_options c
c.action do |global_options,options,args|
+ notify_deprecated
+
id = require_arg(args, 'VARIABLE')
variable = api.variable(id)
validate_retire_privileges variable, options