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']["hostgroups"]
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,73 +12,68 @@ 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/hostgroups", 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/hostgroups/: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] hostgroup
33
- # allowed keys are:
34
- # * architecture_id [String],
35
- # * domain_id [String],
36
- # * environment_id [String],
37
- # * medium_id [String],
38
- # * name [String],
39
- # * operatingsystem_id [String],
40
- # * ptable_id [String],
41
- # * puppet_ca_proxy_id [String],
42
- # * puppet_proxy_id [String],
43
- # * subnet_id [String],
30
+ # @option params [Hash] hostgroup
31
+ # allowed keys are:
32
+ # * architecture_id [String]
33
+ # * domain_id [String]
34
+ # * environment_id [String]
35
+ # * medium_id [String]
36
+ # * operatingsystem_id [String]
37
+ # * ptable_id [String]
38
+ # * puppet_ca_proxy_id [String]
39
+ # * puppet_proxy_id [String]
40
+ # * subnet_id [String]
41
+ # * name [String]
44
42
  #
45
43
  # @param [Hash] headers additional http headers
46
- def create(params = { }, headers = { })
47
- check_params params, :allowed => true, :method => __method__
48
- url, params = fill_params_in_url "/api/hostgroups", params
49
- call(:"post", url, params, headers)
44
+ # @return [Array] First item: parsed data; second item: raw body
45
+ def create(params = {}, headers = {})
46
+ perform_call(__method__, params, headers)
50
47
  end
51
48
 
52
49
  # @param [Hash] params a hash of params to be passed to the service
53
- # @option params [String] id
54
- # @option params [Hash] hostgroup
55
- # allowed keys are:
56
- # * architecture_id [String],
57
- # * domain_id [String],
58
- # * environment_id [String],
59
- # * medium_id [String],
60
- # * name [String],
61
- # * operatingsystem_id [String],
62
- # * ptable_id [String],
63
- # * puppet_ca_proxy_id [String],
64
- # * puppet_proxy_id [String],
65
- # * subnet_id [String],
50
+ # @option params [String] id
51
+ # @option params [Hash] hostgroup
52
+ # allowed keys are:
53
+ # * architecture_id [String]
54
+ # * domain_id [String]
55
+ # * environment_id [String]
56
+ # * medium_id [String]
57
+ # * operatingsystem_id [String]
58
+ # * ptable_id [String]
59
+ # * puppet_ca_proxy_id [String]
60
+ # * puppet_proxy_id [String]
61
+ # * subnet_id [String]
62
+ # * name [String]
66
63
  #
67
64
  # @param [Hash] headers additional http headers
68
- def update(params = { }, headers = { })
69
- check_params params, :allowed => true, :method => __method__
70
- url, params = fill_params_in_url "/api/hostgroups/:id", params
71
- call(:"put", url, params, headers)
65
+ # @return [Array] First item: parsed data; second item: raw body
66
+ def update(params = {}, headers = {})
67
+ perform_call(__method__, params, headers)
72
68
  end
73
69
 
74
70
  # @param [Hash] params a hash of params to be passed to the service
75
- # @option params [String] id
71
+ # @option params [String] id
76
72
  #
77
73
  # @param [Hash] headers additional http headers
78
- def destroy(params = { }, headers = { })
79
- check_params params, :allowed => true, :method => __method__
80
- url, params = fill_params_in_url "/api/hostgroups/:id", params
81
- call(:"delete", url, params, headers)
74
+ # @return [Array] First item: parsed data; second item: raw body
75
+ def destroy(params = {}, headers = {})
76
+ perform_call(__method__, params, headers)
82
77
  end
83
78
 
84
79
  end
