Class: SolusVM::ClientCLI

Inherits:
BaseCLI
  • Object
show all
Defined in:
lib/solusvm/cli/client_cli.rb

Instance Method Summary (collapse)

Methods inherited from BaseCLI

banner, default_option, namespace

Instance Method Details

- (Object) api (private)



42
43
44
# File 'lib/solusvm/cli/client_cli.rb', line 42

def api
  @client ||= SolusVM::Client.new(api_params())
end

- (Object) authenticate(username, password)



21
22
23
# File 'lib/solusvm/cli/client_cli.rb', line 21

def authenticate(username, password)
  output api.authenticate(username, password)
end

- (Object) change_password(username, password)



16
17
18
# File 'lib/solusvm/cli/client_cli.rb', line 16

def change_password(username, password)
  output api.change_password(username, password)
end

- (Object) check_exists(username)



26
27
28
# File 'lib/solusvm/cli/client_cli.rb', line 26

def check_exists(username)
  output api.exists?(username)
end

- (Object) create



11
12
13
# File 'lib/solusvm/cli/client_cli.rb', line 11

def create
  output api.create(options)
end

- (Object) delete(username)



31
32
33
# File 'lib/solusvm/cli/client_cli.rb', line 31

def delete(username)
  output api.delete(username)
end

- (Object) list



36
37
38
# File 'lib/solusvm/cli/client_cli.rb', line 36

def list
  output api.list
end