foreman_api 0.0.11 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/foreman_api/base.rb +3 -1
- data/lib/foreman_api/resources/architecture.rb +6 -6
- data/lib/foreman_api/resources/audit.rb +4 -4
- data/lib/foreman_api/resources/auth_source_ldap.rb +14 -14
- data/lib/foreman_api/resources/bookmark.rb +2 -2
- data/lib/foreman_api/resources/common_parameter.rb +4 -4
- data/lib/foreman_api/resources/compute_resource.rb +20 -20
- data/lib/foreman_api/resources/config_template.rb +13 -13
- data/lib/foreman_api/resources/dashboard.rb +1 -1
- data/lib/foreman_api/resources/domain.rb +13 -13
- data/lib/foreman_api/resources/environment.rb +4 -4
- data/lib/foreman_api/resources/fact_value.rb +4 -4
- data/lib/foreman_api/resources/host.rb +8 -8
- data/lib/foreman_api/resources/hostgroup.rb +4 -4
- data/lib/foreman_api/resources/image.rb +4 -4
- data/lib/foreman_api/resources/lookup_key.rb +4 -4
- data/lib/foreman_api/resources/medium.rb +10 -10
- data/lib/foreman_api/resources/model.rb +4 -4
- data/lib/foreman_api/resources/operating_system.rb +4 -4
- data/lib/foreman_api/resources/ptable.rb +4 -4
- data/lib/foreman_api/resources/puppetclass.rb +4 -4
- data/lib/foreman_api/resources/report.rb +14 -4
- data/lib/foreman_api/resources/role.rb +2 -2
- data/lib/foreman_api/resources/setting.rb +4 -4
- data/lib/foreman_api/resources/smart_proxy.rb +3 -3
- data/lib/foreman_api/resources/subnet.rb +32 -32
- data/lib/foreman_api/resources/template_combination.rb +54 -0
- data/lib/foreman_api/resources/template_kind.rb +2 -2
- data/lib/foreman_api/resources/user.rb +6 -6
- data/lib/foreman_api/resources/usergroup.rb +4 -2
- data/lib/foreman_api/version.rb +1 -1
- metadata +3 -2
data/lib/foreman_api/base.rb
CHANGED
@@ -5,6 +5,8 @@ require 'foreman_api/rest_client_oauth'
|
|
5
5
|
|
6
6
|
module ForemanApi
|
7
7
|
class Base
|
8
|
+
API_VERSION = "2"
|
9
|
+
|
8
10
|
attr_reader :client, :config
|
9
11
|
|
10
12
|
def initialize(config, options = { })
|
@@ -13,7 +15,7 @@ module ForemanApi
|
|
13
15
|
:password => config[:password],
|
14
16
|
:oauth => config[:oauth],
|
15
17
|
:headers => { :content_type => 'application/json',
|
16
|
-
:accept =>
|
18
|
+
:accept => "application/json;version=#{API_VERSION}" }
|
17
19
|
@config = config
|
18
20
|
end
|
19
21
|
|
@@ -6,10 +6,10 @@ module ForemanApi
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
|
-
# @option params [String] order Sort results
|
10
|
-
# @option params [String] page Paginate results
|
11
|
-
# @option params [String] per_page Number of entries per request
|
12
|
-
# @option params [String] search Filter results
|
9
|
+
# @option params [String] order Sort results
|
10
|
+
# @option params [String] page Paginate results
|
11
|
+
# @option params [String] per_page Number of entries per request
|
12
|
+
# @option params [String] search Filter results
|
13
13
|
#
|
14
14
|
# @param [Hash] headers additional http headers
|
15
15
|
def index(params = { }, headers = { })
|
@@ -32,7 +32,7 @@ module ForemanApi
|
|
32
32
|
# @option params [Hash] architecture
|
33
33
|
# allowed keys are:
|
34
34
|
# * name [String],
|
35
|
-
# * operatingsystem_ids [String] Operatingsystem id&#
|
35
|
+
# * operatingsystem_ids [String] Operatingsystem id’s,
|
36
36
|
#
|
37
37
|
# @param [Hash] headers additional http headers
|
38
38
|
def create(params = { }, headers = { })
|
@@ -46,7 +46,7 @@ module ForemanApi
|
|
46
46
|
# @option params [Hash] architecture
|
47
47
|
# allowed keys are:
|
48
48
|
# * name [String],
|
49
|
-
# * operatingsystem_ids [String] Operatingsystem id&#
|
49
|
+
# * operatingsystem_ids [String] Operatingsystem id’s,
|
50
50
|
#
|
51
51
|
# @param [Hash] headers additional http headers
|
52
52
|
def update(params = { }, headers = { })
|
@@ -6,10 +6,10 @@ module ForemanApi
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
|
-
# @option params [String] order Sort results
|
10
|
-
# @option params [String] page Paginate results
|
11
|
-
# @option params [String] per_page Number of entries per request
|
12
|
-
# @option params [String] search Filter results
|
9
|
+
# @option params [String] order Sort results
|
10
|
+
# @option params [String] page Paginate results
|
11
|
+
# @option params [String] per_page Number of entries per request
|
12
|
+
# @option params [String] search Filter results
|
13
13
|
#
|
14
14
|
# @param [Hash] headers additional http headers
|
15
15
|
def index(params = { }, headers = { })
|
@@ -6,8 +6,8 @@ module ForemanApi
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
|
-
# @option params [String] page Paginate results
|
10
|
-
# @option params [String] per_page Number of entries per request
|
9
|
+
# @option params [String] page Paginate results
|
10
|
+
# @option params [String] per_page Number of entries per request
|
11
11
|
#
|
12
12
|
# @param [Hash] headers additional http headers
|
13
13
|
def index(params = { }, headers = { })
|
@@ -30,16 +30,16 @@ module ForemanApi
|
|
30
30
|
# @option params [Hash] auth_source_ldap
|
31
31
|
# allowed keys are:
|
32
32
|
# * account [String],
|
33
|
-
# * account_password [String] Required if onthefly_register is true
|
34
|
-
# * attr_firstname [String] Required if onthefly_register is true
|
35
|
-
# * attr_lastname [String] Required if onthefly_register is true
|
36
|
-
# * attr_login [String] Required if onthefly_register is true
|
37
|
-
# * attr_mail [String] Required if onthefly_register is true
|
33
|
+
# * account_password [String] Required if onthefly_register is true,
|
34
|
+
# * attr_firstname [String] Required if onthefly_register is true,
|
35
|
+
# * attr_lastname [String] Required if onthefly_register is true,
|
36
|
+
# * attr_login [String] Required if onthefly_register is true,
|
37
|
+
# * attr_mail [String] Required if onthefly_register is true,
|
38
38
|
# * base_dn [String],
|
39
39
|
# * host [String],
|
40
40
|
# * name [String],
|
41
41
|
# * onthefly_register [String],
|
42
|
-
# * port [String] Defaults to 389
|
42
|
+
# * port [String] Defaults to 389,
|
43
43
|
# * tls [String],
|
44
44
|
#
|
45
45
|
# @param [Hash] headers additional http headers
|
@@ -54,16 +54,16 @@ module ForemanApi
|
|
54
54
|
# @option params [Hash] auth_source_ldap
|
55
55
|
# allowed keys are:
|
56
56
|
# * account [String],
|
57
|
-
# * account_password [String] Required if onthefly_register is true
|
58
|
-
# * attr_firstname [String] Required if onthefly_register is true
|
59
|
-
# * attr_lastname [String] Required if onthefly_register is true
|
60
|
-
# * attr_login [String] Required if onthefly_register is true
|
61
|
-
# * attr_mail [String] Required if onthefly_register is true
|
57
|
+
# * account_password [String] Required if onthefly_register is true,
|
58
|
+
# * attr_firstname [String] Required if onthefly_register is true,
|
59
|
+
# * attr_lastname [String] Required if onthefly_register is true,
|
60
|
+
# * attr_login [String] Required if onthefly_register is true,
|
61
|
+
# * attr_mail [String] Required if onthefly_register is true,
|
62
62
|
# * base_dn [String],
|
63
63
|
# * host [String],
|
64
64
|
# * name [String],
|
65
65
|
# * onthefly_register [String],
|
66
|
-
# * port [String] Defaults to 389
|
66
|
+
# * port [String] Defaults to 389,
|
67
67
|
# * tls [String],
|
68
68
|
#
|
69
69
|
# @param [Hash] headers additional http headers
|
@@ -6,8 +6,8 @@ module ForemanApi
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
|
-
# @option params [String] page Paginate results
|
10
|
-
# @option params [String] per_page Number of entries per request
|
9
|
+
# @option params [String] page Paginate results
|
10
|
+
# @option params [String] per_page Number of entries per request
|
11
11
|
#
|
12
12
|
# @param [Hash] headers additional http headers
|
13
13
|
def index(params = { }, headers = { })
|
@@ -6,10 +6,10 @@ module ForemanApi
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
|
-
# @option params [String] order Sort results
|
10
|
-
# @option params [String] page Paginate results
|
11
|
-
# @option params [String] per_page Number of entries per request
|
12
|
-
# @option params [String] search Filter results
|
9
|
+
# @option params [String] order Sort results
|
10
|
+
# @option params [String] page Paginate results
|
11
|
+
# @option params [String] per_page Number of entries per request
|
12
|
+
# @option params [String] search Filter results
|
13
13
|
#
|
14
14
|
# @param [Hash] headers additional http headers
|
15
15
|
def index(params = { }, headers = { })
|
@@ -6,10 +6,10 @@ module ForemanApi
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
|
-
# @option params [String] order Sort results
|
10
|
-
# @option params [String] page Paginate results
|
11
|
-
# @option params [String] per_page Number of entries per request
|
12
|
-
# @option params [String] search Filter results
|
9
|
+
# @option params [String] order Sort results
|
10
|
+
# @option params [String] page Paginate results
|
11
|
+
# @option params [String] per_page Number of entries per request
|
12
|
+
# @option params [String] search Filter results
|
13
13
|
#
|
14
14
|
# @param [Hash] headers additional http headers
|
15
15
|
def index(params = { }, headers = { })
|
@@ -33,14 +33,14 @@ module ForemanApi
|
|
33
33
|
# allowed keys are:
|
34
34
|
# * description [String],
|
35
35
|
# * name [String],
|
36
|
-
# * password [String] Password for ovirt, ec2, vmware, openstack. secret key for ec2
|
37
|
-
# * provider [String] Providers include libvirt, ovirt, ec2, vmware, openstack, rackspace
|
38
|
-
# * region [String] For ec2 only
|
39
|
-
# * server [String] For vmware
|
40
|
-
# * tenant [String] For openstack only
|
41
|
-
# * url [String] Url for libvirt, ovirt, and openstack
|
42
|
-
# * user [String] Username for ovirt, ec2, vmware, openstack. access key for ec2
|
43
|
-
# * uuid [String] For ovirt, vmware datacenter
|
36
|
+
# * password [String] Password for ovirt, ec2, vmware, openstack. secret key for ec2,
|
37
|
+
# * provider [String] Providers include libvirt, ovirt, ec2, vmware, openstack, rackspace,
|
38
|
+
# * region [String] For ec2 only,
|
39
|
+
# * server [String] For vmware,
|
40
|
+
# * tenant [String] For openstack only,
|
41
|
+
# * url [String] Url for libvirt, ovirt, and openstack,
|
42
|
+
# * user [String] Username for ovirt, ec2, vmware, openstack. access key for ec2.,
|
43
|
+
# * uuid [String] For ovirt, vmware datacenter,
|
44
44
|
#
|
45
45
|
# @param [Hash] headers additional http headers
|
46
46
|
def create(params = { }, headers = { })
|
@@ -55,14 +55,14 @@ module ForemanApi
|
|
55
55
|
# allowed keys are:
|
56
56
|
# * description [String],
|
57
57
|
# * name [String],
|
58
|
-
# * password [String] Password for ovirt, ec2, vmware, openstack. secret key for ec2
|
59
|
-
# * provider [String] Providers include libvirt, ovirt, ec2, vmware, openstack, rackspace
|
60
|
-
# * region [String] For ec2 only
|
61
|
-
# * server [String] For vmware
|
62
|
-
# * tenant [String] For openstack only
|
63
|
-
# * url [String] Url for libvirt, ovirt, and openstack
|
64
|
-
# * user [String] Username for ovirt, ec2, vmware, openstack. access key for ec2
|
65
|
-
# * uuid [String] For ovirt, vmware datacenter
|
58
|
+
# * password [String] Password for ovirt, ec2, vmware, openstack. secret key for ec2,
|
59
|
+
# * provider [String] Providers include libvirt, ovirt, ec2, vmware, openstack, rackspace,
|
60
|
+
# * region [String] For ec2 only,
|
61
|
+
# * server [String] For vmware,
|
62
|
+
# * tenant [String] For openstack only,
|
63
|
+
# * url [String] Url for libvirt, ovirt, and openstack,
|
64
|
+
# * user [String] Username for ovirt, ec2, vmware, openstack. access key for ec2.,
|
65
|
+
# * uuid [String] For ovirt, vmware datacenter,
|
66
66
|
#
|
67
67
|
# @param [Hash] headers additional http headers
|
68
68
|
def update(params = { }, headers = { })
|
@@ -6,10 +6,10 @@ module ForemanApi
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
|
-
# @option params [String] order Sort results
|
10
|
-
# @option params [String] page Paginate results
|
11
|
-
# @option params [String] per_page Number of entries per request
|
12
|
-
# @option params [String] search Filter results
|
9
|
+
# @option params [String] order Sort results
|
10
|
+
# @option params [String] page Paginate results
|
11
|
+
# @option params [String] per_page Number of entries per request
|
12
|
+
# @option params [String] search Filter results
|
13
13
|
#
|
14
14
|
# @param [Hash] headers additional http headers
|
15
15
|
def index(params = { }, headers = { })
|
@@ -32,12 +32,12 @@ module ForemanApi
|
|
32
32
|
# @option params [Hash] config_template
|
33
33
|
# allowed keys are:
|
34
34
|
# * audit_comment [String, nil],
|
35
|
-
# * name [String] Template name
|
36
|
-
# * operatingsystem_ids [String] Array of operating systems id to associate the template with
|
35
|
+
# * name [String] Template name,
|
36
|
+
# * operatingsystem_ids [String] Array of operating systems id to associate the template with,
|
37
37
|
# * snippet [String, nil],
|
38
38
|
# * template [String],
|
39
|
-
# * template_combinations_attributes [String] Array of template combinations (
|
40
|
-
# * template_kind_id [String, nil] Not relevant for snippet
|
39
|
+
# * template_combinations_attributes [String] Array of template combinations (hostgroup_id, environment_id),
|
40
|
+
# * template_kind_id [String, nil] Not relevant for snippet,
|
41
41
|
#
|
42
42
|
# @param [Hash] headers additional http headers
|
43
43
|
def create(params = { }, headers = { })
|
@@ -51,12 +51,12 @@ module ForemanApi
|
|
51
51
|
# @option params [Hash] config_template
|
52
52
|
# allowed keys are:
|
53
53
|
# * audit_comment [String, nil],
|
54
|
-
# * name [String] Template name
|
55
|
-
# * operatingsystem_ids [String] Array of operating systems id to associate the template with
|
54
|
+
# * name [String] Template name,
|
55
|
+
# * operatingsystem_ids [String] Array of operating systems id to associate the template with,
|
56
56
|
# * snippet [String],
|
57
57
|
# * template [String],
|
58
|
-
# * template_combinations_attributes [String] Array of template combinations (
|
59
|
-
# * template_kind_id [String, nil] Not relevant for snippet
|
58
|
+
# * template_combinations_attributes [String] Array of template combinations (hostgroup_id, environment_id),
|
59
|
+
# * template_kind_id [String, nil] Not relevant for snippet,
|
60
60
|
#
|
61
61
|
# @param [Hash] headers additional http headers
|
62
62
|
def update(params = { }, headers = { })
|
@@ -66,7 +66,7 @@ module ForemanApi
|
|
66
66
|
end
|
67
67
|
|
68
68
|
# @param [Hash] params a hash of params to be passed to the service
|
69
|
-
# @option params [String] version Template version
|
69
|
+
# @option params [String] version Template version
|
70
70
|
#
|
71
71
|
# @param [Hash] headers additional http headers
|
72
72
|
def revision(params = { }, headers = { })
|
@@ -6,7 +6,7 @@ module ForemanApi
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
|
-
# @option params [String] search Filter results
|
9
|
+
# @option params [String] search Filter results
|
10
10
|
#
|
11
11
|
# @param [Hash] headers additional http headers
|
12
12
|
def index(params = { }, headers = { })
|
@@ -6,10 +6,10 @@ module ForemanApi
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
|
-
# @option params [String] order Sort results
|
10
|
-
# @option params [String] page Paginate results
|
11
|
-
# @option params [String] per_page Number of entries per request
|
12
|
-
# @option params [String] search Filter results
|
9
|
+
# @option params [String] order Sort results
|
10
|
+
# @option params [String] page Paginate results
|
11
|
+
# @option params [String] per_page Number of entries per request
|
12
|
+
# @option params [String] search Filter results
|
13
13
|
#
|
14
14
|
# @param [Hash] headers additional http headers
|
15
15
|
def index(params = { }, headers = { })
|
@@ -19,7 +19,7 @@ module ForemanApi
|
|
19
19
|
end
|
20
20
|
|
21
21
|
# @param [Hash] params a hash of params to be passed to the service
|
22
|
-
# @option params [String] id May be numerical id or domain name
|
22
|
+
# @option params [String] id May be numerical id or domain name
|
23
23
|
#
|
24
24
|
# @param [Hash] headers additional http headers
|
25
25
|
def show(params = { }, headers = { })
|
@@ -31,10 +31,10 @@ module ForemanApi
|
|
31
31
|
# @param [Hash] params a hash of params to be passed to the service
|
32
32
|
# @option params [Hash] domain
|
33
33
|
# allowed keys are:
|
34
|
-
# * dns_id [String, nil] Dns proxy to use within this domain
|
35
|
-
# * domain_parameters_attributes [String] Array of parameters (name, value)
|
36
|
-
# * fullname [String, nil] Full name describing the domain
|
37
|
-
# * name [String] The full dns domain name
|
34
|
+
# * dns_id [String, nil] Dns proxy to use within this domain,
|
35
|
+
# * domain_parameters_attributes [String] Array of parameters (name, value),
|
36
|
+
# * fullname [String, nil] Full name describing the domain,
|
37
|
+
# * name [String] The full dns domain name,
|
38
38
|
#
|
39
39
|
# @param [Hash] headers additional http headers
|
40
40
|
def create(params = { }, headers = { })
|
@@ -47,10 +47,10 @@ module ForemanApi
|
|
47
47
|
# @option params [String] id
|
48
48
|
# @option params [Hash] domain
|
49
49
|
# allowed keys are:
|
50
|
-
# * dns_id [String, nil] Dns proxy to use within this domain
|
51
|
-
# * domain_parameters_attributes [String] Array of parameters (name, value)
|
52
|
-
# * fullname [String, nil] Full name describing the domain
|
53
|
-
# * name [String, nil] The full dns domain name
|
50
|
+
# * dns_id [String, nil] Dns proxy to use within this domain,
|
51
|
+
# * domain_parameters_attributes [String] Array of parameters (name, value),
|
52
|
+
# * fullname [String, nil] Full name describing the domain,
|
53
|
+
# * name [String, nil] The full dns domain name,
|
54
54
|
#
|
55
55
|
# @param [Hash] headers additional http headers
|
56
56
|
def update(params = { }, headers = { })
|
@@ -6,10 +6,10 @@ module ForemanApi
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
|
-
# @option params [String] order Sort results
|
10
|
-
# @option params [String] page Paginate results
|
11
|
-
# @option params [String] per_page Number of entries per request
|
12
|
-
# @option params [String] search Filter results
|
9
|
+
# @option params [String] order Sort results
|
10
|
+
# @option params [String] page Paginate results
|
11
|
+
# @option params [String] per_page Number of entries per request
|
12
|
+
# @option params [String] search Filter results
|
13
13
|
#
|
14
14
|
# @param [Hash] headers additional http headers
|
15
15
|
def index(params = { }, headers = { })
|
@@ -6,10 +6,10 @@ module ForemanApi
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
|
-
# @option params [String] order Sort results
|
10
|
-
# @option params [String] page Paginate results
|
11
|
-
# @option params [String] per_page Number of entries per request
|
12
|
-
# @option params [String] search Filter results
|
9
|
+
# @option params [String] order Sort results
|
10
|
+
# @option params [String] page Paginate results
|
11
|
+
# @option params [String] per_page Number of entries per request
|
12
|
+
# @option params [String] search Filter results
|
13
13
|
#
|
14
14
|
# @param [Hash] headers additional http headers
|
15
15
|
def index(params = { }, headers = { })
|
@@ -6,10 +6,10 @@ module ForemanApi
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
|
-
# @option params [String] order Sort results
|
10
|
-
# @option params [String] page Paginate results
|
11
|
-
# @option params [String] per_page Number of entries per request
|
12
|
-
# @option params [String] search Filter results
|
9
|
+
# @option params [String] order Sort results
|
10
|
+
# @option params [String] page Paginate results
|
11
|
+
# @option params [String] per_page Number of entries per request
|
12
|
+
# @option params [String] search Filter results
|
13
13
|
#
|
14
14
|
# @param [Hash] headers additional http headers
|
15
15
|
def index(params = { }, headers = { })
|
@@ -37,8 +37,8 @@ module ForemanApi
|
|
37
37
|
# * host_parameters_attributes [String],
|
38
38
|
# * hostgroup_id [String],
|
39
39
|
# * image_id [String],
|
40
|
-
# * ip [String] Not required if using a subnet with dhcp proxy
|
41
|
-
# * mac [String] Not required if its a virtual machine
|
40
|
+
# * ip [String] Not required if using a subnet with dhcp proxy,
|
41
|
+
# * mac [String] Not required if its a virtual machine,
|
42
42
|
# * medium_id [String],
|
43
43
|
# * model_id_id [String],
|
44
44
|
# * name [String],
|
@@ -67,8 +67,8 @@ module ForemanApi
|
|
67
67
|
# * host_parameters_attributes [String],
|
68
68
|
# * hostgroup_id [String],
|
69
69
|
# * image_id [String],
|
70
|
-
# * ip [String] Not required if using a subnet with dhcp proxy
|
71
|
-
# * mac [String] Not required if its a virtual machine
|
70
|
+
# * ip [String] Not required if using a subnet with dhcp proxy,
|
71
|
+
# * mac [String] Not required if its a virtual machine,
|
72
72
|
# * medium_id [String],
|
73
73
|
# * model_id_id [String],
|
74
74
|
# * name [String],
|
@@ -6,10 +6,10 @@ module ForemanApi
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
|
-
# @option params [String] order Sort results
|
10
|
-
# @option params [String] page Paginate results
|
11
|
-
# @option params [String] per_page Number of entries per request
|
12
|
-
# @option params [String] search Filter results
|
9
|
+
# @option params [String] order Sort results
|
10
|
+
# @option params [String] page Paginate results
|
11
|
+
# @option params [String] per_page Number of entries per request
|
12
|
+
# @option params [String] search Filter results
|
13
13
|
#
|
14
14
|
# @param [Hash] headers additional http headers
|
15
15
|
def index(params = { }, headers = { })
|
@@ -7,10 +7,10 @@ module ForemanApi
|
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
9
|
# @option params [String] compute_resource_id
|
10
|
-
# @option params [String] order Sort results
|
11
|
-
# @option params [String] page Paginate results
|
12
|
-
# @option params [String] per_page Number of entries per request
|
13
|
-
# @option params [String] search Filter results
|
10
|
+
# @option params [String] order Sort results
|
11
|
+
# @option params [String] page Paginate results
|
12
|
+
# @option params [String] per_page Number of entries per request
|
13
|
+
# @option params [String] search Filter results
|
14
14
|
#
|
15
15
|
# @param [Hash] headers additional http headers
|
16
16
|
def index(params = { }, headers = { })
|
@@ -6,10 +6,10 @@ module ForemanApi
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
|
-
# @option params [String] order Sort results
|
10
|
-
# @option params [String] page Paginate results
|
11
|
-
# @option params [String] per_page Number of entries per request
|
12
|
-
# @option params [String] search Filter results
|
9
|
+
# @option params [String] order Sort results
|
10
|
+
# @option params [String] page Paginate results
|
11
|
+
# @option params [String] per_page Number of entries per request
|
12
|
+
# @option params [String] search Filter results
|
13
13
|
#
|
14
14
|
# @param [Hash] headers additional http headers
|
15
15
|
def index(params = { }, headers = { })
|
@@ -6,10 +6,10 @@ module ForemanApi
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
|
-
# @option params [String] order For example, name asc, or name desc
|
10
|
-
# @option params [String] page Paginate results
|
11
|
-
# @option params [String] per_page Number of entries per request
|
12
|
-
# @option params [String] search Filter results
|
9
|
+
# @option params [String] order For example, name asc, or name desc
|
10
|
+
# @option params [String] page Paginate results
|
11
|
+
# @option params [String] per_page Number of entries per request
|
12
|
+
# @option params [String] search Filter results
|
13
13
|
#
|
14
14
|
# @param [Hash] headers additional http headers
|
15
15
|
def index(params = { }, headers = { })
|
@@ -31,9 +31,9 @@ module ForemanApi
|
|
31
31
|
# @param [Hash] params a hash of params to be passed to the service
|
32
32
|
# @option params [Hash] medium
|
33
33
|
# allowed keys are:
|
34
|
-
# * name [String] Name of media
|
35
|
-
# * os_family [String] The family that the operating system belongs to. available families: archlinux
|
36
|
-
# * path [String] The path to the medium, can be a url or a valid nfs server (exclusive of the architecture). for example http://mirror.averse.net/centos/$version/os/$arch where $arch will be substituted for the host&#
|
34
|
+
# * name [String] Name of media,
|
35
|
+
# * os_family [String] The family that the operating system belongs to. available families: archlinux debian redhat solaris suse windows ,
|
36
|
+
# * path [String] The path to the medium, can be a url or a valid nfs server (exclusive of the architecture). for example http://mirror.averse.net/centos/$version/os/$arch where $arch will be substituted for the host’s actual os architecture and $version, $major and $minor will be substituted for the version of the operating system. solaris and debian media may also use $release.,
|
37
37
|
#
|
38
38
|
# @param [Hash] headers additional http headers
|
39
39
|
def create(params = { }, headers = { })
|
@@ -46,9 +46,9 @@ module ForemanApi
|
|
46
46
|
# @option params [String] id
|
47
47
|
# @option params [Hash] medium
|
48
48
|
# allowed keys are:
|
49
|
-
# * name [String] Name of media
|
50
|
-
# * os_family [String, nil] The family that the operating system belongs to. available families: archlinux
|
51
|
-
# * path [String] The path to the medium, can be a url or a valid nfs server (exclusive of the architecture). for example http://mirror.averse.net/centos/$version/os/$arch where $arch will be substituted for the host&#
|
49
|
+
# * name [String] Name of media,
|
50
|
+
# * os_family [String, nil] The family that the operating system belongs to. available families: archlinux debian redhat solaris suse windows ,
|
51
|
+
# * path [String] The path to the medium, can be a url or a valid nfs server (exclusive of the architecture). for example http://mirror.averse.net/centos/$version/os/$arch where $arch will be substituted for the host’s actual os architecture and $version, $major and $minor will be substituted for the version of the operating system. solaris and debian media may also use $release.,
|
52
52
|
#
|
53
53
|
# @param [Hash] headers additional http headers
|
54
54
|
def update(params = { }, headers = { })
|
@@ -6,10 +6,10 @@ module ForemanApi
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
|
-
# @option params [String] order Sort results
|
10
|
-
# @option params [String] page Paginate results
|
11
|
-
# @option params [String] per_page Number of entries per request
|
12
|
-
# @option params [String] search Filter results
|
9
|
+
# @option params [String] order Sort results
|
10
|
+
# @option params [String] page Paginate results
|
11
|
+
# @option params [String] per_page Number of entries per request
|
12
|
+
# @option params [String] search Filter results
|
13
13
|
#
|
14
14
|
# @param [Hash] headers additional http headers
|
15
15
|
def index(params = { }, headers = { })
|
@@ -6,10 +6,10 @@ module ForemanApi
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
|
-
# @option params [String] order For example, name asc, or name desc
|
10
|
-
# @option params [String] page Paginate results
|
11
|
-
# @option params [String] per_page Number of entries per request
|
12
|
-
# @option params [String] search Filter results
|
9
|
+
# @option params [String] order For example, name asc, or name desc
|
10
|
+
# @option params [String] page Paginate results
|
11
|
+
# @option params [String] per_page Number of entries per request
|
12
|
+
# @option params [String] search Filter results
|
13
13
|
#
|
14
14
|
# @param [Hash] headers additional http headers
|
15
15
|
def index(params = { }, headers = { })
|
@@ -6,10 +6,10 @@ module ForemanApi
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
|
-
# @option params [String] order Sort results
|
10
|
-
# @option params [String] page Paginate results
|
11
|
-
# @option params [String] per_page Number of entries per request
|
12
|
-
# @option params [String] search Filter results
|
9
|
+
# @option params [String] order Sort results
|
10
|
+
# @option params [String] page Paginate results
|
11
|
+
# @option params [String] per_page Number of entries per request
|
12
|
+
# @option params [String] search Filter results
|
13
13
|
#
|
14
14
|
# @param [Hash] headers additional http headers
|
15
15
|
def index(params = { }, headers = { })
|
@@ -6,10 +6,10 @@ module ForemanApi
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
|
-
# @option params [String] order Sort results
|
10
|
-
# @option params [String] page Paginate results
|
11
|
-
# @option params [String] per_page Number of entries per request
|
12
|
-
# @option params [String] search Filter results
|
9
|
+
# @option params [String] order Sort results
|
10
|
+
# @option params [String] page Paginate results
|
11
|
+
# @option params [String] per_page Number of entries per request
|
12
|
+
# @option params [String] search Filter results
|
13
13
|
#
|
14
14
|
# @param [Hash] headers additional http headers
|
15
15
|
def index(params = { }, headers = { })
|
@@ -6,10 +6,10 @@ module ForemanApi
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
|
-
# @option params [String] order Sort results
|
10
|
-
# @option params [String] page Paginate results
|
11
|
-
# @option params [String] per_page Number of entries per request
|
12
|
-
# @option params [String] search Filter results
|
9
|
+
# @option params [String] order Sort results
|
10
|
+
# @option params [String] page Paginate results
|
11
|
+
# @option params [String] per_page Number of entries per request
|
12
|
+
# @option params [String] search Filter results
|
13
13
|
#
|
14
14
|
# @param [Hash] headers additional http headers
|
15
15
|
def index(params = { }, headers = { })
|
@@ -38,6 +38,16 @@ module ForemanApi
|
|
38
38
|
call(:"delete", url, params, headers)
|
39
39
|
end
|
40
40
|
|
41
|
+
# @param [Hash] params a hash of params to be passed to the service
|
42
|
+
# @option params [String] id
|
43
|
+
#
|
44
|
+
# @param [Hash] headers additional http headers
|
45
|
+
def last(params = { }, headers = { })
|
46
|
+
check_params params, :allowed => true, :method => __method__
|
47
|
+
url, params = fill_params_in_url "/api/hosts/:host_id/reports/last", params
|
48
|
+
call(:"get", url, params, headers)
|
49
|
+
end
|
50
|
+
|
41
51
|
end
|
42
52
|
end
|
43
53
|
end
|
@@ -6,8 +6,8 @@ module ForemanApi
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
|
-
# @option params [String] page Paginate results
|
10
|
-
# @option params [String] per_page Number of entries per request
|
9
|
+
# @option params [String] page Paginate results
|
10
|
+
# @option params [String] per_page Number of entries per request
|
11
11
|
#
|
12
12
|
# @param [Hash] headers additional http headers
|
13
13
|
def index(params = { }, headers = { })
|
@@ -6,10 +6,10 @@ module ForemanApi
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
|
-
# @option params [String] order Sort results
|
10
|
-
# @option params [String] page Paginate results
|
11
|
-
# @option params [String] per_page Number of entries per request
|
12
|
-
# @option params [String] search Filter results
|
9
|
+
# @option params [String] order Sort results
|
10
|
+
# @option params [String] page Paginate results
|
11
|
+
# @option params [String] per_page Number of entries per request
|
12
|
+
# @option params [String] search Filter results
|
13
13
|
#
|
14
14
|
# @param [Hash] headers additional http headers
|
15
15
|
def index(params = { }, headers = { })
|
@@ -6,9 +6,9 @@ module ForemanApi
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
|
-
# @option params [String] page Paginate results
|
10
|
-
# @option params [String] per_page Number of entries per request
|
11
|
-
# @option params [String] type Filter by type
|
9
|
+
# @option params [String] page Paginate results
|
10
|
+
# @option params [String] per_page Number of entries per request
|
11
|
+
# @option params [String] type Filter by type
|
12
12
|
#
|
13
13
|
# @param [Hash] headers additional http headers
|
14
14
|
def index(params = { }, headers = { })
|
@@ -6,10 +6,10 @@ module ForemanApi
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
|
-
# @option params [String] order Sort results
|
10
|
-
# @option params [String] page Paginate results
|
11
|
-
# @option params [String] per_page Number of entries per request
|
12
|
-
# @option params [String] search Filter results
|
9
|
+
# @option params [String] order Sort results
|
10
|
+
# @option params [String] page Paginate results
|
11
|
+
# @option params [String] per_page Number of entries per request
|
12
|
+
# @option params [String] search Filter results
|
13
13
|
#
|
14
14
|
# @param [Hash] headers additional http headers
|
15
15
|
def index(params = { }, headers = { })
|
@@ -31,19 +31,19 @@ module ForemanApi
|
|
31
31
|
# @param [Hash] params a hash of params to be passed to the service
|
32
32
|
# @option params [Hash] subnet
|
33
33
|
# allowed keys are:
|
34
|
-
# * dhcp_id [String] Dhcp proxy to use within this subnet
|
35
|
-
# * dns_id [String] Dns proxy to use within this subnet
|
36
|
-
# * dns_primary [String] Primary dns for this subnet
|
37
|
-
# * dns_secondary [String] Secondary dns for this subnet
|
38
|
-
# * domain_ids [String] Domains in which this subnet is part
|
39
|
-
# * from [String] Starting ip address for ip auto suggestion
|
40
|
-
# * gateway [String] Primary dns for this subnet
|
41
|
-
# * mask [String] Netmask for this subnet
|
42
|
-
# * name [String] Subnet name
|
43
|
-
# * network [String] Subnet network
|
44
|
-
# * tftp_id [String] Tftp proxy to use within this subnet
|
45
|
-
# * to [String] Ending ip address for ip auto suggestion
|
46
|
-
# * vlanid [String] Vlan id for this subnet
|
34
|
+
# * dhcp_id [String] Dhcp proxy to use within this subnet,
|
35
|
+
# * dns_id [String] Dns proxy to use within this subnet,
|
36
|
+
# * dns_primary [String] Primary dns for this subnet,
|
37
|
+
# * dns_secondary [String] Secondary dns for this subnet,
|
38
|
+
# * domain_ids [String] Domains in which this subnet is part,
|
39
|
+
# * from [String] Starting ip address for ip auto suggestion,
|
40
|
+
# * gateway [String] Primary dns for this subnet,
|
41
|
+
# * mask [String] Netmask for this subnet,
|
42
|
+
# * name [String] Subnet name,
|
43
|
+
# * network [String] Subnet network,
|
44
|
+
# * tftp_id [String] Tftp proxy to use within this subnet,
|
45
|
+
# * to [String] Ending ip address for ip auto suggestion,
|
46
|
+
# * vlanid [String] Vlan id for this subnet,
|
47
47
|
#
|
48
48
|
# @param [Hash] headers additional http headers
|
49
49
|
def create(params = { }, headers = { })
|
@@ -53,22 +53,22 @@ module ForemanApi
|
|
53
53
|
end
|
54
54
|
|
55
55
|
# @param [Hash] params a hash of params to be passed to the service
|
56
|
-
# @option params [String] id Subnet numeric identifier
|
56
|
+
# @option params [String] id Subnet numeric identifier
|
57
57
|
# @option params [Hash] subnet
|
58
58
|
# allowed keys are:
|
59
|
-
# * dhcp_id [String, nil] Dhcp proxy to use within this subnet
|
60
|
-
# * dns_id [String, nil] Dns proxy to use within this subnet
|
61
|
-
# * dns_primary [String, nil] Primary dns for this subnet
|
62
|
-
# * dns_secondary [String, nil] Secondary dns for this subnet
|
63
|
-
# * domain_ids [String, nil] Domains in which this subnet is part
|
64
|
-
# * from [String, nil] Starting ip address for ip auto suggestion
|
65
|
-
# * gateway [String, nil] Primary dns for this subnet
|
66
|
-
# * mask [String] Netmask for this subnet
|
67
|
-
# * name [String] Subnet name
|
68
|
-
# * network [String] Subnet network
|
69
|
-
# * tftp_id [String, nil] Tftp proxy to use within this subnet
|
70
|
-
# * to [String, nil] Ending ip address for ip auto suggestion
|
71
|
-
# * vlanid [String, nil] Vlan id for this subnet
|
59
|
+
# * dhcp_id [String, nil] Dhcp proxy to use within this subnet,
|
60
|
+
# * dns_id [String, nil] Dns proxy to use within this subnet,
|
61
|
+
# * dns_primary [String, nil] Primary dns for this subnet,
|
62
|
+
# * dns_secondary [String, nil] Secondary dns for this subnet,
|
63
|
+
# * domain_ids [String, nil] Domains in which this subnet is part,
|
64
|
+
# * from [String, nil] Starting ip address for ip auto suggestion,
|
65
|
+
# * gateway [String, nil] Primary dns for this subnet,
|
66
|
+
# * mask [String] Netmask for this subnet,
|
67
|
+
# * name [String] Subnet name,
|
68
|
+
# * network [String] Subnet network,
|
69
|
+
# * tftp_id [String, nil] Tftp proxy to use within this subnet,
|
70
|
+
# * to [String, nil] Ending ip address for ip auto suggestion,
|
71
|
+
# * vlanid [String, nil] Vlan id for this subnet,
|
72
72
|
#
|
73
73
|
# @param [Hash] headers additional http headers
|
74
74
|
def update(params = { }, headers = { })
|
@@ -78,7 +78,7 @@ module ForemanApi
|
|
78
78
|
end
|
79
79
|
|
80
80
|
# @param [Hash] params a hash of params to be passed to the service
|
81
|
-
# @option params [String] id Subnet numeric identifier
|
81
|
+
# @option params [String] id Subnet numeric identifier
|
82
82
|
#
|
83
83
|
# @param [Hash] headers additional http headers
|
84
84
|
def destroy(params = { }, headers = { })
|
@@ -0,0 +1,54 @@
|
|
1
|
+
module ForemanApi
|
2
|
+
module Resources
|
3
|
+
class TemplateCombination < ForemanApi::Base
|
4
|
+
def self.doc
|
5
|
+
@doc ||= ForemanApi.doc['resources']["template_combinations"]
|
6
|
+
end
|
7
|
+
|
8
|
+
# @param [Hash] params a hash of params to be passed to the service
|
9
|
+
# @option params [String] config_template_id
|
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/config_templates/:config_template_id/template_combinations", params
|
15
|
+
call(:"get", url, params, headers)
|
16
|
+
end
|
17
|
+
|
18
|
+
# @param [Hash] params a hash of params to be passed to the service
|
19
|
+
# @option params [String] config_template_id
|
20
|
+
# @option params [Hash] template_combination
|
21
|
+
# allowed keys are:
|
22
|
+
# * environment_id [String, nil] Environment id,
|
23
|
+
# * hostgroup_id [String, nil] Hostgroup id,
|
24
|
+
#
|
25
|
+
# @param [Hash] headers additional http headers
|
26
|
+
def create(params = { }, headers = { })
|
27
|
+
check_params params, :allowed => true, :method => __method__
|
28
|
+
url, params = fill_params_in_url "/api/config_templates/:config_template_id/template_combinations", params
|
29
|
+
call(:"post", url, params, headers)
|
30
|
+
end
|
31
|
+
|
32
|
+
# @param [Hash] params a hash of params to be passed to the service
|
33
|
+
# @option params [String] id
|
34
|
+
#
|
35
|
+
# @param [Hash] headers additional http headers
|
36
|
+
def show(params = { }, headers = { })
|
37
|
+
check_params params, :allowed => true, :method => __method__
|
38
|
+
url, params = fill_params_in_url "/api/template_combinations/:id", params
|
39
|
+
call(:"get", url, params, headers)
|
40
|
+
end
|
41
|
+
|
42
|
+
# @param [Hash] params a hash of params to be passed to the service
|
43
|
+
# @option params [String] id
|
44
|
+
#
|
45
|
+
# @param [Hash] headers additional http headers
|
46
|
+
def destroy(params = { }, headers = { })
|
47
|
+
check_params params, :allowed => true, :method => __method__
|
48
|
+
url, params = fill_params_in_url "/api/template_combinations/:id", params
|
49
|
+
call(:"delete", url, params, headers)
|
50
|
+
end
|
51
|
+
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -6,8 +6,8 @@ module ForemanApi
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
|
-
# @option params [String] page Paginate results
|
10
|
-
# @option params [String] per_page Number of entries per request
|
9
|
+
# @option params [String] page Paginate results
|
10
|
+
# @option params [String] per_page Number of entries per request
|
11
11
|
#
|
12
12
|
# @param [Hash] headers additional http headers
|
13
13
|
def index(params = { }, headers = { })
|
@@ -6,10 +6,10 @@ module ForemanApi
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
|
-
# @option params [String] order Sort results
|
10
|
-
# @option params [String] page Paginate results
|
11
|
-
# @option params [String] per_page Number of entries per request
|
12
|
-
# @option params [String] search Filter results
|
9
|
+
# @option params [String] order Sort results
|
10
|
+
# @option params [String] page Paginate results
|
11
|
+
# @option params [String] per_page Number of entries per request
|
12
|
+
# @option params [String] search Filter results
|
13
13
|
#
|
14
14
|
# @param [Hash] headers additional http headers
|
15
15
|
def index(params = { }, headers = { })
|
@@ -31,7 +31,7 @@ module ForemanApi
|
|
31
31
|
# @param [Hash] params a hash of params to be passed to the service
|
32
32
|
# @option params [Hash] user
|
33
33
|
# allowed keys are:
|
34
|
-
# * admin [String] Is an admin account
|
34
|
+
# * admin [String] Is an admin account?,
|
35
35
|
# * auth_source_id [Numeric],
|
36
36
|
# * firstname [String],
|
37
37
|
# * lastname [String],
|
@@ -50,7 +50,7 @@ module ForemanApi
|
|
50
50
|
# @option params [String] id
|
51
51
|
# @option params [Hash] user
|
52
52
|
# allowed keys are:
|
53
|
-
# * admin [String] Is an admin account
|
53
|
+
# * admin [String] Is an admin account?,
|
54
54
|
# * firstname [String, nil],
|
55
55
|
# * lastname [String, nil],
|
56
56
|
# * login [String],
|
@@ -6,8 +6,10 @@ module ForemanApi
|
|
6
6
|
end
|
7
7
|
|
8
8
|
# @param [Hash] params a hash of params to be passed to the service
|
9
|
-
# @option params [String]
|
10
|
-
# @option params [String]
|
9
|
+
# @option params [String] order Sort results
|
10
|
+
# @option params [String] page Paginate results
|
11
|
+
# @option params [String] per_page Number of entries per request
|
12
|
+
# @option params [String] search Filter results
|
11
13
|
#
|
12
14
|
# @param [Hash] headers additional http headers
|
13
15
|
def index(params = { }, headers = { })
|
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.1.0
|
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: 2013-
|
12
|
+
date: 2013-02-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
@@ -148,6 +148,7 @@ files:
|
|
148
148
|
- lib/foreman_api/resources/setting.rb
|
149
149
|
- lib/foreman_api/resources/smart_proxy.rb
|
150
150
|
- lib/foreman_api/resources/subnet.rb
|
151
|
+
- lib/foreman_api/resources/template_combination.rb
|
151
152
|
- lib/foreman_api/resources/template_kind.rb
|
152
153
|
- lib/foreman_api/resources/user.rb
|
153
154
|
- lib/foreman_api/resources/usergroup.rb
|