lib/kaname/cli.rb in kaname-0.3.3 vs lib/kaname/cli.rb in kaname-0.4.0
- old
+ new
@@ -1,25 +1,23 @@
require 'yaml'
-require 'fog'
require 'thor'
require 'hashdiff'
require 'diffy'
module Kaname
class CLI < Thor
desc 'password', 'Commands about updating user password'
def password
- credentials = Fog::Identity[:openstack].credentials
- puts "current_user: #{credentials[:current_user]["username"]}"
+ puts "current_user: #{Kaname::Config.username}"
print "type your current password: "
old_password = STDIN.noecho(&:gets).strip
puts
print "type your new password: "
new_password = STDIN.noecho(&:gets).strip
puts
- Kaname::Adapter::Real.new.update_user_password(credentials, old_password, new_password)
+ Kaname::Adapter::Real.new.update_user_password(old_password, new_password)
end
option :dryrun, type: :boolean
desc 'apply', 'Commands about configuration apply'
def apply