katello_api 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. data/.gitignore +2 -0
  2. data/Gemfile +2 -0
  3. data/README.rdoc +0 -4
  4. data/doc/KatelloApi/Base.html +831 -0
  5. data/doc/KatelloApi/Generator/Base.html +671 -0
  6. data/doc/KatelloApi/Generator.html +115 -0
  7. data/doc/KatelloApi/Resources/ActivationKey.html +1757 -0
  8. data/doc/KatelloApi/Resources/Architecture.html +1007 -0
  9. data/doc/KatelloApi/Resources/Changeset.html +1413 -0
  10. data/doc/KatelloApi/Resources/ChangesetsContent.html +2674 -0
  11. data/doc/KatelloApi/Resources/ComputeResource.html +1067 -0
  12. data/doc/KatelloApi/Resources/ConfigTemplate.html +1361 -0
  13. data/doc/KatelloApi/Resources/ContentView.html +938 -0
  14. data/doc/KatelloApi/Resources/ContentViewDefinition.html +1629 -0
  15. data/doc/KatelloApi/Resources/Crl.html +367 -0
  16. data/doc/KatelloApi/Resources/Distribution.html +560 -0
  17. data/doc/KatelloApi/Resources/Distributor.html +1892 -0
  18. data/doc/KatelloApi/Resources/Domain.html +1066 -0
  19. data/doc/KatelloApi/Resources/Environment.html +1645 -0
  20. data/doc/KatelloApi/Resources/Erratum.html +632 -0
  21. data/doc/KatelloApi/Resources/GpgKey.html +1220 -0
  22. data/doc/KatelloApi/Resources/HardwareModel.html +1025 -0
  23. data/doc/KatelloApi/Resources/Organization.html +1062 -0
  24. data/doc/KatelloApi/Resources/Package.html +728 -0
  25. data/doc/KatelloApi/Resources/Permission.html +1021 -0
  26. data/doc/KatelloApi/Resources/Ping.html +625 -0
  27. data/doc/KatelloApi/Resources/Product.html +1845 -0
  28. data/doc/KatelloApi/Resources/Provider.html +2237 -0
  29. data/doc/KatelloApi/Resources/Repository.html +1976 -0
  30. data/doc/KatelloApi/Resources/RepositorySet.html +770 -0
  31. data/doc/KatelloApi/Resources/Role.html +1257 -0
  32. data/doc/KatelloApi/Resources/RoleLdapGroup.html +728 -0
  33. data/doc/KatelloApi/Resources/SmartProxy.html +1054 -0
  34. data/doc/KatelloApi/Resources/Statu.html +367 -0
  35. data/doc/KatelloApi/Resources/Subnet.html +1007 -0
  36. data/doc/KatelloApi/Resources/Subscription.html +1064 -0
  37. data/doc/KatelloApi/Resources/Sync.html +826 -0
  38. data/doc/KatelloApi/Resources/SyncPlan.html +1148 -0
  39. data/doc/KatelloApi/Resources/System.html +3576 -0
  40. data/doc/KatelloApi/Resources/SystemGroup.html +2006 -0
  41. data/doc/KatelloApi/Resources/SystemGroupErratum.html +602 -0
  42. data/doc/KatelloApi/Resources/SystemGroupPackage.html +826 -0
  43. data/doc/KatelloApi/Resources/SystemPackage.html +770 -0
  44. data/doc/KatelloApi/Resources/Task.html +546 -0
  45. data/doc/KatelloApi/Resources/Template.html +1573 -0
  46. data/doc/KatelloApi/Resources/TemplatesContent.html +2268 -0
  47. data/doc/KatelloApi/Resources/Uebercert.html +406 -0
  48. data/doc/KatelloApi/Resources/User.html +1846 -0
  49. data/doc/KatelloApi/Resources.html +117 -0
  50. data/doc/KatelloApi.html +365 -0
  51. data/doc/_index.html +539 -0
  52. data/doc/class_list.html +53 -0
  53. data/doc/css/common.css +1 -0
  54. data/doc/css/full_list.css +57 -0
  55. data/doc/css/style.css +338 -0
  56. data/doc/file.README.html +127 -0
  57. data/doc/file_list.html +55 -0
  58. data/doc/frames.html +28 -0
  59. data/doc/index.html +127 -0
  60. data/doc/js/app.js +214 -0
  61. data/doc/js/full_list.js +173 -0
  62. data/doc/js/jquery.js +4 -0
  63. data/doc/method_list.html +2548 -0
  64. data/doc/top-level-namespace.html +112 -0
  65. data/lib/katello_api/base.rb +61 -6
  66. data/lib/katello_api/documentation.json +1 -0
  67. data/lib/katello_api/resources/activation_key.rb +51 -48
  68. data/lib/katello_api/resources/architecture.rb +19 -24
  69. data/lib/katello_api/resources/changeset.rb +39 -37
  70. data/lib/katello_api/resources/changesets_content.rb +64 -57
  71. data/lib/katello_api/resources/compute_resource.rb +37 -42
  72. data/lib/katello_api/resources/config_template.rb +40 -44
  73. data/lib/katello_api/resources/content_view.rb +14 -17
  74. data/lib/katello_api/resources/content_view_definition.rb +34 -42
  75. data/lib/katello_api/resources/crl.rb +3 -4
  76. data/lib/katello_api/resources/distribution.rb +8 -8
  77. data/lib/katello_api/resources/distributor.rb +35 -37
  78. data/lib/katello_api/resources/domain.rb +28 -32
  79. data/lib/katello_api/resources/environment.rb +38 -44
  80. data/lib/katello_api/resources/erratum.rb +9 -8
  81. data/lib/katello_api/resources/gpg_key.rb +28 -33
  82. data/lib/katello_api/resources/hardware_model.rb +25 -30
  83. data/lib/katello_api/resources/organization.rb +24 -26
  84. data/lib/katello_api/resources/package.rb +9 -12
  85. data/lib/katello_api/resources/permission.rb +21 -19
  86. data/lib/katello_api/resources/ping.rb +9 -12
  87. data/lib/katello_api/resources/product.rb +34 -43
  88. data/lib/katello_api/resources/provider.rb +55 -66
  89. data/lib/katello_api/resources/repository.rb +44 -55
  90. data/lib/katello_api/resources/repository_set.rb +9 -12
  91. data/lib/katello_api/resources/role.rb +35 -33
  92. data/lib/katello_api/resources/role_ldap_group.rb +10 -12
  93. data/lib/katello_api/resources/smart_proxy.rb +24 -28
  94. data/lib/katello_api/resources/statu.rb +3 -4
  95. data/lib/katello_api/resources/subnet.rb +19 -24
  96. data/lib/katello_api/resources/subscription.rb +16 -21
  97. data/lib/katello_api/resources/sync.rb +9 -12
  98. data/lib/katello_api/resources/sync_plan.rb +28 -33
  99. data/lib/katello_api/resources/system.rb +81 -90
  100. data/lib/katello_api/resources/system_group.rb +47 -57
  101. data/lib/katello_api/resources/system_group_erratum.rb +6 -8
  102. data/lib/katello_api/resources/system_group_package.rb +15 -18
  103. data/lib/katello_api/resources/system_package.rb +12 -15
  104. data/lib/katello_api/resources/task.rb +6 -8
  105. data/lib/katello_api/resources/template.rb +39 -47
  106. data/lib/katello_api/resources/templates_content.rb +40 -52
  107. data/lib/katello_api/resources/uebercert.rb +4 -4
  108. data/lib/katello_api/resources/user.rb +47 -50
  109. data/lib/katello_api/version.rb +1 -1
  110. data/lib/katello_api.rb +0 -13
  111. metadata +68 -4
