Class: Rudy::CLI::AWS::SDB::Domains

Inherits:
CommandBase
  • Object
show all
Defined in:
lib/rudy/cli/aws/sdb/domains.rb

Instance Attribute Summary

Attributes inherited from CommandBase

#config

Instance Method Summary collapse

Methods included from Huxtable

change_environment, change_position, change_region, change_role, change_zone, #check_keys, #config_dirname, create_domain, #current_group_name, #current_machine_address, #current_machine_count, #current_machine_group, #current_machine_hostname, #current_machine_image, #current_machine_name, #current_machine_size, #current_user, #current_user_keypairpath, debug?, #debug?, domain, domain_exists?, #group_metadata, #has_keypair?, #has_keys?, #has_pem_keys?, #has_root_keypair?, keypair_path_to_name, #known_machine_group?, #root_keypairname, #root_keypairpath, #switch_user, update_config, update_global, update_logger, #user_keypairname, #user_keypairpath

Instance Method Details

#domainsObject



9
10
11
12
13
14
# File 'lib/rudy/cli/aws/sdb/domains.rb', line 9

def domains
  sdb = Rudy::AWS::SDB.new(@@global.accesskey, @@global.secretkey, @@global.region)
  domains = sdb.list_domains
  puts domains
  puts "No domains" if domains.nil? || domains.empty?
end

#domains_createObject



21
22
23
24
25
# File 'lib/rudy/cli/aws/sdb/domains.rb', line 21

def domains_create
  @sdb.create_domain @argv.name
  execute_check(:low)
  domains
end

#domains_create_valid?Boolean

Returns:

  • (Boolean)


16
17
18
19
20
# File 'lib/rudy/cli/aws/sdb/domains.rb', line 16

def domains_create_valid?
  @sdb = Rudy::AWS::SDB.new(@@global.accesskey, @@global.secretkey, @@global.region)
  raise "No name specified" unless @argv.name
  true
end

#domains_destroyObject



32
33
34
35
36
# File 'lib/rudy/cli/aws/sdb/domains.rb', line 32

def domains_destroy
  execute_check(:medium)
  @sdb.destroy_domain @argv.name
  domains
end

#domains_destroy_valid?Boolean

Returns:

  • (Boolean)


27
28
29
30
31
# File 'lib/rudy/cli/aws/sdb/domains.rb', line 27

def domains_destroy_valid?
  @sdb = Rudy::AWS::SDB.new(@@global.accesskey, @@global.secretkey, @@global.region)
  raise "No name specified" unless @argv.name
  true
end