class Knife::Clc::IpAssignment::IpAssigner
Attributes
config[R]
connection[R]
errors[R]
Public Class Methods
new(params)
click to toggle source
# File lib/knife-clc/ip_assignment/ip_assigner.rb, line 10 def initialize(params) @connection = params.fetch(:connection) @config = params.fetch(:config) @errors = params.fetch(:errors) end
Public Instance Methods
execute(server_id)
click to toggle source
TODO: Params ordering dependency
# File lib/knife-clc/ip_assignment/ip_assigner.rb, line 17 def execute(server_id) connection.create_ip_address(server_id, ip_params) end
prepare()
click to toggle source
# File lib/knife-clc/ip_assignment/ip_assigner.rb, line 21 def prepare validator.validate end
Private Instance Methods
ip_params()
click to toggle source
# File lib/knife-clc/ip_assignment/ip_assigner.rb, line 27 def ip_params mapper.prepare_ip_params end
mapper()
click to toggle source
# File lib/knife-clc/ip_assignment/ip_assigner.rb, line 35 def mapper @mapper ||= Mapper.new(:config => config, :errors => errors) end
validator()
click to toggle source
# File lib/knife-clc/ip_assignment/ip_assigner.rb, line 31 def validator @validator ||= Validator.new(:config => config, :errors => errors) end