foreman_cpp_cloudstack 0.1.5 → 0.1.6
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.
- checksums.yaml +4 -4
- data/README.md +4 -6
- data/app/models/concerns/fog_extensions/cloudstack/flavor.rb +9 -1
- data/app/models/concerns/fog_extensions/cloudstack/server.rb +8 -0
- data/app/models/concerns/foreman_cpp_cloudstack/compute.rb +8 -0
- data/app/models/foreman_cpp_cloudstack/cloudstack.rb +27 -0
- data/app/views/images/form/_cloudstack.html.erb +10 -1
- data/lib/foreman_cpp_cloudstack.rb +9 -0
- data/lib/foreman_cpp_cloudstack/engine.rb +10 -4
- data/lib/foreman_cpp_cloudstack/version.rb +9 -1
- 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: 14088e20f875549969b36bad16706366ccc41961
|
4
|
+
data.tar.gz: 89c07516d3a2a5f11f2e5fd320f7b02b6587cd91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c38c9cde889163aa86cee0c674619437f20c3f591f7a43c305b0038c794bed5f139bc16b86d6e7bdeb7a952709d452d7f4d0b5695a7211d60fea6011ac185fcd
|
7
|
+
data.tar.gz: 88071ed5f6b04c5804ccd8f85597d7d810a729068087962f0eca0ad7f5c38b0763ebf3ef1d39f28ef54661760be6a24b2610d6a0aa6b8930ef83273896e54119
|
data/README.md
CHANGED
@@ -1,12 +1,10 @@
|
|
1
1
|
# Foreman Cloudstack Plugin
|
2
2
|
|
3
|
-
This plugin enables provisioning and managing a Cloudstack
|
3
|
+
This plugin enables provisioning and managing a Cloudstack server in Foreman.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
Please see the Foreman manual for appropriate instructions:
|
7
|
+
Please see the Foreman manual for appropriate instructions to install via RubyGems:
|
10
8
|
|
11
9
|
* [Foreman: How to Install a Plugin](http://theforeman.org/manuals/latest/index.html#6.1InstallaPlugin)
|
12
10
|
|
@@ -16,7 +14,7 @@ The gem name is "foreman_cpp_cloudstack".
|
|
16
14
|
|
17
15
|
| Foreman Version | Plugin Version |
|
18
16
|
| ---------------:| --------------:|
|
19
|
-
|
|
17
|
+
| = 1.7 | 0.1.6 |
|
20
18
|
|
21
19
|
## Latest code
|
22
20
|
|
@@ -32,7 +30,7 @@ All user data is gzipped
|
|
32
30
|
|
33
31
|
# Copyright
|
34
32
|
|
35
|
-
Copyright (c)
|
33
|
+
Copyright (c) 2015 bytemine GmbH
|
36
34
|
|
37
35
|
This program is free software: you can redistribute it and/or modify
|
38
36
|
it under the terms of the GNU General Public License as published by
|
@@ -1,3 +1,11 @@
|
|
1
|
+
###########################################################################
|
2
|
+
# Written by / Copyright (C) 2015 bytemine GmbH #
|
3
|
+
# sponsored by ennit AG #
|
4
|
+
# Author: Daniel Rauer E-Mail: rauer@bytemine.net #
|
5
|
+
# #
|
6
|
+
# http://www.bytemine.net/ #
|
7
|
+
###########################################################################
|
8
|
+
|
1
9
|
module FogExtensions
|
2
10
|
module Cloudstack
|
3
11
|
module Flavor
|
@@ -12,4 +20,4 @@ module FogExtensions
|
|
12
20
|
end
|
13
21
|
end
|
14
22
|
end
|
15
|
-
end
|
23
|
+
end
|
@@ -1,3 +1,11 @@
|
|
1
|
+
###########################################################################
|
2
|
+
# Written by / Copyright (C) 2015 bytemine GmbH #
|
3
|
+
# sponsored by ennit AG #
|
4
|
+
# Author: Daniel Rauer E-Mail: rauer@bytemine.net #
|
5
|
+
# #
|
6
|
+
# http://www.bytemine.net/ #
|
7
|
+
###########################################################################
|
8
|
+
|
1
9
|
module FogExtensions
|
2
10
|
module Cloudstack
|
3
11
|
module Server
|
@@ -1,3 +1,11 @@
|
|
1
|
+
###########################################################################
|
2
|
+
# Written by / Copyright (C) 2015 bytemine GmbH #
|
3
|
+
# sponsored by ennit AG #
|
4
|
+
# Author: Daniel Rauer E-Mail: rauer@bytemine.net #
|
5
|
+
# #
|
6
|
+
# http://www.bytemine.net/ #
|
7
|
+
###########################################################################
|
8
|
+
|
1
9
|
require 'socket'
|
2
10
|
require 'timeout'
|
3
11
|
require 'zlib'
|
@@ -1,3 +1,11 @@
|
|
1
|
+
###########################################################################
|
2
|
+
# Written by / Copyright (C) 2015 bytemine GmbH #
|
3
|
+
# sponsored by ennit AG #
|
4
|
+
# Author: Daniel Rauer E-Mail: rauer@bytemine.net #
|
5
|
+
# #
|
6
|
+
# http://www.bytemine.net/ #
|
7
|
+
###########################################################################
|
8
|
+
|
1
9
|
require 'uri'
|
2
10
|
|
3
11
|
module ForemanCPPCloudstack
|
@@ -21,6 +29,25 @@ module ForemanCPPCloudstack
|
|
21
29
|
end
|
22
30
|
end
|
23
31
|
|
32
|
+
def templates_isos
|
33
|
+
list = Array.new
|
34
|
+
templates = client.list_templates("self")["listtemplatesresponse"]["template"]
|
35
|
+
if templates.any?
|
36
|
+
list << {:id => "-1", :name => "--- Templates ---"}
|
37
|
+
templates.each do |template|
|
38
|
+
list << {:id => template["id"], :name => template["name"]+" ("+template["zonename"]+")"}
|
39
|
+
end
|
40
|
+
end
|
41
|
+
isos = client.list_isos["listisosresponse"]["iso"]
|
42
|
+
if isos.any?
|
43
|
+
list << {:id => "-1", :name => "--- ISOs ---"}
|
44
|
+
isos.each do |iso|
|
45
|
+
list << {:id => iso["id"], :name => iso["name"]+" ("+iso["zonename"]+")"}
|
46
|
+
end
|
47
|
+
end
|
48
|
+
list
|
49
|
+
end
|
50
|
+
|
24
51
|
def domains
|
25
52
|
return [] if url.blank? or user.blank? or password.blank?
|
26
53
|
domainsobj = client.list_domains
|
@@ -1,3 +1,12 @@
|
|
1
1
|
<%= text_f f, :username, :value => @image.username || "root", :help_inline => _("The user that is used to ssh into the instance, normally cloud-user, ec2-user, ubuntu, root etc") %>
|
2
|
-
<%=
|
2
|
+
<%= selectable_f(f, :uuid, @compute_resource.templates_isos.map {|t| [t[:name], t[:id]]},
|
3
|
+
{}, {:label => _('Template/ISO'), :onLoad => "disable_select()"}) %>
|
3
4
|
<%= checkbox_f f, :user_data, :help_inline => _("Does this image support user data input (e.g. via cloud-init)?") %>
|
5
|
+
|
6
|
+
<script type="text/javascript">
|
7
|
+
$('#image_uuid').find("option").each(function() {
|
8
|
+
if($(this).val()=="-1") {
|
9
|
+
$(this).attr('disabled', 'true');
|
10
|
+
}
|
11
|
+
});
|
12
|
+
</script>
|
@@ -1,3 +1,12 @@
|
|
1
|
+
###########################################################################
|
2
|
+
# Written by / Copyright (C) 2015 bytemine GmbH #
|
3
|
+
# sponsored by ennit AG #
|
4
|
+
# Author: Daniel Rauer E-Mail: rauer@bytemine.net #
|
5
|
+
# #
|
6
|
+
# http://www.bytemine.net/ #
|
7
|
+
###########################################################################
|
8
|
+
|
1
9
|
require 'foreman_cpp_cloudstack/engine'
|
10
|
+
|
2
11
|
module ForemanCPPCloudstack
|
3
12
|
end
|
@@ -1,3 +1,11 @@
|
|
1
|
+
###########################################################################
|
2
|
+
# Written by / Copyright (C) 2015 bytemine GmbH #
|
3
|
+
# sponsored by ennit AG #
|
4
|
+
# Author: Daniel Rauer E-Mail: rauer@bytemine.net #
|
5
|
+
# #
|
6
|
+
# http://www.bytemine.net/ #
|
7
|
+
###########################################################################
|
8
|
+
|
1
9
|
require 'fast_gettext'
|
2
10
|
require 'gettext_i18n_rails'
|
3
11
|
require 'fog'
|
@@ -24,17 +32,15 @@ module ForemanCPPCloudstack
|
|
24
32
|
requires_foreman '>= 1.7'
|
25
33
|
compute_resource ForemanCPPCloudstack::Cloudstack
|
26
34
|
end
|
27
|
-
|
28
35
|
end
|
29
36
|
|
30
37
|
config.to_prepare do
|
31
38
|
begin
|
32
|
-
|
33
|
-
|
39
|
+
Fog::Compute::Cloudstack::Server.send(:include, ::FogExtensions::Cloudstack::Server)
|
40
|
+
Host::Managed.send(:include, ForemanCPPCloudstack::Compute)
|
34
41
|
rescue => e
|
35
42
|
puts "#{ForemanCPPCloudstack}: skipping engine hook (#{e.to_s})"
|
36
43
|
end
|
37
44
|
end
|
38
|
-
|
39
45
|
end
|
40
46
|
end
|
@@ -1,3 +1,11 @@
|
|
1
|
+
###########################################################################
|
2
|
+
# Written by / Copyright (C) 2015 bytemine GmbH #
|
3
|
+
# sponsored by ennit AG #
|
4
|
+
# Author: Daniel Rauer E-Mail: rauer@bytemine.net #
|
5
|
+
# #
|
6
|
+
# http://www.bytemine.net/ #
|
7
|
+
###########################################################################
|
8
|
+
|
1
9
|
module ForemanCPPCloudstack
|
2
|
-
VERSION = "0.1.
|
10
|
+
VERSION = "0.1.6"
|
3
11
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_cpp_cloudstack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bytemine GmbH, Daniel Rauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|