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,16 +4,15 @@ module ForemanApi
4
4
  def self.doc
5
5
  @doc ||= ForemanApi.doc['resources']["template_kinds"]
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/template_kinds", 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
  end
@@ -4,7 +4,7 @@ module ForemanApi
4
4
  def self.doc
5
5
  @doc ||= ForemanApi.doc['resources']["users"]
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,66 +12,61 @@ 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/users", 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/users/: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] user
33
- # allowed keys are:
34
- # * admin [String] Is an admin account?,
35
- # * auth_source_id [Numeric],
36
- # * firstname [String],
37
- # * lastname [String],
38
- # * login [String],
39
- # * mail [String],
40
- # * password [String],
30
+ # @option params [Hash] user
31
+ # allowed keys are:
32
+ # * auth_source_id [Numeric]
33
+ # * admin [String] Is an admin account?
34
+ # * firstname [String]
35
+ # * lastname [String]
36
+ # * login [String]
37
+ # * mail [String]
38
+ # * password [String]
41
39
  #
42
40
  # @param [Hash] headers additional http headers
43
- def create(params = { }, headers = { })
44
- check_params params, :allowed => true, :method => __method__
45
- url, params = fill_params_in_url "/api/users", params
46
- call(:"post", url, params, headers)
41
+ # @return [Array] First item: parsed data; second item: raw body
42
+ def create(params = {}, headers = {})
43
+ perform_call(__method__, params, headers)
47
44
  end
48
45
 
49
46
  # @param [Hash] params a hash of params to be passed to the service
50
- # @option params [String] id
51
- # @option params [Hash] user
52
- # allowed keys are:
53
- # * admin [String] Is an admin account?,
54
- # * firstname [String, nil],
55
- # * lastname [String, nil],
56
- # * login [String],
57
- # * mail [String],
58
- # * password [String],
47
+ # @option params [String] id
48
+ # @option params [Hash] user
49
+ # allowed keys are:
50
+ # * admin [String] Is an admin account?
51
+ # * firstname [String, nil]
52
+ # * lastname [String, nil]
53
+ # * login [String]
54
+ # * mail [String]
55
+ # * password [String]
59
56
  #
60
57
  # @param [Hash] headers additional http headers
61
- def update(params = { }, headers = { })
62
- check_params params, :allowed => true, :method => __method__
63
- url, params = fill_params_in_url "/api/users/:id", params
64
- call(:"put", url, params, headers)
58
+ # @return [Array] First item: parsed data; second item: raw body
59
+ def update(params = {}, headers = {})
60
+ perform_call(__method__, params, headers)
65
61
  end
66
62
 
67
63
  # @param [Hash] params a hash of params to be passed to the service
68
- # @option params [String] id
64
+ # @option params [String] id
69
65
  #
70
66
  # @param [Hash] headers additional http headers
71
- def destroy(params = { }, headers = { })
72
- check_params params, :allowed => true, :method => __method__
73
- url, params = fill_params_in_url "/api/users/:id", params
74
- call(:"delete", url, params, headers)
67
+ # @return [Array] First item: parsed data; second item: raw body
68
+ def destroy(params = {}, headers = {})
69
+ perform_call(__method__, params, headers)
75
70
  end
76
71
 
77
72
  end
@@ -4,7 +4,7 @@ module ForemanApi
4
4
  def self.doc
5
5
  @doc ||= ForemanApi.doc['resources']["usergroups"]
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,55 +12,50 @@ 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/usergroups", 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/usergroups/: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] usergroup
33
- # allowed keys are:
34
- # * name [String],
30
+ # @option params [Hash] usergroup
31
+ # allowed keys are:
32
+ # * name [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/usergroups", 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] usergroup
46
- # allowed keys are:
47
- # * name [String],
41
+ # @option params [String] id
42
+ # @option params [Hash] usergroup
43
+ # allowed keys are:
44
+ # * name [String]
48
45
  #
49
46
  # @param [Hash] headers additional http headers
