Class: RemoteLXC::RemotelxcCreate

Inherits:
Chef::Knife
  • Object
show all
Includes:
Helpers
Defined in:
lib/chef/knife/remotelxc_create.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helpers

#knife_ssh

Constructor Details

#initialize(*args) ⇒ RemotelxcCreate

Returns a new instance of RemotelxcCreate.



107
108
109
110
# File 'lib/chef/knife/remotelxc_create.rb', line 107

def initialize(*args)
  super
  config[:distro] = 'chef-full'
end

Instance Attribute Details

#lxc_nameObject (readonly)

Returns the value of attribute lxc_name.



105
106
107
# File 'lib/chef/knife/remotelxc_create.rb', line 105

def lxc_name
  @lxc_name
end

Instance Method Details

#runObject



112
113
114
115
116
# File 'lib/chef/knife/remotelxc_create.rb', line 112

def run
  @lxc_name = config[:chef_node_name] = name_args.first
  ip_address = create_new_container
  bootstrap_container(ip_address)
end