Class: ZAWS::Command::Elasticip
- Inherits:
-
Thor
- Object
- Thor
- ZAWS::Command::Elasticip
- Defined in:
- lib/zaws/command/elasticip.rb
Instance Attribute Summary collapse
-
#aws ⇒ Object
Returns the value of attribute aws.
-
#out ⇒ Object
Returns the value of attribute out.
-
#print_exit_code ⇒ Object
Returns the value of attribute print_exit_code.
Instance Method Summary collapse
- #assoc_exists(externalid) ⇒ Object
- #declare(externalid) ⇒ Object
-
#initialize(*args) ⇒ Elasticip
constructor
A new instance of Elasticip.
- #release(externalid) ⇒ Object
- #view ⇒ Object
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
#aws ⇒ Object
Returns the value of attribute aws.
9 10 11 |
# File 'lib/zaws/command/elasticip.rb', line 9 def aws @aws end |
#out ⇒ Object
Returns the value of attribute out.
10 11 12 |
# File 'lib/zaws/command/elasticip.rb', line 10 def out @out end |
#print_exit_code ⇒ Object
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([:region],externalid,@out,([:verbose]?@out:nil),[: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([:region],externalid,@out,([:verbose]?@out:nil),[:vpcid],[:check],[: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([:region],externalid,@out,([:verbose]?@out:nil),[:vpcid]) return val end |
#view ⇒ Object
26 27 28 |
# File 'lib/zaws/command/elasticip.rb', line 26 def view @aws.ec2.elasticip.view([:region],[:viewtype],@out,([:verbose]?@out:nil),[:vpcid]) end |