50
- def update(params = { }, headers = { })
51
- check_params params, :allowed => true, :method => __method__
52
- url, params = fill_params_in_url "/api/usergroups/:id", params
53
- call(:"put", url, params, headers)
47
+ # @return [Array] First item: parsed data; second item: raw body
48
+ def update(params = {}, headers = {})
49
+ perform_call(__method__, params, headers)
54
50
  end
55
51
 
56
52
  # @param [Hash] params a hash of params to be passed to the service
57
- # @option params [String] id
53
+ # @option params [String] id
58
54
  #
59
55
  # @param [Hash] headers additional http headers
60
- def destroy(params = { }, headers = { })
61
- check_params params, :allowed => true, :method => __method__
62
- url, params = fill_params_in_url "/api/usergroups/:id", params
63
- call(:"delete", url, params, headers)
56
+ # @return [Array] First item: parsed data; second item: raw body
57
+ def destroy(params = {}, headers = {})
58
+ perform_call(__method__, params, headers)
64
59
  end
65
60
 
66
61
  end
@@ -1,3 +1,3 @@
1
1
  module ForemanApi
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
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.1.1
4
+ version: 0.1.2
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-02-13 00:00:00.000000000 Z
12
+ date: 2013-04-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
@@ -66,6 +66,7 @@ executables: []
66
66
  extensions: []
67
67
  extra_rdoc_files: []
68
68
  files:
69
+ - .gitignore
69
70
  - .yardopts
70
71
  - Gemfile
71
72
  - MIT-LICENSE
@@ -86,12 +87,15 @@ files:
86
87
  - doc/ForemanApi/Resources/FactValue.html
87
88
  - doc/ForemanApi/Resources/Home.html
88
89
  - doc/ForemanApi/Resources/Host.html
90
+ - doc/ForemanApi/Resources/HostClass.html
89
91
  - doc/ForemanApi/Resources/Hostgroup.html
92
+ - doc/ForemanApi/Resources/HostgroupClass.html
90
93
  - doc/ForemanApi/Resources/Image.html
91
94
  - doc/ForemanApi/Resources/LookupKey.html
92
95
  - doc/ForemanApi/Resources/Medium.html
93
96
  - doc/ForemanApi/Resources/Model.html
94
97
  - doc/ForemanApi/Resources/OperatingSystem.html
98
+ - doc/ForemanApi/Resources/Parameter.html
95
99
  - doc/ForemanApi/Resources/Ptable.html
96
100
  - doc/ForemanApi/Resources/Puppetclass.html
97
101
  - doc/ForemanApi/Resources/Report.html
@@ -99,6 +103,7 @@ files:
99
103
  - doc/ForemanApi/Resources/Setting.html
100
104
  - doc/ForemanApi/Resources/SmartProxy.html
101
105
  - doc/ForemanApi/Resources/Subnet.html
106
+ - doc/ForemanApi/Resources/TemplateCombination.html
102
107
  - doc/ForemanApi/Resources/TemplateKind.html
103
108
  - doc/ForemanApi/Resources/User.html
104
109
  - doc/ForemanApi/Resources/Usergroup.html
@@ -135,12 +140,15 @@ files:
135
140
  - lib/foreman_api/resources/fact_value.rb
136
141
  - lib/foreman_api/resources/home.rb
137
142
  - lib/foreman_api/resources/host.rb
143
+ - lib/foreman_api/resources/host_class.rb
138
144
  - lib/foreman_api/resources/hostgroup.rb
145
+ - lib/foreman_api/resources/hostgroup_class.rb
139
146
  - lib/foreman_api/resources/image.rb
140
147
  - lib/foreman_api/resources/lookup_key.rb
141
148
  - lib/foreman_api/resources/medium.rb
142
149
  - lib/foreman_api/resources/model.rb
143
150
  - lib/foreman_api/resources/operating_system.rb
151
+ - lib/foreman_api/resources/parameter.rb
144
152
  - lib/foreman_api/resources/ptable.rb
145
153
  - lib/foreman_api/resources/puppetclass.rb
146
154
  - lib/foreman_api/resources/report.rb