foreman_api 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/foreman_api/documentation.json +1 -1
- data/lib/foreman_api/resources/common_parameter.rb +1 -1
- data/lib/foreman_api/resources/compute_resource.rb +21 -1
- data/lib/foreman_api/resources/domain.rb +1 -1
- data/lib/foreman_api/resources/environment.rb +1 -1
- data/lib/foreman_api/resources/host.rb +10 -0
- data/lib/foreman_api/resources/hostgroup.rb +1 -1
- data/lib/foreman_api/resources/image.rb +2 -2
- data/lib/foreman_api/resources/medium.rb +1 -1
- data/lib/foreman_api/resources/operating_system.rb +1 -1
- data/lib/foreman_api/resources/ptable.rb +1 -1
- data/lib/foreman_api/resources/puppetclass.rb +1 -1
- data/lib/foreman_api/resources/role.rb +1 -1
- data/lib/foreman_api/resources/template_kind.rb +20 -0
- data/lib/foreman_api/version.rb +1 -1
- metadata +3 -2
@@ -36,7 +36,7 @@ module ForemanApi
|
|
36
36
|
end
|
37
37
|
|
38
38
|
# @param [Hash] params a hash of params to be passed to the service
|
39
|
-
# allowed keys are: {"common_parameter"=>["name", "value"]
|
39
|
+
# allowed keys are: {"id"=>nil, "common_parameter"=>["name", "value"]}
|
40
40
|
#
|
41
41
|
# @param [Hash] headers additional http headers
|
42
42
|
def update(params = { }, headers = { })
|
@@ -26,7 +26,17 @@ module ForemanApi
|
|
26
26
|
end
|
27
27
|
|
28
28
|
# @param [Hash] params a hash of params to be passed to the service
|
29
|
-
# allowed keys are: {"compute_resource"=>["name", "provider", "url", "description", "user", "password", "uuid", "region", "tenant", "server"]
|
29
|
+
# allowed keys are: {"id"=>nil, "compute_resource"=>["name", "provider", "url", "description", "user", "password", "uuid", "region", "tenant", "server"]}
|
30
|
+
#
|
31
|
+
# @param [Hash] headers additional http headers
|
32
|
+
def create(params = { }, headers = { })
|
33
|
+
check_params params, :allowed => true, :method => __method__
|
34
|
+
url, params = fill_params_in_url "/api/compute_resources/:id", params
|
35
|
+
call(:"put", url, params, headers)
|
36
|
+
end
|
37
|
+
|
38
|
+
# @param [Hash] params a hash of params to be passed to the service
|
39
|
+
# allowed keys are: ["id"]
|
30
40
|
#
|
31
41
|
# @param [Hash] headers additional http headers
|
32
42
|
def update(params = { }, headers = { })
|
@@ -35,6 +45,16 @@ module ForemanApi
|
|
35
45
|
call(:"put", url, params, headers)
|
36
46
|
end
|
37
47
|
|
48
|
+
# @param [Hash] params a hash of params to be passed to the service
|
49
|
+
# allowed keys are: ["id"]
|
50
|
+
#
|
51
|
+
# @param [Hash] headers additional http headers
|
52
|
+
def destroy(params = { }, headers = { })
|
53
|
+
check_params params, :allowed => true, :method => __method__
|
54
|
+
url, params = fill_params_in_url "/api/compute_resources/:id", params
|
55
|
+
call(:"delete", url, params, headers)
|
56
|
+
end
|
57
|
+
|
38
58
|
end
|
39
59
|
end
|
40
60
|
end
|
@@ -36,7 +36,7 @@ module ForemanApi
|
|
36
36
|
end
|
37
37
|
|
38
38
|
# @param [Hash] params a hash of params to be passed to the service
|
39
|
-
# allowed keys are: {"domain"=>["name", "fullname", "dns_id", "domain_parameters_attributes"]
|
39
|
+
# allowed keys are: {"id"=>nil, "domain"=>["name", "fullname", "dns_id", "domain_parameters_attributes"]}
|
40
40
|
#
|
41
41
|
# @param [Hash] headers additional http headers
|
42
42
|
def update(params = { }, headers = { })
|
@@ -36,7 +36,7 @@ module ForemanApi
|
|
36
36
|
end
|
37
37
|
|
38
38
|
# @param [Hash] params a hash of params to be passed to the service
|
39
|
-
# allowed keys are: {"environment"=>["name"]
|
39
|
+
# allowed keys are: {"id"=>nil, "environment"=>["name"]}
|
40
40
|
#
|
41
41
|
# @param [Hash] headers additional http headers
|
42
42
|
def update(params = { }, headers = { })
|
@@ -55,6 +55,16 @@ module ForemanApi
|
|
55
55
|
call(:"delete", url, params, headers)
|
56
56
|
end
|
57
57
|
|
58
|
+
# @param [Hash] params a hash of params to be passed to the service
|
59
|
+
# allowed keys are: ["id"]
|
60
|
+
#
|
61
|
+
# @param [Hash] headers additional http headers
|
62
|
+
def status(params = { }, headers = { })
|
63
|
+
check_params params, :allowed => true, :method => __method__
|
64
|
+
url, params = fill_params_in_url "/api/hosts/:id/status", params
|
65
|
+
call(:"get", url, params, headers)
|
66
|
+
end
|
67
|
+
|
58
68
|
end
|
59
69
|
end
|
60
70
|
end
|
@@ -36,7 +36,7 @@ module ForemanApi
|
|
36
36
|
end
|
37
37
|
|
38
38
|
# @param [Hash] params a hash of params to be passed to the service
|
39
|
-
# allowed keys are: {"hostgroup"=>["name", "environment_id", "operatingsystem_id", "architecture_id", "medium_id", "ptable_id", "puppet_ca_proxy_id", "subnet_id", "domain_id", "puppet_proxy_id"]
|
39
|
+
# allowed keys are: {"id"=>nil, "hostgroup"=>["name", "environment_id", "operatingsystem_id", "architecture_id", "medium_id", "ptable_id", "puppet_ca_proxy_id", "subnet_id", "domain_id", "puppet_proxy_id"]}
|
40
40
|
#
|
41
41
|
# @param [Hash] headers additional http headers
|
42
42
|
def update(params = { }, headers = { })
|
@@ -26,7 +26,7 @@ module ForemanApi
|
|
26
26
|
end
|
27
27
|
|
28
28
|
# @param [Hash] params a hash of params to be passed to the service
|
29
|
-
# allowed keys are: {"image"=>["name", "username", "uuid", "compute_resource_id", "architecture_id", "operatingsystem_id"]
|
29
|
+
# allowed keys are: {"compute_resource_id"=>nil, "image"=>["name", "username", "uuid", "compute_resource_id", "architecture_id", "operatingsystem_id"]}
|
30
30
|
#
|
31
31
|
# @param [Hash] headers additional http headers
|
32
32
|
def create(params = { }, headers = { })
|
@@ -36,7 +36,7 @@ module ForemanApi
|
|
36
36
|
end
|
37
37
|
|
38
38
|
# @param [Hash] params a hash of params to be passed to the service
|
39
|
-
# allowed keys are: {"image"=>["name", "username", "uuid", "compute_resource_id", "architecture_id", "operatingsystem_id"], "
|
39
|
+
# allowed keys are: {"compute_resource_id"=>nil, "image"=>["name", "username", "uuid", "compute_resource_id", "architecture_id", "operatingsystem_id"], "id"=>nil}
|
40
40
|
#
|
41
41
|
# @param [Hash] headers additional http headers
|
42
42
|
def update(params = { }, headers = { })
|
@@ -31,7 +31,7 @@ module ForemanApi
|
|
31
31
|
# @param [Hash] headers additional http headers
|
32
32
|
def create(params = { }, headers = { })
|
33
33
|
check_params params, :allowed => true, :method => __method__
|
34
|
-
url, params = fill_params_in_url "/api/
|
34
|
+
url, params = fill_params_in_url "/api/media", params
|
35
35
|
call(:"post", url, params, headers)
|
36
36
|
end
|
37
37
|
|
@@ -36,7 +36,7 @@ module ForemanApi
|
|
36
36
|
end
|
37
37
|
|
38
38
|
# @param [Hash] params a hash of params to be passed to the service
|
39
|
-
# allowed keys are: {"
|
39
|
+
# allowed keys are: {"operatingsystem"=>["name", "major", "minor", "family", "release_name"], "id"=>nil}
|
40
40
|
#
|
41
41
|
# @param [Hash] headers additional http headers
|
42
42
|
def update(params = { }, headers = { })
|
@@ -36,7 +36,7 @@ module ForemanApi
|
|
36
36
|
end
|
37
37
|
|
38
38
|
# @param [Hash] params a hash of params to be passed to the service
|
39
|
-
# allowed keys are: {"ptable"=>["name", "layout", "os_family"]
|
39
|
+
# allowed keys are: {"id"=>nil, "ptable"=>["name", "layout", "os_family"]}
|
40
40
|
#
|
41
41
|
# @param [Hash] headers additional http headers
|
42
42
|
def update(params = { }, headers = { })
|
@@ -36,7 +36,7 @@ module ForemanApi
|
|
36
36
|
end
|
37
37
|
|
38
38
|
# @param [Hash] params a hash of params to be passed to the service
|
39
|
-
# allowed keys are: {"puppetclass"=>["name"]
|
39
|
+
# allowed keys are: {"id"=>nil, "puppetclass"=>["name"]}
|
40
40
|
#
|
41
41
|
# @param [Hash] headers additional http headers
|
42
42
|
def update(params = { }, headers = { })
|
@@ -36,7 +36,7 @@ module ForemanApi
|
|
36
36
|
end
|
37
37
|
|
38
38
|
# @param [Hash] params a hash of params to be passed to the service
|
39
|
-
# allowed keys are: {"role"=>["name"]
|
39
|
+
# allowed keys are: {"id"=>nil, "role"=>["name"]}
|
40
40
|
#
|
41
41
|
# @param [Hash] headers additional http headers
|
42
42
|
def update(params = { }, headers = { })
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module ForemanApi
|
2
|
+
module Resources
|
3
|
+
class TemplateKind < Apipie::Client::Base
|
4
|
+
def self.doc
|
5
|
+
@doc ||= ForemanApi.doc['resources']["template_kinds"]
|
6
|
+
end
|
7
|
+
|
8
|
+
# @param [Hash] params a hash of params to be passed to the service
|
9
|
+
# allowed keys are: ["page", "per_page"]
|
10
|
+
#
|
11
|
+
# @param [Hash] headers additional http headers
|
12
|
+
def index(params = { }, headers = { })
|
13
|
+
check_params params, :allowed => true, :method => __method__
|
14
|
+
url, params = fill_params_in_url "/api/template_kinds", params
|
15
|
+
call(:"get", url, params, headers)
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/foreman_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-01-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: apipie-rails
|
@@ -116,6 +116,7 @@ files:
|
|
116
116
|
- lib/foreman_api/resources/setting.rb
|
117
117
|
- lib/foreman_api/resources/smart_proxy.rb
|
118
118
|
- lib/foreman_api/resources/subnet.rb
|
119
|
+
- lib/foreman_api/resources/template_kind.rb
|
119
120
|
- lib/foreman_api/resources/user.rb
|
120
121
|
- lib/foreman_api/resources/usergroup.rb
|
121
122
|
- lib/foreman_api/version.rb
|