@@ -9,20 +9,18 @@ module KatelloApi
9
9
  # @option params [String] organization_id organization identifier
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/organizations/:organization_id/tasks", 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
18
  # @option params [String] id task identifier
20
19
  #
21
20
  # @param [Hash] headers additional http headers
22
- def show(params = { }, headers = { })
23
- check_params params, :allowed => true, :method => __method__
24
- url, params = fill_params_in_url "/api/tasks/:id", params
25
- call(:"get", url, params, headers)
21
+ # @return [Array] First item: parsed data; second item: raw body
22
+ def show(params = {}, headers = {})
23
+ perform_call(__method__, params, headers)
26
24
  end
27
25
 
28
26
  end
@@ -10,96 +10,88 @@ module KatelloApi
10
10
  # @option params [String] name system template identifier
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/environments/:environment_id/templates", 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
19
  # @option params [String] id system template numeric identifier
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/templates/: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
28
  # @option params [String] environment_id environment numeric identifier
31
- # @option params [Hash] template
32
- # allowed keys are:
33
- # * description [String, nil] template description ,
34
- # * name [String] new template name ,
35
- # * parent_id [String, nil] parent template numeric identifier ,
29
+ # @option params [Hash] template
30
+ # allowed keys are:
31
+ # * parent_id [String, nil] parent template numeric identifier
32
+ # * description [String, nil] template description
33
+ # * name [String] new template name
36
34
  #
