Class: Armrest::CLI::BlobContainer

Inherits:
Armrest::Command show all
Defined in:
lib/armrest/cli/blob_container.rb

Instance Method Summary collapse

Methods inherited from Armrest::Command

alter_command_description, command_help, dispatch, exit_on_failure?, website

Instance Method Details

#create(name) ⇒ Object



18
19
20
21
22
23
24
25
26
27
# File 'lib/armrest/cli/blob_container.rb', line 18

def create(name)
  resp = Armrest::Services::BlobContainer.new(options).create(name: name)
  if resp.code == "201"
    puts "Blob container created: #{name}"
  else
    puts "Blob container unable to create: #{name}"
    puts "resp:"
    pp resp
  end
end

#get(name) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/armrest/cli/blob_container.rb', line 7

def get(name)
  exist = Armrest::Services::BlobContainer.new(options).get(name: name)
  if exist
    puts "Blob container exists: #{name}"
  else
    puts "Blob container does not exist: #{name}"
  end
end