@@ -0,0 +1,40 @@
1
+ module ForemanApi
2
+ module Resources
3
+ class HostgroupClass < ForemanApi::Base
4
+ def self.doc
5
+ @doc ||= ForemanApi.doc['resources']["hostgroup_classes"]
6
+ end
7
+
8
+ # @param [Hash] params a hash of params to be passed to the service
9
+ # @option params [Object] hostgroup_id Part of +/api/hostgroups/:hostgroup_id/puppetclass_ids+ path
10
+ #
11
+ # @param [Hash] headers additional http headers
12
+ # @return [Array] First item: parsed data; second item: raw body
13
+ def index(params = {}, headers = {})
14
+ perform_call(__method__, params, headers)
15
+ end
16
+
17
+ # @param [Hash] params a hash of params to be passed to the service
18
+ # @option params [String] hostgroup_id Id of hostgroup
19
+ # @option params [String] puppetclass_id Id of puppetclass
20
+ #
21
+ # @param [Hash] headers additional http headers
22
+ # @return [Array] First item: parsed data; second item: raw body
23
+ def create(params = {}, headers = {})
24
+ perform_call(__method__, params, headers)
25
+ end
26
+
27
+ # @param [Hash] params a hash of params to be passed to the service
28
+ # @option params [Object] id Part of +/api/hostgroups/:hostgroup_id/puppetclass_ids/:id+ path
29
+ # @option params [String] hostgroup_id Id of hostgroup
30
+ # @option params [String] puppetclass_id Id of puppetclass
31
+ #
32
+ # @param [Hash] headers additional http headers
33
+ # @return [Array] First item: parsed data; second item: raw body
34
+ def destroy(params = {}, headers = {})
35
+ perform_call(__method__, params, headers)
36
+ end
37
+
38
+ end
39
+ end
40
+ end
@@ -4,78 +4,73 @@ module ForemanApi
4
4
  def self.doc
5
5
  @doc ||= ForemanApi.doc['resources']["images"]
6
6
  end
7
-
7
+
8
8
  # @param [Hash] params a hash of params to be passed to the service
9
- # @option params [String] compute_resource_id
9
+ # @option params [String] compute_resource_id
10
10
  # @option params [String] order Sort results
11
11
  # @option params [String] page Paginate results
12
12
  # @option params [String] per_page Number of entries per request
13
13
  # @option params [String] search Filter results
14
14
  #
15
15
  # @param [Hash] headers additional http headers
16
- def index(params = { }, headers = { })
17
- check_params params, :allowed => true, :method => __method__
18
- url, params = fill_params_in_url "/api/compute_resources/:compute_resource_id/images", params
19
- call(:"get", url, params, headers)
16
+ # @return [Array] First item: parsed data; second item: raw body
17
+ def index(params = {}, headers = {})
18
+ perform_call(__method__, params, headers)
20
19
  end
21
20
 
22
21
  # @param [Hash] params a hash of params to be passed to the service
23
- # @option params [String] id
24
- # @option params [String] compute_resource_id
22
+ # @option params [String] id
23
+ # @option params [String] compute_resource_id
25
24
  #
26
25
  # @param [Hash] headers additional http headers
27
- def show(params = { }, headers = { })
28
- check_params params, :allowed => true, :method => __method__
29
- url, params = fill_params_in_url "/api/compute_resources/:compute_resource_id/images/:id", params
30
- call(:"get", url, params, headers)
26
+ # @return [Array] First item: parsed data; second item: raw body
27
+ def show(params = {}, headers = {})
28
+ perform_call(__method__, params, headers)
31
29
  end
32
30
 
33
31
  # @param [Hash] params a hash of params to be passed to the service
34
- # @option params [String] compute_resource_id
35
- # @option params [Hash] image
36
- # allowed keys are:
37
- # * architecture_id [String],
38
- # * compute_resource_id [String],
39
- # * name [String],
40
- # * operatingsystem_id [String],
41
- # * username [String],
42
- # * uuid [String],
32
+ # @option params [String] compute_resource_id
33
+ # @option params [Hash] image
34
+ # allowed keys are:
35
+ # * architecture_id [String]
36
+ # * compute_resource_id [String]
37
+ # * operatingsystem_id [String]
38
+ # * name [String]
39
+ # * username [String]
40
+ # * uuid [String]
43
41
  #
44
42
  # @param [Hash] headers additional http headers
45
- def create(params = { }, headers = { })
46
- check_params params, :allowed => true, :method => __method__
47
- url, params = fill_params_in_url "/api/compute_resources/:compute_resource_id/images", params
48
- call(:"post", url, params, headers)
43
+ # @return [Array] First item: parsed data; second item: raw body
44
+ def create(params = {}, headers = {})
45
+ perform_call(__method__, params, headers)
49
46
  end
50
47
 
51
48
  # @param [Hash] params a hash of params to be passed to the service
52
- # @option params [String] id
53
- # @option params [String] compute_resource_id
54
- # @option params [Hash] image
55
- # allowed keys are:
56
- # * architecture_id [String],
57
- # * compute_resource_id [String],
58
- # * name [String],
59
- # * operatingsystem_id [String],
60
- # * username [String],
61
- # * uuid [String],
49
+ # @option params [String] id
50
+ # @option params [String] compute_resource_id
51
+ # @option params [Hash] image
52
+ # allowed keys are:
53
+ # * architecture_id [String]
54
+ # * compute_resource_id [String]
55
+ # * operatingsystem_id [String]
56
+ # * name [String]
57
+ # * username [String]
58
+ # * uuid [String]
62
59
  #
63
60
  # @param [Hash] headers additional http headers
64
- def update(params = { }, headers = { })
65
- check_params params, :allowed => true, :method => __method__
66
- url, params = fill_params_in_url "/api/compute_resources/:compute_resource_id/images/:id", params
67
- call(:"put", url, params, headers)
61
+ # @return [Array] First item: parsed data; second item: raw body
62
+ def update(params = {}, headers = {})
63
+ perform_call(__method__, params, headers)
68
64
  end
69
65
 
70
66
  # @param [Hash] params a hash of params to be passed to the service
71
- # @option params [String] id
72
- # @option params [String] compute_resource_id
67
+ # @option params [String] id
68
+ # @option params [String] compute_resource_id
73
69
  #
74
70
  # @param [Hash] headers additional http headers
75
- def destroy(params = { }, headers = { })
76
- check_params params, :allowed => true, :method => __method__
77
- url, params = fill_params_in_url "/api/compute_resources/:compute_resource_id/images/:id", params
78
- call(:"delete", url, params, headers)
71
+ # @return [Array] First item: parsed data; second item: raw body
72
+ def destroy(params = {}, headers = {})
73
+ perform_call(__method__, params, headers)
79
74
  end
80
75
 
81
76
  end
@@ -4,73 +4,69 @@ module ForemanApi
4
4
  def self.doc
5
5
  @doc ||= ForemanApi.doc['resources']["lookup_keys"]
6
6
  end
7
-
7
+
8
8
  # @param [Hash] params a hash of params to be passed to the service
9
+ # @option params [Object] host_id Part of +/api/hosts/:host_id/lookup_keys+ path
9
10
  # @option params [String] order Sort results
10
11
  # @option params [String] page Paginate results
11
12
  # @option params [String] per_page Number of entries per request
12
13
  # @option params [String] search Filter results
13
14
  #
14
15
  # @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/lookup_keys", params
18
- call(:"get", url, params, headers)
16
+ # @return [Array] First item: parsed data; second item: raw body
17
+ def index(params = {}, headers = {})
18
+ perform_call(__method__, params, headers)
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
22
+ # @option params [String] id
23
23
  #
24
24
  # @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/lookup_keys/:id", params
28
- call(:"get", url, params, headers)
25
+ # @return [Array] First item: parsed data; second item: raw body
26
+ def show(params = {}, headers = {})
27
+ perform_call(__method__, params, headers)
29
28
  end
30
29
 
31
30
  # @param [Hash] params a hash of params to be passed to the service
32
- # @option params [Hash] lookup_key
33
- # allowed keys are:
34
- # * default_value [String],
35
- # * description [String],
36
- # * key [String],
37
- # * lookup_values_count [String],
38
- # * path [String],
39
- # * puppetclass_id [String],
31
+ # @option params [Hash] lookup_key
32
+ # allowed keys are:
33
+ # * puppetclass_id [String]
34
+ # * default_value [String]
35
+ # * description [String]
36
+ # * key [String]
37
+ # * lookup_values_count [String]
38
+ # * path [String]
40
39
  #
41
40
  # @param [Hash] headers additional http headers
42
- def create(params = { }, headers = { })
43
- check_params params, :allowed => true, :method => __method__
44
- url, params = fill_params_in_url "/api/lookup_keys", params
45
- 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)
46
44
  end