37
35
  # @param [Hash] headers additional http headers
38
- def create(params = { }, headers = { })
39
- check_params params, :allowed => true, :method => __method__
40
- url, params = fill_params_in_url "/api/templates", params
41
- call(:"post", url, params, headers)
36
+ # @return [Array] First item: parsed data; second item: raw body
37
+ def create(params = {}, headers = {})
38
+ perform_call(__method__, params, headers)
42
39
  end
43
40
 
44
41
  # @param [Hash] params a hash of params to be passed to the service
45
42
  # @option params [String] id template numeric identifier
46
- # @option params [Hash] template
47
- # allowed keys are:
48
- # * description [String, nil] template description ,
49
- # * name [String] new template name ,
50
- # * parent_id [String, nil] parent template numeric identifier ,
43
+ # @option params [Hash] template
44
+ # allowed keys are:
45
+ # * parent_id [String, nil] parent template numeric identifier
46
+ # * description [String, nil] template description
47
+ # * name [String] new template name
51
48
  #
52
49
  # @param [Hash] headers additional http headers
53
- def update(params = { }, headers = { })
54
- check_params params, :allowed => true, :method => __method__
55
- url, params = fill_params_in_url "/api/templates/:id", params
56
- call(:"put", url, params, headers)
50
+ # @return [Array] First item: parsed data; second item: raw body
51
+ def update(params = {}, headers = {})
52
+ perform_call(__method__, params, headers)
57
53
  end
58
54
 
59
55
  # @param [Hash] params a hash of params to be passed to the service
60
56
  # @option params [String] id template numeric identifier
61
57
  #
62
58
  # @param [Hash] headers additional http headers
63
- def destroy(params = { }, headers = { })
64
- check_params params, :allowed => true, :method => __method__
65
- url, params = fill_params_in_url "/api/templates/:id", params
66
- call(:"delete", url, params, headers)
59
+ # @return [Array] First item: parsed data; second item: raw body
60
+ def destroy(params = {}, headers = {})
61
+ perform_call(__method__, params, headers)
67
62
  end
68
63
 
69
64
  # @param [Hash] params a hash of params to be passed to the service
70
65
  # @option params [String] environment_id environment numeric identifier
71
- # @option params [Hash] template
72
- # allowed keys are:
73
- # * description [String, nil] template description ,
74
- # * name [String] new template name ,
75
- # * parent_id [String, nil] parent template numeric identifier ,
66
+ # @option params [Hash] template
67
+ # allowed keys are:
68
+ # * parent_id [String, nil] parent template numeric identifier
69
+ # * description [String, nil] template description
70
+ # * name [String] new template name
76
71
  # @option params [String] template_file template file to import
77
72
  #
78
73
  # @param [Hash] headers additional http headers
79
- def import(params = { }, headers = { })
80
- check_params params, :allowed => true, :method => __method__
81
- url, params = fill_params_in_url "/api/templates/import", params
82
- call(:"post", url, params, headers)
74
+ # @return [Array] First item: parsed data; second item: raw body
75
+ def import(params = {}, headers = {})
76
+ perform_call(__method__, params, headers)
83
77
  end
84
78
 
85
79
  # @param [Hash] params a hash of params to be passed to the service
86
80
  # @option params [String] id template numeric identifier
87
81
  #
88
82
  # @param [Hash] headers additional http headers
