Sha256: b883cf7a558b00bd0e28caa43cb5bbc1f3b2621e50cda2c6d8d145e814185f77
Contents?: true
Size: 1.54 KB
Versions: 3
Compression:
Stored size: 1.54 KB
Contents
module Solusvm class ClientCli < BaseCli desc "create", "Creates a new h" method_option :username, type: :string, desc: "Username", aliases: ["-u", "--username"] method_option :password, type: :string, desc: "Password", aliases: ["-p", "--password"] method_option :email, type: :string, desc: "Email", aliases: ["-e", "--email"] method_option :firstname, type: :string, desc: "Firstname", aliases: ["-f", "--firstname"] method_option :lastname, type: :string, desc: "Lastname", aliases: ["-l", "--lastname"] method_option :company, type: :string, desc: "Company", aliases: ["-c", "--company"] def create output api.create(options) end desc "change-password USERNAME NEWPASSWORD", "Changes the password of an existing client" def change_password(username, password) output api.change_password(username, password) end desc "authenticate USERNAME NEWPASSWORD", "Verify a clients login. Returns true when the specified login is correct" def authenticate(username, password) output api.authenticate(username, password) end desc "check-exists USERNAME", "Checks if a client exists" def check_exists(username) output api.exists?(username) end desc "delete USERNAME", "Deletes an existing client" def delete(username) output api.delete(username) end desc "list", "Lists existing clients" def list output api.list end private def api @client ||= begin Solusvm::Client.new(api_params()) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
solusvm-1.4.0 | lib/solusvm/cli/client_cli.rb |
solusvm-1.3.1 | lib/solusvm/cli/client_cli.rb |
solusvm-1.3.0 | lib/solusvm/cli/client_cli.rb |