Class: ZAWS::Command::Elasticip

Inherits:
Thor
  • Object
show all
Defined in:
lib/zaws/command/elasticip.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Elasticip

Returns a new instance of Elasticip.



13
14
15
16
17
18
19
20
# File 'lib/zaws/command/elasticip.rb', line 13

def initialize(*args)
    super
     shellout=ZAWS::Helper::Shell.new
    awscli = ZAWS::AWSCLI.new(shellout)
    @aws = ZAWS::AWS.new(shellout,awscli)
    @out = $stdout
    @print_exit_code = false
end

Instance Attribute Details

#awsObject

Returns the value of attribute aws.



9
10
11
# File 'lib/zaws/command/elasticip.rb', line 9

def aws
  @aws
end

#outObject

Returns the value of attribute out.



10
11
12
# File 'lib/zaws/command/elasticip.rb', line 10

def out
  @out
end

Returns the value of attribute print_exit_code.



11
12
13
# File 'lib/zaws/command/elasticip.rb', line 11

def print_exit_code
  @print_exit_code
end

Instance Method Details

#assoc_exists(externalid) ⇒ Object



32
33
34
35
# File 'lib/zaws/command/elasticip.rb', line 32

def assoc_exists(externalid) 
    val,instanceid,assoc,alloc,ip=@aws.ec2.elasticip.assoc_exists(options[:region],externalid,@out,(options[:verbose]?@out:nil),options[:vpcid])
    return val
end

#declare(externalid) ⇒ Object



41
42
43
44
# File 'lib/zaws/command/elasticip.rb', line 41

def declare(externalid) 
    val=@aws.ec2.elasticip.declare(options[:region],externalid,@out,(options[:verbose]?@out:nil),options[:vpcid],options[:check],options[:undofile])
    return val
end

#release(externalid) ⇒ Object



48
49
50
51
# File 'lib/zaws/command/elasticip.rb', line 48

def release(externalid) 
    val=@aws.ec2.elasticip.release(options[:region],externalid,@out,(options[:verbose]?@out:nil),options[:vpcid])
    return val
end

#viewObject



26
27
28
# File 'lib/zaws/command/elasticip.rb', line 26

def view
    @aws.ec2.elasticip.view(options[:region],options[:viewtype],@out,(options[:verbose]?@out:nil),options[:vpcid])
end