Skip to content

Commit 1747b5d

Browse files
michalwskiohadlevy
authored andcommitted
initial plugin commit
0 parents  commit 1747b5d

File tree

25 files changed

+1529
-0
lines changed

25 files changed

+1529
-0
lines changed

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.bundle/
2+
log/*.log
3+
pkg/
4+
.idea/
5+
test/dummy/db/*.sqlite3
6+
test/dummy/db/*.sqlite3-journal
7+
test/dummy/log/*.log
8+
test/dummy/tmp/
9+
test/dummy/.sass-cache

Gemfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
source "https://rubygems.org"
2+
3+
# Declare your gem's dependencies in foreman_xen.gemspec.
4+
# Bundler will treat runtime dependencies like base dependencies, and
5+
# development dependencies will be added by default to the :development group.
6+
gemspec
7+
8+
# Declare any dependencies that are still in development here instead of in
9+
# your gemspec. These might include edge Rails or gems from your path or
10+
# Git. Remember to move these dependencies to your gemspec before releasing
11+
# your gem to rubygems.org.
12+
13+
# To use debugger
14+
# gem 'debugger'
15+

LICENSE

Lines changed: 619 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Foreman XEN Plugin
2+
3+
This plugin enables provisioning and managing XEN Server in Foreman.
4+
5+
## Installation
6+
7+
Please see the Foreman manual for appropriate instructions:
8+
9+
* [Foreman: How to Install a Plugin](http://theforeman.org/manuals/latest/index.html#6.1InstallaPlugin)
10+
11+
The gem name is "foreman_xen".
12+
13+
## Compatibility
14+
15+
| Foreman Version | Plugin Version |
16+
| ---------------:| --------------:|
17+
| >= 1.5 | 0.0.1 |
18+
19+
## Latest code
20+
21+
You can get the develop branch of the plugin by specifying your Gemfile in this way:
22+
23+
gem 'foreman_xen', :git => "https://github.com/theforeman/foreman_xen.git"
24+
25+
# Copyright
26+
27+
Copyright (c) 2014 ooVoo LLC
28+
29+
This program is free software: you can redistribute it and/or modify
30+
it under the terms of the GNU General Public License as published by
31+
the Free Software Foundation, either version 3 of the License, or
32+
(at your option) any later version.
33+
34+
This program is distributed in the hope that it will be useful,
35+
but WITHOUT ANY WARRANTY; without even the implied warranty of
36+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37+
GNU General Public License for more details.
38+
39+
You should have received a copy of the GNU General Public License
40+
along with this program. If not, see <http://www.gnu.org/licenses/>.

Rakefile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
require "bundler/gem_tasks"
2+
3+
begin
4+
require 'bundler/setup'
5+
rescue LoadError
6+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
7+
end
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
module FogExtensions
2+
module Xenserver
3+
module Server
4+
5+
def to_s
6+
name
7+
end
8+
9+
def nics_attributes=(attrs); end
10+
11+
def volumes_attributes=(attrs); end
12+
13+
def memory_min
14+
memory_static_min.to_i
15+
end
16+
17+
def memory_max
18+
memory_static_max.to_i
19+
end
20+
21+
def memory
22+
memory_static_max.to_i
23+
end
24+
25+
def reset
26+
reboot
27+
end
28+
29+
def ready?
30+
running?
31+
end
32+
33+
def mac
34+
vifs.first.mac
35+
end
36+
37+
def state
38+
power_state
39+
end
40+
41+
def custom_template_name
42+
template_name
43+
end
44+
45+
def builtin_template_name
46+
template_name
47+
end
48+
49+
end
50+
end
51+
end

0 commit comments

Comments
 (0)