47
45
 
48
46
  # @param [Hash] params a hash of params to be passed to the service
49
- # @option params [String] id
50
- # @option params [Hash] lookup_key
51
- # allowed keys are:
52
- # * default_value [String],
53
- # * description [String],
54
- # * key [String],
55
- # * lookup_values_count [String],
56
- # * path [String],
57
- # * puppetclass_id [String],
47
+ # @option params [String] id
48
+ # @option params [Hash] lookup_key
49
+ # allowed keys are:
50
+ # * puppetclass_id [String]
51
+ # * default_value [String]
52
+ # * description [String]
53
+ # * key [String]
54
+ # * lookup_values_count [String]
55
+ # * path [String]
58
56
  #
59
57
  # @param [Hash] headers additional http headers
60
- def update(params = { }, headers = { })
61
- check_params params, :allowed => true, :method => __method__
62
- url, params = fill_params_in_url "/api/lookup_keys/:id", params
63
- 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)
64
61
  end
65
62
 
66
63
  # @param [Hash] params a hash of params to be passed to the service
67
- # @option params [String] id
64
+ # @option params [String] id
68
65
  #
69
66
  # @param [Hash] headers additional http headers
70
- def destroy(params = { }, headers = { })
71
- check_params params, :allowed => true, :method => __method__
72
- url, params = fill_params_in_url "/api/lookup_keys/:id", params
73
- 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)
74
70
  end
75
71
 
76
72
  end
@@ -4,7 +4,7 @@ module ForemanApi
4
4
  def self.doc
5
5
  @doc ||= ForemanApi.doc['resources']["media"]
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 For example, name asc, or name desc
10
10
  # @option params [String] page Paginate results
@@ -12,59 +12,54 @@ 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/media", 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/media/: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] medium
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 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&#8217;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.,
30
+ # @option params [Hash] medium
31
+ # allowed keys are:
32
+ # * name [String] Name of media
33
+ # * os_family [String] The family that the operating system belongs to. available families: archlinux debian redhat solaris suse windows
34
+ # * 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&#8217;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
35
  #
38
36
  # @param [Hash] headers additional http headers
39
- def create(params = { }, headers = { })
40
- check_params params, :allowed => true, :method => __method__
41
- url, params = fill_params_in_url "/api/media", params
42
- call(:"post", url, params, headers)
37
+ # @return [Array] First item: parsed data; second item: raw body
38
+ def create(params = {}, headers = {})
39
+ perform_call(__method__, params, headers)
43
40
  end
44
41
 
45
42
  # @param [Hash] params a hash of params to be passed to the service
46
- # @option params [String] id
47
- # @option params [Hash] medium
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 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&#8217;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.,
43
+ # @option params [String] id
44
+ # @option params [Hash] medium
45
+ # allowed keys are:
46
+ # * name [String] Name of media
47
+ # * os_family [String, nil] The family that the operating system belongs to. available families: archlinux debian redhat solaris suse windows
48
+ # * 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&#8217;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
49
  #
53
50
  # @param [Hash] headers additional http headers
54
- def update(params = { }, headers = { })
55
- check_params params, :allowed => true, :method => __method__
56
- url, params = fill_params_in_url "/api/media/:id", params
57
- call(:"put", url, params, headers)
51
+ # @return [Array] First item: parsed data; second item: raw body
52
+ def update(params = {}, headers = {})
53
+ perform_call(__method__, params, headers)
58
54
  end
59
55
 
60
56
  # @param [Hash] params a hash of params to be passed to the service
61
- # @option params [String] id
57
+ # @option params [String] id
62
58
  #
63
59
  # @param [Hash] headers additional http headers
64
- def destroy(params = { }, headers = { })
65
- check_params params, :allowed => true, :method => __method__
66
- url, params = fill_params_in_url "/api/media/:id", params
67
- call(:"delete", url, params, headers)
60
+ # @return [Array] First item: parsed data; second item: raw body
61
+ def destroy(params = {}, headers = {})
62
+ perform_call(__method__, params, headers)
68
63
  end
69
64
 
70
65
  end