nifty 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e937c870bd341d68c0d82e95f2e0e2817241354b
4
- data.tar.gz: 771d88a6857eae41a2fc90f94ca311c9be6ff862
3
+ metadata.gz: da06809a0d103dea0a5455df408602e66d73c185
4
+ data.tar.gz: 3ee9e2867cd51f105302f6680e6ac79cddf0a20b
5
5
  SHA512:
6
- metadata.gz: 4aa1d442d66c1c75dcf81c2ff822d186ba36a7893aa69a3bff9e392853e30f8a2c1ccf3168d5c61240b02aa55f3422cae36e6e7abb66be0591445ea7fce732fe
7
- data.tar.gz: a4c85fa18d6b3b1cf17b6a4353f869081cee188ff4fda53ec8af194989a94eed3a0cbf1d1734addaeb563b39517f49c7d7c82b97bc1663ddbed83ceaf1fced1f
6
+ metadata.gz: 34f8471c151ee40e16098847dad9de49b0607927d1a1b6ff8d845eabb5cce852fa1b7bd9dfd36f7909cd3f9177fa306241842f03642a028109afeb929bb14abe
7
+ data.tar.gz: 4206e4b064191fe2a80d794dd443f7b5971a56e3cda04e2bb6309b8ddce7f3d2f314b13fa7f97d584fc482147a41e46132fb74e584acdf9bd9f9cb89cbd4bf3e
data/README.md CHANGED
@@ -22,7 +22,17 @@ NIFTY cooperates with two other tools [COMFY](https://github.com/CESNET/comfy) a
22
22
 
23
23
  ## Installation
24
24
  ###From distribution specific packages
25
- Omnibus packaging for NIFTY will be available soon. Meanwhile, use one of other installation methods.
25
+ Distribution specific packages can be created with [omnibus packaging for NIFTY](https://github.com/CESNET/omnibus-nifty). When installing via packages you don't have to install neither ruby nor rubygems. Packages contain embedded ruby and all the necessary gems and libraries witch will not effect your system ruby, gems and libraries.
26
+
27
+ Currently supported distributions:
28
+
29
+ Ubuntu 12.04
30
+ Ubuntu 14.04
31
+ Debian 7.6
32
+ Debian 8.2
33
+ CentOS 6.5
34
+ CentOS 7.1
35
+
26
36
 
27
37
  ###From RubyGems.org
28
38
  To install the most recent stable version
@@ -55,7 +65,7 @@ three locations:
55
65
  * `/etc/nifty/nifty.yml`
56
66
  * `PATH_TO_GEM_DIR/config/nifty.yml`
57
67
 
58
- The example configuration file can be found at the last location
68
+ The default configuration file can be found at the last location
59
69
  `PATH_TO_GEM_DIR/config/nifty.yml`.
60
70
 
61
71
  ##Usage
@@ -67,7 +77,8 @@ Commands:
67
77
  nifty backends # Lists all available backends with their description
68
78
  nifty help [COMMAND] # Describe available commands or one specific command
69
79
  nifty opennebula --api-call-timeout=API-CALL-TIMEOUT --expiration-interval=EXPIRATION-INTERVAL --permissions=PERMISSIONS -d, --datastores=one two three # Runs NIFTY with backend opennebula
70
- nifty opennebula-transfer-methods # Lists all available transfer methods with their description for "...
80
+ nifty opennebula-migrate --api-call-timeout=API-CALL-TIMEOUT # Prepares "opennebula" for integration with NIFTY
81
+ nifty opennebula-transfer-methods # Lists all available transfer methods with their description for "opennebula" backend
71
82
  nifty version # Prints NIFTY's version
72
83
 
73
84
  Options:
@@ -32,7 +32,3 @@ BUS = "<%= disk.target %>"
32
32
  <% if disk.format %>
33
33
  DRIVER = "<%= disk.format %>"
34
34
  <% end %>
35
-
36
- <% appliance.attributes.each do |key, value| %>
37
- <%= key %> = "<%= value %>"
38
- <% end %>
@@ -20,7 +20,3 @@ IMAGE = "<%= name %>",
20
20
  IMAGE_UNAME = "<%= username %>"
21
21
  ]
22
22
  <% end %>
23
-
24
- <% appliance.attributes.each do |key, value| %>
25
- <%= key %> = "<%= value %>"
26
- <% end %>
@@ -11,6 +11,7 @@ class Nifty::Backends::Opennebula < Nifty::Backend
11
11
  VMCATCHER_APPLIANCE_OS_ARCH = 'VMCATCHER_EVENT_SL_ARCH'
12
12
  VMCATCHER_APPLIANCE_OS_DISTRIBUTION = 'VMCATCHER_EVENT_SL_OS'
13
13
  VMCATCHER_APPLIANCE_OS_VERSION = 'VMCATCHER_EVENT_SL_OSVERSION'
14
+ VMCATCHER_PREFIX = 'VMCATCHER_'
14
15
 
15
16
  class << self
16
17
  # @see Nifty::Backend#backend?
@@ -132,11 +133,16 @@ class Nifty::Backends::Opennebula < Nifty::Backend
132
133
  appliance.title = image["TEMPLATE/#{VMCATCHER_APPLIANCE_TITLE}"]
133
134
  appliance.description = image["TEMPLATE/#{VMCATCHER_APPLIANCE_DESCRIPTION}"]
134
135
 
136
+ vmcatcher_attributes = {}
137
+ image.to_hash['IMAGE']['TEMPLATE'].each_pair { |k,v| vmcatcher_attributes[k] = v if k.start_with? VMCATCHER_PREFIX }
138
+
135
139
  image_template = Tilt::ERBTemplate.new(File.join(Nifty::GEM_DIR, 'templates', 'image.erb'))
136
140
  image_template_update = image_template.render(Object.new, {name: image_name, appliance: appliance})
137
141
  logger.debug("Updating image template for image #{image_name}")
138
142
  Nifty::Backends::Utils::Opennebula::Helper.handle_opennebula_error { image.update(image_template_update, true) }
139
143
 
144
+ appliance.attributes = vmcatcher_attributes
145
+
140
146
  logger.debug("Looking for templates with image #{image_name}...")
141
147
  template_handler.unmanaged_templates_with_image(image_name).each do |template|
142
148
  template_name = template.name
data/lib/nifty/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Nifty
2
- VERSION = "0.2.7"
2
+ VERSION = "0.2.8"
3
3
  end
data/templates/image.erb CHANGED
@@ -1,4 +1,8 @@
1
1
 
2
+ <% appliance.attributes.each do |key, value| %>
3
+ <%= key %> = "<%= value %>"
4
+ <% end %>
5
+
2
6
  NIFTY_ID = "<%= name %>"
3
7
  NIFTY_VERSION = "<%= Nifty::VERSION %>"
4
8
  NIFTY_APPLIANCE_ID = "<%= appliance.identifier %>"
@@ -1,4 +1,8 @@
1
1
 
2
+ <% appliance.attributes.each do |key, value| %>
3
+ <%= key %> = "<%= value %>"
4
+ <% end %>
5
+
2
6
  NIFTY_ID = "<%= name %>"
3
7
  NIFTY_VERSION = "<%= Nifty::VERSION %>"
4
8
  NIFTY_APPLIANCE_ID = "<%= appliance.identifier %>"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nifty
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michal Kimle
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-29 00:00:00.000000000 Z
11
+ date: 2016-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler