foreman_api 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. data/.gitignore +3 -0
  2. data/Gemfile +2 -0
  3. data/Rakefile +0 -1
  4. data/doc/ForemanApi.html +5 -5
  5. data/doc/ForemanApi/Resources.html +6 -6
  6. data/doc/ForemanApi/Resources/Architecture.html +260 -127
  7. data/doc/ForemanApi/Resources/Audit.html +118 -51
  8. data/doc/ForemanApi/Resources/AuthSourceLdap.html +314 -163
  9. data/doc/ForemanApi/Resources/Bookmark.html +266 -131
  10. data/doc/ForemanApi/Resources/CommonParameter.html +260 -127
  11. data/doc/ForemanApi/Resources/ComputeResource.html +314 -165
  12. data/doc/ForemanApi/Resources/ConfigTemplate.html +387 -195
  13. data/doc/ForemanApi/Resources/Dashboard.html +53 -27
  14. data/doc/ForemanApi/Resources/Domain.html +275 -137
  15. data/doc/ForemanApi/Resources/Environment.html +254 -123
  16. data/doc/ForemanApi/Resources/FactValue.html +75 -32
  17. data/doc/ForemanApi/Resources/Home.html +92 -43
  18. data/doc/ForemanApi/Resources/Host.html +401 -212
  19. data/doc/ForemanApi/Resources/HostClass.html +698 -0
  20. data/doc/ForemanApi/Resources/Hostgroup.html +308 -159
  21. data/doc/ForemanApi/Resources/HostgroupClass.html +712 -0
  22. data/doc/ForemanApi/Resources/Image.html +284 -143
  23. data/doc/ForemanApi/Resources/LookupKey.html +295 -140
  24. data/doc/ForemanApi/Resources/Medium.html +278 -145
  25. data/doc/ForemanApi/Resources/Model.html +272 -135
  26. data/doc/ForemanApi/Resources/OperatingSystem.html +323 -160
  27. data/doc/ForemanApi/Resources/Parameter.html +1512 -0
  28. data/doc/ForemanApi/Resources/Ptable.html +266 -131
  29. data/doc/ForemanApi/Resources/Puppetclass.html +295 -131
  30. data/doc/ForemanApi/Resources/Report.html +311 -71
  31. data/doc/ForemanApi/Resources/Role.html +248 -119
  32. data/doc/ForemanApi/Resources/Setting.html +156 -76
  33. data/doc/ForemanApi/Resources/SmartProxy.html +257 -125
  34. data/doc/ForemanApi/Resources/Subnet.html +332 -175
  35. data/doc/ForemanApi/Resources/TemplateCombination.html +826 -0
  36. data/doc/ForemanApi/Resources/TemplateKind.html +56 -29
  37. data/doc/ForemanApi/Resources/User.html +287 -145
  38. data/doc/ForemanApi/Resources/Usergroup.html +272 -115
  39. data/doc/_index.html +32 -4
  40. data/doc/class_list.html +1 -1
  41. data/doc/css/style.css +10 -0
  42. data/doc/file.MIT-LICENSE.html +29 -24
  43. data/doc/file.README.html +60 -59
  44. data/doc/frames.html +1 -1
  45. data/doc/index.html +60 -59
  46. data/doc/method_list.html +434 -266
  47. data/doc/top-level-namespace.html +3 -3
  48. data/lib/foreman_api.rb +0 -13
  49. data/lib/foreman_api/base.rb +77 -7
  50. data/lib/foreman_api/documentation.json +1 -1
  51. data/lib/foreman_api/resources/architecture.rb +27 -32
  52. data/lib/foreman_api/resources/audit.rb +9 -10
  53. data/lib/foreman_api/resources/auth_source_ldap.rb +47 -52
  54. data/lib/foreman_api/resources/bookmark.rb +31 -36
  55. data/lib/foreman_api/resources/common_parameter.rb +27 -32
  56. data/lib/foreman_api/resources/compute_resource.rb +43 -48
  57. data/lib/foreman_api/resources/config_template.rb +43 -50
  58. data/lib/foreman_api/resources/dashboard.rb +4 -5
  59. data/lib/foreman_api/resources/domain.rb +30 -35
  60. data/lib/foreman_api/resources/environment.rb +25 -30
  61. data/lib/foreman_api/resources/fact_value.rb +5 -5
  62. data/lib/foreman_api/resources/home.rb +7 -9
  63. data/lib/foreman_api/resources/host.rb +63 -69
  64. data/lib/foreman_api/resources/host_class.rb +39 -0
  65. data/lib/foreman_api/resources/hostgroup.rb +43 -48
  66. data/lib/foreman_api/resources/hostgroup_class.rb +40 -0
  67. data/lib/foreman_api/resources/image.rb +40 -45
  68. data/lib/foreman_api/resources/lookup_key.rb +36 -40
  69. data/lib/foreman_api/resources/medium.rb +29 -34
  70. data/lib/foreman_api/resources/model.rb +31 -36
  71. data/lib/foreman_api/resources/operating_system.rb +39 -45
  72. data/lib/foreman_api/resources/parameter.rb +96 -0
  73. data/lib/foreman_api/resources/ptable.rb +29 -34
  74. data/lib/foreman_api/resources/puppetclass.rb +31 -34
  75. data/lib/foreman_api/resources/report.rb +17 -20
  76. data/lib/foreman_api/resources/role.rb +25 -30
  77. data/lib/foreman_api/resources/setting.rb +15 -18
  78. data/lib/foreman_api/resources/smart_proxy.rb +27 -32
  79. data/lib/foreman_api/resources/subnet.rb +47 -52
  80. data/lib/foreman_api/resources/template_combination.rb +21 -25
  81. data/lib/foreman_api/resources/template_kind.rb +4 -5
  82. data/lib/foreman_api/resources/user.rb +36 -41
  83. data/lib/foreman_api/resources/usergroup.rb +25 -30
  84. data/lib/foreman_api/version.rb +1 -1
  85. metadata +10 -2
@@ -4,7 +4,7 @@ module ForemanApi
4
4
  def self.doc
5
5
  @doc ||= ForemanApi.doc['resources']["reports"]
6
6
  end
7
-
7
+
8
8
  # @param [Hash] params a hash of params to be passed to the service
9
9
  # @option params [String] order Sort results
10
10
  # @option params [String] page Paginate results
@@ -12,40 +12,37 @@ module ForemanApi
12
12
  # @option params [String] search Filter results
13
13
  #
14
14
  # @param [Hash] headers additional http headers
15
- def index(params = { }, headers = { })
16
- check_params params, :allowed => true, :method => __method__
17
- url, params = fill_params_in_url "/api/reports", params
18
- call(:"get", url, params, headers)
15
+ # @return [Array] First item: parsed data; second item: raw body
16
+ def index(params = {}, headers = {})
17
+ perform_call(__method__, params, headers)
19
18
  end
20
19
 
21
20
  # @param [Hash] params a hash of params to be passed to the service
22
- # @option params [String] id
21
+ # @option params [String] id
23
22
  #
24
23
  # @param [Hash] headers additional http headers
25
- def show(params = { }, headers = { })
26
- check_params params, :allowed => true, :method => __method__
27
- url, params = fill_params_in_url "/api/reports/:id", params
28
- call(:"get", url, params, headers)
24
+ # @return [Array] First item: parsed data; second item: raw body
25
+ def show(params = {}, headers = {})
26
+ perform_call(__method__, params, headers)
29
27
  end
30
28
 
31
29
  # @param [Hash] params a hash of params to be passed to the service
32
- # @option params [String] id
30
+ # @option params [String] id
33
31
  #
34
32
  # @param [Hash] headers additional http headers
35
- def destroy(params = { }, headers = { })
36
- check_params params, :allowed => true, :method => __method__
37
- url, params = fill_params_in_url "/api/ptables/:id", params
38
- call(:"delete", url, params, headers)
33
+ # @return [Array] First item: parsed data; second item: raw body
34
+ def destroy(params = {}, headers = {})
35
+ perform_call(__method__, params, headers)
39
36
  end
40
37
 
41
38
  # @param [Hash] params a hash of params to be passed to the service
42
- # @option params [String] id
39
+ # @option params [String] id
40
+ # @option params [Object] host_id Part of +/api/hosts/:host_id/reports/last+ path
43
41
  #
44
42
  # @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)