89
- def validate(params = { }, headers = { })
90
- check_params params, :allowed => true, :method => __method__
91
- url, params = fill_params_in_url "/api/templates/:id/validate", params
92
- call(:"get", url, params, headers)
83
+ # @return [Array] First item: parsed data; second item: raw body
84
+ def validate(params = {}, headers = {})
85
+ perform_call(__method__, params, headers)
93
86
  end
94
87
 
95
88
  # @param [Hash] params a hash of params to be passed to the service
96
89
  # @option params [String] id template numeric identifier
97
90
  #
98
91
  # @param [Hash] headers additional http headers
99
- def export(params = { }, headers = { })
100
- check_params params, :allowed => true, :method => __method__
101
- url, params = fill_params_in_url "/api/templates/:id/export", params
102
- call(:"get", url, params, headers)
92
+ # @return [Array] First item: parsed data; second item: raw body
93
+ def export(params = {}, headers = {})
94
+ perform_call(__method__, params, headers)
103
95
  end
104
96
 
105
97
  end
@@ -6,14 +6,13 @@ module KatelloApi
6
6
  end
7
7
 
8
8
  # @param [Hash] params a hash of params to be passed to the service
9
- # @option params [String] name package identifier
10
9
  # @option params [String] template_id template numeric identifier
10
+ # @option params [String] name package identifier
11
11
  #
12
12
  # @param [Hash] headers additional http headers
