openvz 1.5.3 → 1.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -4,6 +4,9 @@ OpenVZ API
4
4
  OpenVZ is a container based virtualization for Linux. This API will allow you
5
5
  to easily write tools to manipulate containers on a host.
6
6
 
7
+ Full and up to date ruby doc available at:
8
+ http://rubydoc.info/github/sts/ruby-openvz/master/frames
9
+
7
10
  USAGE
8
11
  =====
9
12
 
@@ -79,6 +82,8 @@ you do not have to use a template, just use debootstrap.
79
82
  :ipadd => '10.0.0.2',
80
83
  :hostname => 'mia.ono.at' )
81
84
 
85
+ container.file( '/etc/bash.bashrc', :source => '/etc/vz/template/bashrc' )
86
+
82
87
  container.start
83
88
 
84
89
  # Update the system
data/lib/openvz.rb CHANGED
@@ -2,20 +2,16 @@
2
2
  # OpenVZ API
3
3
  #
4
4
  module OpenVZ
5
-
6
5
  autoload :Log, "openvz/log"
7
6
  autoload :Shell, "openvz/shell"
8
7
  autoload :Inventory, "openvz/inventory"
9
- autoload :Vendor, "openvz/vendor"
10
8
  autoload :Container, "openvz/container"
11
9
  autoload :Util, "openvz/util"
12
10
  autoload :ConfigHash, "openvz/confighash"
13
11
 
14
- VERSION = "1.5.3"
12
+ VERSION = "1.5.4"
15
13
 
16
14
  def self.version
17
15
  VERSION
18
16
  end
19
-
20
- OpenVZ::Vendor.load_vendored
21
17
  end
@@ -5,7 +5,7 @@ module OpenVZ
5
5
  end
6
6
 
7
7
  def load
8
- Util.execute("#{@vzlist} -a").each { |l|
8
+ Util.execute("#{@vzlist} -a").each_line { |l|
9
9
  # inventarize a container object for each avaiable container.
10
10
  if l =~ /^\s+(\d+)\s+(.*)\s+(running|stopped)\s+(.*)\s\s(.*)$/
11
11
  self[$1] = Container.new($1)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openvz
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 5
9
- - 3
10
- version: 1.5.3
9
+ - 4
10
+ version: 1.5.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Stefan Schlesinger
@@ -49,8 +49,6 @@ files:
49
49
  - lib/openvz/log.rb
50
50
  - lib/openvz/shell.rb
51
51
  - lib/openvz/util.rb
52
- - lib/openvz/vendor/require_vendored.rb
53
- - lib/openvz/vendor.rb
54
52
  - lib/openvz.rb
55
53
  - openvz.gemspec
56
54
  - README.md
data/lib/openvz/vendor.rb DELETED
@@ -1,41 +0,0 @@
1
- module OpenVZ
2
- # Simple module to manage vendored code.
3
- #
4
- # To vendor a library simply download its whole git repo or untar
5
- # into vendor/libraryname and create a load_libraryname.rb file
6
- # to add its libdir into the $:.
7
- #
8
- # Once you have that file, add a require line in vendor/require_vendored.rb
9
- # which will run after all the load_* files.
10
- #
11
- # The intention is to not change vendored libraries and to eventually
12
- # make adding them in optional so that distros can simply adjust their
13
- # packaging to exclude this directory and the various load_xxx.rb scripts
14
- # if they wish to install these gems as native packages.
15
- class Vendor
16
- class << self
17
- def vendor_dir
18
- File.join([File.dirname(File.expand_path(__FILE__)), "vendor"])
19
- end
20
-
21
- def load_entry(entry)
22
- Log.debug("Loading vendored #{$1}")
23
- load "#{vendor_dir}/#{entry}"
24
- end
25
-
26
- def require_libs
27
- require 'openvz/vendor/require_vendored'
28
- end
29
-
30
- def load_vendored
31
- Dir.entries(vendor_dir).each do |entry|
32
- if entry.match(/load_(\w+?)\.rb$/)
33
- load_entry entry
34
- end
35
- end
36
-
37
- require_libs
38
- end
39
- end
40
- end
41
- end
@@ -1 +0,0 @@
1
- require 'systemu'