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 +4 -4
- data/README.md +14 -3
- data/config/templates/image.erb +0 -4
- data/config/templates/template.erb +0 -4
- data/lib/nifty/backends/opennebula.rb +6 -0
- data/lib/nifty/version.rb +1 -1
- data/templates/image.erb +4 -0
- data/templates/template.erb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da06809a0d103dea0a5455df408602e66d73c185
|
4
|
+
data.tar.gz: 3ee9e2867cd51f105302f6680e6ac79cddf0a20b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
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-
|
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:
|
data/config/templates/image.erb
CHANGED
@@ -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
data/templates/image.erb
CHANGED
data/templates/template.erb
CHANGED
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.
|
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-
|
11
|
+
date: 2016-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|