Class: Stackit::StackitCli

Inherits:
StackCli show all
Defined in:
lib/stackit/cli/stackit_cli.rb

Instance Method Summary collapse

Methods inherited from StackCli

#create_stack, #delete_stack, #update_stack

Methods inherited from BaseCli

banner, exit_on_failure?, subcommand_prefix

Constructor Details

#initialize(*args) ⇒ StackitCli

Returns a new instance of StackitCli.



7
8
9
# File 'lib/stackit/cli/stackit_cli.rb', line 7

def initialize(*args)
  super(*args)
end

Instance Method Details

#create_keypairObject



13
14
15
16
17
# File 'lib/stackit/cli/stackit_cli.rb', line 13

def create_keypair
  puts Stackit.aws.ec2.create_key_pair({
    key_name: options['name']
  })['key_material']
end

#delete_keypairObject



21
22
23
24
25
# File 'lib/stackit/cli/stackit_cli.rb', line 21

def delete_keypair
  Stackit.aws.ec2.delete_key_pair({
    key_name: options['name']
  })
end

#versionObject



28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/stackit/cli/stackit_cli.rb', line 28

def version
  puts "  _____   _                 _      _______  _______ \n (_____) (_)_              (_) _  (_______)(__ _ __)\n(_)___   (___) ____    ___ (_)(_)    (_)      (_)   \n  (___)_ (_)  (____) _(___)(___)     (_)      (_)   \n  ____(_)(_)_( )_( )(_)___ (_)(_)  __(_)__    (_)   \n (_____)  (__)(__)_) (____)(_) (_)(_______)   (_)  v\#{Stackit::VERSION}\n\nSimple, elegant CloudFormation dependency management.\n\n"
end