13
- def add_package(params = { }, headers = { })
14
- check_params params, :allowed => true, :method => __method__
15
- url, params = fill_params_in_url "/api/templates/:template_id/packages", params
16
- call(:"post", url, params, headers)
13
+ # @return [Array] First item: parsed data; second item: raw body
14
+ def add_package(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
@@ -21,22 +20,20 @@ module KatelloApi
21
20
  # @option params [String] template_id template numeric identifier
22
21
  #
23
22
  # @param [Hash] headers additional http headers
24
- def remove_package(params = { }, headers = { })
25
- check_params params, :allowed => true, :method => __method__
26
- url, params = fill_params_in_url "/api/templates/:template_id/packages/:id", params
27
- call(:"delete", url, params, headers)
23
+ # @return [Array] First item: parsed data; second item: raw body
24
+ def remove_package(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 [String] name parameter identifier
32
29
  # @option params [String] template_id template numeric identifier
30
+ # @option params [String] name parameter identifier
33
31
  # @option params [String] value parameter value
34
32
  #
35
33
  # @param [Hash] headers additional http headers
36
- def add_parameter(params = { }, headers = { })
37
- check_params params, :allowed => true, :method => __method__
38
- url, params = fill_params_in_url "/api/templates/:template_id/parameters", params
39
- call(:"post", url, params, headers)
34
+ # @return [Array] First item: parsed data; second item: raw body
35
+ def add_parameter(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
@@ -44,21 +41,19 @@ module KatelloApi
44
41
  # @option params [String] template_id template numeric identifier
45
42
  #
46
43
  # @param [Hash] headers additional http headers
47
- def remove_parameter(params = { }, headers = { })
48
- check_params params, :allowed => true, :method => __method__
49
- url, params = fill_params_in_url "/api/templates/:template_id/parameters/:id", params
50
- call(:"delete", url, params, headers)
44
+ # @return [Array] First item: parsed data; second item: raw body
45
+ def remove_parameter(params = {}, headers = {})
46
+ perform_call(__method__, params, headers)
51
47
  end
52
48
 
53
49
  # @param [Hash] params a hash of params to be passed to the service
54
- # @option params [String] name package group identifier
55
50
  # @option params [String] template_id template numeric identifier
51
+ # @option params [String] name package group identifier
56
52
  #
57
53
  # @param [Hash] headers additional http headers
58
- def add_package_group(params = { }, headers = { })
59
- check_params params, :allowed => true, :method => __method__
60
- url, params = fill_params_in_url "/api/templates/:template_id/package_groups", params
61
- call(:"post", url, params, headers)
54
+ # @return [Array] First item: parsed data; second item: raw body
55
+ def add_package_group(params = {}, headers = {})
56
+ perform_call(__method__, params, headers)
62
57
  end
63
58
 
64
59
  # @param [Hash] params a hash of params to be passed to the service
@@ -66,21 +61,19 @@ module KatelloApi
66
61
  # @option params [String] template_id template numeric identifier
67
62
  #
68
63
  # @param [Hash] headers additional http headers
69
- def remove_package_group(params = { }, headers = { })
70
- check_params params, :allowed => true, :method => __method__
71
- url, params = fill_params_in_url "/api/templates/:template_id/package_groups/:id", params
72
- call(:"delete", url, params, headers)
64
+ # @return [Array] First item: parsed data; second item: raw body
65
+ def remove_package_group(params = {}, headers = {})
66
+ perform_call(__method__, params, headers)
73
67
  end
74
68
 
75
69
  # @param [Hash] params a hash of params to be passed to the service
76
- # @option params [String] name package group category identifier
77
70
  # @option params [String] template_id template numeric identifier
71
+ # @option params [String] name package group category identifier
78
72
  #
79
73
  # @param [Hash] headers additional http headers
80
- def add_package_group_category(params = { }, headers = { })
81
- check_params params, :allowed => true, :method => __method__
82
- url, params = fill_params_in_url "/api/templates/:template_id/package_group_categories", params
83
- call(:"post", url, params, headers)
74
+ # @return [Array] First item: parsed data; second item: raw body
75
+ def add_package_group_category(params = {}, headers = {})
76
+ perform_call(__method__, params, headers)
84
77
  end
85
78
 
86
79
  # @param [Hash] params a hash of params to be passed to the service
@@ -88,10 +81,9 @@ module KatelloApi
88
81
  # @option params [String] template_id template numeric identifier
89
82
  #
90
83
  # @param [Hash] headers additional http headers
91
- def remove_package_group_category(params = { }, headers = { })
92
- check_params params, :allowed => true, :method => __method__
93
- url, params = fill_params_in_url "/api/templates/:template_id/package_group_categories/:id", params
94
- call(:"delete", url, params, headers)
84
+ # @return [Array] First item: parsed data; second item: raw body
85
+ def remove_package_group_category(params = {}, headers = {})
86
+ perform_call(__method__, params, headers)
95
87
  end
96
88
 
97
89
  # @param [Hash] params a hash of params to be passed to the service
@@ -99,10 +91,9 @@ module KatelloApi
99
91
  # @option params [String] template_id template numeric identifier
100
92
  #
101
93
  # @param [Hash] headers additional http headers
102
- def add_distribution(params = { }, headers = { })
103
- check_params params, :allowed => true, :method => __method__
104
- url, params = fill_params_in_url "/api/templates/:template_id/distributions", params
105
- call(:"post", url, params, headers)
94
+ # @return [Array] First item: parsed data; second item: raw body
95
+ def add_distribution(params = {}, headers = {})
96
+ perform_call(__method__, params, headers)
106
97
  end
107
98
 
108
99
  # @param [Hash] params a hash of params to be passed to the service
@@ -110,10 +101,9 @@ module KatelloApi
110
101
  # @option params [String] template_id template numeric identifier
111
102
  #
112
103
  # @param [Hash] headers additional http headers
113
- def remove_distribution(params = { }, headers = { })
114
- check_params params, :allowed => true, :method => __method__
115
- url, params = fill_params_in_url "/api/templates/:template_id/distributions/:id", params
116
- call(:"delete", url, params, headers)
104
+ # @return [Array] First item: parsed data; second item: raw body
105
+ def remove_distribution(params = {}, headers = {})
106
+ perform_call(__method__, params, headers)
117
107
  end
118
108
 
119
109
  # @param [Hash] params a hash of params to be passed to the service
@@ -121,10 +111,9 @@ module KatelloApi
121
111
  # @option params [String] template_id template numeric identifier
122
112
  #
123
113
  # @param [Hash] headers additional http headers
124
- def add_repo(params = { }, headers = { })
125
- check_params params, :allowed => true, :method => __method__
126
- url, params = fill_params_in_url "/api/templates/:template_id/repositories", params
127
- call(:"post", url, params, headers)
114
+ # @return [Array] First item: parsed data; second item: raw body
115
+ def add_repo(params = {}, headers = {})
116
+ perform_call(__method__, params, headers)
128
117
  end
129
118
 
130
119
  # @param [Hash] params a hash of params to be passed to the service
@@ -132,10 +121,9 @@ module KatelloApi
132
121
  # @option params [String] template_id template numeric identifier
133
122
  #
134
123
  # @param [Hash] headers additional http headers
135
- def remove_repo(params = { }, headers = { })
136
- check_params params, :allowed => true, :method => __method__
137
- url, params = fill_params_in_url "/api/templates/:template_id/repositories/:id", params
138
- call(:"delete", url, params, headers)
124
+ # @return [Array] First item: parsed data; second item: raw body
125
+ def remove_repo(params = {}, headers = {})
126
+ perform_call(__method__, params, headers)
139
127
  end
140
128
 
141
129
  end
@@ -6,13 +6,13 @@ module KatelloApi
6
6
  end
7
7
 
8
8
  # @param [Hash] params a hash of params to be passed to the service
9
+ # @option params [Object] organization_id Part of +/api/organizations/:organization_id/uebercert+ path
9
10
  # @option params [String] regenerate when set to ‘true’ certificate will be re-issued
10
11
  #
11
12
  # @param [Hash] headers additional http headers
12
- def show(params = { }, headers = { })
13
- check_params params, :allowed => true, :method => __method__
14
- url, params = fill_params_in_url "/api/organizations/:organization_id/uebercert", params
15
- call(:"get", url, params, headers)
13
+ # @return [Array] First item: parsed data; second item: raw body
14
+ def show(params = {}, headers = {})
15
+ perform_call(__method__, params, headers)
16
16
  end
17
17
 
18
18
  end
@@ -11,101 +11,98 @@ module KatelloApi
11
11
  # @option params [String] username filter by username
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/users", 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
20
+ # @option params [Object] id Part of +/api/users/:id+ path
21
21
  #
22
22
  # @param [Hash] headers additional http headers
23
- def show(params = { }, headers = { })
24
- check_params params, :allowed => false, :method => __method__
25
- url, params = fill_params_in_url "/api/users/:id", params
26
- 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)
27
26
  end
28
27
 
29
28
  # @param [Hash] params a hash of params to be passed to the service
30
- # @option params [Numeric, nil] default_environment_id
31
- # @option params [String, nil] disabled
32
- # @option params [String] email
33
- # @option params [String] password
34
- # @option params [String] username
29
+ # @option params [Numeric, nil] default_environment_id
30
+ # @option params [String, nil] disabled
31
+ # @option params [String] email
32
+ # @option params [String] password
33
+ # @option params [String] username
35
34
  #
36
35
  # @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/users", params
40
- call(:"post", url, params, headers)
36
+ # @return [Array] First item: parsed data; second item: raw body
37
+ def create(params = {}, headers = {})
38
+ perform_call(__method__, params, headers)
41
39
  end
42
40
 
43
41
  # @param [Hash] params a hash of params to be passed to the service
44
- # @option params [Numeric, nil] default_environment_id
45
- # @option params [String, nil] disabled
46
- # @option params [String] email
47
- # @option params [String] password
42
+ # @option params [Object] id Part of +/api/users/:id+ path
43
+ # @option params [Numeric, nil] default_environment_id
44
+ # @option params [String, nil] disabled
45
+ # @option params [String] email
46
+ # @option params [String] password
48
47
  #
49
48
  # @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/users/:id", params
53
- call(:"put", url, params, headers)
49
+ # @return [Array] First item: parsed data; second item: raw body
50
+ def update(params = {}, headers = {})
51
+ perform_call(__method__, params, headers)
54
52
  end
55
53
 
56
54
  # @param [Hash] params a hash of params to be passed to the service
55
+ # @option params [Object] id Part of +/api/users/:id+ path
57
56
  #
58
57
  # @param [Hash] headers additional http headers
59
- def destroy(params = { }, headers = { })
60
- check_params params, :allowed => false, :method => __method__
61
- url, params = fill_params_in_url "/api/users/:id", params
62
- call(:"delete", url, params, headers)
58
+ # @return [Array] First item: parsed data; second item: raw body
59
+ def destroy(params = {}, headers = {})
60
+ perform_call(__method__, params, headers)
63
61
  end
64
62
 
65
63
  # @param [Hash] params a hash of params to be passed to the service
64
+ # @option params [Object] user_id Part of +/api/users/:user_id/roles+ path
66
65
  #
67
66
  # @param [Hash] headers additional http headers
68
- def list_roles(params = { }, headers = { })
69
- check_params params, :allowed => false, :method => __method__
70
- url, params = fill_params_in_url "/api/users/:user_id/roles", params
71
- call(:"get", url, params, headers)
67
+ # @return [Array] First item: parsed data; second item: raw body
68
+ def list_roles(params = {}, headers = {})
69
+ perform_call(__method__, params, headers)
72
70
  end
73
71
 
74
72
  # @param [Hash] params a hash of params to be passed to the service
75
73
  #
76
74
  # @param [Hash] headers additional http headers
77
- def sync_ldap_roles(params = { }, headers = { })
78
- check_params params, :allowed => false, :method => __method__
79
- url, params = fill_params_in_url "/api/users/sync_ldap_roles", params
80
- call(:"get", url, params, headers)
75
+ # @return [Array] First item: parsed data; second item: raw body
76
+ def sync_ldap_roles(params = {}, headers = {})
77
+ perform_call(__method__, params, headers)
81
78
  end
82
79
 
83
80
  # @param [Hash] params a hash of params to be passed to the service
84
- # @option params [Numeric] role_id
81
+ # @option params [Numeric] role_id
82
+ # @option params [Object] user_id Part of +/api/users/:user_id/roles+ path
85
83
  #
86
84
  # @param [Hash] headers additional http headers
87
- def add_role(params = { }, headers = { })
88
- check_params params, :allowed => true, :method => __method__
89
- url, params = fill_params_in_url "/api/users/:user_id/roles", params
90
- call(:"post", url, params, headers)
85
+ # @return [Array] First item: parsed data; second item: raw body
86
+ def add_role(params = {}, headers = {})
87
+ perform_call(__method__, params, headers)
91
88
  end
92
89
 
93
90
  # @param [Hash] params a hash of params to be passed to the service
91
+ # @option params [Object] id Part of +/api/users/:user_id/roles/:id+ path
92
+ # @option params [Object] user_id Part of +/api/users/:user_id/roles/:id+ path
94
93
  #
95
94
  # @param [Hash] headers additional http headers
96
- def remove_role(params = { }, headers = { })
97
- check_params params, :allowed => false, :method => __method__
98
- url, params = fill_params_in_url "/api/users/:user_id/roles/:id", params
99
- call(:"delete", url, params, headers)
95
+ # @return [Array] First item: parsed data; second item: raw body
96
+ def remove_role(params = {}, headers = {})
97
+ perform_call(__method__, params, headers)
100
98
  end
101
99
 
102
100
  # @param [Hash] params a hash of params to be passed to the service
103
101
  #
104
102
  # @param [Hash] headers additional http headers
105
- def report(params = { }, headers = { })
106
- check_params params, :allowed => false, :method => __method__
107
- url, params = fill_params_in_url "/api/users/report", params
108
- call(:"get", url, params, headers)
103
+ # @return [Array] First item: parsed data; second item: raw body
104
+ def report(params = {}, headers = {})
105
+ perform_call(__method__, params, headers)
109
106
  end
110
107
 
111
108
  end
@@ -1,3 +1,3 @@
1
1
  module KatelloApi
2
- VERSION = "0.0.1" unless defined? KatelloApi::VERSION
2
+ VERSION = "0.0.2" unless defined? KatelloApi::VERSION
3
3
  end
data/lib/katello_api.rb CHANGED
@@ -2,19 +2,6 @@ require 'json'
2
2
  require 'yaml'
3
3
 
4
4
  module KatelloApi
5
- def self.client_config
6
- @client_config ||= YAML.load_file("#{root}/katello_api/config.yml")
7
- end
8
-
9
- def self.root
10
- @root ||= File.expand_path(File.dirname(__FILE__))
11
- end
12
-
13
- def self.doc
14
- @doc ||= File.open("#{root}/katello_api/documentation.json", 'r') do |f|
15
- JSON.load(f.read)['docs']
16
- end
17
- end
18
5
  end
19
6
 
20
7
  require 'katello_api/base'