43
+ # @return [Array] First item: parsed data; second item: raw body
44
+ def last(params = {}, headers = {})
45
+ perform_call(__method__, params, headers)
49
46
  end
50
47
 
51
48
  end
@@ -4,61 +4,56 @@ module ForemanApi
4
4
  def self.doc
5
5
  @doc ||= ForemanApi.doc['resources']["roles"]
6
6
  end
7
-
7
+
8
8
  # @param [Hash] params a hash of params to be passed to the service
9
9
  # @option params [String] page Paginate results
10
10
  # @option params [String] per_page Number of entries per request
11
11
  #
12
12
  # @param [Hash] headers additional http headers
13
- def index(params = { }, headers = { })
14
- check_params params, :allowed => true, :method => __method__
15
- url, params = fill_params_in_url "/api/roles", params
16
- call(:"get", url, params, headers)
13
+ # @return [Array] First item: parsed data; second item: raw body
14
+ def index(params = {}, headers = {})
15
+ perform_call(__method__, params, headers)
17
16
  end
18
17
 
19
18
  # @param [Hash] params a hash of params to be passed to the service
20
- # @option params [String] id
19
+ # @option params [String] id
21
20
  #
22
21
  # @param [Hash] headers additional http headers
23
- def show(params = { }, headers = { })
24
- check_params params, :allowed => true, :method => __method__
25
- url, params = fill_params_in_url "/api/roles/:id", params
26
- call(:"get", url, params, headers)
22
+ # @return [Array] First item: parsed data; second item: raw body
23
+ def show(params = {}, headers = {})
24
+ perform_call(__method__, params, headers)
27
25
  end
28
26
 
29
27
  # @param [Hash] params a hash of params to be passed to the service
30
- # @option params [Hash] role
31
- # allowed keys are:
32
- # * name [String],
28
+ # @option params [Hash] role
29
+ # allowed keys are:
30
+ # * name [String]
33
31
  #
34
32
  # @param [Hash] headers additional http headers
35
- def create(params = { }, headers = { })
36
- check_params params, :allowed => true, :method => __method__
37
- url, params = fill_params_in_url "/api/roles", params
38
- call(:"post", url, params, headers)
33
+ # @return [Array] First item: parsed data; second item: raw body
34
+ def create(params = {}, headers = {})
35
+ perform_call(__method__, params, headers)
39
36
  end
40
37
 
41
38
  # @param [Hash] params a hash of params to be passed to the service
42
- # @option params [String] id
43
- # @option params [Hash] role
44
- # allowed keys are:
45
- # * name [String],
39
+ # @option params [String] id
40
+ # @option params [Hash] role
41
+ # allowed keys are:
42
+ # * name [String]
46
43
  #
47
44
  # @param [Hash] headers additional http headers
48
- def update(params = { }, headers = { })
49
- check_params params, :allowed => true, :method => __method__
50
- url, params = fill_params_in_url "/api/roles/:id", params
51
- call(:"put", url, params, headers)
45
+ # @return [Array] First item: parsed data; second item: raw body
46
+ def update(params = {}, headers = {})
47
+ perform_call(__method__, params, headers)
52
48
  end
53
49
 
54
50
  # @param [Hash] params a hash of params to be passed to the service
55
- # @option params [String] id
51
+ # @option params [String] id
56
52
  #
57
53
  # @param [Hash] headers additional http headers
58
- def destroy(params = { }, headers = { })
59
- check_params params, :allowed => true, :method => __method__
60
- url, params = fill_params_in_url "/api/roles/:id", params
61
- call(:"delete", url, params, headers)
54
+ # @return [Array] First item: parsed data; second item: raw body
55
+ def destroy(params = {}, headers = {})
56
+ perform_call(__method__, params, headers)
62
57
  end
63
58
 
64
59
  end
@@ -4,7 +4,7 @@ module ForemanApi
4
4
  def self.doc
5
5
  @doc ||= ForemanApi.doc['resources']["settings"]
6
6
  end
7
-
7
+
8
8
  # @param [Hash] params a hash of params to be passed to the service
9
9
  # @option params [String] order Sort results
10
10
  # @option params [String] page Paginate results
@@ -12,33 +12,30 @@ module ForemanApi
12
12
  # @option params [String] search Filter results
13
13
  #
14
14
  # @param [Hash] headers additional http headers
15
- def index(params = { }, headers = { })
16
- check_params params, :allowed => true, :method => __method__
17
- url, params = fill_params_in_url "/api/settings", params
18
- call(:"get", url, params, headers)
15
+ # @return [Array] First item: parsed data; second item: raw body
16
+ def index(params = {}, headers = {})
17
+ perform_call(__method__, params, headers)
19
18
  end
20
19
 
21
20
  # @param [Hash] params a hash of params to be passed to the service
22
- # @option params [String] id
21
+ # @option params [String] id
23
22
  #
24
23
  # @param [Hash] headers additional http headers
25
- def show(params = { }, headers = { })
26
- check_params params, :allowed => true, :method => __method__
27
- url, params = fill_params_in_url "/api/settings/:id", params
28
- call(:"get", url, params, headers)
24
+ # @return [Array] First item: parsed data; second item: raw body
25
+ def show(params = {}, headers = {})
26
+ perform_call(__method__, params, headers)
29
27
  end
30
28
 
31
29
  # @param [Hash] params a hash of params to be passed to the service
32
- # @option params [String] id
33
- # @option params [Hash] setting
34
- # allowed keys are:
35
- # * value [String],
30
+ # @option params [String] id
31
+ # @option params [Hash] setting
32
+ # allowed keys are:
33
+ # * value [String]
36
34
  #
37
35
  # @param [Hash] headers additional http headers
38
- def update(params = { }, headers = { })
39
- check_params params, :allowed => true, :method => __method__
40
- url, params = fill_params_in_url "/api/settings/:id", params
41
- call(:"put", url, params, headers)
36
+ # @return [Array] First item: parsed data; second item: raw body
37
+ def update(params = {}, headers = {})
38
+ perform_call(__method__, params, headers)
42
39
  end
43
40
 
44
41
  end
@@ -4,64 +4,59 @@ module ForemanApi
4
4
  def self.doc
5
5
  @doc ||= ForemanApi.doc['resources']["smart_proxies"]
6
6
  end
7
-
7
+
8
8
  # @param [Hash] params a hash of params to be passed to the service
9
9
  # @option params [String] page Paginate results
10
10
  # @option params [String] per_page Number of entries per request
11
11
  # @option params [String] type Filter by type
12
12
  #
13
13
  # @param [Hash] headers additional http headers
14
- def index(params = { }, headers = { })
15
- check_params params, :allowed => true, :method => __method__
16
- url, params = fill_params_in_url "/api/smart_proxies", params
17
- call(:"get", url, params, headers)
14
+ # @return [Array] First item: parsed data; second item: raw body
15
+ def index(params = {}, headers = {})
16
+ perform_call(__method__, params, headers)
18
17
  end
19
18
 
20
19
  # @param [Hash] params a hash of params to be passed to the service
21
- # @option params [String] id
20
+ # @option params [String] id
22
21
  #
23
22
  # @param [Hash] headers additional http headers
24
- def show(params = { }, headers = { })
25
- check_params params, :allowed => true, :method => __method__
26
- url, params = fill_params_in_url "/api/smart_proxies/:id", params
27
- call(:"get", url, params, headers)
23
+ # @return [Array] First item: parsed data; second item: raw body
24
+ def show(params = {}, headers = {})
25
+ perform_call(__method__, params, headers)
28
26
  end
29
27
 
30
28
  # @param [Hash] params a hash of params to be passed to the service
31
- # @option params [Hash] smart_proxy
32
- # allowed keys are:
33
- # * name [String],
34
- # * url [String],
29
+ # @option params [Hash] smart_proxy
30
+ # allowed keys are:
31
+ # * name [String]
32
+ # * url [String]
35
33
  #
36
34
  # @param [Hash] headers additional http headers
37
- def create(params = { }, headers = { })
38
- check_params params, :allowed => true, :method => __method__
39
- url, params = fill_params_in_url "/api/smart_proxies", params
40
- call(:"post", url, params, headers)
35
+ # @return [Array] First item: parsed data; second item: raw body
36
+ def create(params = {}, headers = {})
37
+ perform_call(__method__, params, headers)
41
38
  end
42
39
 
43
40
  # @param [Hash] params a hash of params to be passed to the service
44
- # @option params [String] id
45
- # @option params [Hash] smart_proxy
46
- # allowed keys are:
47
- # * name [String],
48
- # * url [String],
41
+ # @option params [String] id
42
+ # @option params [Hash] smart_proxy
43
+ # allowed keys are:
44
+ # * name [String]
45
+ # * url [String]
49
46
  #
50
47
  # @param [Hash] headers additional http headers
51
- def update(params = { }, headers = { })
52
- check_params params, :allowed => true, :method => __method__
53
- url, params = fill_params_in_url "/api/smart_proxies/:id", params
54
- call(:"put", url, params, headers)
48
+ # @return [Array] First item: parsed data; second item: raw body
49
+ def update(params = {}, headers = {})
50
+ perform_call(__method__, params, headers)
55
51
  end
56
52
 
57
53
  # @param [Hash] params a hash of params to be passed to the service
58
- # @option params [String] id
54
+ # @option params [String] id
59
55
  #
60
56
  # @param [Hash] headers additional http headers
61
- def destroy(params = { }, headers = { })
62
- check_params params, :allowed => true, :method => __method__
63
- url, params = fill_params_in_url "/api/smart_proxies/:id", params
64
- call(:"delete", url, params, headers)
57
+ # @return [Array] First item: parsed data; second item: raw body
58
+ def destroy(params = {}, headers = {})
59
+ perform_call(__method__, params, headers)
65
60
  end
66
61
 
67
62
  end
@@ -4,7 +4,7 @@ module ForemanApi
4
4
  def self.doc
5
5
  @doc ||= ForemanApi.doc['resources']["subnets"]
6
6
  end
7
-
7
+
8
8
  # @param [Hash] params a hash of params to be passed to the service
9
9
  # @option params [String] order Sort results
10
10
  # @option params [String] page Paginate results
@@ -12,79 +12,74 @@ module ForemanApi
12
12
  # @option params [String] search Filter results
13
13
  #
14
14
  # @param [Hash] headers additional http headers
15
- def index(params = { }, headers = { })
16
- check_params params, :allowed => true, :method => __method__
17
- url, params = fill_params_in_url "/api/subnets", params
18
- call(:"get", url, params, headers)
15
+ # @return [Array] First item: parsed data; second item: raw body
16
+ def index(params = {}, headers = {})
17
+ perform_call(__method__, params, headers)
19
18
  end
20
19
 
21
20
  # @param [Hash] params a hash of params to be passed to the service
22
- # @option params [String] id
21
+ # @option params [String] id
23
22
  #
24
23
  # @param [Hash] headers additional http headers
25
- def show(params = { }, headers = { })
26
- check_params params, :allowed => true, :method => __method__
27
- url, params = fill_params_in_url "/api/subnets/:id", params
28
- call(:"get", url, params, headers)
24
+ # @return [Array] First item: parsed data; second item: raw body
25
+ def show(params = {}, headers = {})
26
+ perform_call(__method__, params, headers)
29
27
  end
30
28
 
31
29
  # @param [Hash] params a hash of params to be passed to the service
32
- # @option params [Hash] subnet
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,
30
+ # @option params [Hash] subnet
31
+ # allowed keys are:
32
+ # * dhcp_id [String] Dhcp proxy to use within this subnet
33
+ # * dns_id [String] Dns proxy to use within this subnet
34
+ # * domain_ids [String] Domains in which this subnet is part
35
+ # * tftp_id [String] Tftp 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
+ # * from [String] Starting ip address for ip auto suggestion
39
+ # * gateway [String] Primary dns for this subnet
40
+ # * mask [String] Netmask for this subnet
41
+ # * name [String] Subnet name
42
+ # * network [String] Subnet network
43
+ # * to [String] Ending ip address for ip auto suggestion
44
+ # * vlanid [String] Vlan id for this subnet
47
45
  #
48
46
  # @param [Hash] headers additional http headers
49
- def create(params = { }, headers = { })
50
- check_params params, :allowed => true, :method => __method__
51
- url, params = fill_params_in_url "/api/subnets", params
52
- call(:"post", url, params, headers)
47
+ # @return [Array] First item: parsed data; second item: raw body
48
+ def create(params = {}, headers = {})
49
+ perform_call(__method__, params, headers)
53
50
  end
54
51
 
55
52
  # @param [Hash] params a hash of params to be passed to the service
56
53
  # @option params [String] id Subnet numeric identifier
57
- # @option params [Hash] subnet
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,
54
+ # @option params [Hash] subnet
55
+ # allowed keys are:
56
+ # * dhcp_id [String, nil] Dhcp proxy to use within this subnet
57
+ # * dns_id [String, nil] Dns proxy to use within this subnet
58
+ # * domain_ids [String, nil] Domains in which this subnet is part
59
+ # * tftp_id [String, nil] Tftp proxy to use within this subnet
60
+ # * dns_primary [String, nil] Primary dns for this subnet
61
+ # * dns_secondary [String, nil] Secondary dns for this subnet
62
+ # * from [String, nil] Starting ip address for ip auto suggestion
63
+ # * gateway [String, nil] Primary dns for this subnet
64
+ # * mask [String] Netmask for this subnet
65
+ # * name [String] Subnet name
66
+ # * network [String] Subnet network
67
+ # * to [String, nil] Ending ip address for ip auto suggestion
68
+ # * vlanid [String, nil] Vlan id for this subnet
72
69
  #
73
70
  # @param [Hash] headers additional http headers
74
- def update(params = { }, headers = { })
75
- check_params params, :allowed => true, :method => __method__
76
- url, params = fill_params_in_url "/api/subnets/:id", params
77
- call(:"put", url, params, headers)
71
+ # @return [Array] First item: parsed data; second item: raw body
72
+ def update(params = {}, headers = {})
73
+ perform_call(__method__, params, headers)
78
74
  end
79
75
 
80
76
  # @param [Hash] params a hash of params to be passed to the service
81
77
  # @option params [String] id Subnet numeric identifier
82
78
  #
83
79
  # @param [Hash] headers additional http headers
84
- def destroy(params = { }, headers = { })
85
- check_params params, :allowed => true, :method => __method__
86
- url, params = fill_params_in_url "/api/subnets/:id", params
87
- call(:"delete", url, params, headers)
80
+ # @return [Array] First item: parsed data; second item: raw body
81
+ def destroy(params = {}, headers = {})
82
+ perform_call(__method__, params, headers)
88
83
  end
89
84
 
90
85
  end
@@ -4,49 +4,45 @@ module ForemanApi
4
4
  def self.doc
5
5
  @doc ||= ForemanApi.doc['resources']["template_combinations"]
6
6
  end
7
-
7
+
8
8
  # @param [Hash] params a hash of params to be passed to the service
9
- # @option params [String] config_template_id
9
+ # @option params [String] config_template_id
10
10
  #
11
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)
12
+ # @return [Array] First item: parsed data; second item: raw body
13
+ def index(params = {}, headers = {})
14
+ perform_call(__method__, params, headers)
16
15
  end
17
16
 
18
17
  # @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,
18
+ # @option params [String] config_template_id
19
+ # @option params [Hash] template_combination
20
+ # allowed keys are:
21
+ # * environment_id [String, nil] Environment id
22
+ # * hostgroup_id [String, nil] Hostgroup id
24
23
  #
25
24
  # @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)
25
+ # @return [Array] First item: parsed data; second item: raw body
26
+ def create(params = {}, headers = {})
27
+ perform_call(__method__, params, headers)
30
28
  end
31
29
 
32
30
  # @param [Hash] params a hash of params to be passed to the service
33
- # @option params [String] id
31
+ # @option params [String] id
34
32
  #
35
33
  # @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)
34
+ # @return [Array] First item: parsed data; second item: raw body
35
+ def show(params = {}, headers = {})
36
+ perform_call(__method__, params, headers)
40
37
  end
41
38
 
42
39
  # @param [Hash] params a hash of params to be passed to the service
43
- # @option params [String] id
40
+ # @option params [String] id
44
41
  #
45
42
  # @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)
43
+ # @return [Array] First item: parsed data; second item: raw body
44
+ def destroy(params = {}, headers = {})
45
+ perform_call(__method__, params, headers)
50
46
  end
51
47
 
52
48
  end